stateviews(3U)

✨ stateviews(3U) β€” the Unidraw state variable view subclasses ✨

okay bestie, buckle up πŸ’– this is a page from the InterViews Reference Manual, and it's all about the lil view classes that watch your state variables for you. no cap, it's giving "who's watching the watchers" but make it graphics.


🌸 NAME 🌸

BrushVarView, CompNameVarView, FileNameVarView, FontVarView, GravityVarView, MagnifVarView, ModifStatusVarView, NameVarView, PatternVarView β€” a whole squad of various state variable view subclasses πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

#include <Unidraw/stateviews.h>

πŸ’… DESCRIPTION πŸ’…

Unidraw predefines several state variable view subclasses for the state variable subjects it predefines, as described below. it's basically a matching set, iykyk 🫢


πŸ¦‹ PUBLIC OPERATIONS πŸ¦‹

  • BrushVarView(BrushVar*, ColorVar* = nil)
  • FontVarView(FontVar*, Alignment = Center)
  • PatternVarView(PatternVar*, ColorVar* = nil)

these three are views of graphics state state variable subjects ✨

BrushVarView displays a short line drawn in the subject's brush and in a color specified by the given ColorVar (black if no ColorVar is supplied). the way that it shows None when the BrushVar's brush is invisible? iconic.

similarly, PatternVarView displays a filled rectangle drawn in the subject's pattern and in a color specified by the given ColorVar (black if no ColorVar is supplied). and yes, PatternVarView also displays None if the PatternVar's pattern is invisible 🎨

FontVarView displays the name of its subject's font, aligned as specified in its canvas πŸ’–

  • GravityVarView(GravityVar*, Alignment = Center) β€” displays either gravity on or a blank, depending on whether the subject indicates that gravity is on or not. literally binary, fr fr 🌈
  • MagnifVarView(MagnifVar*, Alignment = Center) β€” displays mag xx, where x is the current modification factor recorded in the subject. obsessed with a good zoom readout πŸ”
  • ModifStateVarView(ModifStateVar*, Alignment = Center) β€” displays either an asterisk or a blank, depending on whether the subject records that its component is modified. tiny asterisk, big main character energy ⭐
  • NameVarView( NameVar*, Alignment = Center, const char* sample = nil )
  • FileNameVarView( NameVar*, Alignment = Center, boolean relative = true, const char* sample = nil )
  • CompNameVarView( CompNameVarView*, Alignment = Center, boolean relative = true, const char* sample = nil )

these ones display the subject's string aligned as specified with respect to the canvas πŸ’œ each constructor takes an optional sample string that defines the view's natural size β€” so cute, it's the view's lil measuring tape πŸ“

FileNameVarView provides a specialized view of a NameVar for displaying file names. it adds a relative argument for displaying the file name either as a relative or full path πŸ—‚οΈ

CompNameVarView provides similar functionality for CompNameVar subjects, except it precedes its subject's component's name with [part of] for components that have a named parent but that are not named themselves. honestly? relatable. we've all been [part of] something 😭


πŸ‘‘ SEE ALSO πŸ‘‘

statevars(3U), StateVarView(3U)


πŸ’€ quick vibe check: the NAME section says ModifStatusVarView and the operations list says ModifStateVarView. that's just how the page spells it, bestie β€” I'm not touching it, no cap. same deal with CompNameVarView(CompNameVarView*, ...) β€” copied character for character, that's the assignment πŸ’…

and that's the whole page, periodt 🫢 this came to you from Unidraw, dated 6 August 1990, and the page itself answers to the name stateviews(3U). slay 🌟