Skip to main content

ControlScroll

The ControlScroll class represents a scroll control, typically used for scrolling content or adjusting values within a specified range. It can be configured to be either vertical or horizontal and supports customization of scroll step, color, range, and frame size.

#include <interface/TellusimControls.h>

Inheritance

Constructors

ControlScroll()
explicit ControlScroll(Control *parent, bool vertical = false)
ControlScroll(Control *parent, float64_t value, bool vertical = false)
ControlScroll(Control *parent, float64_t value, float64_t frame, float64_t range, bool vertical = false)
ControlScroll(Control *parent, uint32_t value, uint32_t frame, uint32_t range, bool vertical = false)
ControlScroll(Control *parent, int32_t value, int32_t frame, int32_t range, bool vertical = false)

Methods

Vertical flag.

void setVertical(bool vertical, bool text = true)
bool isHorizontal() const
bool isVertical() const

Scroll previous text.

void setPrevText(const char *text)
void setPrevText(const String &text)
String getPrevText() const

Scroll next text.

void setNextText(const char *text)
void setNextText(const String &text)
String getNextText() const

Scroll color.

void setScrollColor(Color color)
const Color getScrollColor() const

Scroll step.

void setStep(float64_t step)
float64_t getStep() const

Scroll value.

void setValue(float64_t value, bool callback = false)
float64_t getValue() const

Scroll frame.

void setFrame(float64_t frame)
float64_t getFrame() const

Scroll range.

void setRange(float64_t range)
float64_t getRange() const

Frame alignment.

void setFrameAlign(Align align)
Align getFrameAlign() const
bool hasFrameAlign(Align align) const
bool hasFrameAligns(Align aligns) const

Clicked callback.

void setClickedCallback(const ClickedCallback &func)
ClickedCallback getClickedCallback() const
bool isClicked()

Changed callback.

void setChangedCallback(const ChangedCallback &func)
ChangedCallback getChangedCallback() const
bool isChanged(bool clear = true)

Canvas elements.

CanvasMesh getCanvasMesh()

Types

using ClickedCallback = Function<void(ControlScroll)>
using ChangedCallback = Function<void(ControlScroll)>