uctrls(3U)
π uctrls β the InterViews Reference Manual glow-up β¨
okay bestie, so this is uctrls(3U) from the InterViews Reference Manual, and it's literally the home of all the predefined UControl and UControlInteractor subclasses for the controls you keep seeing everywhere. come sit, we're doing this π«Ά
π NAME π
CommandControl, PanelControl, HPanelControl, VPanelControl, CommandInteractor, PanelInteractor β the predefined UControl and UControlInteractor subclasses for common controls. like, the whole friend group, no cap.
β¨ SYNOPSIS β¨
#include <Unidraw/uctrls.h>
that's it. one include. iconic behavior π
πΈ DESCRIPTION πΈ
so CommandControl is a UControl subclass that executes a Command. and where do you see them? mostly in menus, bestie, that's their whole moment. CommandInteractor is a UControlInteractor subclass that CommandControls create to define their appearance. it's giving "I made my own outfit".
then we have PanelControl, a subclass of UControl that gives you a radiobutton-like interface for selecting from a set of mutually-exclusive choices. you hand it an interactor when you create it, and that interactor defines its appearance. PanelControls are often used to create ``palettes'' of interactors that engage the current Tool instance. yes, mutual exclusivity, we love a "you can only pick one" rule π₯
PanelInteractor is a UControlInteractor subclass that defines an appearance that is often appropriate for PanelControls. and HPanelControl and VPanelControl are subclasses of PanelControl that use PanelInteractor instances by default. convenient? extremely. π
π COMMANDCONTROL PUBLIC OPERATIONS π
CommandControl(ControlInfo*)CommandControl(const char*, ControlInfo*)
Create a CommandControl, optionally supplying an instance name. The constructors automatically create and insert a ControlInteractor to define the CommandControl's appearance. no extra work from you, queen, it just handles it β¨
virtual void Do()
okay so here's the tea π β if the ControlInfo's owner is a reversible command, then Do will create a copy of the command, execute it, and log it (if it remains reversible following execution). if the owner is an irreversible command, then Do will execute it without copying or logging it. two very different vibes, so know which one you're dealing with fr fr.
π¦ COMMANDINTERACTOR PUBLIC OPERATIONS π¦
CommandInteractor(ControlInfo*)
Create a CommandInteractor with the given ControlInfo object. The CommandInteractor displays the ControlInfo's label and keylabel side-by-side as would befit a menu entry. side-by-side, like besties walking into the function π
π PANELCONTROL PUBLIC OPERATIONS π
PanelControl(Interactor*, ControlInfo*, ControlState* = nil)PanelControl(const char*, Interactor*, ControlInfo*,ControlState* = nil)
Create a PanelControl, supplying an interactor that defines its appearance, a ControlInfo object, and optionally an instance name and a ControlState, which all PanelControls in a palette should share to ensure mutual exclusion. share the state, keep the exclusivity, that's the whole point bestie π
virtual void Do()
Do simply calls Down. so when the KeyMap executes the keyboard equivalent specified in the ControlInfo, it has the same effect as clicking on the PanelControl instance. keyboard click = mouse click, same energy, no difference πΈ
π§ PANELCONTROL SUBCLASS PUBLIC OPERATIONS π§
HPanelControl(ControlInfo*, ControlState* = nil)HPanelControl(const char*, ControlInfo*, ControlState* = nil)VPanelControl(ControlInfo*, ControlState* = nil)VPanelControl(const char*, ControlInfo*, ControlState* = nil)
HPanelControls and VPanelControls simply create an instance of PanelInteractor and pass it to the PanelControl constructor. and listen β HPanelControls should be used in row-oriented palettes, and VPanelControls should be used in column-oriented palettes. h for horizontal, v for vertical, pick the right one or your layout is gonna be a mess π
β PANELINTERACTOR PUBLIC OPERATIONS β
PanelInteractor(ControlInfo*, Orientation)
Create a PanelInteractor with the given orientation and ControlInfo object. The PanelInteractor will draw the ControlInfo's label in the center of its canvas and the keylabel in the lower right. Horizontal orientation is appropriate for row-oriented instances, while Vertical orientation is appropriate for column-oriented instances. center label, corner keylabel, that's the layout, periodt π
π SEE ALSO π
Command(3U), ControlInfo(3U), KeyMap(3U), Tool(3U), UControl(3U), globals(3U)
go read those too, iykyk π
and that's the whole page, bestie!! this was brought to you by Unidraw, dated 20 November 1990 β yes she's vintage, yes she still slays. 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