12#include <ds_selection_base.h>
94 float mTrackProportion;
97 uint32_t mKnobDiameter;
105 const char* mTextOff;
120 uint32_t mTouchTimestamp;
124 uint8_t mIsInverted: 1;
125 uint8_t mIsTouchActive: 1;
128 uint8_t mTrackBorderThickness;
129 uint8_t mKnobBorderThickness;
132 void onSizeChange(
void)
override final;
133 void onPaint(
DsRenderer &renderer)
override final;
136 int32_t onSelectionChange(int32_t selection)
override final;
DsColor is a class that represents a 4 channel color (Alpha, Red, Green, Blue).
Definition ds_color.h:53
DsPoint is a class that represents the X and Y 2D coordinates of a point as integer numbers.
Definition ds_geometry.h:24
DsRect is a class that represents a 2D rectangle (X, Y, W, H)
Definition ds_geometry.h:1507
DsRenderer is a class that implements all the drawing operations.
Definition ds_renderer.h:42
DsSelectionBase is a base class that contains a selection value.
Definition ds_selection_base.h:19
DsSize is class that represents the 2D size of a graphic object (width, height) as integer values.
Definition ds_geometry.h:780
DsSwitch is a class that represents an ON/OFF switch view.
Definition ds_switch.h:24
void setKnobBorderThickness(uint8_t thickness)
Sets the knob border thickness.
DsSwitch(DsView *parent, const DsPoint &pos, const DsSize &size, bool inverted=false)
Creates a DsSwitch object.
void setText(const char *text_on, DsColor color_on, const char *text_off, DsColor color_off, const ds_bitmap_font_t *font)
Sets the text for both ON/OFF states.
void setSwitchKnobColors(DsColor knob_border_on_color, DsColor knob_on_color, DsColor knob_border_off_color, DsColor knob_off_color)
Sets the switch knob colors.
void setTrackBorderThickness(uint8_t thickness)
Sets the track border thickness.
void setTrackProportion(float proportion)
Sets proportion of the track width versus the knob diameter.
void setSwitchTrackColors(DsColor track_border_on_color, DsColor track_on_color, DsColor track_border_off_color, DsColor track_off_color)
Sets the switch track colors.
DsView is a base class that represents any view on the screen.
Definition ds_view.h:40
This structure implements a touch event.
Definition ds_event.h:25