constructor
destructor, kills children
Layout type
activate event
adds a widget
adds a widget
initialise
Redirects the keyboardEvent to appropriate widget
Redirects the mouseEvent to the appropriate widget
Recalculates size and position for all visible widgets
Resize event
activate the passed widget if it's in the current layout
timer
called by parent widget to update
Color for unoccupied space
Color to fill with when out of space
minimum width
maximum width
minimum height
maximum height
viewport coordinates. (drawable area for widget)
viewport size. (drawable area for widget)
If a coordinate is within writing area, and writing area actually exists
move seek for next write to terminal. can only write in between: `(_viewX .. _viewX + _viewWidth, _viewY .. _viewX + _viewHeight)`
writes a character on terminal
writes a string to terminal. if it does not fit in one line, it is wrapped
fill current line with a character. max is ignored if max==0
activate the passed widget if this is the correct widget
called by itself, to update events subscribed to
called by children when they want to subscribe to events
to set cursor position on terminal. only works if this is active widget. set x or y or both to negative to hide cursor
called to request to scrollX
called to request to scrollY
Called after UI has been run
Called when mouse is clicked with cursor on this widget.
Called when key is pressed and this widget is active.
Called when widget size is changed,
Called when the widget is rescrolled, ~but size not changed.~
called right after this widget is activated, or de-activated
called often.
Called when this widget should re-draw itself
To request parent to trigger an update event
To request parent to trigger a resize event
custom initialize event
custom mouse event
custom keyboard event
custom resize event
custom scroll event
custom activate event
custom timer event
ratio of height or width
if widget is visible.
horizontal scroll.
vertical scroll.
width of widget
height of widget
minimum width
minimum height
maximum width
maximum height
Used to place widgets in an order (i.e vertical or horizontal)