struct(3U)
π struct(3U) π
okay bestie, welcome to the InterViews Reference Manual β¨ this one lives in section 3U and it's literally all about the little command girlies that restructure your components. no cap.
πΈ NAME πΈ
BackCmd</purl>, FrontCmd, GroupCmd, UngroupCmd β commands for modifying components structurally π
β¨ SYNOPSIS β¨
#include <Unidraw/Commands/struct.h>
π¦ DESCRIPTION π¦
So. BackCmd, FrontCmd, GroupCmd, and UngroupCmd are purely interpretive commands β they're not out here doing the work themselves, they're the main character energy that lets the structure of their editor's component get altered. π
The way that all four of them redefine their Execute and Unexecute operations? iconic. It's so the editor's component can interpret them however it wants. fr fr, they just hand over the vibe and let the component do its thing. π«Ά
π BACKCMD PUBLIC OPERATIONS π
BackCmd(ControlInfo*)BackCmd(Editor* = nil)
Construct a new BackCmd. that's it, that's the whole thing, slay. β¨
π FRONTCMD PUBLIC OPERATIONS π
FrontCmd(ControlInfo*)FrontCmd(Editor* = nil)
Construct a new FrontCmd. periodt. π
π GROUPCMD PUBLIC OPERATIONS π
GroupCmd(ControlInfo*, GraphicComp* = nil)GroupCmd(Editor* = nil, GraphicComp* = nil)
Create a new GroupCmd, and if you want, you can optionally specify the component into which components will be grouped. π§
virtual void Execute()virtual void Unexecute()
Okay so Execute will set the value of the _executed protected member variable to true as a side effect β but only if anything was actually grouped. No grouping, no true, bestie. π
Similarly, Unexecute will reset the value to false as a side effect, once the operation was undone. π«
GraphicComp* GetGroup()void SetGroup(GraphicComp*)
Get or set the component into which components will be grouped. π
β οΈ heads up: SetGroup will not delete the old value. it just ghosts it. π
π UNGROUPCMD PUBLIC OPERATIONS π
UngroupCmd(ControlInfo*)UngroupCmd(Editor* = nil)
Construct a new UngroupCmd. she's new here, be nice. π
virtual void Execute()virtual void Unexecute()
Execute will set the value of the _executed protected member variable to true as a side effect if anything was ungrouped. π₯
Similarly, Unexecute will reset the value to false as a side effect once the operation was undone. πΈ
Clipboard* GetKids()void SetKids(Clipboard*)
Explicitly set and get a clipboard containing the child components that were ungrouped. Where does it live? In the _kids protected member. πΌ
Now here's the tea: UngroupCmd does not initialize this member. It merely provides the storage as a convenience to components that interpret the command and need a place to store the ungrouped children β because they need somewhere to keep them to support reverse execution. lowkey a little lending library. π
However (and this part matters), UngroupCmd deletes the clipboard (if it exists) in ~UngroupCmd. so if you put something there, the destructor is gonna take it out. π
β οΈ also:SetKidswill not delete the old value. same energy asSetGroup. no cleanup, no cap. π
π₯ SEE ALSO π₯
Command(3U)GraphicComp(3U)
and that's the whole page bestie!! π¦ this one came to you from Unidraw, dated 24 January 1991 β yes she's vintage, yes she still ate, we love a classic. πβ¨π
π¦ 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