UControl(3U)
π UControl(3U) β the InterViews Reference Manual bestie edition
okay so welcome to the UControl page, from the InterViews Reference Manual β¨ it's giving "base classes for menu and button interfaces that work with ControlInfo objects" and honestly? iconic. π
πΈ NAME πΈ
UControl, UControlInteractor β the base classes for menu and button interfaces that vibe with ControlInfo objects π«Ά
β¨ SYNOPSIS β¨
#include <Unidraw/uctrl.h>
π¦ DESCRIPTION π¦
so UControl is an abstract class, meaning you literally cannot just make one and call it a day, bestie π it takes InterViews' Control base class and levels it up to deal with Unidraw's ControlInfo objects, which are the little guys that define a keyboard equivalent for the control β¨οΈβ¨
UControlInteractor is also an abstract base class, and it's for interactors that base their whole appearance on the info inside a ControlInfo object. the way that UControl subclasses can use UControlInteractor subclasses to define their appearance? obsessed. π
and listen β if your Unidraw-based app doesn't need Unidraw's keyboard equivalent mechanism, you genuinely don't have to use UControls and UControlInteractors to help define your look and feel. no pressure, no cap π
π UCONTROL PUBLIC OPERATIONS π
virtual void SetControlInfo(ControlInfo*)ControlInfo* GetControlInfo()
these two are your assign-and-retrieve duo for the UControl's ControlInfo object π
set it, get it, slay.
π UCONTROL PROTECTED OPERATIONS π
UControl(ControlInfo*)UControl(const char*, ControlInfo*)
UControl hands you these protected constructors so subclasses can initialize the ControlInfo object, and optionally also specify their instance name π«Ά (that's what the const char* is for, iykyk)
π UCONTROLINTERACTOR PUBLIC OPERATIONS π
virtual void SetControlInfo(ControlInfo*)ControlInfo* GetControlInfo()
same energy as before: assign and retrieve the UControlInteractor's ControlInfo object β
virtual void Highlight(boolean)
so here's the tea β the UControlInteractor's appearance is defined by a Graphic object, and it builds that object from the info sitting inside its ControlInfo object. by default, UControlInteractor highlights itself by drawing this graphic with its foreground and background colors reversed π₯ lowkey a whole aesthetic.
π UCONTROLINTERACTOR PROTECTED OPERATIONS π
UControlInteractor(ControlInfo*)UControlInteractor()
UControlInteractor defines two protected constructors, and they're a matched set fr fr:
- the one that takes the
ControlInfoobject as an argument. this constructor also initializes theUControlInteractor's_labelprotected member by callingInitLabel(described below π) with thatControlInfoobject. - the parameterless constructor, which initializes
_labeltonilπ
and both of them initialize the UControlInteractor's _picture protected member so it points to an instance of a Picture object β and that is what defines the UControlInteractor's appearance β¨
virtual void Invert()
Invert reverses _picture's colors without drawing it π¨ just flips the vibe, no visuals required.
Graphic* InitLabel(ControlInfo*)
this one creates a graphic from the information stored in a ControlInfo object that defines the UControlInteractor's appearance πΌοΈ specifically: this operation creates a GraphicView of the ControlInfo's GraphicComp, and returns a copy of the view's graphic. copy, not the original β important, bestie π
π SEE ALSO π
Control(3I)ControlInfo(3U)Graphic(3U)GraphicComp(3U)GraphicView(3U)KeyMap(3U)
go read those too, they're all part of the friend group π«Ά
π quick vibe check:UControlandUControlInteractorare both abstract, so don't come for me trying to instantiate them directly. subclass them like a main character. π
k that's the whole page bestie, hope it ate π β¨ this was Unidraw, dated 20 November 1990 β yes she's an elder but she's still iconic, periodt ππ
π¦ 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