Skip to main content

ControlArea

The ControlArea class represents a flexible area control within a user interface, capable of managing multiple controls in a grid-like layout. It allows for both horizontal and vertical scrolling, configurable scaling, and offers a range of alignment, size, and step options. The class supports dynamic scrolling, with adjustable values and steps for both horizontal and vertical axes. This control is ideal for creating organized, scrollable, and scalable grid-based layouts within a user interface.

#include <interface/TellusimControls.h>

Inheritance

Constructors

ControlArea()
explicit ControlArea(Control *parent)
ControlArea(Control *parent, uint32_t columns)
ControlArea(Control *parent, bool horizontal, bool vertical)
ControlArea(Control *parent, uint32_t columns, float32_t x, float32_t y)

Methods

Absolute flag.

void setAbsolute(bool absolute)
bool isAbsolute() const

Scalable flag.

void setScalable(bool scalable)
bool isScalable() const

Scrollable flag.

void setScrollable(bool scrollable)
bool isScrollable() const

Area scale.

void setScale(float32_t scale)
float32_t getScale() const

Scale range.

void setScaleRange(float32_t min, float32_t max)
float32_t getMinScale() const
float32_t getMaxScale() const

Area step.

void setHorizontalStep(float64_t step)
void setVerticalStep(float64_t step)
void setStep(float64_t horizontal, float64_t vertical)
float64_t getHorizontalStep() const
float64_t getVerticalStep() const

Area value.

void setHorizontalValue(float64_t value)
void setVerticalValue(float64_t value)
void setValue(float64_t horizontal, float64_t vertical)
float64_t getHorizontalValue() const
float64_t getVerticalValue() const

Frame alignment.

void setFrameAlign(Align align)
Align getFrameAlign() const

Area frame.

float64_t getHorizontalFrame() const
float64_t getVerticalFrame() const

Area range.

float64_t getHorizontalRange() const
float64_t getVerticalRange() const

Horizontal scroll.

void setHorizontalEnabled(bool enabled, bool dynamic = false)
bool isHorizontalEnabled() const
bool isHorizontalDynamic() const
bool isHorizontalHidden() const
const ControlScroll getHorizontalScroll() const
ControlScroll getHorizontalScroll()

Vertical scroll.

void setVerticalEnabled(bool enabled, bool dynamic = false)
bool isVerticalEnabled() const
bool isVerticalDynamic() const
bool isVerticalHidden() const
const ControlScroll getVerticalScroll() const
ControlScroll getVerticalScroll()

Font style.

bool setFontSize(uint32_t size)
uint32_t getFontSize() const
bool setFontStyle(FontStyle style)
const FontStyle getFontStyleConst() const
const FontStyle getFontStyle() const
FontStyle getFontStyle()

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

Controls offset.

const Vector2f getControlsOffset() const

View rectangle.

const Rect getViewRect() const