Users will not normally directly create instances of EZGui, but only use it through its subclasses. It provides the basic mechanisms for various EZ widget wrappers. It also provides a standard for EZ GUI Classes, and new EZ Classes should subclass EZGUI to help keep a consistent user interface.
Returns the enclosing CompositeView.
Returns the bounds of the enclosing CompositeView.
Sets/gets it the label. Will add the label view if none was initially created.
(string) |
An Instance of String. |
Returns the window if you used the popUp window function.
Makes the popup window always on top, if there is one.
bool |
An Instance of Boolean. Default is false. |
Sets/gets it the component views are visible.
bool |
An Instance of Boolean. Default is true. |
Sets/gets the onClose function of either view
or window
, depending on whether the EZ view used a popup window.
func |
An Instance of Function or FunctionList. |
font |
An instance of Font. |
EZGui provides a standard and basic tools for most EZ classes. If you make a new EZ class, then subclass EZGui, and override the necessary methods. If your class only has a label and a widget, chances are, you need to override nothing, but only need to write the new and init class methods. See existing subclasses of EZGui for examples of this. You may also want to override the following:
Returns the active widget. Subclasses will typically refer to it or ignore it, e.g.:
Gets/sets the action of the EZ class instance.
(func) |
An Instance of Function or FunctionList. |
Gets/sets the value of the widget
. Does not perform the action.
val |
An integer. |
Gets/sets the value of the widget. Performs do action.
val |
An integer. |
Performs this.action.value(this)
.
This calculates the bounds of the subviews and the gaps. It returns an array of Rects, which depends on how many subview there are. Subclasses override this if they have more than one widget.
Called by init. Returns [view, bounds]
. The container is either the enclosing Container, or a pop up window with a container.
Only defined by some subclasses. Sets the resize
and align
of all the views, according to the state of layout
.
Called in the init method of all subclasses. Sets the margin and gap of view
. By default, it tries to get its parent's gap, otherwise it defaults to 2@2
. Setting argGap
overrides these.