Widget¶
Note
Widget is derived from Object class
Widget is the base class for all windows and represents any visible object on screen. All controls, top level windows and so on are widgets.
Widget can be used for construct your own classes derived from it. For example a new kind of Window or Dialog. Otherwise you are not exploit all the pottential of lide classes.
Constructor¶
Widget class has a single constructor:
object Widget:new ( string sWidgetName, string sWidgetType, number nPosX, number nPosY, number nWidth, number nHeight )
Arguments¶
These arguments are received by class constructor.
| Argument | Description |
|---|---|
| sWidgetName | The widget name |
| sWidgetType | The widget type identificator |
| nPosX | Position related to X |
| nPosY | Position related to Y |
| nWidth | Width of the widget |
| nHeight | Height of the widget |
Events¶
The following events are emitted by this class:
| Event name | Description |
|---|---|
| Widget.onEnter | When the mouse moves onto this widget. |
| Widget.onLeave | When the mouse moves out to this widget. |
Inherited Methods¶
These methods are inherited from its super classes:
| Class Method | Description |
|---|---|
| Object:getID | Returns widget’s identifier. |
| Object:setID | Sets the widget identifier. |
| Object:getName | Returns widget’s name. |
| Object:setName | Sets the widget name. |