Foldout

Inherited: None

Description

The Foldout class manages a UI widget that can show or hide additional content based on its expanded state. It includes functionality for adding widgets to the foldout, toggling its expanded state.

Public Methods

Frame *

container () const

CheckBox *

indicator () const

void

insertWidget (int index, Widget * widget)

bool

isExpanded () const

void

onExpand ()

void

setContainer (Frame * container)

void

setExpanded (bool expanded)

void

setIndicator (CheckBox * indicator)

void

setText (const TString text)

TString

text () const

Static Methods

None

Methods Description

Frame * Foldout::container () const

Returns container component attached to this widget.

See also setContainer().


CheckBox * Foldout::indicator () const

Returns indicator button to fold and unfold container with content.

See also setIndicator().


void Foldout::insertWidget (int index, Widget * widget)

Inserts widget to the foldout’s container, at given position index. Effectively placing it inside the foldout’s expanded content area.


bool Foldout::isExpanded () const

Returns true id foldout is currently expanded; otherwise returns false.


void Foldout::onExpand ()

Toggles the expanded state of the foldout when the indicator is clicked.


void Foldout::setContainer (Frame * container)

Sets container component attached to this widget.

See also container().


void Foldout::setExpanded (bool expanded)

Expands or collapses the foldout based on the expanded parameter.

See also isExpanded().


void Foldout::setIndicator (CheckBox * indicator)

Sets indicator button to fold and unfold container with content.

See also indicator().


void Foldout::setText (TString text)

Sets the label text for the foldout.

See also text().


TString Foldout::text () const

Returns the current text of the foldout’s label.

See also setText().