- _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 (d)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 actually 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 re-subscribe to events
- requestCursorPos
void requestCursorPos(int x, int y)
to set cursor position on terminal. will only work 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,
or widget should recalculate it's child widgets' sizes;
- 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)
called often. msecs is the msecs since last timerEvent, not accurate
- updateEvent
bool updateEvent()
Called to update this widget
- 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]
use to change the custom initialize event
- onMouseEvent
MouseEventFuction onMouseEvent [@property setter]
use to change the custom mouse event
- onKeyboardEvent
KeyboardEventFunction onKeyboardEvent [@property setter]
use to change the custom keyboard event
- onResizeEvent
ResizeEventFunction onResizeEvent [@property setter]
use to change the custom resize event
- onActivateEvent
ActivateEventFunction onActivateEvent [@property setter]
use to change the custom activate event
- onTimerEvent
TimerEventFunction onTimerEvent [@property setter]
use to change the custom timer event
- isActive
bool isActive [@property getter]
- eventSub
uint eventSub [@property getter]
- sizeRatio
uint sizeRatio [@property getter]
uint sizeRatio [@property setter]
specifies ratio of height or width (depending on parent layout type)
- show
bool show [@property getter]
bool show [@property setter]
visibility of the widget.
- scrollX
uint scrollX [@property getter]
uint scrollX [@property setter]
- scrollY
uint scrollY [@property getter]
uint scrollY [@property setter]
- width
uint width [@property getter]
- width
uint width [@property setter]
fixed width setter.
This will actually do minWidth=maxWidth=value and call requestResize
- height
uint height [@property getter]
- height
uint height [@property setter]
fixed height setter.
This will actually do minHeight=maxHeight=value and call requestResize
- 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]
Just occupies some space. Use this to put space between widgets
To specify the size, use the minHeight, maxHeight, minWidth, and maxWidth. only specifying the width and/or height will have no effect