wgt(3)

πŸ“¦
version 3.8.0 Β· 3 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

wgt β€” the standard widget module, and yes bestie it's literally called that πŸ’… (this is the wgt page from the library functions manual, section 3, in case you were wondering where you wandered into)


πŸŽ€ STANDARD WIDGET MODULE πŸŽ€

okay so the Standard Widget module is a whole set of comprehensive objects, and the entire point of them is that you use them as widgets for a particular applications. that's the vibe. it's giving "toolbox but make it cute".

🌸 The conditional class 🌸

the Conditional class is a widget class that hands you a mechanism for conditional expression evaluation. here's how it works: a conditional object, if it's active, gets valuated by evaluating the operator plus the associated left and right operands. and you can also define a conditional by name and info, which is so convenient of it 🫢

const cond (afnix:wgt:Conditional "test" "test example")

and then you define the actual conditional with the set method, which accepts one or two operands. one or two. she's flexible like that ✨

cond:set "==" "x" 2

πŸ‘‘ STANDARD WIDGET REFERENCE πŸ‘‘

πŸ’– Conditional πŸ’–

the Conditional class is a widget class that represents a selectable condition. a condition is defined by a string operator and one or two literal arguments. and if the condition is active, it can be valuated by an expressable interface. that's the whole deal, no cap.

Predicate

  • conditional-p

Inheritance

  • NameableSerial

Constructors

  • Conditional (none) β€” The Uri constructor creates an empty uri object. (not me reading this three times πŸ™ˆ that is genuinely, character for character, what it says. we report, we do not editorialize.)
  • Conditional (String) β€” The Conditional constructor creates a conditional object by name.
  • Conditional (String String) β€” The Conditional constructor creates a conditional object by name and information. two strings, double the lore πŸ’«

Methods

  • set-name -> none (String) β€” sets the conditional name.
  • set-info -> none (String) β€” sets the conditional information.
  • get-info -> String (none) β€” gets the conditional information back out.
  • set-active -> none (Boolean) β€” sets the conditional active flag. this is the on/off switch of the whole operation, main character energy fr.
  • get-active -> Boolean (none) β€” gets the conditional active flag.
  • set -> none (String Literal | String Literal Literal) β€” sets the conditional expression. first form: the operator is set with a unique lhs. second form: the operator is set with a lhs and a rhs. pick your fighter πŸ’…
  • get-operator -> String (none) β€” gets the conditional operator.
  • get-lhs -> Literal (none) β€” gets the conditional lhs.
  • get-rhs -> Literal (none) β€” gets the conditional rhs.

🌈 reminder bestie: set takes either String Literal or String Literal Literal. one operand or two, never zero, never three. the vibes are strict but fair.

okay that's the whole page!! this was the wgt(3) module from AFNIX Module β€” the AFNIX crew, dated right there in the footer β€” mwah, thanks for reading, slay, periodt πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from