MPLABĀ® Harmony Graphics Suite
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 //#include "gfx/legato/datastructure/legato_list.h"
57 
58 typedef struct leListWheelWidget leListWheelWidget;
59 
60 // *****************************************************************************
61 /* Function Pointer:
62  leListWheelWidget_SelectedItemChangedEvent
63 
64  Summary:
65  Selected item changed event function callback type
66 */
71 typedef void (*leListWheelWidget_SelectedItemChangedEvent)(leListWheelWidget*,
72  int32_t idx);
73 
74 // *****************************************************************************
75 // *****************************************************************************
76 // Section: Data Types and Constants
77 // *****************************************************************************
78 // *****************************************************************************
79 
80 // *****************************************************************************
81 /* Enumeration:
82  leListWheelIndicatorFill
83 
84  Summary:
85  Indicates the fill type for the listwheel indicator area.
86 */
91 typedef enum leListWheelIndicatorFill
92 {
93  LE_LISTWHEEL_INDICATOR_FILL_NONE,
94  LE_LISTWHEEL_INDICATOR_FILL_SOLID,
95  LE_LISTWHEEL_INDICATOR_FILL_GRADIENT,
96 } leListWheelIndicatorFill;
97 
98 // *****************************************************************************
99 /* Enumeration:
100  leListWheelEffects
101 
102  Summary:
103  Indicates the zoom effects for the list wheel items.
104 */
109 typedef enum leListWheelZoomEffects
110 {
111  LE_LISTWHEEL_ZOOM_EFFECT_NONE,
112  LE_LISTWHEEL_ZOOM_EFFECT_VSCALE,
113  LE_LISTWHEEL_ZOOM_EFFECT_FULL_SCALE,
114  LE_LISTWHEEL_ZOOM_EFFECT_FIXED_SCALE,
115 } leListWheelZoomEffects;
116 
117 // *****************************************************************************
118 /* Structure:
119  leListWheelItem
120 
121  Summary:
122  Implementation of a list wheel widget item struct
123 
124  Description:
125  A list wheel item contains either a text string, an icon, or both
126 
127  Remarks:
128  None.
129 */
134 typedef struct leListWheelItem
135 {
136  const leString* string;
137  const leImage* icon;
138 } leListWheelItem;
139 
140 /* internal use only */
145 typedef struct leListWheelWidget leListWheelWidget;
146 
147 #define LE_LISTWHEELWIDGET_VTABLE(THIS_TYPE) \
148  LE_WIDGET_VTABLE(THIS_TYPE) \
149  \
150  uint32_t (*getVisibleItemCount)(const THIS_TYPE* _this); \
151  leResult (*setVisibleItemCount)(THIS_TYPE* _this, uint32_t cnt); \
152  leRelativePosition (*getIconPosition)(const THIS_TYPE* _this); \
153  leResult (*setIconPosition)(THIS_TYPE* _this, leRelativePosition pos); \
154  uint32_t (*getIconMargin)(const THIS_TYPE* _this); \
155  leResult (*setIconMargin)(THIS_TYPE* _this, uint32_t mg); \
156  leBool (*getShowIndicators)(const THIS_TYPE* _this); \
157  leResult (*setShowIndicators)(THIS_TYPE* _this, leBool b); \
158  uint32_t (*getIndicatorArea)(const THIS_TYPE* _this); \
159  leResult (*setIndicatorArea)(THIS_TYPE* _this, uint32_t area); \
160  leBool (*getShaded)(const THIS_TYPE* _this); \
161  leResult (*setShaded)(THIS_TYPE* _this, leBool b); \
162  uint32_t (*getFlickInitSpeed)(const THIS_TYPE* _this); \
163  leResult (*setFlickInitSpeed)(THIS_TYPE* _this, uint32_t sp); \
164  uint32_t (*getMaxMomentum)(const THIS_TYPE* _this); \
165  leResult (*setMaxMomentum)(THIS_TYPE* _this, uint32_t max); \
166  uint32_t (*getMomentumFalloffRate)(const THIS_TYPE* _this); \
167  leResult (*setMomentumFalloffRate)(THIS_TYPE* _this, uint32_t percent); \
168  uint32_t (*getRotationUpdateRate)(const THIS_TYPE* _this); \
169  leResult (*setRotationUpdateRate)(THIS_TYPE* _this, uint32_t ms); \
170  uint32_t (*getItemCount)(const THIS_TYPE* _this); \
171  int32_t (*appendItem)(THIS_TYPE* _this); \
172  int32_t (*insertItem)(THIS_TYPE* _this, int32_t idx); \
173  leResult (*removeItem)(THIS_TYPE* _this, int32_t idx); \
174  leResult (*removeAllItems)(THIS_TYPE* _this); \
175  int32_t (*getSelectedItem)(const THIS_TYPE* _this); \
176  leResult (*setSelectedItem)(THIS_TYPE* _this, int32_t idx); \
177  leResult (*selectPreviousItem)(THIS_TYPE* _this); \
178  leResult (*selectNextItem)(THIS_TYPE* _this); \
179  leString* (*getItemString)(const THIS_TYPE* _this, int32_t idx); \
180  leResult (*setItemString)(THIS_TYPE* _this, int32_t idx, const leString* str); \
181  leImage* (*getItemIcon)(const THIS_TYPE* _this, int32_t idx); \
182  leResult (*setItemIcon)(THIS_TYPE* _this, int32_t idx, const leImage* img); \
183  leListWheelWidget_SelectedItemChangedEvent (*getSelectedItemChangedEventCallback)(const THIS_TYPE* _this); \
184  leResult (*setSelectedItemChangedEventCallback)(THIS_TYPE* _this, leListWheelWidget_SelectedItemChangedEvent cb); \
185  leListWheelIndicatorFill (*getIndicatorFill)(const THIS_TYPE* _this); \
186  leResult (*setIndicatorFill)(THIS_TYPE* _this, leListWheelIndicatorFill fill); \
187  leListWheelZoomEffects (*getZoomEffects)(const THIS_TYPE* _this); \
188  leResult (*setZoomEffects)(THIS_TYPE* _this, leListWheelZoomEffects zfx); \
189  leBool (*getAutoHideWheel)(const THIS_TYPE* _this); \
190  leResult (*setAutoHideWheel)(THIS_TYPE* _this, leBool b); \
191 
192 typedef struct leListWheelWidgetVTable
193 {
194  LE_LISTWHEELWIDGET_VTABLE(leListWheelWidget)
195 } leListWheelWidgetVTable;
196 
202 // *****************************************************************************
209 typedef struct leListWheelWidget
210 {
211  leWidget widget; // widget base class
212 
213  const leListWheelWidgetVTable* fn;
214 
215  leArray items; // list of items for the wheel
216  int32_t selectedItem; // currently selected item
217  int32_t visibleItems; // number of visible items in the wheel
218  // must be odd and >= 3
219  int32_t topItem; // the current top item
220 
221  leRelativePosition iconPos; // the icon position of the items
222  uint32_t iconMargin; // the icon margin of the items
223 
224  leBool showIndicators; // controls the visibility of the horizontal
225  // indicator bars in the center of the widget
226  uint32_t indicatorArea; // controls the distance between the indicator bars
227 
228  uint32_t shaded; // determins if the background of the widget uses gradient
229  // shading to show depth
230 
231  int32_t cycleDistance; // determins the amount of drag distance needed
232  // to cycle between items
233  int32_t cycleDelta; // tracks the current amount of drag distance
234 
235  // these track drag movement over time
236  int32_t firstTouchY;
237  int32_t touchY;
238  int32_t lastTouchY;
239  leBool stillTouching;
240 
241  int32_t minFlickDelta; // amount of distance that must be dragged in a single
242  // frame to trigger momentum mode
243 
244  int32_t momentum; // current momentum value
245  int32_t maxMomentum; // maximum momentum value
246  int32_t momentumFalloff; // momentum falloff rate
247  int32_t rotation; // determines actual rotation of the wheel
248  int32_t rotationCounter; // time-based limiter for rotation calculations
249  int32_t rotationTick; // rotation time accumulator
250 
251  leBool snapPending;
252 
253  leListWheelIndicatorFill indicatorFill; // the indicator's fill type
254  leListWheelZoomEffects zoomEffects; // zoomEffects
255  leBool autoHideWheel; //auto hides the wheel
256  leBool hideWheel; //flag to hide/show the wheel
257 
258  struct
259  {
260  int32_t y;
261  int32_t per;
262 
263  uint32_t nextItem;
264  } paintState;
265 
266  leListWheelWidget_SelectedItemChangedEvent cb; // item changed callback
267 
268  leBorderType borderTypeCache; // Copy of border type, used to restore borders on auto-hide
269  leBackgroundType backgroundTypeCache; // Copy of background type, used to restore borders on auto-hide
270 } leListWheelWidget;
271 
272 // *****************************************************************************
273 // *****************************************************************************
274 // Section: Routines
275 // *****************************************************************************
276 // *****************************************************************************
277 
289 LIB_EXPORT leListWheelWidget* leListWheelWidget_New();
290 
301 LIB_EXPORT void leListWheelWidget_Constructor(leListWheelWidget* wgt);
302 
303 
304 #ifdef _DOXYGEN_
305 #define THIS_TYPE struct leWidget
306 
307 // *****************************************************************************
308 /* Virtual Member Function:
309  uint32_t getVisibleItemCount(const leListWheelWidget* _this)
310 
311  Summary:
312  Gets the visible item count
313 
314  Description:
315  Gets the visible item count
316 
317  Parameters:
318  const leListWheelWidget* _this - The list wheel widget to operate on
319 
320  Remarks:
321  Usage - _this->fn->getVisibleItemCount(_this);
322 
323  Returns:
324  uint32_t - the visibility setting
325 */
326 
327 // *****************************************************************************
328 /* Virtual Member Function:
329  leResult setVisibleItemCount(leListWheelWidget* _this,
330  uint32_t cnt)
331 
332  Summary:
333  Sets the visible item count
334 
335  Description:
336  Sets the visible item count
337 
338  Parameters:
339  leListWheelWidget* _this - The list wheel widget to operate on
340  uint32_t cnt - the item count
341 
342  Remarks:
343  Usage - _this->fn->setVisibleItemCount(_this, cnt);
344 
345  Returns:
346  leResult - the result of the operation
347 */
360 virtual leResult setVisibleItemCount(leListWheelWidget* _this,
361  uint32_t cnt);
362 
363 
364 // *****************************************************************************
365 /* Virtual Member Function:
366  leRelativePosition getIconPosition(const leListWheelWidget* _this)
367 
368  Summary:
369  Gets the image icon position
370 
371  Description:
372  Gets the image icon position
373 
374  Parameters:
375  const leListWheelWidget* _this - The list wheel widget to operate on
376 
377  Remarks:
378  Usage - _this->fn->getIconPosition(_this);
379 
380  Returns:
381  leRelativePosition - the position
382 */
383 
384 // *****************************************************************************
385 /* Virtual Member Function:
386  leResult setIconPosition(leListWheelWidget* _this,
387  leRelativePosition pos)
388 
389  Summary:
390  Sets the image icon position
391 
392  Description:
393  Sets the image icon position
394 
395  Parameters:
396  leListWheelWidget* _this - The list wheel widget to operate on
397  leRelativePosition pos - the position value
398 
399  Remarks:
400  Usage - _this->fn->setIconPosition(_this, pos);
401 
402  Returns:
403  leResult - the result of the operation
404 */
418 virtual leResult setIconPosition(leListWheelWidget* _this,
419  leRelativePosition pos);
420 
421 // *****************************************************************************
422 /* Virtual Member Function:
423  uint32_t getIconMargin(const leListWheelWidget* _this)
424 
425  Summary:
426  Gets the icon margin
427 
428  Description:
429  Gets the icon margin
430 
431  Parameters:
432  const leListWheelWidget* _this - The list wheel widget to operate on
433 
434  Remarks:
435  Usage - _this->fn->getIconMargin(_this);
436 
437  Returns:
438  uint32_t - the icon margin value
439 */
440 
441 // *****************************************************************************
442 /* Virtual Member Function:
443  leResult setIconMargin(leListWheelWidget* _this,
444  uint32_t mg)
445 
446  Summary:
447  Sets the icon margin
448 
449  Description:
450  Sets the icon margin
451 
452  Parameters:
453  leListWheelWidget* _this - The list wheel widget to operate on
454  uint32_t mg - the margin value
455 
456  Remarks:
457  Usage - _this->fn->setIconMargin(_this, mg);
458 
459  Returns:
460  leResult - the result of the operation
461 */
475 virtual leResult setIconMargin(leListWheelWidget* _this,
476  uint32_t mg);
477 
478 // *****************************************************************************
479 /* Virtual Member Function:
480  leBool getShowIndicators(const leListWheelWidget* _this)
481 
482  Summary:
483  Indicates if the selection indicators should be drawn
484 
485  Description:
486  Indicates if the selection indicators should be drawn
487 
488  Parameters:
489  const leListWheelWidget* _this - The list wheel widget to operate on
490 
491  Remarks:
492  Usage - _this->fn->getShowIndicators(_this);
493 
494  Returns:
495  leBool - the setting value
496 */
508 virtual leBool getShowIndicators(const leListWheelWidget* _this);
509 
510 // *****************************************************************************
511 /* Virtual Member Function:
512  leResult setShowIndicators(leListWheelWidget* _this,
513  leBool b)
514 
515  Summary:
516  Set the draw indicator setting value
517 
518  Description:
519  Set the draw indicator setting value
520 
521  Parameters:
522  leListWheelWidget* _this - The list wheel widget to operate on
523  leBool b - the setting value
524 
525  Remarks:
526  Usage - _this->fn->setShowIndicators(_this, b);
527 
528  Returns:
529  leResult - the result of the operation
530 */
544 virtual leResult setShowIndicators(leListWheelWidget* _this,
545  leBool b);
546 
547 // *****************************************************************************
548 /* Virtual Member Function:
549  uint32_t getIndicatorArea(const leListWheelWidget* _this)
550 
551  Summary:
552  Gets the area of the selection indicators
553 
554  Description:
555  Gets the area of the selection indicators
556 
557  Parameters:
558  const leListWheelWidget* _this - The list wheel widget to operate on
559 
560  Remarks:
561  Usage - _this->fn->getIndicatorArea(_this);
562 
563  Returns:
564  uint32_t - the area value
565 */
566 
567 // *****************************************************************************
568 /* Virtual Member Function:
569  leResult setIndicatorArea(leListWheelWidget* _this,
570  uint32_t area)
571 
572  Summary:
573  Sets the area of hte selection indicators
574 
575  Description:
576  Sets the area of hte selection indicators
577 
578  Parameters:
579  leListWheelWidget* _this - The list wheel widget to operate on
580  uint32_t area - the area value
581 
582  Remarks:
583  Usage - _this->fn->setIndicatorArea(_this, area);
584 
585  Returns:
586  leResult - the result of the operation
587 */
601 virtual leResult setIndicatorArea(leListWheelWidget* _this,
602  uint32_t area);
603 
604 // *****************************************************************************
605 /* Virtual Member Function:
606  leBool getShaded(const leListWheelWidget* _this)
607 
608  Summary:
609  Gets the shaded setting value
610 
611  Description:
612  Gets the shaded setting value
613 
614  Parameters:
615  const leListWheelWidget* _this - The list wheel widget to operate on
616 
617  Remarks:
618  Usage - _this->fn->getShaded(_this);
619 
620  Returns:
621  leBool - the setting value
622 */
634 virtual leBool getShaded(const leListWheelWidget* _this);
635 
636 // *****************************************************************************
637 /* Virtual Member Function:
638  leResult setShaded(leListWheelWidget* _this,
639  leBool b)
640 
641  Summary:
642  Sets the shaded setting value
643 
644  Description:
645  Sets the shaded setting value
646 
647  Parameters:
648  leListWheelWidget* _this - The list wheel widget to operate on
649  leBool b - the setting value
650 
651  Remarks:
652  Usage - _this->fn->setShaded(_this, b);
653 
654  Returns:
655  leResult - the result of the operation
656 */
670 virtual leResult setShaded(leListWheelWidget* _this,
671  leBool sp);
672 
673 
674 // *****************************************************************************
675 /* Virtual Member Function:
676  uint32_t getFlickInitSpeed(const leListWheelWidget* _this)
677 
678  Summary:
679  Gets the flick init speed
680 
681  Description:
682  Gets the flick init speed
683 
684  Parameters:
685  const leListWheelWidget* _this - The list wheel widget to operate on
686 
687  Remarks:
688  Usage - _this->fn->getFlickInitSpeed(_this);
689 
690  Returns:
691  uint32_t - the speed value
692 */
703 virtual uint32_t getFlickInitSpeed(const leListWheelWidget* _this);
704 
705 // *****************************************************************************
706 /* Virtual Member Function:
707  leResult setFlickInitSpeed(leListWheelWidget* _this,
708  uint32_t sp)
709 
710  Summary:
711  Sets the flick init speed
712 
713  Description:
714  Sets the flick init speed
715 
716  Parameters:
717  leListWheelWidget* _this - The list wheel widget to operate on
718  uint32_t sp - the speed value
719 
720  Remarks:
721  Usage - _this->fn->setFlickInitSpeed(_this, sp);
722 
723  Returns:
724  leResult - the result of the operation
725 */
739 virtual leResult setFlickInitSpeed(leListWheelWidget* _this,
740  uint32_t sp);
741 
742 // *****************************************************************************
743 /* Virtual Member Function:
744  uint32_t getMaxMomentum(const leListWheelWidget* _this)
745 
746  Summary:
747  Get the max momentum value
748 
749  Description:
750  Get the max momentum value
751 
752  Parameters:
753  const leListWheelWidget* _this - The list wheel widget to operate on
754 
755  Remarks:
756  Usage - _this->fn->getMaxMomentum(_this);
757 
758  Returns:
759  uint32_t - the value
760 */
771 virtual uint32_t getMaxMomentum(const leListWheelWidget* _this);
772 
773 // *****************************************************************************
774 /* Virtual Member Function:
775  leResult setMaxMomentum(leListWheelWidget* _this,
776  uint32_t max)
777 
778  Summary:
779  Sets the max momentum value
780 
781  Description:
782  Sets the max momentum value
783 
784  Parameters:
785  leListWheelWidget* _this - The list wheel widget to operate on
786  uint32_t max - the maximum value
787 
788  Remarks:
789  Usage - _this->fn->setMaxMomentum(_this, max);
790 
791  Returns:
792  leResult - the result of the operation
793 */
807 virtual leResult setMaxMomentum(leListWheelWidget* _this,
808  uint32_t max);
809 
810 // *****************************************************************************
811 /* Virtual Member Function:
812  uint32_t getMomentumFalloffRate(const leListWheelWidget* _this)
813 
814  Summary:
815  Gets the momentum falloff rate
816 
817  Description:
818  Gets the momentum falloff rate
819 
820  Parameters:
821  const leListWheelWidget* _this - The list wheel widget to operate on
822 
823  Remarks:
824  Usage - _this->fn->getMomentumFalloffRate(_this);
825 
826  Returns:
827  uint32_t - the value
828 */
839 virtual uint32_t getMomentumFalloffRate(const leListWheelWidget* _this);
840 
841 // *****************************************************************************
842 /* Virtual Member Function:
843  leResult setMomentumFalloffRate(leListWheelWidget* _this,
844  uint32_t percent)
845 
846  Summary:
847  Sets the momentum falloff rate
848 
849  Description:
850  Sets the momentum falloff rate
851 
852  Parameters:
853  leListWheelWidget* _this - The list wheel widget to operate on
854  uint32_t percent - the value
855 
856  Remarks:
857  Usage - _this->fn->setMomentumFalloffRate(_this, percent);
858 
859  Returns:
860  leResult - the result of the operation
861 */
875 virtual leResult setMomentumFalloffRate(leListWheelWidget* _this,
876  uint32_t percent);
877 
878 // *****************************************************************************
879 /* Virtual Member Function:
880  uint32_t getRotationUpdateRate(const leListWheelWidget* _this)
881 
882  Summary:
883  Gets the rotation update rate
884 
885  Description:
886  Gets the rotation update rate
887 
888  Parameters:
889  const leListWheelWidget* _this - The list wheel widget to operate on
890 
891  Remarks:
892  Usage - _this->fn->getRotationUpdateRate(_this);
893 
894  Returns:
895  uint32_t - the value
896 */
907 virtual uint32_t getRotationUpdateRate(const leListWheelWidget* _this);
908 
909 // *****************************************************************************
910 /* Virtual Member Function:
911  leResult setRotationUpdateRate(leListWheelWidget* _this,
912  uint32_t ms)
913 
914  Summary:
915  Sets the rotation update rate
916 
917  Description:
918  Sets the rotation update rate
919 
920  Parameters:
921  leListWheelWidget* _this - The list wheel widget to operate on
922  uint32_t ms - the value
923 
924  Remarks:
925  Usage - _this->fn->setRotationUpdateRate(_this, ms);
926 
927  Returns:
928  leResult - the result of the operation
929 */
943 virtual leResult setRotationUpdateRate(leListWheelWidget* _this,
944  uint32_t ms);
945 
946 // *****************************************************************************
947 /* Virtual Member Function:
948  uint32_t getItemCount(const leListWheelWidget* _this)
949 
950  Summary:
951  Gets the total item count
952 
953  Description:
954  Gets the total item count
955 
956  Parameters:
957  const leListWheelWidget* _this - The list wheel widget to operate on
958 
959  Remarks:
960  Usage - _this->fn->getItemCount(_this);
961 
962  Returns:
963  uint32_t - the item count value
964 */
975 virtual uint32_t getItemCount(const leListWheelWidget* _this);
976 
977 // *****************************************************************************
978 /* Virtual Member Function:
979  int32_t appendItem(leListWheelWidget* _this)
980 
981  Summary:
982  Appends an item to the list
983 
984  Description:
985  Appends an item to the list
986 
987  Parameters:
988  leListWheelWidget* _this - The list wheel widget to operate on
989 
990  Remarks:
991  Usage - _this->fn->appendItem(_this);
992 
993  Returns:
994  int32_t - the index of the appended item
995 */
1006 virtual int32_t appendItem(const leListWheelWidget* _this);
1007 
1008 // *****************************************************************************
1009 /* Virtual Member Function:
1010  int32_t insertItem(leListWheelWidget* _this,
1011  int32_t idx)
1012 
1013  Summary:
1014  Inserts an item into the list
1015 
1016  Description:
1017  Inserts an item into the list
1018 
1019  Parameters:
1020  leListWheelWidget* _this - The list wheel widget to operate on
1021  int32_t idx - the index
1022 
1023  Remarks:
1024  Usage - _this->fn->insertItem(_this, idx);
1025 
1026  Returns:
1027  int32_t - the index of the appended item
1028 */
1029 
1030 // *****************************************************************************
1031 /* Virtual Member Function:
1032  leResult removeItem(leListWheelWidget* _this,
1033  int32_t idx)
1034 
1035  Summary:
1036  Removes an item from the list
1037 
1038  Description:
1039  Removes an item from the list
1040 
1041  Parameters:
1042  leListWheelWidget* _this - The list wheel widget to operate on
1043  int32_t idx - the index
1044 
1045  Remarks:
1046  Usage - _this->fn->removeItem(_this, idx);
1047 
1048  Returns:
1049  leResult - the result of the operation
1050 */
1064 virtual leResult removeItem(leListWheelWidget* _this,
1065  int32_t idx);
1066 
1067 // *****************************************************************************
1068 /* Virtual Member Function:
1069  leResult removeAllItems(leListWheelWidget* _this)
1070 
1071  Summary:
1072  Removes all items from the list
1073 
1074  Description:
1075  Removes all items from the list
1076 
1077  Parameters:
1078  leListWheelWidget* _this - The list wheel widget to operate on
1079 
1080  Remarks:
1081  Usage - _this->fn->removeAllItems(_this);
1082 
1083  Returns:
1084  leResult - the result of the operation
1085 */
1097 virtual leResult removeAllItems(leListWheelWidget* _this);
1098 
1099 // *****************************************************************************
1100 /* Virtual Member Function:
1101  int32_t getSelectedItem(const leListWheelWidget* _this)
1102 
1103  Summary:
1104  Gets the selected item
1105 
1106  Description:
1107  Gets the selected item
1108 
1109  Parameters:
1110  const leListWheelWidget* _this - The list wheel widget to operate on
1111 
1112  Remarks:
1113  Usage - _this->fn->getSelectedItem(_this);
1114 
1115  Returns:
1116  int32_t - the index of the selected item
1117 */
1128 virtual int32_t getSelectedItem(const leListWheelWidget* _this);
1129 
1130 // *****************************************************************************
1131 /* Virtual Member Function:
1132  leResult setSelectedItem(leListWheelWidget* _this,
1133  int32_t idx)
1134 
1135  Summary:
1136  Sets the selected item
1137 
1138  Description:
1139  Sets the selected item
1140 
1141  Parameters:
1142  leListWheelWidget* _this - The list wheel widget to operate on
1143  int32_t idx - the index
1144 
1145  Remarks:
1146  Usage - _this->fn->setSelectedItem(_this, idx);
1147 
1148  Returns:
1149  leResult - the result of the operation
1150 */
1164 virtual leResult setSelectedItem(leListWheelWidget* _this,
1165  int32_t idx);
1166 
1167 
1168 // *****************************************************************************
1169 /* Virtual Member Function:
1170  leResult selectPreviousItem(leListWheelWidget* _this)
1171 
1172  Summary:
1173  Selects the previous item
1174 
1175  Description:
1176  Selects the previous item
1177 
1178  Parameters:
1179  leListWheelWidget* _this - The list wheel widget to operate on
1180 
1181  Remarks:
1182  Usage - _this->fn->selectPreviousItem(_this);
1183 
1184  Returns:
1185  leResult - the result of the operation
1186 */
1197 virtual leResult selectPreviousItem(leListWheelWidget* _this);
1198 
1199 // *****************************************************************************
1200 /* Virtual Member Function:
1201  leResult selectNextItem(leListWheelWidget* _this)
1202 
1203  Summary:
1204  Selects the next item
1205 
1206  Description:
1207  Selects the next item
1208 
1209  Parameters:
1210  leListWheelWidget* _this - The list wheel widget to operate on
1211 
1212  Remarks:
1213  Usage - _this->fn->selectNextItem(_this);
1214 
1215  Returns:
1216  leResult - the result of the operation
1217 */
1228 virtual leResult selectNextItem(leListWheelWidget* _this);
1229 
1230 // *****************************************************************************
1231 /* Virtual Member Function:
1232  leString* getItemString(const leListWheelWidget* _this,
1233  int32_t idx)
1234 
1235  Summary:
1236  Gets the string pointer for an item
1237 
1238  Description:
1239  Gets the string pointer for an item
1240 
1241  Parameters:
1242  const leListWheelWidget* _this - The list wheel widget to operate on
1243  int32_t idx - the index
1244 
1245  Remarks:
1246  Usage - _this->fn->getItemString(_this, idx);
1247 
1248  Returns:
1249  leString* - the string pointer
1250 */
1263 virtual leString* getItemString(const leListWheelWidget* _this,
1264  int32_t idx);
1265 
1266 // *****************************************************************************
1267 /* Virtual Member Function:
1268  leResult setItemString(leListWheelWidget* _this,
1269  int32_t idx,
1270  const leString* str)
1271 
1272  Summary:
1273  Sets the string pointer for an item
1274 
1275  Description:
1276  Sets the string pointer for an item
1277 
1278  Parameters:
1279  leListWheelWidget* _this - The list wheel widget to operate on
1280  int32_t idx - the index
1281  const leString* str - the string pointer
1282 
1283  Remarks:
1284  Usage - _this->fn->setItemString(_this, idx, str);
1285 
1286  Returns:
1287  leResult - the result of the operation
1288 */
1303 virtual leResult setItemString(leListWheelWidget* _this,
1304  int32_t idx,
1305  const leString* str);
1306 
1307 // *****************************************************************************
1308 /* Virtual Member Function:
1309  leImage* getItemIcon(const leListWheelWidget* _this,
1310  int32_t idx)
1311 
1312  Summary:
1313  Gets the image pointer for an item
1314 
1315  Description:
1316  Gets the image pointer for an item
1317 
1318  Parameters:
1319  const leListWheelWidget* _this - The list wheel widget to operate on
1320  int32_t idx - the index
1321 
1322  Remarks:
1323  Usage - _this->fn->getItemIcon(_this, idx);
1324 
1325  Returns:
1326  leImage* - the image pointer
1327 */
1340 virtual leImage* getItemIcon(const leListWheelWidget* _this,
1341  int32_t idx);
1342 
1343 // *****************************************************************************
1344 /* Virtual Member Function:
1345  leResult setItemIcon(leListWheelWidget* _this,
1346  int32_t idx,
1347  const leImage* img)
1348 
1349  Summary:
1350  Sets the image pointer for an item
1351 
1352  Description:
1353  Sets the image pointer for an item
1354 
1355  Parameters:
1356  leListWheelWidget* _this - The list wheel widget to operate on
1357  int32_t idx - the index
1358  const leImage* img - the image pointer
1359 
1360  Remarks:
1361  Usage - _this->fn->setItemIcon(_this, idx, img);
1362 
1363  Returns:
1364  leResult - the result of the operation
1365 */
1381 virtual leResult setItemIcon(leListWheelWidget* _this,
1382  int32_t idx,
1383  const leImage* img);
1384 
1385 
1396 virtual leListWheelWidget_SelectedItemChangedEvent getSelectedItemChangedEventCallback
1397  (const leListWheelWidget* _this);
1398 
1412 virtual leResult setSelectedItemChangedEventCallback(leListWheelWidget* _this,
1413  leListWheelWidget_SelectedItemChangedEvent cb);
1414 
1415 
1416 
1417 // *****************************************************************************
1418 /* Virtual Member Function:
1419  leListWheelIndicatorFill getIndicatorFill(const leListWheelWidget* _this)
1420 
1421  Summary:
1422  Gets the indicator fill setting value
1423 
1424  Description:
1425  Gets the indicator fill setting value
1426 
1427  Parameters:
1428  const leListWheelWidget* _this - The list wheel widget to operate on
1429 
1430  Remarks:
1431  Usage - _this->fn->getIndicatorFill(_this);
1432 
1433  Returns:
1434  leListWheelIndicatorFill - the setting value
1435 */
1447 virtual leListWheelIndicatorFill getIndicatorFill(const leListWheelWidget* _this);
1448 
1449 // *****************************************************************************
1450 /* Virtual Member Function:
1451  leResult setIndicatorFill(leListWheelWidget* _this,
1452  leListWheelIndicatorFill fill)
1453 
1454  Summary:
1455  Sets the indicator fill setting value
1456 
1457  Description:
1458  Sets the indicator fill setting value
1459 
1460  Parameters:
1461  leListWheelWidget* _this - The list wheel widget to operate on
1462  leListWheelIndicatorFill fill - the setting value
1463 
1464  Remarks:
1465  Usage - _this->fn->setIndicatorFill(_this, fill);
1466 
1467  Returns:
1468  leResult - the result of the operation
1469 */
1483 virtual leResult setIndicatorFill(leListWheelWidget* _this,
1484  leListWheelIndicatorFill fill);
1485 
1486 
1487 // *****************************************************************************
1488 /* Virtual Member Function:
1489  leListWheelZoomEffects getZoomEffects(const leListWheelWidget* _this)
1490 
1491  Summary:
1492  Gets the current zoom effects
1493 
1494  Description:
1495  Gets the current zoom effects
1496 
1497  Parameters:
1498  const leListWheelWidget* _this - The list wheel widget to operate on
1499 
1500  Remarks:
1501  Usage - _this->fn->getZoomEffects(_this);
1502 
1503  Returns:
1504  leListWheelZoomEffects - the setting value
1505 */
1517 virtual leListWheelZoomEffects getZoomEffects(const leListWheelWidget* _this);
1518 
1519 // *****************************************************************************
1520 /* Virtual Member Function:
1521  leResult setZoomEffects(leListWheelWidget* _this,
1522  leListWheelZoomEffects zfx)
1523 
1524  Summary:
1525  Sets the zoom effects value
1526 
1527  Description:
1528  Sets the zoom effects value
1529 
1530  Parameters:
1531  leListWheelWidget* _this - The list wheel widget to operate on
1532  leListWheelZoomEffects zfx - the setting value
1533 
1534  Remarks:
1535  Usage - _this->fn->setZoomEffects(_this, zfx);
1536 
1537  Returns:
1538  leResult - the result of the operation
1539 */
1553 virtual leResult setZoomEffects(leListWheelWidget* _this,
1554  leListWheelZoomEffects zfx);
1555 
1556 // *****************************************************************************
1557 /* Virtual Member Function:
1558  leBool getAutoHideWheel(const leListWheelWidget* _this)
1559 
1560  Summary:
1561  Gets the wheel auto-hide setting
1562 
1563  Description:
1564  Gets the wheel auto-hide setting
1565 
1566  Parameters:
1567  const leListWheelWidget* _this - The list wheel widget to operate on
1568 
1569  Remarks:
1570  Usage - _this->fn->getAutoHideWheel(_this);
1571 
1572  Returns:
1573  leBool - the setting value
1574 */
1585 virtual leBool getAutoHideWheel(const leListWheelWidget* _this);
1586 
1587 // *****************************************************************************
1588 /* Virtual Member Function:
1589  leResult setAutoHideWheel(leListWheelWidget* _this,
1590  leBool b)
1591 
1592  Summary:
1593  Sets the wheel auto-hide setting
1594 
1595  Description:
1596  Sets the wheel auto-hide setting
1597 
1598  Parameters:
1599  leListWheelWidget* _this - The list wheel widget to operate on
1600  leBool b - the setting value
1601 
1602  Remarks:
1603  Usage - _this->fn->setAutoHideWheel(_this, b);
1604 
1605  Returns:
1606  leResult - the result of the operation
1607 */
1621 virtual leResult setAutoHideWheel(leListWheelWidget* _this,
1622  leBool b);
1623 
1624 #undef THIS_TYPE
1625 #endif
1626 
1627 
1628 #endif // LE_LISTWHEEL_WIDGET_ENABLED
1629 #endif /* LEGATO_LISTWHEELWIDGET_H */
_leWidget_SetAlphaAmount
leResult _leWidget_SetAlphaAmount(leWidget *_this, uint32_t alpha)
Set alpha amount.
Definition: legato_widget.c:570
legato_math.h
Defines common math functions for general use.
legato_widget_listwheel.h
List wheel functions and definitions.
legato_error.h
Error functions, macros and definitions.
_leWidget_GetType
leWidgetType _leWidget_GetType(const leWidget *_this)
Get widget type.
Definition: legato_widget.c:176
_leWidget_GetScheme
leScheme * _leWidget_GetScheme(const leWidget *_this)
Get widget scheme.
Definition: legato_widget.c:938
leResult
leResult
This enum represents function call results.
Definition: legato_common.h:134
leBorderType
leBorderType
Used to define widget border types.
Definition: legato_widget.h:248
leArray_RemoveAt
leResult leArray_RemoveAt(leArray *arr, uint32_t idx)
Remove value at index.
Definition: legato_array.c:197
_leWidget_RectToScreenSpace
leRect _leWidget_RectToScreenSpace(const leWidget *_this)
Get widget rectangle.
Definition: legato_widget.c:701
leRect
This struct represents a rectangle.
Definition: legato_common.h:405
_leWidget_IsOpaque
leBool _leWidget_IsOpaque(const leWidget *_this)
Determine is widget is opaque.
Definition: legato_widget.c:594
_leWidget_SetBorderType
leResult _leWidget_SetBorderType(leWidget *_this, leBorderType type)
Set widget scheme.
Definition: legato_widget.c:967
_leWidget_RemoveAllChildren
void _leWidget_RemoveAllChildren(leWidget *_this)
Remove all children from widget.
Definition: legato_widget.c:823
_leWidget_SetParent
leResult _leWidget_SetParent(leWidget *_this, leWidget *parent)
Set parent widget.
Definition: legato_widget.c:862
leWidgetEvent_TouchUp
Used to define widget touch up event.
Definition: legato_widget.h:403
lePercentOfDec
LIB_EXPORT void lePercentOfDec(uint32_t num, uint32_t percent, uint32_t *whl, uint32_t *dec)
Calculate percent of a decimal.
Definition: legato_math.c:231
legato_image.h
Image functions and defintions.
_leWidget_InvalidateContents
void _leWidget_InvalidateContents(const leWidget *_this)
Invalidate widget contents.
Definition: legato_widget.c:1210
_leWidget_SetCornerRadius
leResult _leWidget_SetCornerRadius(leWidget *_this, uint32_t radius)
Set widget scheme.
Definition: legato_widget.c:1091
_leWidget_InstallEventFilter
leResult _leWidget_InstallEventFilter(leWidget *_this, leWidgetEventFilter fltr)
Install event filter.
Definition: legato_widget.c:1215
_leWidget_SetX
leResult _leWidget_SetX(leWidget *_this, int32_t x)
Set widget x position.
Definition: legato_widget.c:190
_leWidget_SetSize
leResult _leWidget_SetSize(leWidget *_this, uint32_t width, uint32_t height)
Set widget height.
Definition: legato_widget.c:381
_leWidget_HasFocus
leBool _leWidget_HasFocus(const leWidget *_this)
Determines the focus status.
Definition: legato_widget.c:1110
legato_memory.h
Memory functions and definitions.
_leWidget_Resize
leResult _leWidget_Resize(leWidget *_this, int32_t width, int32_t height)
Resize widget.
Definition: legato_widget.c:426
_leWidget_SetAlphaEnabled
leResult _leWidget_SetAlphaEnabled(leWidget *_this, leBool enable)
Set cumulative alpha enable status.
Definition: legato_widget.c:501
leArray_PushBack
leResult leArray_PushBack(leArray *arr, void *val)
Push value on back.
Definition: legato_array.c:147
leWidgetEvent_TouchDown
Used to define widget touch down event.
Definition: legato_widget.h:377
_leWidget_ContainsDescendant
leBool _leWidget_ContainsDescendant(const leWidget *_this, const leWidget *wgt)
Determine widget exists.
Definition: legato_widget.c:910
_leWidget_SetBackgroundType
leResult _leWidget_SetBackgroundType(leWidget *_this, leBackgroundType type)
Set widget scheme.
Definition: legato_widget.c:989
legato_widget_list.h
List widget functions and definitions.
_leWidget_GetWidth
uint32_t _leWidget_GetWidth(const leWidget *_this)
Get widget width.
Definition: legato_widget.c:317
leImage
Definition: legato_image.h:180
LE_VALIGN_MIDDLE
@ LE_VALIGN_MIDDLE
Definition: legato_common.h:183
_leWidget_GetCumulativeAlphaEnabled
leBool _leWidget_GetCumulativeAlphaEnabled(const leWidget *_this)
Get cumulative alpha enable status.
Definition: legato_widget.c:484
_leWidget_RectToParentSpace
leRect _leWidget_RectToParentSpace(const leWidget *_this)
Get widget rectangle.
Definition: legato_widget.c:684
_leWidget_Translate
leResult _leWidget_Translate(leWidget *_this, int32_t x, int32_t y)
Translate widget x and y position.
Definition: legato_widget.c:282
legato_renderer.h
_leWidget_SetHeight
leResult _leWidget_SetHeight(leWidget *_this, uint32_t height)
Set widget height.
Definition: legato_widget.c:356
_leWidget_SetWidth
leResult _leWidget_SetWidth(leWidget *_this, uint32_t width)
Set the widget width.
Definition: legato_widget.c:324
leWidget_ResizeEvent
Used to define widget resize event.
Definition: legato_widget.h:329
LE_WIDGET_BACKGROUND_FILL
@ LE_WIDGET_BACKGROUND_FILL
Definition: legato_widget.h:226
_leWidget_SetVisible
leResult _leWidget_SetVisible(leWidget *_this, leBool visible)
Set widget visible status.
Definition: legato_widget.c:649
_leWidget_GetRootWidget
leWidget * _leWidget_GetRootWidget(const leWidget *_this)
Get root widget.
Definition: legato_widget.c:843
leRectIntersects
LIB_EXPORT leBool leRectIntersects(const leRect *l_rect, const leRect *r_rect)
Determines if two rectangles are intersecting.
Definition: legato_rect.c:51
LE_HALIGN_CENTER
@ LE_HALIGN_CENTER
Definition: legato_common.h:208
leArray
This struct represents a array.
Definition: legato_array.h:61
legato_widget.h
Legato widget definitions.
leBackgroundType
leBackgroundType
Used to define widget background types.
Definition: legato_widget.h:224
leArray_Create
leResult leArray_Create(leArray *arr)
Create a new array.
Definition: legato_array.c:73
_leWidget_GetHAlignment
leHAlignment _leWidget_GetHAlignment(const leWidget *_this)
Get widget horizontal alignment.
Definition: legato_widget.c:1003
_leWidget_GetHeight
uint32_t _leWidget_GetHeight(const leWidget *_this)
Get widget height.
Definition: legato_widget.c:349
leString
This struct represents a string.
Definition: legato_string.h:108
_leWidget_LocalRect
leRect _leWidget_LocalRect(const leWidget *_this)
Get widget rectangle.
Definition: legato_widget.c:670
leArray_InsertAt
leResult leArray_InsertAt(leArray *arr, uint32_t idx, void *val)
Insert value at index.
Definition: legato_array.c:174
leBool
leBool
This enum represents booleans.
Definition: legato_common.h:157
_leWidget_GetBackgroundType
leBackgroundType _leWidget_GetBackgroundType(const leWidget *_this)
Get widget background type.
Definition: legato_widget.c:982
_leWidget_SetScheme
leResult _leWidget_SetScheme(leWidget *_this, const leScheme *scheme)
Set widget scheme.
Definition: legato_widget.c:945
_leWidget_SetHAlignment
leResult _leWidget_SetHAlignment(leWidget *_this, leHAlignment align)
Set widget scheme.
Definition: legato_widget.c:1010
_leWidget_GetEnabled
leBool _leWidget_GetEnabled(const leWidget *_this)
Get widget enabled flag.
Definition: legato_widget.c:615
leRectClipAdj
LIB_EXPORT leRect leRectClipAdj(const leRect *l_rect, const leRect *r_rect, leRect *adj)
Clips a rectangle to the space of another rectangle.
Definition: legato_rect.c:75
_leWidget_SetFocus
leResult _leWidget_SetFocus(leWidget *_this)
Set widget scheme.
Definition: legato_widget.c:1117
LE_FALSE
@ LE_FALSE
Definition: legato_common.h:158
_leWidget_GetAlphaEnabled
leBool _leWidget_GetAlphaEnabled(const leWidget *_this)
Get alpha enable status.
Definition: legato_widget.c:473
_leWidget_GetChildAtIndex
leWidget * _leWidget_GetChildAtIndex(const leWidget *_this, uint32_t idx)
Get child at index.
Definition: legato_widget.c:888
leWidgetEvent
Used to define widget event.
Definition: legato_widget.h:352
_leWidget_GetCumulativeAlphaAmount
uint32_t _leWidget_GetCumulativeAlphaAmount(const leWidget *_this)
Get cumulative alpha amount.
Definition: legato_widget.c:538
_leWidget_SetY
leResult _leWidget_SetY(leWidget *_this, int32_t y)
Set widget y position.
Definition: legato_widget.c:222
_leWidget_GetBorderType
leBorderType _leWidget_GetBorderType(const leWidget *_this)
Get widget bordertype.
Definition: legato_widget.c:960
_leWidget_SetMargins
leResult _leWidget_SetMargins(leWidget *_this, uint32_t l, uint32_t t, uint32_t r, uint32_t b)
Set widget margins.
Definition: legato_widget.c:1058
legato_utils.h
General internal utilities for the library.
_leWidget_GetVAlignment
leVAlignment _leWidget_GetVAlignment(const leWidget *_this)
Get widget vertical alignment.
Definition: legato_widget.c:1027
leImage_Draw
LIB_EXPORT leResult leImage_Draw(const leImage *img, const leRect *sourceRect, int32_t x, int32_t y, uint32_t a)
Draw an Image.
Definition: legato_image.c:131
legato_string.h
Fixed string functions and definitions.
leArray_Clear
leResult leArray_Clear(leArray *arr)
Clear array.
Definition: legato_array.c:279
LE_RELATIVE_POSITION_RIGHTOF
@ LE_RELATIVE_POSITION_RIGHTOF
Definition: legato_common.h:317
LE_WIDGET_BACKGROUND_NONE
@ LE_WIDGET_BACKGROUND_NONE
Definition: legato_widget.h:225
leWidget
Used to define a widget.
Definition: legato_widget.h:623
leUtils_RectToScreenSpace
void leUtils_RectToScreenSpace(const leWidget *widget, leRect *rect)
Convert rectangle from widget local space to screen space.
Definition: legato_utils.c:151
legato.h
The header file joins all header files used in the graphics object library.
_leWidget_GetX
int32_t _leWidget_GetX(const leWidget *_this)
Get widget x position.
Definition: legato_widget.c:183
leRectClip
LIB_EXPORT void leRectClip(const leRect *l_rect, const leRect *r_rect, leRect *result)
Clips a rectangle to the space of another rectangle.
Definition: legato_rect.c:122
_leWidget_SetVAlignment
leResult _leWidget_SetVAlignment(leWidget *_this, leVAlignment align)
Set widget vertical alignment.
Definition: legato_widget.c:1034
_leWidget_GetVisible
leBool _leWidget_GetVisible(const leWidget *_this)
Get widget visible status.
Definition: legato_widget.c:642
leWidgetEvent_TouchMove
Used to define widget touch move event.
Definition: legato_widget.h:429
leAbsoluteValue
LIB_EXPORT uint32_t leAbsoluteValue(int32_t val)
Calculates the absolute value of a signed integer.
Definition: legato_math.c:280
_leWidget_AddChild
leResult _leWidget_AddChild(leWidget *_this, leWidget *child)
Add child to widget.
Definition: legato_widget.c:734
_leWidget_GetIndexOfChild
uint32_t _leWidget_GetIndexOfChild(const leWidget *_this, const leWidget *child)
Get index of child.
Definition: legato_widget.c:899
_leWidget_GetChildCount
uint32_t _leWidget_GetChildCount(const leWidget *_this)
Get child count.
Definition: legato_widget.c:881
LE_RELATIVE_POSITION_LEFTOF
@ LE_RELATIVE_POSITION_LEFTOF
Definition: legato_common.h:314
_leWidget_GetMargins
leMargin _leWidget_GetMargins(const leWidget *_this)
Get widget margins.
Definition: legato_widget.c:1051
leWidget_Constructor
LIB_EXPORT void leWidget_Constructor(leWidget *wgt)
Initialize widget.
Definition: legato_widget.c:67
leScheme_GetRenderColor
leColor leScheme_GetRenderColor(const leScheme *schm, leSchemeColor clr)
Gets a scheme render color for the current layer color mode.
Definition: legato_scheme.c:68
leRelativePosition
leRelativePosition
This enum represents the relative position modes for objects.
Definition: legato_common.h:313
LE_TRUE
@ LE_TRUE
Definition: legato_common.h:159
_leWidget_GetAlphaAmount
uint32_t _leWidget_GetAlphaAmount(const leWidget *_this)
Get alpha amount.
Definition: legato_widget.c:527
_leWidget_GetCornerRadius
uint32_t _leWidget_GetCornerRadius(const leWidget *_this)
Get widget corner radius.
Definition: legato_widget.c:1084
legato_common.h
Common macros and definitions used by Legato.
_leWidget_RemoveEventFilter
leResult _leWidget_RemoveEventFilter(leWidget *_this, leWidgetEventFilter fltr)
Remove event filter.
Definition: legato_widget.c:1238
leString::fn
const leStringVTable * fn
Definition: legato_string.h:109
legato_state.h
leUtils_ArrangeRectangle
void leUtils_ArrangeRectangle(leRect *sub, leRect obj, leRect bounds, leHAlignment hAlignment, leVAlignment vAlignment, leRelativePosition position, uint8_t leftMargin, uint8_t topMargin, uint8_t rightMargin, uint8_t bottomMargin, uint16_t rectMargin)
Calculates the position of a rectangle within the given bound.
Definition: legato_utils.c:213
_leWidget_RemoveChild
leResult _leWidget_RemoveChild(leWidget *_this, leWidget *child)
Remove child from widget.
Definition: legato_widget.c:785
destructor
virtual void destructor(leString *_this)
Destruct string.
_leWidget_SetEnabled
leResult _leWidget_SetEnabled(leWidget *_this, leBool enable)
Set widget enabled flag.
Definition: legato_widget.c:620
leDivideRounding
LIB_EXPORT int32_t leDivideRounding(int32_t num, int32_t denom)
Performs a linear interpolation of an integer based on a percentage between two signed points.
Definition: legato_math.c:328
_leWidget_SetPosition
leResult _leWidget_SetPosition(leWidget *_this, int32_t x, int32_t y)
Set widget x and y position.
Definition: legato_widget.c:247
leUtils_ArrangeRectangleRelative
void leUtils_ArrangeRectangleRelative(leRect *sub, leRect obj, leRect bounds, leHAlignment hAlignment, leVAlignment vAlignment, leRelativePosition position, uint8_t leftMargin, uint8_t topMargin, uint8_t rightMargin, uint8_t bottomMargin, uint16_t rectMargin)
Calculates the position of a rectangle within the given bounds.
Definition: legato_utils.c:286
_leWidget_Invalidate
void _leWidget_Invalidate(const leWidget *_this)
Invalidate widget.
Definition: legato_widget.c:1142
_leWidget_GetY
int32_t _leWidget_GetY(const leWidget *_this)
Get widget y position.
Definition: legato_widget.c:215