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
void |
addWidget (Widget * widget) |
bool |
isExpanded () const |
void |
onExpand () |
void |
setExpanded (bool expanded) |
void |
setText (const std::string text) |
std::string |
text () const |
Static Methods
None
Methods Description
void Foldout::addWidget (Widget * widget)
Adds a widget to the foldout’s container, 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::setExpanded (bool expanded)
Expands or collapses the foldout based on the expanded parameter.
See also isExpanded().
void Foldout::setText (std::string text)
Sets the label text for the foldout.
See also *text*().
std::string Foldout::text () const
Returns the current text of the foldout’s label.
See also setText().