- _minWidth
uint _minWidth;
- _maxWidth
uint _maxWidth;
- _minHeight
uint _minHeight;
- _maxHeight
uint _maxHeight;
- viewportX
uint viewportX [@property getter]
- viewportY
uint viewportY [@property getter]
viewport coordinates. (drawable area for widget)
- viewportWidth
uint viewportWidth [@property getter]
- viewportHeight
uint viewportHeight [@property getter]
viewport size. (drawable area for widget)
- isWritable
bool isWritable(uint x, uint y)
If a coordinate is within writing area,
and writing area actually exists
- moveTo
void moveTo(uint newX, uint newY)
move seek for next write to terminal.
can only write in between:
`(_viewX .. _viewX + _viewWidth,
_viewY .. _viewX + _viewHeight)`
- write
bool write(dchar c, Color fg, Color bg)
writes a character on terminal
- write
uint write(dstring s, Color fg, Color bg)
writes a string to terminal.
if it does not fit in one line, it is wrapped
- fillLine
uint fillLine(dchar c, Color fg, Color bg, uint max)
fill current line with a character.
max is ignored if max==0
- searchAndActivateWidget
bool searchAndActivateWidget(QWidget target)
activate the passed widget if this is the correct widget
- eventSubscribe
void eventSubscribe(uint newSub)
called by itself, to update events subscribed to
- eventSubscribe
void eventSubscribe()
called by children when they want to subscribe to events
- requestCursorPos
void requestCursorPos(int x, int y)
to set cursor position on terminal.
only works if this is active widget.
set x or y or both to negative to hide cursor
- requestScrollX
bool requestScrollX(uint x)
called to request to scrollX
- requestScrollY
bool requestScrollY(uint y)
called to request to scrollY
- initialize
bool initialize()
Called after UI has been run
- mouseEvent
bool mouseEvent(MouseEvent mouse)
Called when mouse is clicked with cursor on this widget.
- keyboardEvent
bool keyboardEvent(KeyboardEvent key, bool cycle)
Called when key is pressed and this widget is active.
- resizeEvent
bool resizeEvent()
Called when widget size is changed,
- scrollEvent
bool scrollEvent()
Called when the widget is rescrolled, ~but size not changed.~
- activateEvent
bool activateEvent(bool isActive)
called right after this widget is activated, or de-activated
- timerEvent
bool timerEvent(uint msecs)
- updateEvent
bool updateEvent()
Called when this widget should re-draw itself
- requestUpdate
void requestUpdate()
To request parent to trigger an update event
- requestResize
void requestResize()
To request parent to trigger a resize event
- onInitEvent
InitFunction onInitEvent [@property setter]
- onMouseEvent
MouseEventFuction onMouseEvent [@property setter]
- onKeyboardEvent
KeyboardEventFunction onKeyboardEvent [@property setter]
- onResizeEvent
ResizeEventFunction onResizeEvent [@property setter]
- onScrollEvent
ScrollEventFunction onScrollEvent [@property setter]
- onActivateEvent
ActivateEventFunction onActivateEvent [@property setter]
- onTimerEvent
TimerEventFunction onTimerEvent [@property setter]
- isActive
bool isActive [@property getter]
- isScrollableContainer
bool isScrollableContainer [@property getter]
- eventSub
uint eventSub [@property getter]
- sizeRatio
uint sizeRatio [@property getter]
uint sizeRatio [@property setter]
- show
bool show [@property getter]
bool show [@property setter]
- scrollX
uint scrollX [@property getter]
uint scrollX [@property setter]
- scrollY
uint scrollY [@property getter]
uint scrollY [@property setter]
- width
uint width [@property getter]
uint width [@property setter]
- height
uint height [@property getter]
uint height [@property setter]
- minWidth
uint minWidth [@property getter]
uint minWidth [@property setter]
- minHeight
uint minHeight [@property getter]
uint minHeight [@property setter]
- maxWidth
uint maxWidth [@property getter]
uint maxWidth [@property setter]
- maxHeight
uint maxHeight [@property getter]
uint maxHeight [@property setter]
To get single-line input from keyboard