edit(3U)
π edit(3U) β the editing commands π
okay so bestie, welcome to edit(3U) from the InterViews Reference Manual β¨ this is the Unidraw page about the little command squad that handles all your component editing βοΈπ slay, let's get into it π«Ά
πΈ NAME πΈ
the whole girl group, one page π :
ConnectCmdCopyCmdCutCmdDeleteCmdDupCmdMobilityCmdPasteCmdRedoCmdReplaceCmdSlctAllCmdUndoCmd
β¦and collectively they're known as the editing commands π
β¨ SYNOPSIS β¨
#include <Unidraw/Commands/edit.h>
that's it, that's the whole vibe, go off π
π¦ DESCRIPTION π¦
so the Unidraw library ships a bunch of commands that give you all the common component editing functionality you'd expect. here's the tea on each one β:
ConnectCmdis a non-interpretive command that connects two connectors πCopyCmdcopies the selected components onto its clipboard β but only if it defines one β otherwise it goes onto the global clipboard πCutCmd,DeleteCmd,DupCmdandPasteCmdare purely interpretive commands, which means they are always interpreted by their editor's component π§MobilityCmdgives the selected components the opportunity to set their mobility based on the value it provides πΆβοΈUndoCmdandRedoCmdare non-interpretive commands that simply undo and redo the last command that affected their editor's component β©οΈβͺοΈReplaceCmdreplaces the selected components with the component it stores π- and finally
SlctAllCmdis a non-interpretive command that selects all the components displayed in its editor β¨ everything, all at once, iconic
π CONNECTCMD PUBLIC OPERATIONS π
ConnectCmd(
ControlInfo*,
Connector* source = nil, Connector* target = nil
)
ConnectCmd(Editor* = nil, Connector* = nil, Connector* = nil)
the ConnectCmd constructor optionally takes two connectors as parameters β the source and the target. when it gets executed, it will call Connect on source with target as its argument. it will also set the source's mobility to floating π
void GetConnectors(Connector*& source, Connector*& target)β hands you back the connectors that were supplied in the constructor π«΄
π COPYCMD PUBLIC OPERATIONS π
CopyCmd(ControlInfo*, Clipboard* = nil)
CopyCmd(Editor* = nil, Clipboard* = nil)
create a CopyCmd instance, optionally specifying a clipboard to store the copied components in πΎ
virtual void Execute()β does literally nothing if no components are selected π΄ otherwise,Executeplaces a copy of the selected components onto theCopyCmd's clipboard if it's non-nil, or else onto the global clipboard (which it gets from the catalog) πvirtual boolean Reversible()βCopyCmdis not reversible, periodt π βοΈ
βοΈ CUTCMD PUBLIC OPERATIONS βοΈ
CutCmd(ControlInfo*, Clipboard* = nil)
CutCmd(Editor* = nil, Clipboard* = nil)
create a CutCmd instance, optionally specifying a clipboard to store the components that were cut in ποΈ
virtual void Execute()virtual void Unexecute()
CutCmd redefines these operations so the editor's component can interpret it π§ Execute will set the value of the _executed protected member variable to true as a side effect, and similarly, Unexecute will reset the value to false as a side effect π
ποΈ DELETECMD PUBLIC OPERATIONS ποΈ
DeleteCmd(ControlInfo*, Clipboard* = nil)
DeleteCmd(Editor* = nil, Clipboard* = nil)
create a DeleteCmd instance, optionally specifying a clipboard to store the components that were deleted in ποΈ
virtual void Execute()virtual void Unexecute()
DeleteCmd redefines these operations so the editor's component can interpret it π§ Execute will set the value of the _executed protected member variable to true as a side effect, and similarly, Unexecute will reset the value to false as a side effect π
π― DUPCMD PUBLIC OPERATIONS π―
DupCmd(ControlInfo*, Clipboard* = nil)
DupCmd(Editor* = nil, Clipboard* = nil)
create a DupCmd instance, optionally specifying a clipboard to store the components that were duplicated in ποΈ
virtual void Execute()virtual void Unexecute()
DupCmd redefines these operations so the editor's component can interpret it π§ Execute will set the value of the _executed protected member variable to true as a side effect, and similarly, Unexecute will reset the value to false as a side effect π
πΆβοΈ MOBILITYCMD PUBLIC OPERATIONS πΆβοΈ
MobilityCmd(ControlInfo*, Mobility = Fixed)
MobilityCmd(Editor* = nil, Mobility = Fixed)
create a MobilityCmd instance, optionally specifying the mobility that interpreting components may use πΌ
Mobility GetMobility()β returns the mobility that was specified in the constructor π€
π₯ PASTECMD PUBLIC OPERATIONS π₯
PasteCmd(ControlInfo*, Clipboard* = nil)
PasteCmd(Editor* = nil, Clipboard* = nil)
create a PasteCmd instance, optionally specifying a clipboard to store the components that will be pasted in ποΈ
virtual void Execute()virtual void Unexecute()
PasteCmd redefines these operations so the editor's component can interpret it π§ Execute will set the value of the _executed protected member variable to true as a side effect, and similarly, Unexecute will reset the value to false as a side effect π
virtual boolean Reversible()βPasteCmdis reversible if either its clipboard or the global clipboard is non-empty π
β©οΈ REDOCMD PUBLIC OPERATIONS β©οΈ
RedoCmd(ControlInfo*)
RedoCmd(Editor* = nil)
construct a new RedoCmd π οΈ
virtual boolean Reversible()βRedoCmdis not reversible π βοΈ
π REPLACECMD PUBLIC OPERATIONS π
ReplaceCmd(ControlInfo*, GraphicComp* replacement = nil)
ReplaceCmd(Editor* = nil, GraphicComp* replacement = nil)
create a new ReplaceCmd, optionally supplying the GraphicComp that will replace the ones that are selected π«³
GraphicComp* GetReplacement()β returns the replacementGraphicCompthat was supplied in the constructor π¦
β SLCTALLCMD PUBLIC OPERATIONS β
SlctAllCmd(ControlInfo*)
SlctAllCmd(Editor* = nil)
construct a new SlctAllCmd π οΈ
virtual boolean Reversible()βSlctAllCmdis not reversible π βοΈ
β©οΈ UNDOCMD PUBLIC OPERATIONS β©οΈ
UndoCmd(ControlInfo*)
UndoCmd(Editor* = nil)
construct a new UndoCmd π οΈ
virtual boolean Reversible()βUndoCmdis not reversible π βοΈ
π SEE ALSO π
the besties you should also go read, fr fr π:
Catalog(3U)Clipboard(3U)Command(3U)Connector(3U)GraphicComp(3U)globals(3U)
okay that's the whole page bestie, you ate that π½οΈβ¨ this one's from Unidraw, dated 24 January 1991 β yeah she's vintage, she's classic, she's older than the internet you're reading this on ππ go forth and edit, mwah π π
π¦ 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