QLayout

Used to place widgets in an order (i.e vertical or horizontal)

Constructors

this
this(QLayout.Type type)

constructor

Destructor

~this
~this()

destructor, kills children

Members

Enums

Type
enum Type

Layout type

Functions

activateEvent
bool activateEvent(bool isActive)

override activate event

addWidget
void addWidget(QWidget[] widgets)

adds a widget, and makes space for it

addWidget
void addWidget(QWidget widget, bool allowScrollControl)

adds a widget, and makes space for it

eventSubscribe
void eventSubscribe()
Undocumented in source. Be warned that the author may not have intended to support it.
initialize
bool initialize()

override initialize to initliaze child widgets

keyboardEvent
bool keyboardEvent(KeyboardEvent key, bool cycle)

Redirects the keyboardEvent to appropriate widget

mouseEvent
bool mouseEvent(MouseEvent mouse)

Redirects the mouseEvent to the appropriate widget

resizeEvent
bool resizeEvent()

Recalculates size and position for all visible widgets

scrollEvent
bool scrollEvent()

Resize event

searchAndActivateWidget
bool searchAndActivateWidget(QWidget target)

activate the passed widget if it's in the current layout

timerEvent
bool timerEvent(uint msecs)

override timer event to call child widgets' timers

updateEvent
bool updateEvent()

called by parent widget to update

Properties

fillColor
Color fillColor [@property getter]
Color fillColor [@property setter]

Color for unoccupied space

overflowColor
Color overflowColor [@property getter]
Color overflowColor [@property setter]

Color to fill with when out of space

Inherited Members

From QWidget

_minWidth
uint _minWidth;

minimum width

_maxWidth
uint _maxWidth;

maximum width

_minHeight
uint _minHeight;

minimum height

_maxHeight
uint _maxHeight;

maximum height

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]

horizontal scroll.

scrollY
uint scrollY [@property getter]
uint scrollY [@property setter]

vertical scroll.

width
uint width [@property getter]

width of widget

width
uint width [@property setter]

fixed width setter. This will actually do minWidth=maxWidth=value and call requestResize

height
uint height [@property getter]

height of widget

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]

minimum width

minHeight
uint minHeight [@property getter]
uint minHeight [@property setter]

minimum height

maxWidth
uint maxWidth [@property getter]
uint maxWidth [@property setter]

maximum width

maxHeight
uint maxHeight [@property getter]
uint maxHeight [@property setter]

maximum height

Meta