ControlGroup
The ControlGroup class is a composite UI control derived from ControlText that groups multiple controls together with a labeled header, optional folding behavior, and customizable styling. It supports layout features similar to a grid, including configurable columns, spacing, and per-column ratios. A ControlGroup can be rendered either above or below its children, optionally with a background and rounded borders.
#include <interface/TellusimControls.h>
Inheritance
- Inherits from ControlText
Constructors
ControlGroup()
explicit ControlGroup(Control *parent, bool above = false)
ControlGroup(Control *parent, const char *text, bool above = false)
ControlGroup(Control *parent, const String &text, bool above = false)
ControlGroup(Control *parent, const char *text, uint32_t columns, bool above = false)
ControlGroup(Control *parent, const char *text, uint32_t columns, float32_t x, float32_t y, bool above = false)
Methods
Above flag.
void setAbove(bool above, bool text = true)
bool isAbove() const
bool isBelow() const
Foldable flag.
void setFoldable(bool foldable)
bool isFoldable() const
Expanded flag.
void setExpanded(bool expanded)
bool isExpanded() const
Background flag.
void setBackground(bool background)
bool getBackground() const
Group radius.
void setGroupRadius(float32_t radius)
float32_t getGroupRadius() const
Group color.
void setGroupColor(Color color)
const Color getGroupColor() const
Stroke style.
void setStrokeStyle(StrokeStyle style)
const StrokeStyle getStrokeStyleConst() const
const StrokeStyle getStrokeStyle() const
StrokeStyle getStrokeStyle()
Gradient style.
void setGradientStyle(GradientStyle style)
const GradientStyle getGradientStyleConst() const
const GradientStyle getGradientStyle() const
GradientStyle getGradientStyle()
Folded text.
void setFoldedText(const char *text)
void setFoldedText(const String &text)
String getFoldedText() const
Expanded text.
void setExpandedText(const char *text)
void setExpandedText(const String &text)
String getExpandedText() const
Number of columns.
void setColumns(uint32_t columns)
uint32_t getColumns() const
Grid spacing.
void setSpacing(Vector2f spacing)
void setSpacing(float32_t x, float32_t y)
const Vector2f getSpacing() const
Grid column ratio.
void setColumnRatio(uint32_t index, float32_t ratio)
float32_t getColumnRatio(uint32_t index) const
Controls size.
const Vector2f getControlsSize() const
Clicked callback.
void setClickedCallback(const ClickedCallback &func)
ClickedCallback getClickedCallback() const
bool isClicked()
Canvas elements.
CanvasRect getCanvasRect()
Types
using ClickedCallback = Function<void(ControlGroup)>