statevars(3U)

✨ NAME ✨

okay bestie, meet the whole squad: BrushVar, ColorVar, CompNameVar, FontVar, GravityVar, MagnifVar, ModifStatusVar, NameVar, and PatternVar β€” they're all state variable subject subclasses and they are serving. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <Unidraw/statevars.h>

πŸ¦‹ DESCRIPTION πŸ¦‹

Unidraw predefines several state variable subject subclasses, and ngl, the lineup is stacked:

  • BrushVar, ColorVar, FontVar, and PatternVar store the graphics state information their names suggest. yes, exactly what it says on the tin, no cap. πŸ–ŒοΈ
  • GravityVar records whether gravity is in effect.
  • MagnifVar records the current viewer magnification.
  • ModifStatusVar records whether state-modifying operations have been applied to a component being edited.
  • NameVar stores a string of interest.
  • CompNameVar is a NameVar that stores a component and keeps track of its catalog name. she does both. multitasking queen. πŸ‘‘

These variables represent state that is basic to graphical components, and also state that is often globally accessible in graphics applications. like, the fundamental vibes, fr fr. ✨


πŸ’– PUBLIC OPERATIONS πŸ’–

🌈 BrushVar, ColorVar, FontVar, PatternVar

BrushVar(PSBrush* = nil)
virtual PSBrush* BrushVar::GetBrush()
virtual void BrushVar::SetBrush(PSBrush*)

ColorVar(PSColor* = nil)
virtual PSColor* ColorVar::GetColor()
virtual void ColorVar::SetColor(PSColor*)

FontVar(PSFont* = nil)
virtual PSFont* FontVar::GetFont()
virtual void FontVar::SetFont(PSFont*)

PatternVar(PSPattern* = nil)
virtual PSPattern* PatternVar::GetPattern()
virtual void PatternVar::SetPattern(PSPattern*)

Each graphics state state variable subclass defines a constructor that takes an initial value for the state it represents, and adds operations for assigning and retrieving that state. constructor in, getter and setter out. it's giving structure. πŸŽ€

🫢 GravityVar

GravityVar(boolean = false)
virtual boolean GravityVar::IsActive();
virtual void GravityVar::Activate(boolean)

The GravityVar constructor takes an initial value that specifies whether gravity is on or off. IsActive returns the current value, and Activate changes it to the one supplied. flip it, bestie. 🌸

πŸ”₯ MagnifVar

MagnifVar(float = 1)
virtual float MagnifVar::GetMagnif()
virtual void MagnifVar::SetMagnif(float)

The MagnifVar constructor takes an initial value for the magnification factor, and SetMagnify and GetMagnif assign and return the current value. zoom zoom, literally. πŸ’«

πŸ’€ ModifStatusVar

ModifStatusVar(Component* = nil, boolean = false)
virtual boolean ModifStatusVar::GetModifStatus()
virtual void ModifStatusVar::SetModifStatus(boolean)
virtual Component* ModifStatusVar::GetComponent()
virtual void ModifStatusVar::SetComponent(Component*)

The ModifStatusVar constructor takes a component instance and an initial value as arguments. The ModifStatusVar is responsible for indicating whether the given component is modified. GetModifStatus, SetModifStatus, GetComponent, and SetComponent get and set these arguments. The modification status will be set automatically (in editors that maintain a ModifStatusVar instance) when an reversible operation is performed on the component. she keeps receipts, and she updates them for you. πŸ™ˆ

🌟 NameVar

NameVar(const char* = nil)
virtual const char* NameVar::GetName()
virtual void NameVar::SetName(const char*)

The NameVar constructor takes a string as an optional argument, while GetName and SetName retrieve and assign the string. simple, clean, iconic. πŸ“

🧚 CompNameVar

CompNameVar(Component* = nil)
virtual Component* CompNameVar::GetComponent()
virtual void CompNameVar::SetComponent(Component*)
virtual void CompNameVar::UpdateName()
virtual const char* PartOf()

The CompNameVar constructor takes a component as an optional argument. CompNameVar inherits the GetName operation from NameVar; calling GetName returns the name associated with the component that the CompNameVar stores. The GetComponent and SetComponent calls get and set the component. UpdateName updates the string that GetName returns to reflect the component's catalog name. SetComponent calls this operation automatically when it changes the CompNameVar's component. PartOf returns the name of the root component in the CompNameVar component's hierarchy. she knows her roots, literally. πŸ’œ


🌈 SEE ALSO 🌈

  • Catalog(3U)
  • Component(3U)
  • Editor(3U)
  • StateVar(3U)
  • pspaint(3U)

okay that's the whole page, bestie, go forth and state your variables πŸ’– this lil manual came to you from Unidraw, dated 6 August 1990, and it lives at statevars(3U). slay, periodt. βœ¨πŸŽ€πŸ¦‹