Widget

Inherited: NativeBehaviour

Description

The Widget class serves as the base class for all user interface objects, providing basic functionality for handling updates, drawing, and interaction. Internal methods are marked as internal and are intended for use within the framework rather than by external code.

Public Methods

void

boundChanged (const Vector2 & size)

bool

isVisible () const

void

lower ()

Widget *

parentWidget ()

void

raise ()

RectTransform *

rectTransform () const

Static Methods

Widget *

focusWidget ()

Methods Description

void Widget::boundChanged (Vector2 & size)

Callback to respond to changes in the widget’s size.


:ref:`Widget<api_Widget>`* Widget::focusWidget ()

Returns the application widget that has the keyboard input focus, or nullptr if no widget in this application has the focus.


bool Widget::isVisible () const

Returns true if widget is visible on the screen; otherwise, false.


void Widget::lower ()

Lowers the widget to the bottom of the widget’s stack.

See also raise().


:ref:`Widget<api_Widget>`* Widget::parentWidget ()

Returns the parent Widget.


void Widget::raise ()

Raises this widget to the top of the widget’s stack.

See also lower().


:ref:`RectTransform<api_RectTransform>`* Widget::rectTransform () const

Returns RectTransform component attached to parent Actor.