Element

Base for all TUI elements

Constructors

this
this()
Undocumented in source.

Members

Functions

_create
void _create()

Private create method. Used for internal logic Called when element is first added as child

_destroy
void _destroy()

Private destroy method. Used for internal logic Called when element is queued for deletion or when App is being closed

_input
void _input(InputEvent e)

Private input method. Used for internal logic Called each frame if there's unprocessed input event

_render
void _render()

Private render method. Used for internal logic Called each frame if render is needed

_update
void _update(float delta)

Private update method. Used for internal logic Called each frame

addChild
void addChild(Element child)

Adds child to element

childCount
size_t childCount()

Returns amount of children element has

create
void create()

Public create method. Can be overriden. Called when element is first added as child

destroy
void destroy()

Public destroy method. Can be overriden. Called when element is queued for deletion or when App is being closed

getChild
Element getChild(size_t index)

Returns child at pos

getChildPos
long getChildPos(Element child)

Returns child at pos

hasChild
bool hasChild(Element child)

Returns true if this has child

input
void input(InputEvent e)

Public input method. Can be overriden. Called each frame if there's unprocessed input event

moveChild
void moveChild(Element child, size_t index)

Moves child to position

propagateCreate
void propagateCreate()
propagateDestroy
void propagateDestroy()
propagateInput
void propagateInput(InputEvent e)
propagateRender
void propagateRender()
propagateUpdate
void propagateUpdate(float delta)

Propagates internal function calls

removeChild
void removeChild(Element child)

Removes child from element

render
void render()

Public render method. Can be overriden. Called each frame if render is needed

setApp
void setApp(App p_app)

Sets App element attached to if it's not already defined

setParent
void setParent(Element p_parent)

Reparents element if it's not root

setRoot
void setRoot()

Sets element as root if there's no root already

update
void update(float delta)

Public update method. Can be overriden. Called each frame

Mixins

__anonymous
mixin getter!_app

Returns App element is attached to

__anonymous
mixin getter!_parent

Returns current parent

__anonymous
mixin getter!_children

Returns array of children

__anonymous
mixin getter!_isRoot

Returns true if element is root

__anonymous
mixin getter!_isInit

Returns true if Element was initialized

__anonymous
mixin property!_pos

Element position property

Meta