GuiContext

Undocumented in source.
class GuiContext {}

Constructors

this
this(LineBuffer* debugText)
Undocumented in source.

Members

Functions

addChild
void addChild(WidgetId parent, WidgetId child)

Call to set parent after components are set because it will create WidgetTransform component for child which will be overwritten by set call if Components list contains WidgetTransform components too.

beginDrag
void beginDrag(WidgetId wid)
Undocumented in source. Be warned that the author may not have intended to support it.
clipboard
string clipboard()
Undocumented in source. Be warned that the author may not have intended to support it.
clipboard
void clipboard(S str)
Undocumented in source. Be warned that the author may not have intended to support it.
createOverlay
WidgetProxy createOverlay()
Undocumented in source. Be warned that the author may not have intended to support it.
createWidget
WidgetProxy createWidget(Components components)
WidgetProxy createWidget(string name, Components components)
WidgetProxy createWidget(WidgetId parent, Components components)
WidgetProxy createWidget(string name, WidgetId parent, Components components)

Pass string as first parameter to set name Pass WidgetId as first parameter, or after string to set parent createWidget([string name,] [WidgetId parent,] Component... components)

cursorIcon
void cursorIcon(CursorIcon icon)
Undocumented in source. Be warned that the author may not have intended to support it.
doDrag
void doDrag(ivec2 delta)
Undocumented in source. Be warned that the author may not have intended to support it.
draggedWidget
WidgetId draggedWidget()
Undocumented in source. Be warned that the author may not have intended to support it.
draggedWidget
void draggedWidget(WidgetId wid)
Undocumented in source. Be warned that the author may not have intended to support it.
endDrag
void endDrag()
Undocumented in source. Be warned that the author may not have intended to support it.
focusedWidget
WidgetId focusedWidget()
Undocumented in source. Be warned that the author may not have intended to support it.
focusedWidget
void focusedWidget(WidgetId wid)
Undocumented in source. Be warned that the author may not have intended to support it.
get
C* get(WidgetId wid)
Undocumented in source. Be warned that the author may not have intended to support it.
getByName
WidgetId getByName(string name)

returns 0 if not found

getOrCreate
C* getOrCreate(WidgetId wid, C defVal)
Undocumented in source. Be warned that the author may not have intended to support it.
getRoot
WidgetProxy getRoot(size_t rootIndex)
Undocumented in source. Be warned that the author may not have intended to support it.
getRoots
ChildrenRange getRoots()
Undocumented in source. Be warned that the author may not have intended to support it.
has
bool has(WidgetId wid)
Undocumented in source. Be warned that the author may not have intended to support it.
hoveredWidget
WidgetId hoveredWidget()
Undocumented in source. Be warned that the author may not have intended to support it.
hoveredWidget
void hoveredWidget(WidgetId wid)
Undocumented in source. Be warned that the author may not have intended to support it.
inputOwnerWidget
WidgetId inputOwnerWidget()
Undocumented in source. Be warned that the author may not have intended to support it.
inputOwnerWidget
void inputOwnerWidget(WidgetId wid)
Undocumented in source. Be warned that the author may not have intended to support it.
lastClickedWidget
WidgetId lastClickedWidget()
Undocumented in source. Be warned that the author may not have intended to support it.
lastClickedWidget
void lastClickedWidget(WidgetId wid)
Undocumented in source. Be warned that the author may not have intended to support it.
onCharEnter
void onCharEnter(dchar character)
Undocumented in source. Be warned that the author may not have intended to support it.
onKeyPress
void onKeyPress(KeyCode key, uint modifiers)
Undocumented in source. Be warned that the author may not have intended to support it.
onKeyRelease
void onKeyRelease(KeyCode key, uint modifiers)
Undocumented in source. Be warned that the author may not have intended to support it.
onScroll
void onScroll(dvec2 delta)
Undocumented in source. Be warned that the author may not have intended to support it.
pointerMoved
void pointerMoved(ivec2 newPointerPos)
Undocumented in source. Be warned that the author may not have intended to support it.
pointerPressed
void pointerPressed(PointerButton button, uint modifiers)
Undocumented in source. Be warned that the author may not have intended to support it.
pointerReleased
void pointerReleased(PointerButton button, uint modifiers)
Undocumented in source. Be warned that the author may not have intended to support it.
postEvent
bool postEvent(WidgetId wid, Event event)
Undocumented in source. Be warned that the author may not have intended to support it.
postEvent
bool postEvent(WidgetProxy widget, Event event)
Undocumented in source. Be warned that the author may not have intended to support it.
pressedWidget
WidgetId pressedWidget()
Undocumented in source. Be warned that the author may not have intended to support it.
pressedWidget
void pressedWidget(WidgetId wid)
Undocumented in source. Be warned that the author may not have intended to support it.
remove
void remove(WidgetId wid)
Undocumented in source. Be warned that the author may not have intended to support it.
removeWidget
void removeWidget(WidgetId wid)
Undocumented in source. Be warned that the author may not have intended to support it.
set
void set(WidgetId wid, Components components)
Undocumented in source. Be warned that the author may not have intended to support it.
update
void update(double deltaTime, RenderQueue renderQueue)
Undocumented in source. Be warned that the author may not have intended to support it.
visitTreeChildrenFirstAll
auto visitTreeChildrenFirstAll(WidgetId root)
Undocumented in source. Be warned that the author may not have intended to support it.
visitTreeChildrenFirstVisible
auto visitTreeChildrenFirstVisible(WidgetId root)
Undocumented in source. Be warned that the author may not have intended to support it.
visitTreeRootFirstAll
auto visitTreeRootFirstAll(WidgetId root)
Undocumented in source. Be warned that the author may not have intended to support it.
visitTreeRootFirstVisible
auto visitTreeRootFirstVisible(WidgetId root)
Undocumented in source. Be warned that the author may not have intended to support it.
widgetChildren
WidgetId[] widgetChildren(WidgetId wid)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

containsPointer
bool containsPointer(WidgetId widget, GuiContext context, ivec2 pointerPos)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

WidgetTreeVisitor
struct WidgetTreeVisitor(bool rootFirst, bool onlyVisible)
Undocumented in source.

Variables

debugText
LineBuffer* debugText;
Undocumented in source.
nameToId
WidgetId[string] nameToId;
Undocumented in source.
roots
WidgetId[] roots;

Roots are auto-expanded on hvexpand to state.canvasSize

state
GuiState state;
Undocumented in source.
style
ImplicitGuiStyle style;
Undocumented in source.
widgetIds
EntityIdManager widgetIds;
Undocumented in source.
widgets
EntityManager widgets;
Undocumented in source.

Meta