Widget

Undocumented in source.
class Widget : EventsListenerEmpty {}

Constructors

this
this()

Default constructor with default style.

this
this(string style)

Construct with custom style.

this
this(View view)
Undocumented in source.

Members

Enums

PartDraws
enum PartDraws

Which part of widget need to render, e.g. if it is a button then PartDraws.left tell that only left side and center will be rendered, this need for grouping rendering of widgets.

SizeType
enum SizeType

Type of sizing for width and height.

Functions

blur
void blur()

Clear focus from widget

checkRules
void checkRules()
Undocumented in source. Be warned that the author may not have intended to support it.
collectOnProgressQueries
void collectOnProgressQueries()
Undocumented in source. Be warned that the author may not have intended to support it.
focus
void focus()

Make focus for widget, and clear focus from focused widget.

freezeUI
void freezeUI(bool isNestedFreeze)
Undocumented in source. Be warned that the author may not have intended to support it.
getNonDecoratorParent
Widget getNonDecoratorParent()
Undocumented in source. Be warned that the author may not have intended to support it.
isFreezingSource
bool isFreezingSource()
Undocumented in source. Be warned that the author may not have intended to support it.
isFrozen
bool isFrozen()
Undocumented in source. Be warned that the author may not have intended to support it.
onBlur
void onBlur(BlurEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
onClickActionInvoked
void onClickActionInvoked()
Undocumented in source. Be warned that the author may not have intended to support it.
onCreate
void onCreate()
Undocumented in source. Be warned that the author may not have intended to support it.
onCursor
void onCursor()

Override this method if need change behaviour when system cursor have to be changed.

onFocus
void onFocus(FocusEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
onMouseMove
void onMouseMove(MouseMoveEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
onMouseUp
void onMouseUp(MouseUpEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
onPostCreate
void onPostCreate()
Undocumented in source. Be warned that the author may not have intended to support it.
onProgress
void onProgress(ProgressEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
onRender
void onRender()

Render widget in camera view.

onResize
void onResize()
Undocumented in source. Be warned that the author may not have intended to support it.
pointIsEnter
bool pointIsEnter(vec2i point)

Determine if point is inside widget area.

processPorgress
bool processPorgress()
Undocumented in source. Be warned that the author may not have intended to support it.
renderChildren
void renderChildren()
Undocumented in source. Be warned that the author may not have intended to support it.
reset
void reset()
Undocumented in source. Be warned that the author may not have intended to support it.
resetChildren
void resetChildren()
Undocumented in source. Be warned that the author may not have intended to support it.
unfreezeUI
void unfreezeUI()
Undocumented in source. Be warned that the author may not have intended to support it.
updateAll
void updateAll()

Recalculate size and position of widget and children widgets.

updateBoundary
void updateBoundary()

Update widget inner bounary and clamped boundary.

updateSize
void updateSize()

This method invokes when widget size is updated.

Properties

absolutePosition
inout(vec2) absolutePosition [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
children
WidgetsContainer children [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
depth
uint depth [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
events
WidgetEventsObserver events [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
extraInnerOffsetEnd
vec2 extraInnerOffsetEnd [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
extraInnerOffsetSize
vec2 extraInnerOffsetSize [@property getter]

Total size of extra inner offset (width and height).

extraInnerOffsetStart
vec2 extraInnerOffsetStart [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
firstWidget
Widget firstWidget [@property getter]

First widget in parent children.

focusNavigator
FocusNavigator focusNavigator [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
height
float height [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
height
float height [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
id
size_t id [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
innerOffset
FrameRect innerOffset [@property getter]

Inner padding plus and extra inner offsets.

innerOffsetEnd
vec2 innerOffsetEnd [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
innerOffsetSize
vec2 innerOffsetSize [@property getter]

Total inner offset size (width and height) considering the extra inner offsets and paddings.

innerOffsetStart
vec2 innerOffsetStart [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
innerSize
vec2 innerSize [@property getter]

Inner size considering the extra innter offsets and paddings.

isFocused
inout(bool) isFocused [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
lastWidget
Widget lastWidget [@property getter]

Last widget in parent children.

left
float left [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
left
float left [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
nextWidget
Widget nextWidget [@property getter]

Next widget in parent children after this.

outerOffset
FrameRect outerOffset [@property getter]

Total outer offset - margins plus extra outer offsets.

outerOffsetEnd
vec2 outerOffsetEnd [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
outerOffsetSize
vec2 outerOffsetSize [@property getter]

Total outer offset size (width and height) considering the extra outer offsets and margins.

outerOffsetStart
vec2 outerOffsetStart [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
outerSize
vec2 outerSize [@property getter]

Outer size considering the extra outer offsets and margins.

parent
Widget parent [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
prevWidget
Widget prevWidget [@property getter]

Previous widget in parent children before this.

resolver
WidgetResolver resolver [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
state
inout(State) state [@property getter]

Returns string of state declared in theme.

top
float top [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
top
float top [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
view
View view [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
width
float width [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
width
float width [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

field
struct field

Field attribute need to tell RPDL which fields are fill when reading layout file.

Variables

absolutePosition_
vec2 absolutePosition_;
Undocumented in source.
associatedWidget
Widget associatedWidget;
Undocumented in source.
contentOffset
vec2 contentOffset;

Children offset relative their absolute positions.

cursor
CursorIcon cursor;

Specifies the type of cursor to be displayed when pointing on an element.

drawChildren
bool drawChildren;
Undocumented in source.
enableRules
Array!(bool delegate()) enableRules;

Additional rules appart from enabled to set widget enabled or not.

extraInnerOffset
FrameRect extraInnerOffset;

Extra inner offset besides padding.

extraOuterOffset
FrameRect extraOuterOffset;

Extra outer offset besides margin.

finalFocus
bool finalFocus;

If true, then focus navigation by children will be limited inside this widget.

focusOnMousUp
bool focusOnMousUp;
Undocumented in source.
focusable
bool focusable;
Undocumented in source.
heightType
SizeType heightType;

Determine how to set height for widget.

hint
utf32string hint;

Some help information about widget, need to display tooltip.

innerBoundarySize
vec2 innerBoundarySize;

Size of boundary over childern.

innerBoundarySizeClamped
vec2 innerBoundarySizeClamped;

Size of boundary over childern clamped to size of widget as minimum boundary size.

isClick
bool isClick;
Undocumented in source.
isEnabled
bool isEnabled;
Undocumented in source.
isEnter
bool isEnter;

True if pointed on widget.

isMouseDown
bool isMouseDown;
Undocumented in source.
isOver
bool isOver;

When in rect of element but if another element over this isOver will still be true.

isVisible
bool isVisible;
Undocumented in source.
locationAlign
Align locationAlign;

How to place a widget horizontally.

locator
WidgetLocator locator;
Undocumented in source.
margin
FrameRect margin;

Used to create space around elements, outside of any defined borders.

name
string name;
Undocumented in source.
outerBoundarySize
vec2 outerBoundarySize;

Full region size including inner offsets.

overSize
vec2 overSize;
Undocumented in source.
overlay
bool overlay;
Undocumented in source.
overlayRect
Rect overlayRect;
Undocumented in source.
overrideIsEnter
bool overrideIsEnter;

Override isEnter state i.e. ignore isEnter value and use overrided value.

owner
Widget owner;
Undocumented in source.
p_depth
uint p_depth;
Undocumented in source.
p_firstWidget
Widget p_firstWidget;
Undocumented in source.
p_isFocused
bool p_isFocused;
Undocumented in source.
p_lastWidget
Widget p_lastWidget;
Undocumented in source.
p_nextWidget
Widget p_nextWidget;
Undocumented in source.
p_parent
Widget p_parent;
Undocumented in source.
p_prevWidget
Widget p_prevWidget;
Undocumented in source.
padding
FrameRect padding;

Used to generate space around an element's content, inside of any defined borders.

partDraws
PartDraws partDraws;
Undocumented in source.
position
vec2 position;
Undocumented in source.
regionAlign
RegionAlign regionAlign;

If set this option then widget will be pinned to one of the side declared in the basic_types.RegionAlign.

renderer
Renderer renderer;
Undocumented in source.
size
vec2 size;
Undocumented in source.
skipFocus
bool skipFocus;

Don't focus this element.

style
string style;

Widget root rpdl node from where the data will be extracted.

verticalLocationAlign
VerticalAlign verticalLocationAlign;

How to place a widget vertically.

view_
View view_;
Undocumented in source.
visibleRules
Array!(bool delegate()) visibleRules;

Additional rules appart from isVisible to set widget visible or not.

widthType
SizeType widthType;

Determine how to set width for widget.

Inherited Members

From EventsListenerEmpty

onKeyPressed
void onKeyPressed(KeyPressedEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
onKeyReleased
void onKeyReleased(KeyReleasedEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
onTextEntered
void onTextEntered(TextEnteredEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
onMouseDown
void onMouseDown(MouseDownEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
onMouseUp
void onMouseUp(MouseUpEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
onDblClick
void onDblClick(DblClickEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
onTripleClick
void onTripleClick(TripleClickEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
onMouseMove
void onMouseMove(MouseMoveEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
onMouseWheel
void onMouseWheel(MouseWheelEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
onWindowResize
void onWindowResize(WindowResizeEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
onWindowExposed
void onWindowExposed(WindowExposedEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta