45 #ifndef LEGATO_SLIDER_H 46 #define LEGATO_SLIDER_H 50 #if LE_SLIDER_WIDGET_ENABLED == 1 82 typedef enum leSliderState
85 LE_SLIDER_STATE_HANDLE_DOWN,
86 LE_SLIDER_STATE_AREA_DOWN
89 typedef struct leSliderWidget leSliderWidget;
103 typedef void (* leSliderWidget_ValueChangedEvent)(leSliderWidget*);
105 typedef struct leSliderWidget leSliderWidget;
111 #define LE_SLIDERWIDGET_VTABLE(THIS_TYPE) \ 112 LE_WIDGET_VTABLE(THIS_TYPE) \ 114 leOrientation (*getOrientation)(const THIS_TYPE* _this); \ 115 leResult (*setOrientation)(THIS_TYPE* _this, leOrientation align, leBool swapDimensions); \ 116 uint32_t (*getGripSize)(const THIS_TYPE* _this); \ 117 leResult (*setGripSize)(THIS_TYPE* _this, uint32_t sz); \ 118 uint32_t (*getMininumValue)(const THIS_TYPE* _this); \ 119 leResult (*setMinimumValue)(THIS_TYPE* _this, uint32_t min); \ 120 uint32_t (*getMaximumValue)(const THIS_TYPE* _this); \ 121 leResult (*setMaximumValue)(THIS_TYPE* _this, uint32_t max); \ 122 uint32_t (*getPercentage)(const THIS_TYPE* _this); \ 123 leResult (*setPercentage)(THIS_TYPE* _this, uint32_t per); \ 124 int32_t (*getValue)(const THIS_TYPE* _this); \ 125 leResult (*setValue)(THIS_TYPE* _this, int32_t val); \ 126 leResult (*step)(THIS_TYPE* _this, int32_t amt); \ 127 leSliderWidget_ValueChangedEvent (*getValueChangedEventCallback)(const THIS_TYPE* _this); \ 128 leResult (*setValueChangedEventCallback)(THIS_TYPE* _this, leSliderWidget_ValueChangedEvent cb); 130 typedef struct leSliderWidgetVTable
132 LE_SLIDERWIDGET_VTABLE(leSliderWidget)
133 } leSliderWidgetVTable;
146 typedef struct leSliderWidget
150 const leSliderWidgetVTable* fn;
160 leSliderWidget_ValueChangedEvent valueChangedEvent;
202 leSliderWidget* leSliderWidget_New(
void);
214 void leSliderWidget_Constructor(leSliderWidget* sld);
217 #define THIS_TYPE struct leWidget 290 virtual leResult setOrientation(leSliderWidget* _this,
323 virtual uint32_t getMaximumValue(
const leSliderWidget* _this);
359 leResult setMaximumValue(leSliderWidget* _this,
392 virtual uint32_t getMaximumValue(
const leSliderWidget* _this);
429 virtual leResult setMaximumValue(leSliderWidget* _this,
462 virtual uint32_t getPercentage(
const leSliderWidget* _this);
499 virtual leResult setPercentage(leSliderWidget* _this,
532 virtual uint32_t getValue(
const leSliderWidget* _this);
569 virtual leResult setPercentage(leSliderWidget* _this,
607 virtual leResult step(leSliderWidget* _this,
620 virtual leSliderWidget_ValueChangedEvent getValueChangedEventCallback
621 (
const leSliderWidget* _this);
636 virtual leResult setValueChangedEventCallback(leSliderWidget* _this,
637 leSliderWidget_ValueChangedEvent cb);
646 #endif // LE_SLIDER_WIDGET_ENABLED Common macros and definitions used by Legato.
leResult
This enum represents function call results.
Definition: legato_common.h:123
leOrientation
This enum represents the orientation modes for objects.
Definition: legato_common.h:329
This structure represents a integer Cartesian point.
Definition: legato_common.h:346
leBool
This enum represents booleans.
Definition: legato_common.h:146
Fixed string functions and definitions.