MPLABĀ® Harmony Graphics Suite  GFX v3.13.0
Legato API Documentation
legato_widget_listwheel.h
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright (C) 2020 Microchip Technology Inc. and its subsidiaries.
3 *
4 * Subject to your compliance with these terms, you may use Microchip software
5 * and any derivatives exclusively with Microchip products. It is your
6 * responsibility to comply with third party license terms applicable to your
7 * use of third party software (including open source software) that may
8 * accompany Microchip software.
9 *
10 * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
11 * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
12 * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
13 * PARTICULAR PURPOSE.
14 *
15 * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
16 * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
17 * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
18 * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
19 * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
20 * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
21 * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
22 *******************************************************************************/
23 
24 /*******************************************************************************
25  Module for Microchip Graphics Library - Legato User Interface Library
26 
27  Company:
28  Microchip Technology Inc.
29 
30  File Name:
31  legato_widget_listwheel.h
32 
33  Summary:
34 
35 
36  Description:
37  This module implements list wheel (drawing-style list box) widget functions.
38 *******************************************************************************/
39 
46 #ifndef LEGATO_LISTWHEELWIDGET_H
47 #define LEGATO_LISTWHEELWIDGET_H
48 
50 
51 #if LE_LISTWHEEL_WIDGET_ENABLED == 1
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
57 //#include "gfx/legato/datastructure/legato_list.h"
61 
62 typedef struct leListWheelWidget leListWheelWidget;
63 
64 // *****************************************************************************
65 /* Function Pointer:
66  leListWheelWidget_SelectedItemChangedEvent
67 
68  Summary:
69  Selected item changed event function callback type
70 */
75 typedef void (* leListWheelWidget_SelectedItemChangedEvent)(leListWheelWidget*,
76  int32_t idx);
77 
78 // *****************************************************************************
79 // *****************************************************************************
80 // Section: Data Types and Constants
81 // *****************************************************************************
82 // *****************************************************************************
83 
84 // *****************************************************************************
85 /* Enumeration:
86  leListWheelIndicatorFill
87 
88  Summary:
89  Indicates the fill type for the listwheel indicator area.
90 */
95 typedef enum leListWheelIndicatorFill
96 {
97  LE_LISTWHEEL_INDICATOR_FILL_NONE,
98  LE_LISTWHEEL_INDICATOR_FILL_SOLID,
99  LE_LISTWHEEL_INDICATOR_FILL_GRADIENT,
100 } leListWheelIndicatorFill;
101 
102 // *****************************************************************************
103 /* Enumeration:
104  leListWheelEffects
105 
106  Summary:
107  Indicates the zoom effects for the list wheel items.
108 */
113 typedef enum leListWheelZoomEffects
114 {
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;
120 
121 // *****************************************************************************
122 /* Structure:
123  leListWheelItem
124 
125  Summary:
126  Implementation of a list wheel widget item struct
127 
128  Description:
129  A list wheel item contains either a text string, an icon, or both
130 
131  Remarks:
132  None.
133 */
138 typedef struct leListWheelItem
139 {
140  const leString* string;
141  const leImage* icon;
142 } leListWheelItem;
143 
144 /* internal use only */
149 typedef struct leListWheelWidget leListWheelWidget;
150 
151 #define LE_LISTWHEELWIDGET_VTABLE(THIS_TYPE) \
152  LE_WIDGET_VTABLE(THIS_TYPE) \
153  \
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); \
195 
196 typedef struct leListWheelWidgetVTable
197 {
198  LE_LISTWHEELWIDGET_VTABLE(leListWheelWidget)
199 } leListWheelWidgetVTable;
200 
206 // *****************************************************************************
213 typedef struct leListWheelWidget
214 {
215  leWidget widget; // widget base class
216 
217  const leListWheelWidgetVTable* fn;
218 
219  leArray items; // list of items for the wheel
220  int32_t selectedItem; // currently selected item
221  int32_t visibleItems; // number of visible items in the wheel
222  // must be odd and >= 3
223  int32_t topItem; // the current top item
224 
225  leRelativePosition iconPos; // the icon position of the items
226  uint32_t iconMargin; // the icon margin of the items
227 
228  leBool showIndicators; // controls the visibility of the horizontal
229  // indicator bars in the center of the widget
230  uint32_t indicatorArea; // controls the distance between the indicator bars
231 
232  uint32_t shaded; // determins if the background of the widget uses gradient
233  // shading to show depth
234 
235  int32_t cycleDistance; // determins the amount of drag distance needed
236  // to cycle between items
237  int32_t cycleDelta; // tracks the current amount of drag distance
238 
239  // these track drag movement over time
240  int32_t firstTouchY;
241  int32_t touchY;
242  int32_t lastTouchY;
243  leBool stillTouching;
244 
245  int32_t minFlickDelta; // amount of distance that must be dragged in a single
246  // frame to trigger momentum mode
247 
248  int32_t momentum; // current momentum value
249  int32_t maxMomentum; // maximum momentum value
250  int32_t momentumFalloff; // momentum falloff rate
251  int32_t rotation; // determines actual rotation of the wheel
252  int32_t rotationCounter; // time-based limiter for rotation calculations
253  int32_t rotationTick; // rotation time accumulator
254 
255  leBool snapPending;
256 
257  leListWheelIndicatorFill indicatorFill; // the indicator's fill type
258  leListWheelZoomEffects zoomEffects; // zoomEffects
259  leBool autoHideWheel; //auto hides the wheel
260  leBool hideWheel; //flag to hide/show the wheel
261 
262  struct
263  {
264  int32_t y;
265  int32_t per;
266 
267  uint32_t nextItem;
268  } paintState;
269 
270  leListWheelWidget_SelectedItemChangedEvent cb; // item changed callback
271 
272  leBorderType borderTypeCache; // Copy of border type, used to restore borders on auto-hide
273  leBackgroundType backgroundTypeCache; // Copy of background type, used to restore borders on auto-hide
274 } leListWheelWidget;
275 
276 // *****************************************************************************
277 // *****************************************************************************
278 // Section: Routines
279 // *****************************************************************************
280 // *****************************************************************************
281 
293 leListWheelWidget* leListWheelWidget_New(void);
294 
305 void leListWheelWidget_Constructor(leListWheelWidget* wgt);
306 
307 #ifdef _DOXYGEN_
308 #define THIS_TYPE struct leWidget
309 
310 // *****************************************************************************
311 /* Virtual Member Function:
312  uint32_t getVisibleItemCount(const leListWheelWidget* _this)
313 
314  Summary:
315  Gets the visible item count
316 
317  Description:
318  Gets the visible item count
319 
320  Parameters:
321  const leListWheelWidget* _this - The list wheel widget to operate on
322 
323  Remarks:
324  Usage - _this->fn->getVisibleItemCount(_this);
325 
326  Returns:
327  uint32_t - the visibility setting
328 */
329 
330 // *****************************************************************************
331 /* Virtual Member Function:
332  leResult setVisibleItemCount(leListWheelWidget* _this,
333  uint32_t cnt)
334 
335  Summary:
336  Sets the visible item count
337 
338  Description:
339  Sets the visible item count
340 
341  Parameters:
342  leListWheelWidget* _this - The list wheel widget to operate on
343  uint32_t cnt - the item count
344 
345  Remarks:
346  Usage - _this->fn->setVisibleItemCount(_this, cnt);
347 
348  Returns:
349  leResult - the result of the operation
350 */
363 virtual leResult setVisibleItemCount(leListWheelWidget* _this,
364  uint32_t cnt);
365 
366 
367 // *****************************************************************************
368 /* Virtual Member Function:
369  leRelativePosition getIconPosition(const leListWheelWidget* _this)
370 
371  Summary:
372  Gets the image icon position
373 
374  Description:
375  Gets the image icon position
376 
377  Parameters:
378  const leListWheelWidget* _this - The list wheel widget to operate on
379 
380  Remarks:
381  Usage - _this->fn->getIconPosition(_this);
382 
383  Returns:
384  leRelativePosition - the position
385 */
386 
387 // *****************************************************************************
388 /* Virtual Member Function:
389  leResult setIconPosition(leListWheelWidget* _this,
390  leRelativePosition pos)
391 
392  Summary:
393  Sets the image icon position
394 
395  Description:
396  Sets the image icon position
397 
398  Parameters:
399  leListWheelWidget* _this - The list wheel widget to operate on
400  leRelativePosition pos - the position value
401 
402  Remarks:
403  Usage - _this->fn->setIconPosition(_this, pos);
404 
405  Returns:
406  leResult - the result of the operation
407 */
421 virtual leResult setIconPosition(leListWheelWidget* _this,
422  leRelativePosition pos);
423 
424 // *****************************************************************************
425 /* Virtual Member Function:
426  uint32_t getIconMargin(const leListWheelWidget* _this)
427 
428  Summary:
429  Gets the icon margin
430 
431  Description:
432  Gets the icon margin
433 
434  Parameters:
435  const leListWheelWidget* _this - The list wheel widget to operate on
436 
437  Remarks:
438  Usage - _this->fn->getIconMargin(_this);
439 
440  Returns:
441  uint32_t - the icon margin value
442 */
443 
444 // *****************************************************************************
445 /* Virtual Member Function:
446  leResult setIconMargin(leListWheelWidget* _this,
447  uint32_t mg)
448 
449  Summary:
450  Sets the icon margin
451 
452  Description:
453  Sets the icon margin
454 
455  Parameters:
456  leListWheelWidget* _this - The list wheel widget to operate on
457  uint32_t mg - the margin value
458 
459  Remarks:
460  Usage - _this->fn->setIconMargin(_this, mg);
461 
462  Returns:
463  leResult - the result of the operation
464 */
478 virtual leResult setIconMargin(leListWheelWidget* _this,
479  uint32_t mg);
480 
481 // *****************************************************************************
482 /* Virtual Member Function:
483  leBool getShowIndicators(const leListWheelWidget* _this)
484 
485  Summary:
486  Indicates if the selection indicators should be drawn
487 
488  Description:
489  Indicates if the selection indicators should be drawn
490 
491  Parameters:
492  const leListWheelWidget* _this - The list wheel widget to operate on
493 
494  Remarks:
495  Usage - _this->fn->getShowIndicators(_this);
496 
497  Returns:
498  leBool - the setting value
499 */
511 virtual leBool getShowIndicators(const leListWheelWidget* _this);
512 
513 // *****************************************************************************
514 /* Virtual Member Function:
515  leResult setShowIndicators(leListWheelWidget* _this,
516  leBool b)
517 
518  Summary:
519  Set the draw indicator setting value
520 
521  Description:
522  Set the draw indicator setting value
523 
524  Parameters:
525  leListWheelWidget* _this - The list wheel widget to operate on
526  leBool b - the setting value
527 
528  Remarks:
529  Usage - _this->fn->setShowIndicators(_this, b);
530 
531  Returns:
532  leResult - the result of the operation
533 */
547 virtual leResult setShowIndicators(leListWheelWidget* _this,
548  leBool b);
549 
550 // *****************************************************************************
551 /* Virtual Member Function:
552  uint32_t getIndicatorArea(const leListWheelWidget* _this)
553 
554  Summary:
555  Gets the area of the selection indicators
556 
557  Description:
558  Gets the area of the selection indicators
559 
560  Parameters:
561  const leListWheelWidget* _this - The list wheel widget to operate on
562 
563  Remarks:
564  Usage - _this->fn->getIndicatorArea(_this);
565 
566  Returns:
567  uint32_t - the area value
568 */
569 
570 // *****************************************************************************
571 /* Virtual Member Function:
572  leResult setIndicatorArea(leListWheelWidget* _this,
573  uint32_t area)
574 
575  Summary:
576  Sets the area of hte selection indicators
577 
578  Description:
579  Sets the area of hte selection indicators
580 
581  Parameters:
582  leListWheelWidget* _this - The list wheel widget to operate on
583  uint32_t area - the area value
584 
585  Remarks:
586  Usage - _this->fn->setIndicatorArea(_this, area);
587 
588  Returns:
589  leResult - the result of the operation
590 */
604 virtual leResult setIndicatorArea(leListWheelWidget* _this,
605  uint32_t area);
606 
607 // *****************************************************************************
608 /* Virtual Member Function:
609  leBool getShaded(const leListWheelWidget* _this)
610 
611  Summary:
612  Gets the shaded setting value
613 
614  Description:
615  Gets the shaded setting value
616 
617  Parameters:
618  const leListWheelWidget* _this - The list wheel widget to operate on
619 
620  Remarks:
621  Usage - _this->fn->getShaded(_this);
622 
623  Returns:
624  leBool - the setting value
625 */
637 virtual leBool getShaded(const leListWheelWidget* _this);
638 
639 // *****************************************************************************
640 /* Virtual Member Function:
641  leResult setShaded(leListWheelWidget* _this,
642  leBool b)
643 
644  Summary:
645  Sets the shaded setting value
646 
647  Description:
648  Sets the shaded setting value
649 
650  Parameters:
651  leListWheelWidget* _this - The list wheel widget to operate on
652  leBool b - the setting value
653 
654  Remarks:
655  Usage - _this->fn->setShaded(_this, b);
656 
657  Returns:
658  leResult - the result of the operation
659 */
673 virtual leResult setShaded(leListWheelWidget* _this,
674  leBool sp);
675 
676 
677 // *****************************************************************************
678 /* Virtual Member Function:
679  uint32_t getFlickInitSpeed(const leListWheelWidget* _this)
680 
681  Summary:
682  Gets the flick init speed
683 
684  Description:
685  Gets the flick init speed
686 
687  Parameters:
688  const leListWheelWidget* _this - The list wheel widget to operate on
689 
690  Remarks:
691  Usage - _this->fn->getFlickInitSpeed(_this);
692 
693  Returns:
694  uint32_t - the speed value
695 */
706 virtual uint32_t getFlickInitSpeed(const leListWheelWidget* _this);
707 
708 // *****************************************************************************
709 /* Virtual Member Function:
710  leResult setFlickInitSpeed(leListWheelWidget* _this,
711  uint32_t sp)
712 
713  Summary:
714  Sets the flick init speed
715 
716  Description:
717  Sets the flick init speed
718 
719  Parameters:
720  leListWheelWidget* _this - The list wheel widget to operate on
721  uint32_t sp - the speed value
722 
723  Remarks:
724  Usage - _this->fn->setFlickInitSpeed(_this, sp);
725 
726  Returns:
727  leResult - the result of the operation
728 */
742 virtual leResult setFlickInitSpeed(leListWheelWidget* _this,
743  uint32_t sp);
744 
745 // *****************************************************************************
746 /* Virtual Member Function:
747  uint32_t getMaxMomentum(const leListWheelWidget* _this)
748 
749  Summary:
750  Get the max momentum value
751 
752  Description:
753  Get the max momentum value
754 
755  Parameters:
756  const leListWheelWidget* _this - The list wheel widget to operate on
757 
758  Remarks:
759  Usage - _this->fn->getMaxMomentum(_this);
760 
761  Returns:
762  uint32_t - the value
763 */
774 virtual uint32_t getMaxMomentum(const leListWheelWidget* _this);
775 
776 // *****************************************************************************
777 /* Virtual Member Function:
778  leResult setMaxMomentum(leListWheelWidget* _this,
779  uint32_t max)
780 
781  Summary:
782  Sets the max momentum value
783 
784  Description:
785  Sets the max momentum value
786 
787  Parameters:
788  leListWheelWidget* _this - The list wheel widget to operate on
789  uint32_t max - the maximum value
790 
791  Remarks:
792  Usage - _this->fn->setMaxMomentum(_this, max);
793 
794  Returns:
795  leResult - the result of the operation
796 */
810 virtual leResult setMaxMomentum(leListWheelWidget* _this,
811  uint32_t max);
812 
813 // *****************************************************************************
814 /* Virtual Member Function:
815  uint32_t getMomentumFalloffRate(const leListWheelWidget* _this)
816 
817  Summary:
818  Gets the momentum falloff rate
819 
820  Description:
821  Gets the momentum falloff rate
822 
823  Parameters:
824  const leListWheelWidget* _this - The list wheel widget to operate on
825 
826  Remarks:
827  Usage - _this->fn->getMomentumFalloffRate(_this);
828 
829  Returns:
830  uint32_t - the value
831 */
842 virtual uint32_t getMomentumFalloffRate(const leListWheelWidget* _this);
843 
844 // *****************************************************************************
845 /* Virtual Member Function:
846  leResult setMomentumFalloffRate(leListWheelWidget* _this,
847  uint32_t percent)
848 
849  Summary:
850  Sets the momentum falloff rate
851 
852  Description:
853  Sets the momentum falloff rate
854 
855  Parameters:
856  leListWheelWidget* _this - The list wheel widget to operate on
857  uint32_t percent - the value
858 
859  Remarks:
860  Usage - _this->fn->setMomentumFalloffRate(_this, percent);
861 
862  Returns:
863  leResult - the result of the operation
864 */
878 virtual leResult setMomentumFalloffRate(leListWheelWidget* _this,
879  uint32_t percent);
880 
881 // *****************************************************************************
882 /* Virtual Member Function:
883  uint32_t getRotationUpdateRate(const leListWheelWidget* _this)
884 
885  Summary:
886  Gets the rotation update rate
887 
888  Description:
889  Gets the rotation update rate
890 
891  Parameters:
892  const leListWheelWidget* _this - The list wheel widget to operate on
893 
894  Remarks:
895  Usage - _this->fn->getRotationUpdateRate(_this);
896 
897  Returns:
898  uint32_t - the value
899 */
910 virtual uint32_t getRotationUpdateRate(const leListWheelWidget* _this);
911 
912 // *****************************************************************************
913 /* Virtual Member Function:
914  leResult setRotationUpdateRate(leListWheelWidget* _this,
915  uint32_t ms)
916 
917  Summary:
918  Sets the rotation update rate
919 
920  Description:
921  Sets the rotation update rate
922 
923  Parameters:
924  leListWheelWidget* _this - The list wheel widget to operate on
925  uint32_t ms - the value
926 
927  Remarks:
928  Usage - _this->fn->setRotationUpdateRate(_this, ms);
929 
930  Returns:
931  leResult - the result of the operation
932 */
946 virtual leResult setRotationUpdateRate(leListWheelWidget* _this,
947  uint32_t ms);
948 
949 // *****************************************************************************
950 /* Virtual Member Function:
951  uint32_t getItemCount(const leListWheelWidget* _this)
952 
953  Summary:
954  Gets the total item count
955 
956  Description:
957  Gets the total item count
958 
959  Parameters:
960  const leListWheelWidget* _this - The list wheel widget to operate on
961 
962  Remarks:
963  Usage - _this->fn->getItemCount(_this);
964 
965  Returns:
966  uint32_t - the item count value
967 */
978 virtual uint32_t getItemCount(const leListWheelWidget* _this);
979 
980 // *****************************************************************************
981 /* Virtual Member Function:
982  int32_t appendItem(leListWheelWidget* _this)
983 
984  Summary:
985  Appends an item to the list
986 
987  Description:
988  Appends an item to the list
989 
990  Parameters:
991  leListWheelWidget* _this - The list wheel widget to operate on
992 
993  Remarks:
994  Usage - _this->fn->appendItem(_this);
995 
996  Returns:
997  int32_t - the index of the appended item
998 */
1009 virtual int32_t appendItem(const leListWheelWidget* _this);
1010 
1011 // *****************************************************************************
1012 /* Virtual Member Function:
1013  int32_t insertItem(leListWheelWidget* _this,
1014  int32_t idx)
1015 
1016  Summary:
1017  Inserts an item into the list
1018 
1019  Description:
1020  Inserts an item into the list
1021 
1022  Parameters:
1023  leListWheelWidget* _this - The list wheel widget to operate on
1024  int32_t idx - the index
1025 
1026  Remarks:
1027  Usage - _this->fn->insertItem(_this, idx);
1028 
1029  Returns:
1030  int32_t - the index of the appended item
1031 */
1032 
1033 // *****************************************************************************
1034 /* Virtual Member Function:
1035  leResult removeItem(leListWheelWidget* _this,
1036  int32_t idx)
1037 
1038  Summary:
1039  Removes an item from the list
1040 
1041  Description:
1042  Removes an item from the list
1043 
1044  Parameters:
1045  leListWheelWidget* _this - The list wheel widget to operate on
1046  int32_t idx - the index
1047 
1048  Remarks:
1049  Usage - _this->fn->removeItem(_this, idx);
1050 
1051  Returns:
1052  leResult - the result of the operation
1053 */
1067 virtual leResult removeItem(leListWheelWidget* _this,
1068  int32_t idx);
1069 
1070 // *****************************************************************************
1071 /* Virtual Member Function:
1072  leResult removeAllItems(leListWheelWidget* _this)
1073 
1074  Summary:
1075  Removes all items from the list
1076 
1077  Description:
1078  Removes all items from the list
1079 
1080  Parameters:
1081  leListWheelWidget* _this - The list wheel widget to operate on
1082 
1083  Remarks:
1084  Usage - _this->fn->removeAllItems(_this);
1085 
1086  Returns:
1087  leResult - the result of the operation
1088 */
1100 virtual leResult removeAllItems(leListWheelWidget* _this);
1101 
1102 // *****************************************************************************
1103 /* Virtual Member Function:
1104  int32_t getSelectedItem(const leListWheelWidget* _this)
1105 
1106  Summary:
1107  Gets the selected item
1108 
1109  Description:
1110  Gets the selected item
1111 
1112  Parameters:
1113  const leListWheelWidget* _this - The list wheel widget to operate on
1114 
1115  Remarks:
1116  Usage - _this->fn->getSelectedItem(_this);
1117 
1118  Returns:
1119  int32_t - the index of the selected item
1120 */
1131 virtual int32_t getSelectedItem(const leListWheelWidget* _this);
1132 
1133 // *****************************************************************************
1134 /* Virtual Member Function:
1135  leResult setSelectedItem(leListWheelWidget* _this,
1136  int32_t idx)
1137 
1138  Summary:
1139  Sets the selected item
1140 
1141  Description:
1142  Sets the selected item
1143 
1144  Parameters:
1145  leListWheelWidget* _this - The list wheel widget to operate on
1146  int32_t idx - the index
1147 
1148  Remarks:
1149  Usage - _this->fn->setSelectedItem(_this, idx);
1150 
1151  Returns:
1152  leResult - the result of the operation
1153 */
1167 virtual leResult setSelectedItem(leListWheelWidget* _this,
1168  int32_t idx);
1169 
1170 
1171 // *****************************************************************************
1172 /* Virtual Member Function:
1173  leResult selectPreviousItem(leListWheelWidget* _this)
1174 
1175  Summary:
1176  Selects the previous item
1177 
1178  Description:
1179  Selects the previous item
1180 
1181  Parameters:
1182  leListWheelWidget* _this - The list wheel widget to operate on
1183 
1184  Remarks:
1185  Usage - _this->fn->selectPreviousItem(_this);
1186 
1187  Returns:
1188  leResult - the result of the operation
1189 */
1200 virtual leResult selectPreviousItem(leListWheelWidget* _this);
1201 
1202 // *****************************************************************************
1203 /* Virtual Member Function:
1204  leResult selectNextItem(leListWheelWidget* _this)
1205 
1206  Summary:
1207  Selects the next item
1208 
1209  Description:
1210  Selects the next item
1211 
1212  Parameters:
1213  leListWheelWidget* _this - The list wheel widget to operate on
1214 
1215  Remarks:
1216  Usage - _this->fn->selectNextItem(_this);
1217 
1218  Returns:
1219  leResult - the result of the operation
1220 */
1231 virtual leResult selectNextItem(leListWheelWidget* _this);
1232 
1233 // *****************************************************************************
1234 /* Virtual Member Function:
1235  leString* getItemString(const leListWheelWidget* _this,
1236  int32_t idx)
1237 
1238  Summary:
1239  Gets the string pointer for an item
1240 
1241  Description:
1242  Gets the string pointer for an item
1243 
1244  Parameters:
1245  const leListWheelWidget* _this - The list wheel widget to operate on
1246  int32_t idx - the index
1247 
1248  Remarks:
1249  Usage - _this->fn->getItemString(_this, idx);
1250 
1251  Returns:
1252  leString* - the string pointer
1253 */
1266 virtual leString* getItemString(const leListWheelWidget* _this,
1267  int32_t idx);
1268 
1269 // *****************************************************************************
1270 /* Virtual Member Function:
1271  leResult setItemString(leListWheelWidget* _this,
1272  int32_t idx,
1273  const leString* str)
1274 
1275  Summary:
1276  Sets the string pointer for an item
1277 
1278  Description:
1279  Sets the string pointer for an item
1280 
1281  Parameters:
1282  leListWheelWidget* _this - The list wheel widget to operate on
1283  int32_t idx - the index
1284  const leString* str - the string pointer
1285 
1286  Remarks:
1287  Usage - _this->fn->setItemString(_this, idx, str);
1288 
1289  Returns:
1290  leResult - the result of the operation
1291 */
1306 virtual leResult setItemString(leListWheelWidget* _this,
1307  int32_t idx,
1308  const leString* str);
1309 
1310 // *****************************************************************************
1311 /* Virtual Member Function:
1312  leImage* getItemIcon(const leListWheelWidget* _this,
1313  int32_t idx)
1314 
1315  Summary:
1316  Gets the image pointer for an item
1317 
1318  Description:
1319  Gets the image pointer for an item
1320 
1321  Parameters:
1322  const leListWheelWidget* _this - The list wheel widget to operate on
1323  int32_t idx - the index
1324 
1325  Remarks:
1326  Usage - _this->fn->getItemIcon(_this, idx);
1327 
1328  Returns:
1329  leImage* - the image pointer
1330 */
1343 virtual leImage* getItemIcon(const leListWheelWidget* _this,
1344  int32_t idx);
1345 
1346 // *****************************************************************************
1347 /* Virtual Member Function:
1348  leResult setItemIcon(leListWheelWidget* _this,
1349  int32_t idx,
1350  const leImage* img)
1351 
1352  Summary:
1353  Sets the image pointer for an item
1354 
1355  Description:
1356  Sets the image pointer for an item
1357 
1358  Parameters:
1359  leListWheelWidget* _this - The list wheel widget to operate on
1360  int32_t idx - the index
1361  const leImage* img - the image pointer
1362 
1363  Remarks:
1364  Usage - _this->fn->setItemIcon(_this, idx, img);
1365 
1366  Returns:
1367  leResult - the result of the operation
1368 */
1384 virtual leResult setItemIcon(leListWheelWidget* _this,
1385  int32_t idx,
1386  const leImage* img);
1387 
1388 
1399 virtual leListWheelWidget_SelectedItemChangedEvent getSelectedItemChangedEventCallback
1400  (const leListWheelWidget* _this);
1401 
1415 virtual leResult setSelectedItemChangedEventCallback(leListWheelWidget* _this,
1416  leListWheelWidget_SelectedItemChangedEvent cb);
1417 
1418 
1419 
1420 // *****************************************************************************
1421 /* Virtual Member Function:
1422  leListWheelIndicatorFill getIndicatorFill(const leListWheelWidget* _this)
1423 
1424  Summary:
1425  Gets the indicator fill setting value
1426 
1427  Description:
1428  Gets the indicator fill setting value
1429 
1430  Parameters:
1431  const leListWheelWidget* _this - The list wheel widget to operate on
1432 
1433  Remarks:
1434  Usage - _this->fn->getIndicatorFill(_this);
1435 
1436  Returns:
1437  leListWheelIndicatorFill - the setting value
1438 */
1450 virtual leListWheelIndicatorFill getIndicatorFill(const leListWheelWidget* _this);
1451 
1452 // *****************************************************************************
1453 /* Virtual Member Function:
1454  leResult setIndicatorFill(leListWheelWidget* _this,
1455  leListWheelIndicatorFill fill)
1456 
1457  Summary:
1458  Sets the indicator fill setting value
1459 
1460  Description:
1461  Sets the indicator fill setting value
1462 
1463  Parameters:
1464  leListWheelWidget* _this - The list wheel widget to operate on
1465  leListWheelIndicatorFill fill - the setting value
1466 
1467  Remarks:
1468  Usage - _this->fn->setIndicatorFill(_this, fill);
1469 
1470  Returns:
1471  leResult - the result of the operation
1472 */
1486 virtual leResult setIndicatorFill(leListWheelWidget* _this,
1487  leListWheelIndicatorFill fill);
1488 
1489 
1490 // *****************************************************************************
1491 /* Virtual Member Function:
1492  leListWheelZoomEffects getZoomEffects(const leListWheelWidget* _this)
1493 
1494  Summary:
1495  Gets the current zoom effects
1496 
1497  Description:
1498  Gets the current zoom effects
1499 
1500  Parameters:
1501  const leListWheelWidget* _this - The list wheel widget to operate on
1502 
1503  Remarks:
1504  Usage - _this->fn->getZoomEffects(_this);
1505 
1506  Returns:
1507  leListWheelZoomEffects - the setting value
1508 */
1520 virtual leListWheelZoomEffects getZoomEffects(const leListWheelWidget* _this);
1521 
1522 // *****************************************************************************
1523 /* Virtual Member Function:
1524  leResult setZoomEffects(leListWheelWidget* _this,
1525  leListWheelZoomEffects zfx)
1526 
1527  Summary:
1528  Sets the zoom effects value
1529 
1530  Description:
1531  Sets the zoom effects value
1532 
1533  Parameters:
1534  leListWheelWidget* _this - The list wheel widget to operate on
1535  leListWheelZoomEffects zfx - the setting value
1536 
1537  Remarks:
1538  Usage - _this->fn->setZoomEffects(_this, zfx);
1539 
1540  Returns:
1541  leResult - the result of the operation
1542 */
1556 virtual leResult setZoomEffects(leListWheelWidget* _this,
1557  leListWheelZoomEffects zfx);
1558 
1559 // *****************************************************************************
1560 /* Virtual Member Function:
1561  leBool getAutoHideWheel(const leListWheelWidget* _this)
1562 
1563  Summary:
1564  Gets the wheel auto-hide setting
1565 
1566  Description:
1567  Gets the wheel auto-hide setting
1568 
1569  Parameters:
1570  const leListWheelWidget* _this - The list wheel widget to operate on
1571 
1572  Remarks:
1573  Usage - _this->fn->getAutoHideWheel(_this);
1574 
1575  Returns:
1576  leBool - the setting value
1577 */
1588 virtual leBool getAutoHideWheel(const leListWheelWidget* _this);
1589 
1590 // *****************************************************************************
1591 /* Virtual Member Function:
1592  leResult setAutoHideWheel(leListWheelWidget* _this,
1593  leBool b)
1594 
1595  Summary:
1596  Sets the wheel auto-hide setting
1597 
1598  Description:
1599  Sets the wheel auto-hide setting
1600 
1601  Parameters:
1602  leListWheelWidget* _this - The list wheel widget to operate on
1603  leBool b - the setting value
1604 
1605  Remarks:
1606  Usage - _this->fn->setAutoHideWheel(_this, b);
1607 
1608  Returns:
1609  leResult - the result of the operation
1610 */
1624 virtual leResult setAutoHideWheel(leListWheelWidget* _this,
1625  leBool b);
1626 
1627 #undef THIS_TYPE
1628 #endif
1629 
1630 #ifdef __cplusplus
1631 }
1632 #endif
1633 
1634 #endif // LE_LISTWHEEL_WIDGET_ENABLED
1635 #endif /* LEGATO_LISTWHEELWIDGET_H */
leBorderType
Used to define widget border types.
Definition: legato_widget.h:249
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
Used to define a widget.
Definition: legato_widget.h:624
leRelativePosition
This enum represents the relative position modes for objects.
Definition: legato_common.h:302
leBackgroundType
Used to define widget background types.
Definition: legato_widget.h:225
Legato widget definitions.
leBool
This enum represents booleans.
Definition: legato_common.h:146
Definition: widget.py:1
Fixed string functions and definitions.