Module ui.widget.container.widgetcontainer

WidgetContainer is a container for one or multiple Widgets.

It is the base class for all the container widgets.

Child widgets are stored in WidgetContainer as conventional array items:

WidgetContainer:new{
    ChildWidgetFoo:new{},
    ChildWidgetBar:new{},
    ...
}

It handles event propagation and painting (with different alignments) for its children.

Functions

WidgetContainer:clear (skip_free) Deletes all child widgets.
WidgetContainer:handleEvent (event) WidgetContainer will pass event to its children by calling their handleEvent methods.


Functions

WidgetContainer:clear (skip_free)
Deletes all child widgets.

Parameters:

  • skip_free HorizontalGroup & VerticalGroup call us after already having called free, so allow skipping this one ;).
WidgetContainer:handleEvent (event)
WidgetContainer will pass event to its children by calling their handleEvent methods. If no child consumes the event (by returning true), it will try to react to the event by itself.

Parameters:

Returns:

    bool true if event is consumed, otherwise false. A consumed event will not be sent to other widgets.
generated by LDoc 1.5.0 Last updated 2024-03-18 16:45:36