Skip to end of metadata
Go to start of metadata

Widget

Each GUI element in the microGraphics Framework is based on the generic Widget.

Fields

FieldTypeDescriptionRead/Write
widthNumberWidth of the widget in pixels.Read only
heightNumberHeight of the widget in pixels.Read only
themeThemeThe color theme used by the widget.Read/Write
actionListenerFunctionThe action listener functionWrite only
inputFunctionThe low level input functionRead/Write
paintFunctionThe paint function.Write only
setSelectedFunctionThe setSelected function.Write only

Functions

FunctionReturn ValuesDescriptionNotes
:setSelected( Boolean )BooleanSets the selected state of a widget.Effect depends on the widget type
:setDirty()noneMarks a widget as dirty; it will be redrawn by mgf. 

:setSelected( Boolean )

Selects on unselects the widget. Returns true if the action was successful. If false is returned this means the widget cannot be (un)selected.

:setDirty()

Marks a widget as dirty. Dirty widgets are redrawn by the microGraphics Framework when a repaint is schedules via mgf.repaint().

  • No labels