'\" t .\" This documentation, which is part of the afnix writing .\" system distribution, is free and can be distributed as .\" long as this copyright notice is left intact. .\" .\" This documentation is distributed in the hope that it .\" will be useful, but without any warranty; without even .\" the implied warranty of merchantability and fitness .\" for a particular purpose. In no event, shall the .\" copyright holder be liable for any direct, incident .\" incidental or special damages arising in any way out .\" of the use of this documentation. .\" .\" Copyright (c) 1999-2022 Amaury Darsch .\" .TH wgt 3 AFNIX "AFNIX Module" .SH NAME wgt - standard widget module .SH STANDARD WIDGET MODULE The Standard Widget module is a set of comprehensive objects designed to be used as widgets for a particular applications. .PP .B The conditional class .br The Conditional class is a widget class that provides a mechanism for conditional expression evaluation. A conditional object, if active, is valuated by evaluating the operator and the associated left and right operands. A conditional can also be defined by name and info. .sp .nf const cond (afnix:wgt:Conditional "test" "test example") .fi .sp The conditional is defined with the set method which accepts one or two operands. .sp .nf cond:set "==" "x" 2 .fi .sp .SH STANDARD WIDGET REFERENCE .PP .B Conditional .br The Conditional class is a widget class which represents a selectable condition. A condition is defined by a string operator and one or two literal arguments. If the condition is active, it can be valuated by an expressable interface. .PP .I Predicate .br .sp .RS conditional-p .RE .PP .I Inheritance .br .sp .RS NameableSerial .RE .PP .I Constructors .br .sp .RS .B Conditional (none) .br The Uri constructor creates an empty uri object. .RE .sp .RS .B Conditional (String) .br The Conditional constructor creates a conditional object by name. .RE .sp .RS .B Conditional (String String) .br The Conditional constructor creates a conditional object by name and information. .RE .PP .I Methods .br .sp .RS .B set-name -> none (String) .br The set-name method sets the conditional name. .RE .sp .RS .B set-info -> none (String) .br The set-info method sets the conditional information. .RE .sp .RS .B get-info -> String (none) .br The get-info method gets the conditional information. .RE .sp .RS .B set-active -> none (Boolean) .br The set-active method sets the conditional active flag. .RE .sp .RS .B get-active -> Boolean (none) .br The get-active method gets the conditional active flag. .RE .sp .RS .B set -> none (String Literal | String Literal Literal) .br The set method set the conditional expression. In the first form, the operator is set with a unique lhs. In the second form, the operator is set with a lhs and a rhs. .RE .sp .RS .B get-operator -> String (none) .br The get-operator method gets the conditional operator. .RE .sp .RS .B get-lhs -> Literal (none) .br The get-lhs method gets the conditional lhs. .RE .sp .RS .B get-rhs -> Literal (none) .br The get-rhs method gets the conditional rhs. .RE