46 #ifndef LEGATO_LISTWHEELWIDGET_H 47 #define LEGATO_LISTWHEELWIDGET_H 51 #if LE_LISTWHEEL_WIDGET_ENABLED == 1 62 typedef struct leListWheelWidget leListWheelWidget;
75 typedef void (* leListWheelWidget_SelectedItemChangedEvent)(leListWheelWidget*,
95 typedef enum leListWheelIndicatorFill
97 LE_LISTWHEEL_INDICATOR_FILL_NONE,
98 LE_LISTWHEEL_INDICATOR_FILL_SOLID,
99 LE_LISTWHEEL_INDICATOR_FILL_GRADIENT,
100 } leListWheelIndicatorFill;
113 typedef enum leListWheelZoomEffects
115 LE_LISTWHEEL_ZOOM_EFFECT_NONE,
116 LE_LISTWHEEL_ZOOM_EFFECT_VSCALE,
117 LE_LISTWHEEL_ZOOM_EFFECT_FULL_SCALE,
118 LE_LISTWHEEL_ZOOM_EFFECT_FIXED_SCALE,
119 } leListWheelZoomEffects;
138 typedef struct leListWheelItem
149 typedef struct leListWheelWidget leListWheelWidget;
151 #define LE_LISTWHEELWIDGET_VTABLE(THIS_TYPE) \ 152 LE_WIDGET_VTABLE(THIS_TYPE) \ 154 uint32_t (*getVisibleItemCount)(const THIS_TYPE* _this); \ 155 leResult (*setVisibleItemCount)(THIS_TYPE* _this, uint32_t cnt); \ 156 leRelativePosition (*getIconPosition)(const THIS_TYPE* _this); \ 157 leResult (*setIconPosition)(THIS_TYPE* _this, leRelativePosition pos); \ 158 uint32_t (*getIconMargin)(const THIS_TYPE* _this); \ 159 leResult (*setIconMargin)(THIS_TYPE* _this, uint32_t mg); \ 160 leBool (*getShowIndicators)(const THIS_TYPE* _this); \ 161 leResult (*setShowIndicators)(THIS_TYPE* _this, leBool b); \ 162 uint32_t (*getIndicatorArea)(const THIS_TYPE* _this); \ 163 leResult (*setIndicatorArea)(THIS_TYPE* _this, uint32_t area); \ 164 leBool (*getShaded)(const THIS_TYPE* _this); \ 165 leResult (*setShaded)(THIS_TYPE* _this, leBool b); \ 166 uint32_t (*getFlickInitSpeed)(const THIS_TYPE* _this); \ 167 leResult (*setFlickInitSpeed)(THIS_TYPE* _this, uint32_t sp); \ 168 uint32_t (*getMaxMomentum)(const THIS_TYPE* _this); \ 169 leResult (*setMaxMomentum)(THIS_TYPE* _this, uint32_t max); \ 170 uint32_t (*getMomentumFalloffRate)(const THIS_TYPE* _this); \ 171 leResult (*setMomentumFalloffRate)(THIS_TYPE* _this, uint32_t percent); \ 172 uint32_t (*getRotationUpdateRate)(const THIS_TYPE* _this); \ 173 leResult (*setRotationUpdateRate)(THIS_TYPE* _this, uint32_t ms); \ 174 uint32_t (*getItemCount)(const THIS_TYPE* _this); \ 175 int32_t (*appendItem)(THIS_TYPE* _this); \ 176 int32_t (*insertItem)(THIS_TYPE* _this, int32_t idx); \ 177 leResult (*removeItem)(THIS_TYPE* _this, int32_t idx); \ 178 leResult (*removeAllItems)(THIS_TYPE* _this); \ 179 int32_t (*getSelectedItem)(const THIS_TYPE* _this); \ 180 leResult (*setSelectedItem)(THIS_TYPE* _this, int32_t idx); \ 181 leResult (*selectPreviousItem)(THIS_TYPE* _this); \ 182 leResult (*selectNextItem)(THIS_TYPE* _this); \ 183 leString* (*getItemString)(const THIS_TYPE* _this, int32_t idx); \ 184 leResult (*setItemString)(THIS_TYPE* _this, int32_t idx, const leString* str); \ 185 leImage* (*getItemIcon)(const THIS_TYPE* _this, int32_t idx); \ 186 leResult (*setItemIcon)(THIS_TYPE* _this, int32_t idx, const leImage* img); \ 187 leListWheelWidget_SelectedItemChangedEvent (*getSelectedItemChangedEventCallback)(const THIS_TYPE* _this); \ 188 leResult (*setSelectedItemChangedEventCallback)(THIS_TYPE* _this, leListWheelWidget_SelectedItemChangedEvent cb); \ 189 leListWheelIndicatorFill (*getIndicatorFill)(const THIS_TYPE* _this); \ 190 leResult (*setIndicatorFill)(THIS_TYPE* _this, leListWheelIndicatorFill fill); \ 191 leListWheelZoomEffects (*getZoomEffects)(const THIS_TYPE* _this); \ 192 leResult (*setZoomEffects)(THIS_TYPE* _this, leListWheelZoomEffects zfx); \ 193 leBool (*getAutoHideWheel)(const THIS_TYPE* _this); \ 194 leResult (*setAutoHideWheel)(THIS_TYPE* _this, leBool b); \ 196 typedef struct leListWheelWidgetVTable
198 LE_LISTWHEELWIDGET_VTABLE(leListWheelWidget)
199 } leListWheelWidgetVTable;
213 typedef struct leListWheelWidget
217 const leListWheelWidgetVTable* fn;
220 int32_t selectedItem;
221 int32_t visibleItems;
230 uint32_t indicatorArea;
235 int32_t cycleDistance;
245 int32_t minFlickDelta;
250 int32_t momentumFalloff;
252 int32_t rotationCounter;
253 int32_t rotationTick;
257 leListWheelIndicatorFill indicatorFill;
258 leListWheelZoomEffects zoomEffects;
270 leListWheelWidget_SelectedItemChangedEvent cb;
293 leListWheelWidget* leListWheelWidget_New(
void);
305 void leListWheelWidget_Constructor(leListWheelWidget* wgt);
308 #define THIS_TYPE struct leWidget 363 virtual leResult setVisibleItemCount(leListWheelWidget* _this,
421 virtual leResult setIconPosition(leListWheelWidget* _this,
478 virtual leResult setIconMargin(leListWheelWidget* _this,
511 virtual leBool getShowIndicators(
const leListWheelWidget* _this);
547 virtual leResult setShowIndicators(leListWheelWidget* _this,
604 virtual leResult setIndicatorArea(leListWheelWidget* _this,
637 virtual leBool getShaded(
const leListWheelWidget* _this);
673 virtual leResult setShaded(leListWheelWidget* _this,
706 virtual uint32_t getFlickInitSpeed(
const leListWheelWidget* _this);
742 virtual leResult setFlickInitSpeed(leListWheelWidget* _this,
774 virtual uint32_t getMaxMomentum(
const leListWheelWidget* _this);
810 virtual leResult setMaxMomentum(leListWheelWidget* _this,
842 virtual uint32_t getMomentumFalloffRate(
const leListWheelWidget* _this);
878 virtual leResult setMomentumFalloffRate(leListWheelWidget* _this,
910 virtual uint32_t getRotationUpdateRate(
const leListWheelWidget* _this);
946 virtual leResult setRotationUpdateRate(leListWheelWidget* _this,
978 virtual uint32_t getItemCount(
const leListWheelWidget* _this);
1009 virtual int32_t appendItem(
const leListWheelWidget* _this);
1067 virtual leResult removeItem(leListWheelWidget* _this,
1100 virtual leResult removeAllItems(leListWheelWidget* _this);
1131 virtual int32_t getSelectedItem(
const leListWheelWidget* _this);
1167 virtual leResult setSelectedItem(leListWheelWidget* _this,
1200 virtual leResult selectPreviousItem(leListWheelWidget* _this);
1231 virtual leResult selectNextItem(leListWheelWidget* _this);
1266 virtual leString* getItemString(
const leListWheelWidget* _this,
1306 virtual leResult setItemString(leListWheelWidget* _this,
1343 virtual leImage* getItemIcon(
const leListWheelWidget* _this,
1384 virtual leResult setItemIcon(leListWheelWidget* _this,
1399 virtual leListWheelWidget_SelectedItemChangedEvent getSelectedItemChangedEventCallback
1400 (
const leListWheelWidget* _this);
1415 virtual leResult setSelectedItemChangedEventCallback(leListWheelWidget* _this,
1416 leListWheelWidget_SelectedItemChangedEvent cb);
1450 virtual leListWheelIndicatorFill getIndicatorFill(
const leListWheelWidget* _this);
1486 virtual leResult setIndicatorFill(leListWheelWidget* _this,
1487 leListWheelIndicatorFill fill);
1520 virtual leListWheelZoomEffects getZoomEffects(
const leListWheelWidget* _this);
1556 virtual leResult setZoomEffects(leListWheelWidget* _this,
1557 leListWheelZoomEffects zfx);
1588 virtual leBool getAutoHideWheel(
const leListWheelWidget* _this);
1624 virtual leResult setAutoHideWheel(leListWheelWidget* _this,
1634 #endif // LE_LISTWHEEL_WIDGET_ENABLED
Common macros and definitions used by Legato.
Image functions and defintions.
Definition: legato_image.h:181
This struct represents a string.
Definition: legato_string.h:107
leResult
This enum represents function call results.
Definition: legato_common.h:123
This struct represents a array.
Definition: legato_array.h:64
leRelativePosition
This enum represents the relative position modes for objects.
Definition: legato_common.h:302
leBool
This enum represents booleans.
Definition: legato_common.h:146
Fixed string functions and definitions.