46 #ifndef LEGATO_WIDGET_CIRCULAR_SLIDER_H 47 #define LEGATO_WIDGET_CIRCULAR_SLIDER_H 51 #if LE_CIRCULARSLIDER_WIDGET_ENABLED == 1 83 typedef enum leCircularSliderButtonState
85 LE_CIRCULAR_SLIDER_STATE_UP,
86 LE_CIRCULAR_SLIDER_STATE_DOWN,
87 } leCircularSliderButtonState;
107 typedef enum leCircularSliderWidgetArcType
109 OUTSIDE_CIRCLE_BORDER,
110 INSIDE_CIRCLE_BORDER,
114 } leCircularSliderWidgetArcType;
134 typedef struct leCircularSliderArc
140 } leCircularSliderArc;
142 typedef struct leCircularSliderWidget leCircularSliderWidget;
156 typedef void (*leCircularSliderWidget_PressedEvent)(leCircularSliderWidget *, int32_t);
170 typedef void (*leCircularSliderWidget_ValueChangedEvent)(leCircularSliderWidget *, int32_t);
184 typedef void (*leCircularSliderWidget_ReleasedEvent)(leCircularSliderWidget *, int32_t);
191 #define LE_CIRCULARSLIDERWIDGET_VTABLE(THIS_TYPE) \ 192 LE_WIDGET_VTABLE(THIS_TYPE) \ 194 uint32_t (*getRadius)(const THIS_TYPE* _this); \ 195 leResult (*setRadius)(THIS_TYPE* _this, uint32_t rad); \ 196 int32_t (*getStartAngle)(const THIS_TYPE* _this); \ 197 leResult (*setStartAngle)(THIS_TYPE* _this, int32_t ang); \ 198 int32_t (*getSpanAngle)(const THIS_TYPE* _this); \ 199 leResult (*setSpanAngle)(THIS_TYPE* _this, int32_t ang); \ 200 uint32_t (*getArcThickness)(const THIS_TYPE* _this, leCircularSliderWidgetArcType type); \ 201 leResult (*setArcThickness)(THIS_TYPE* _this, leCircularSliderWidgetArcType type, uint32_t thck); \ 202 uint32_t (*getArcRadius)(const THIS_TYPE* _this, leCircularSliderWidgetArcType type); \ 203 leResult (*setArcRadius)(THIS_TYPE* _this, leCircularSliderWidgetArcType type, uint32_t rad); \ 204 leScheme* (*getArcScheme)(const THIS_TYPE* _this, leCircularSliderWidgetArcType type); \ 205 leResult (*setArcScheme)(THIS_TYPE* _this, leCircularSliderWidgetArcType type, const leScheme* schm); \ 206 leBool (*getArcVisible)(const THIS_TYPE* _this, leCircularSliderWidgetArcType type); \ 207 leResult (*setArcVisible)(THIS_TYPE* _this, leCircularSliderWidgetArcType type, leBool vis); \ 208 uint32_t (*getValue)(const THIS_TYPE* _this); \ 209 leResult (*setValue)(THIS_TYPE* _this, uint32_t val); \ 210 leBool (*getRoundEdges)(const THIS_TYPE* _this); \ 211 leResult (*setRoundEdges)(THIS_TYPE* _this, leBool rnd); \ 212 leBool (*getStickyButton)(const THIS_TYPE* _this); \ 213 leResult (*setStickyButton)(THIS_TYPE* _this, leBool stk); \ 214 uint32_t (*getSnapDivisions)(const THIS_TYPE* _this); \ 215 leResult (*setSnapDivisions)(THIS_TYPE* _this, uint32_t div); \ 216 leBool (*getTouchOnButtonOnly)(const THIS_TYPE* _this); \ 217 leResult (*setTouchOnButtonOnly)(THIS_TYPE* _this, leBool tch); \ 218 leRotationDirection (*getDirection)(const THIS_TYPE* _this); \ 219 leResult (*setDirection)(THIS_TYPE* _this, leRotationDirection dir); \ 220 leResult (*setPressedEventCallback)(THIS_TYPE* _this, leCircularSliderWidget_PressedEvent cb); \ 221 leResult (*setValueChangedEventCallback)(THIS_TYPE* _this, leCircularSliderWidget_ValueChangedEvent cb); \ 222 leResult (*setReleasedEventCallback)(THIS_TYPE* _this, leCircularSliderWidget_ReleasedEvent cb); \ 224 typedef struct leCircularSliderWidgetVTable
226 LE_CIRCULARSLIDERWIDGET_VTABLE(leCircularSliderWidget)
227 } leCircularSliderWidgetVTable;
251 typedef struct leCircularSliderWidget
255 const leCircularSliderWidgetVTable* fn;
266 uint32_t snapDivisions;
271 leCircularSliderArc activeArc;
272 leCircularSliderArc inActiveArc;
273 leCircularSliderArc outsideBorderArc;
274 leCircularSliderArc insideBorderArc;
275 leCircularSliderArc circleButtonArc;
277 leCircularSliderButtonState btnState;
279 leCircularSliderWidget_PressedEvent pressedCallback;
280 leCircularSliderWidget_ValueChangedEvent valueChangedCallback;
281 leCircularSliderWidget_ReleasedEvent releasedCallback;
282 } leCircularSliderWidget;
301 leCircularSliderWidget* leCircularSliderWidget_New(
void);
313 void leCircularSliderWidget_Constructor(leCircularSliderWidget* wgt);
316 #define THIS_TYPE struct leWidget 329 virtual uint32_t
getRadius(
const leCircularSliderWidget* _this);
361 virtual uint32_t
getStartAngle(
const leCircularSliderWidget* _this);
394 virtual uint32_t getArcThickness(
const leCircularSliderWidget* _this,
395 leCircularSliderWidgetArcType type);
415 virtual leResult setArcThickness(leCircularSliderWidget* _this,
416 leCircularSliderWidgetArcType type,
419 / *****************************************************************************
432 virtual uint32_t getArcRadius(
const leCircularSliderWidget* _this,
433 leCircularSliderWidgetArcType type);
451 virtual leResult setArcRadius(leCircularSliderWidget* _this,
452 leCircularSliderWidgetArcType type,
468 virtual leScheme* getArcScheme(
const leCircularSliderWidget* _this,
469 leCircularSliderWidgetArcType type);
487 leResult setArcScheme(leCircularSliderWidget* _this,
488 leCircularSliderWidgetArcType type,
491 * @brief Get arc visibility
492 * @details Gets arc visilibilty
for <span
class=
"param">type</span>
using 493 * <span
class=
"param">_this</span>.
495 * leCircularSliderWidget* _this;
496 * leCircularSliderWidgetArcType type;
497 *
leBool visible = _this->fn->getArcVisible(_this, axis);
499 * @param _this is the
widget to query.
500 * @param type the type to query.
503 virtual leBool getArcVisible(
const leCircularSliderWidget* _this,
504 leCircularSliderWidgetArcType type);
520 virtual leBool setArcVisible(
const leCircularSliderWidget* _this,
521 leCircularSliderWidgetArcType type);
534 virtual uint32_t getStartValue(
const leCircularSliderWidget* _this);
551 virtual leResult setStartValue(leCircularSliderWidget* _this,
554 / *****************************************************************************
565 virtual uint32_t getEndValue(
const leCircularSliderWidget* _this);
582 virtual leResult setEndValue(leCircularSliderWidget* _this,
596 virtual leBool getRoundEdges(
const leCircularSliderWidget* _this);
613 virtual leResult setRoundEdges(leCircularSliderWidget* _this,
628 virtual leBool getStickyButton(
const leCircularSliderWidget* _this);
645 virtual leResult setStickyButton(leCircularSliderWidget* _this,
659 virtual leBool getTouchOnButtonOnly(
const leCircularSliderWidget* _this);
676 virtual leResult setTouchOnButtonOnly(leCircularSliderWidget* _this,
708 virtual leResult setDirection(leCircularSliderWidget* _this,
725 virtual leResult setPressedEventCallback(leCircularSliderWidget* _this,
726 leCircularSliderWidget_PressedEvent cb);
742 leResult setValueChangedEventCallback(leCircularSliderWidget* _this,
743 leCircularSliderWidget_ValueChangedEvent cb)
759 virtual leResult setReleasedEventCallback(leCircularSliderWidget* _this,
760 leCircularSliderWidget_ReleasedEvent cb);
769 #endif // LE_CIRCULARSLIDER_WIDGET_ENABLED Definition: legato_common.h:149
Common macros and definitions used by Legato.
leRotationDirection
This enum represents the two rotation direction modes for objects.
Definition: legato_common.h:278
leResult
This enum represents function call results.
Definition: legato_common.h:123
Definition: legato_common.h:148
leBool
This enum represents booleans.
Definition: legato_common.h:146
Definition: legato_scheme.h:154