MacroCmd(3U)
π MacroCmd(3U) π
okay bestie, welcome to the InterViews Reference Manual entry for MacroCmd β and yes, it's giving "command that composes other commands" energy, which is honestly such a slay concept. like, a command made of commands?? main character behavior fr fr. π«Ά
β¨ NAME β¨
MacroCmd β a command that composes other commands. it's the girlboss of composition, no cap. π
πΈ SYNOPSIS πΈ
#include <Unidraw/Commands/macro.h>
that's it, that's the whole vibe check. go include it, periodt. π
π¦ DESCRIPTION π¦
so here's the tea: MacroCmd composes other commands in a linear fashion. think of it like a little command conga line. π
executing a MacroCmd is equivalent to executing its children in preorder. literally just run them in order, bestie, it's not that deep. β¨
π PUBLIC OPERATIONS π
MacroCmd(ControlInfo*)MacroCmd(Editor* = nil, Command* first = nil, Command* second = nil, Command* third = nil, Command* fourth = nil)β construct aMacroCmdinstance, and if you're feeling generous you can optionally hand it up to four of its child commands. four!! a little squad. πvirtual void Execute()virtual void Unexecute()virtual boolean Reversible()β okay soExecutesimply executes each child, from first to last.UnexecutecallsUnexecuteon each child, from last to first (yes, it walks backwards, iconic). and theMacroCmdis reversible if any of its children are β like, one reversible kid is enough to make the whole family reversible, we love that for them. ππvirtual void SetEditor(Editor*)βSetEditorcallsSetEditoron each child with the given argument. passing the vibe along, one child at a time. πCommand* GetCommand(Iterator)void SetCommand(Command*, Iterator&)βGetCommandreturns the childCommandto which an iterator points.SetCommandinitializes the iterator to point to a particular childCommand; and heads up β it initializes the iterator to point to a nil instance if the givenCommandis not a child. so like, if it's not in the group chat, the iterator just points at nobody. πvoid Append(Command*, Command* = nil, Command* = nil, Command* = nil)void Prepend(Command*, Command* = nil, Command* = nil, Command* = nil)void InsertAfter(Iterator, Command*)void InsertBefore(Iterator, Command*)void Remove(Command*)void Remove(Iterator&)β these are the operations that modify theMacroCmd's list of children. let's break it down, bestie:AppendandPrependadd up to fourCommandsto the end and the beginning of the list, respectively. back of the line or front of the line, your call. πInsertAfterandInsertBeforeinsert aCommandafter and before theCommandpointed to by the iterator, respectively. sneaking in right next to your fave. π- the
Removeoperations remove a child from the list without deleting it β important!! it's not gone gone, it's just uninvited from the list. you can remove a child by referring to it explicitly or by specifying an iterator. and if an iterator is supplied, theRemoveoperation should advance it to point to the following child as a side effect. noted. π
π§ PROTECTED OPERATIONS π§
Command* Cmd(UList*)UList* Elem(Iterator)β convenience functions for extracting aCommandfrom aUListelement and aUListfrom an iterator, respectively. lil helper girlies. they're just here to make your life easier. π β¨
β SEE ALSO β
Command(3U)Iterator(3U)UList(3U)
go read those too, iykyk. ππ
and that's the whole page!! no skips, no summaries, every flag and function accounted for. you're welcome bestie. π«Ά
okay bye, this was Unidraw, dated 24 January 1991 β yeah she's vintage but she still ate, and she's still serving MacroCmd(3U) realness. 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