catcmds(3U)
π catcmds β the catalog-oriented command squad (catcmds(3U))
okay bestie, welcome to catcmds(3U), straight out of the InterViews Reference Manual β¨ this is the page for the little command crew that lets your users open, view, and save components β plus print 'em and dip out of the app entirely. no cap, it's giving backstage-pass energy π
β¨ NAME β¨
NewCompCmd, PrintCmd, QuitCmd, RevertCmd, SaveCompCmd, SaveCompAsCmd, ViewCompCmd β catalog-oriented commands π¦
β¨ SYNOPSIS β¨
#include <Unidraw/Commands/catcmds.h>
β¨ DESCRIPTION β¨
so the Unidraw library comes preloaded with a whole set of non-interpretive commands π these are the ones that let a user pick components to open, view, and save, plus generate a PostScript external representation, plus quit the app. like, the full lifecycle, fr fr.
here's the lineup, one by one:
- NewCompCmd re-initializes its editor's component so the user can start editing fresh π« if the existing component is modified, it prompts the user to save it first. considerate!
- PrintCmd generates a PostScriptView of the editor's component and lets the user send it to a file or to a printer π¨οΈ
- QuitCmd quits the application, and yes it prompts the user to save modified components on the way out πͺ
- RevertCmd lets the user re-open the current component and discard changes since it was last saved π gone. poof.
- SaveCompAsCmd lets the user save a component under a particular name, while SaveCompCmd saves a component named previously πΎ
- ViewCompCmd lets the user specify another component to view in its editor π
πΈ NEWCOMPCMD PUBLIC OPERATIONS πΈ
NewCompCmd(ControlInfo*, Component* prototype = nil)
NewCompCmd(Editor* = nil, Component* = nil)
- Create a new
NewCompCmdinstance, optionally supplying a prototype component. When executed,NewCompCmdwill make its editor edit a copy of the prototype. The editor's original component will be deleted if no other editor refers to it. π«Ά
virtual boolean Reversible()
NewCompCmdis not reversible π
Component* GetPrototype()
- Return the prototype component specified in the constructor. π
πΈ PRINTCMD PUBLIC OPERATIONS πΈ
PrintCmd(ControlInfo*, PrintDialog* = nil)
PrintCmd(Editor* = nil, PrintDialog* = nil)
- Create a new
PrintCmdinstance, optionally supplying thePrintDialogto display when executed. π¨οΈβ¨
virtual boolean Reversible()
PrintCmdis not reversible π
πΈ PRINTCMD PROTECTED OPERATIONS πΈ
void print(const char* print_cmd, const char* file)
- Concatenates
print_cmdandfileand callssystem(3)on the result. π«£
πΈ QUITCMD PUBLIC OPERATIONS πΈ
QuitCmd(ControlInfo*)
QuitCmd(Editor* = nil)
- Create a new
QuitCmdinstance. bye bestie π
virtual boolean Reversible()
QuitCmdis not reversible π
πΈ REVERTCMD PUBLIC OPERATIONS πΈ
RevertCmd(ControlInfo*)
RevertCmd(Editor* = nil)
- Create a new
RevertCmdinstance. π
virtual boolean Reversible()
RevertCmdis not reversible π
πΈ SAVECOMPCMD PUBLIC OPERATIONS πΈ
SaveCompCmd(ControlInfo*)
SaveCompCmd(Editor* = nil)
- Create a new
SaveCompCmdinstance. πΎ
virtual boolean Reversible()
SaveCompCmdis not reversible π
πΈ SAVECOMPASCMD PUBLIC OPERATIONS πΈ
SaveCompAsCmd(ControlInfo*, FileChooser* = nil)
SaveCompAsCmd(Editor* = nil, FileChooser* = nil)
- Create a new
SaveCompAsCmdinstance, optionally supplying theFileChooserthat will prompt the user to name the component. π
virtual boolean Reversible()
SaveCompAsCmdis not reversible π
πΈ VIEWCOMPCMD PUBLIC OPERATIONS πΈ
ViewCompCmd(ControlInfo*, FileChooser* = nil)
ViewCompCmd(Editor* = nil, FileChooser* = nil)
- Create a new
ViewCompCmdinstance, optionally supplying theFileChooserthat will prompt the user to specify the component to view. After the new component is opened successfully, the editor's original component will be deleted if no other editor refers to it. ππ«
virtual boolean Reversible()
ViewCompCmdis not reversible π
π₯ SEE ALSO π₯
BasicDialog(3U), Command(3U), Component(3U), Editor(3U), PostScriptView(3U), lpr(1).
and that's the whole page, bestie π this one's from Unidraw, dated 23 January 1991 β yeah, vintage, but she still ate, no cap πβ¨ go forth and command π¦π
π¦ where this page comes from
- debian bookworm: ivtools-dev 2.0.11d.a1-1+b4
- debian trixie: ivtools-dev 2.0.11d.a1-3+b4
- ubuntu jammy: ivtools-dev 2.0.11d.a1-1build1
- ubuntu noble: ivtools-dev 2.0.11d.a1-3build1
- ubuntu questing: ivtools-dev 2.0.11d.a1-3build7
- ubuntu resolute: ivtools-dev 2.0.11d.a1-3build9
- ubuntu stonking: ivtools-dev 2.1.1+git.2025.07.26.a1-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms