MPLABĀ® Harmony Graphics Suite
legato_widget_radial_menu.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_radial_menu.h
32 
33  Summary:
34 
35 
36  Description:
37  This module implements radial menu widget functions.
38 *******************************************************************************/
39 
46 #ifndef LEGATO_RADIALMENU_H
47 #define LEGATO_RADIALMENU_H
48 
50 
51 #if LE_RADIALMENU_WIDGET_ENABLED == 1
52 
57 
58 typedef struct leRadialMenuWidget leRadialMenuWidget;
59 
60 typedef void (*leRadialMenuWidget_ItemProminenceChangedEvent)(leRadialMenuWidget*, leWidget*, int32_t);
61 
62 // *****************************************************************************
63 // *****************************************************************************
64 // Section: Data Types and Constants
65 // *****************************************************************************
66 // *****************************************************************************
71 typedef enum leRadialMenuWidgetState
72 {
73  LE_RADIAL_MENU_INIT,
74  LE_RADIAL_MENU_INPUT_READY,
75  LE_RADIAL_MENU_HANDLE_USER_MOVE_REQUEST,
76  LE_RADIAL_MENU_RESET_TO_INPUT_POS
77 } leRadialMenuWidgetState;
78 
83 typedef enum leRadialMenuWidgetInterpolationMode
84 {
85  LE_RADIAL_MENU_INTERPOLATE_OFF,
86  LE_RADIAL_MENU_INTERPOLATE_GRADUAL,
87  LE_RADIAL_MENU_INTERPOLATE_PROMINENT
88 } leRadialMenuWidgetInterpolationMode;
89 
90 /* internal use only */typedef struct leRadialMenuWidget leRadialMenuWidget;
95 
96 #define LE_RADIALMENUWIDGET_VTABLE(THIS_TYPE) \
97  LE_WIDGET_VTABLE(THIS_TYPE) \
98  \
99  leBool (*isProminent)(const THIS_TYPE* _this, const leWidget* widget); \
100  leWidget* (*getProminent)(const THIS_TYPE* _this); \
101  leResult (*setProminent)(THIS_TYPE* _this, const leWidget* widget); \
102  int32_t (*getProminentIndex)(const THIS_TYPE* _this); \
103  leResult (*setProminentIndex)(THIS_TYPE* _this, int32_t index); \
104  leResult (*setNumberOfItemsShown)(THIS_TYPE* _this, uint32_t cnt); \
105  leResult (*setHighlightProminent)(THIS_TYPE* _this, leBool hl); \
106  int32_t (*getMajorAxis)(const THIS_TYPE* _this); \
107  leResult (*setMajorAxis)(THIS_TYPE* _this, int32_t a); \
108  int32_t (*getMinorAxis)(const THIS_TYPE* _this); \
109  leResult (*setMinorAxis)(THIS_TYPE* _this, int32_t b); \
110  int32_t (*getTheta)(const THIS_TYPE* _this); \
111  leResult (*setTheta)(THIS_TYPE* _this, int32_t tht); \
112  leResult (*setScaleMode)(THIS_TYPE* _this, leRadialMenuWidgetInterpolationMode mode); \
113  leResult (*setScaleRange)(THIS_TYPE* _this, int32_t min, int32_t max); \
114  leResult (*setBlendMode)(THIS_TYPE* _this, leRadialMenuWidgetInterpolationMode mode); \
115  leResult (*setBlendRange)(THIS_TYPE* _this, int32_t min, int32_t max); \
116  leResult (*setTouchArea)(THIS_TYPE* _this, int32_t x, int32_t y, int32_t width, int32_t height); \
117  leResult (*setDrawEllipse)(THIS_TYPE* _this, leBool b); \
118  leRadialMenuWidget_ItemProminenceChangedEvent (*getItemProminenceChangedEventCallback)(const THIS_TYPE* _this); \
119  leResult (*setItemProminenceChangedEventCallback)(THIS_TYPE* _this, leRadialMenuWidget_ItemProminenceChangedEvent cb);
120 
121 typedef struct leRadialMenuWidgetVTable
122 {
123  LE_RADIALMENUWIDGET_VTABLE(leRadialMenuWidget)
124 } leRadialMenuWidgetVTable;
125 
131 enum leRadialMenuItemState
132 {
133  LE_RMI_NOT_VISIBLE,
134  LE_RMI_WAITING_FOR_SORT,
135  LE_RMI_VISIBLE,
136  LE_RMI_PROMINENT
137 };
138 
143 typedef struct leRadialMenuItemNode
144 {
145  leWidget* widget; // point to the widget of the item
146  lePoint point;
147  int32_t angle;
148  int32_t absAngle;
149  int32_t adjustedAngle;
150  int32_t paintAngle;
151  uint32_t percent;
152 
153  leRect origSize; //the original size of the widget, it is a reference point for scaling
154  uint32_t origAlphaAmount; //the original alpha value of the widget, it is a reference point for scaling
155 
156  enum leRadialMenuItemState state;
157 
158 } leRadialMenuItemNode;
159 
160 // *****************************************************************************
169 typedef struct leRadialMenuWidget
170 {
171  leWidget widget; // widget base class
172 
173  const leRadialMenuWidgetVTable* fn;
174 
175  leRadialMenuWidgetState state;
176 
177  int32_t prominentIndex;
178 
179  leBool drawEllipse; // indicates if the radial menu is selected
180  leBool highlightProminent; // highlight the prominent widget
181 
182  struct
183  {
184  leBool invalid;
185  int32_t a; // the half-length of the 0-180 axis of the ellipse
186  int32_t b; // the half-length of the 90-270 axis of the ellipse
187  int32_t theta; // the angle of rotation of the entire ellipse
188  } ellipse;
189 
190  struct
191  {
192  uint32_t maxWidth;
193  uint32_t maxHeight;
194  uint32_t alpha;
195  int32_t firstVisibleItem;
196  uint32_t lastZ;
197  } paintState;
198 
199  leBool touchPressed; // keep track of users touch input
200  int32_t rotationDegrees;
201  int32_t angleSlice;
202 
203  leRadialMenuWidgetInterpolationMode scaleMode; // the enable item size scaling within the widget
204 
205  int32_t maxSizePercent; // the maximum size scale between 1 - 200%
206  int32_t minSizePercent; // the minimum size scale between 1 - 200%
207 
208  uint32_t touchX; // the x offset of the touch area as a percentage
209  uint32_t touchY; // the y offset of the touch area as a percentage
210  uint32_t touchWidth; // the width of the touch area as a percentage
211  uint32_t touchHeight; // the height of the touch area as a percentage
212 
213  leRect touchArea; // the area specified within the widget that touch events are detected in pixels
214 
215  int32_t minFlickDelta; // amount of distance that must be dragged in a single
216  // frame to trigger momentum mode
217 
218  int32_t momentum; // current momentum value
219  int32_t maxMomentum; // maximum momentum value
220  int32_t momentumFalloff; // momentum falloff rate
221  int32_t rotation; // determines actual rotation of the wheel
222  int32_t rotationCounter; // time-based limiter for rotation calculations
223  int32_t rotationTick; // rotation time accumulator
224 
225  int32_t snapState;
226  int32_t snapCounter;
227  int32_t snapMagnitude;
228 
229  leRadialMenuWidgetInterpolationMode blendMode; // the enable item alpha scaling within the widget
230 
231  int32_t maxAlphaAmount; // the maximum alpha between 0 - 255
232  int32_t minAlphaAmount; // the minimum alpha between 0 - 255
233 
234  uint32_t itemsShown; // keeps count of how many items to visible, this number should be less than or equal to total number of widget items
235  leList widgetList; // this is the list of widgets
236  leBool positionsInvalid;
237 
238  leRadialMenuWidget_ItemProminenceChangedEvent itemProminenceChangedEvent; // whenever a new item is in prominence event callback
239 } leRadialMenuWidget;
240 
241 
242 // *****************************************************************************
243 // *****************************************************************************
244 // Section: Routines
245 // *****************************************************************************
246 // *****************************************************************************
247 
259 LIB_EXPORT leRadialMenuWidget* leRadialMenuWidget_New();
260 
271 LIB_EXPORT void leRadialMenuWidget_Constructor(leRadialMenuWidget* wgt);
272 
273 #ifdef _DOXYGEN_
274 #define THIS_TYPE struct leWidget
275 
276 // *****************************************************************************
277 /* Virtual Member Function:
278  leBool isProminent(const leRadialMenuWidget* _this,
279  const leWidget* widget)
280 
281  Summary:
282  Evaluates a widget to see if it is the prominent widget
283 
284  Description:
285  Evaluates a widget to see if it is the prominent widget
286 
287  Parameters:
288  const leRadialMenuWidget* _this - The radial menu bar widget to operate on
289  const leWidget* widget -
290 
291  Remarks:
292  Usage - _this->fn->isProminent(_this, widget);
293 
294  Returns:
295  leBool - the prominent indicator
296 */
297 
298 // *****************************************************************************
299 /* Virtual Member Function:
300  leWidget* getProminent(const leRadialMenuWidget* _this)
301 
302  Summary:
303  Gets the prominent child widget
304 
305  Description:
306  Gets the prominent child widget
307 
308  Parameters:
309  const leRadialMenuWidget* _this - The radial menu widget to operate on
310 
311  Remarks:
312  Usage - _this->fn->getProminent(_this);
313 
314  Returns:
315  leWidget* - the prominent child widget
316 */
317 
318 // *****************************************************************************
319 /* Virtual Member Function:
320  leResult setProminent(leRadialMenuWidget* _this,
321  const leWidget* widget)
322 
323  Summary:
324  Sets a widget as prominent
325 
326  Description:
327  Sets a widget as prominent
328 
329  Parameters:
330  leRadialMenuWidget* _this - The radial menu bar widget to operate on
331  const leWidget* widget - the widget to test
332 
333  Remarks:
334  Usage - _this->fn->setProminent(_this, widget);
335 
336  Returns:
337  leResult - the result of the operation
338 */
351 virtual leResult setProminent(leRadialMenuWidget* _this,
352  const leWidget* widget);
353 
354 
355 // *****************************************************************************
356 /* Virtual Member Function:
357  int32_t getProminentIndex(const leRadialMenuWidget* _this)
358 
359  Summary:
360  Gets the prominent item index
361 
362  Description:
363  Gets the prominent item index
364 
365  Parameters:
366  const leRadialMenuWidget* _this - The radial menu bar widget to operate on
367 
368  Remarks:
369  Usage - _this->fn->getProminentIndex(_this);
370 
371  Returns:
372  int32_t - the prominent index
373 */
384 virtual int32_t getProminentIndex(const leRadialMenuWidget* _this);
385 
386 // *****************************************************************************
387 /* Virtual Member Function:
388  leResult setProminentIndex(leRadialMenuWidget* _this,
389  int32_t index)
390 
391  Summary:
392  Sets the prominent item index
393 
394  Description:
395  Sets the prominent item index
396 
397  Parameters:
398  leRadialMenuWidget* _this - The radial menu bar widget to operate on
399  int32_t index - the desired prominent index
400 
401  Remarks:
402  Usage - _this->fn->setProminentIndex(_this, index);
403 
404  Returns:
405  leResult - the result of the operation
406 */
419 virtual leResult setProminentIndex(leRadialMenuWidget* _this,
420  int32_t index);
421 
422 // *****************************************************************************
423 /* Virtual Member Function:
424  leResult setNumberOfItemsShown(leRadialMenuWidget* _this,
425  uint32_t cnt)
426 
427  Summary:
428  Sets the number of items shown
429 
430  Description:
431  Sets the number of items shown
432 
433  Parameters:
434  leRadialMenuWidget* _this - The radial menu bar widget to operate on
435  uint32_t cnt - the item count
436 
437  Remarks:
438  Usage - _this->fn->setNumberOfItemsShown(_this, cnt);
439 
440  Returns:
441  leResult - the result of the operation
442 */
443 
444 // *****************************************************************************
445 /* Virtual Member Function:
446  leResult setHighlightProminent(leRadialMenuWidget* _this,
447  leBool hl)
448 
449  Summary:
450  Sets the highlight prominent setting value
451 
452  Description:
453  Sets the highlight prominent setting value
454 
455  Parameters:
456  leRadialMenuWidget* _this - The radial menu bar widget to operate on
457  leBool hl - the setting value
458 
459  Remarks:
460  Usage - _this->fn->setHighlightProminent(_this, hl);
461 
462  Returns:
463  leResult - the result of the operation
464 */
477 virtual leResult setHighlightProminent(leRadialMenuWidget* _this,
478  leBool hl);
479 
480 // *****************************************************************************
481 /* Virtual Member Function:
482  int32_t getTheta(const leRadialMenuWidget* _this)
483 
484  Summary:
485  Gets the menu ellipse rotation coefficient
486 
487  Description:
488  Gets the menu ellipse rotation coefficient
489 
490  Parameters:
491  const leRadialMenuWidget* _this - The radial menu bar widget to operate on
492 
493  Remarks:
494  Usage - _this->fn->getTheta(_this);
495 
496  Returns:
497  int32_t - the theta value
498 */
509 virtual int32_t getTheta(const leRadialMenuWidget* _this);
510 
511 // *****************************************************************************
512 /* Virtual Member Function:
513  leResult setTheta(leRadialMenuWidget* _this,
514  int32_t tht)
515 
516  Summary:
517  Sets the menu ellipse rotation coefficient
518 
519  Description:
520  Sets the menu ellipse rotation coefficient
521 
522  Parameters:
523  leRadialMenuWidget* _this - The radial menu bar widget to operate on
524  int32_t tht - the theta value
525 
526  Remarks:
527  Usage - _this->fn->setTheta(_this, tht);
528 
529  Returns:
530  leResult - the result of the operation
531 */
544 virtual leResult setTheta(leRadialMenuWidget* _this,
545  int32_t tht);
546 
547 // *****************************************************************************
548 /* Virtual Member Function:
549  leResult setEllipseType(leRadialMenuWidget* _this,
550  leRadialMenuEllipseType type)
551 
552  Summary:
553  Sets the menu ellipse type
554 
555  Description:
556  Sets the menu ellipse type
557 
558  Parameters:
559  leRadialMenuWidget* _this - The radial menu bar widget to operate on
560  leRadialMenuEllipseType type - the type
561 
562  Remarks:
563  Usage - _this->fn->setEllipseType(_this, type);
564 
565  Returns:
566  leResult - the result of the operation
567 */
580 virtual leResult setEllipseType(leRadialMenuWidget* _this,
581  leRadialMenuEllipseType type);
582 
583 // *****************************************************************************
584 /* Virtual Member Function:
585  leResult addWidget(leRadialMenuWidget* _this,
586  leWidget* wgt)
587 
588  Summary:
589  Adds a widget to the ellipse
590 
591  Description:
592  Adds a widget to the ellipse
593 
594  Parameters:
595  leRadialMenuWidget* _this - The radial menu bar widget to operate on
596  leWidget* wgt - the widget to add
597 
598  Remarks:
599  Usage - _this->fn->addWidget(_this, wgt);
600 
601  Returns:
602  leResult - the result of the operation
603 */
616 virtual leResult addWidget(leRadialMenuWidget* _this,
617  leWidget* wgt);
618 
619 // *****************************************************************************
620 /* Virtual Member Function:
621  leResult removeWidget(leRadialMenuWidget* _this,
622  leWidget* wgt)
623 
624  Summary:
625  Removes a widget from the ellipse
626 
627  Description:
628  Removes a widget from the ellipse
629 
630  Parameters:
631  leRadialMenuWidget* _this - The radial menu bar widget to operate on
632  leWidget* wgt - the widget to remove
633 
634  Remarks:
635  Usage - _this->fn->removeWidget(_this, wgt);
636 
637  Returns:
638  leResult - the result of the operation
639 */
652 virtual leResult removeWidget(leRadialMenuWidget* _this,
653  leWidget* wgt);
654 
655 // *****************************************************************************
656 /* Virtual Member Function:
657  leWidget* getWidgetAtIndex(const leRadialMenuWidget* _this,
658  int32_t idx)
659 
660  Summary:
661  Gets a widget at a given index
662 
663  Description:
664  Gets a widget at a given index
665 
666  Parameters:
667  const leRadialMenuWidget* _this - The radial menu bar widget to operate on
668  int32_t idx - the index
669 
670  Remarks:
671  Usage - _this->fn->getWidgetAtIndex(_this, idx);
672 
673  Returns:
674  leWidget* - the widget
675 */
687 virtual leWidget* getWidgetAtIndex(const leRadialMenuWidget* _this,
688  int32_t idx);
689 
690 // *****************************************************************************
691 /* Virtual Member Function:
692  leResult setWidgetAtIndex(leRadialMenuWidget* _this,
693  int32_t idx,
694  leWidget* wgt)
695 
696  Summary:
697  Sets a widget at a given index
698 
699  Description:
700  Sets a widget at a given index
701 
702  Parameters:
703  leRadialMenuWidget* _this - The radial menu bar widget to operate on
704  int32_t idx - the index
705  leWidget* wgt - the widget to set
706 
707  Remarks:
708  Usage - _this->fn->setWidgetAtIndex(_this, idx, wgt);
709 
710  Returns:
711  leResult - the result of the operation
712 */
726 virtual leResult setWidgetAtIndex(leRadialMenuWidget* _this,
727  int32_t idx,
728  leWidget* wgt);
729 
730 // *****************************************************************************
731 /* Virtual Member Function:
732  leResult removeAllWidgets(leRadialMenuWidget* _this)
733 
734  Summary:
735  Removes all widgets from the menu
736 
737  Description:
738  Removes all widgets from the menu
739 
740  Parameters:
741  leRadialMenuWidget* _this - The radial menu bar widget to operate on
742 
743  Remarks:
744  Usage - _this->fn->removeAllWidgets(_this);
745 
746  Returns:
747  leResult - the result of the operation
748 */
760 virtual leResult removeAllWidgets(leRadialMenuWidget* _this);
761 
762 // *****************************************************************************
763 /* Virtual Member Function:
764  leResult setScaleMode(leRadialMenuWidget* _this,
765  leRadialMenuWidgetInterpolationMode mode)
766 
767  Summary:
768  Sets the menu item scaling mode
769 
770  Description:
771  Sets the menu item scaling mode
772 
773  Parameters:
774  leRadialMenuWidget* _this - The radial menu bar widget to operate on
775  leRadialMenuWidgetInterpolationMode mode -
776 
777  Remarks:
778  Usage - _this->fn->setScaleMode(_this, mode);
779 
780  Returns:
781  leResult - the result of the operation
782 */
795 virtual leResult setScaleMode(leRadialMenuWidget* _this,
796  leRadialMenuWidgetInterpolationMode mode);
797 
798 // *****************************************************************************
799 /* Virtual Member Function:
800  leResult setScaleRange(leRadialMenuWidget* _this,
801  int32_t min,
802  int32_t max)
803 
804  Summary:
805  Sets the scale range for menu items
806 
807  Description:
808  Sets the scale range for menu items
809 
810  Parameters:
811  leRadialMenuWidget* _this - The radial menu bar widget to operate on
812  int32_t min - the minimum value
813  int32_t max - the maximum value
814 
815  Remarks:
816  Usage - _this->fn->setScaleRange(_this, min, max);
817 
818  Returns:
819  leResult - the result of the operation
820 */
834 virtual leResult setScaleRange(leRadialMenuWidget* _this,
835  int32_t min,
836  int32_t max);
837 
838 // *****************************************************************************
839 /* Virtual Member Function:
840  leResult setBlendMode(leRadialMenuWidget* _this,
841  leRadialMenuWidgetInterpolationMode mode)
842 
843  Summary:
844  Sets the menu item blending mode
845 
846  Description:
847  Sets the menu item blending mode
848 
849  Parameters:
850  leRadialMenuWidget* _this - The radial menu bar widget to operate on
851  leRadialMenuWidgetInterpolationMode mode -
852 
853  Remarks:
854  Usage - _this->fn->setBlendMode(_this, mode);
855 
856  Returns:
857  leResult - the result of the operation
858 */
872 virtual leResult setBlendMode(leRadialMenuWidget* _this,
873  leRadialMenuWidgetInterpolationMode mode);
874 
875 // *****************************************************************************
876 /* Virtual Member Function:
877  leResult setBlendRange(leRadialMenuWidget* _this,
878  int32_t min,
879  int32_t max)
880 
881  Summary:
882  Sets the blending range
883 
884  Description:
885  Sets the blending range
886 
887  Parameters:
888  leRadialMenuWidget* _this - The radial menu bar widget to operate on
889  int32_t min - the minimum value
890  int32_t max - the maximum value
891 
892  Remarks:
893  Usage - _this->fn->setBlendRange(_this, min, max);
894 
895  Returns:
896  leResult - the result of the operation
897 */
912 virtual leResult setBlendRange(leRadialMenuWidget* _this,
913  int32_t min,
914  int32_t max);
915 
916 // *****************************************************************************
917 /* Virtual Member Function:
918  leResult setTouchArea(leRadialMenuWidget* _this,
919  int32_t x,
920  int32_t y,
921  int32_t width,
922  int32_t height)
923 
924  Summary:
925  Sets the menu touch area
926 
927  Description:
928  Sets the menu touch area
929 
930  Parameters:
931  leRadialMenuWidget* _this - The radial menu bar widget to operate on
932  int32_t x - the X value
933  int32_t y - the Y value
934  int32_t width - the width value
935  int32_t height - the height value
936 
937  Remarks:
938  Usage - _this->fn->setTouchArea(_this, x, y, width, height);
939 
940  Returns:
941  leResult - the result of the operation
942 */
957 virtual leResult setTouchArea(leRadialMenuWidget* _this,
958  int32_t x,
959  int32_t y,
960  int32_t width,
961  int32_t height);
962 
963 // *****************************************************************************
964 /* Virtual Member Function:
965  leResult setDrawEllipse(leRadialMenuWidget* _this,
966  leBool b)
967 
968  Summary:
969  Sets the draw ellipse setting value
970 
971  Description:
972  Sets the draw ellipse setting value
973 
974  Parameters:
975  leRadialMenuWidget* _this - The radial menu bar widget to operate on
976  leBool b - the setting value
977 
978  Remarks:
979  Usage - _this->fn->setDrawEllipse(_this, b);
980 
981  Returns:
982  leResult - the result of the operation
983 */
996 virtual leResult setDrawEllipse(leRadialMenuWidget* _this,
997  leBool b);
998 
1009 virtual leRadialMenuWidget_ItemSelectedEvent getItemSelectedEventCallback(const leRadialMenuWidget* _this)
1010 
1011 
1024 virtual leResult setItemSelectedEventCallback(leRadialMenuWidget* _this,
1025  leRadialMenuWidget_ItemSelectedEvent cb);
1026 
1037 virtual leRadialMenuWidget_ItemProminenceChangedEvent getItemProminenceChangedEventCallback
1038  (const leRadialMenuWidget* _this)
1039 
1040 
1053 virtual leResult setItemProminenceChangedEventCallback(leRadialMenuWidget* _this,
1054  leRadialMenuWidget_ItemProminenceChangedEvent cb)
1055 
1056 #undef THIS_TYPE
1057 #endif
1058 
1059 #endif // LE_RADIALMENU_WIDGET_ENABLED
1060 #endif /* LEGATO_RADIALMENU_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_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
_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
LE_EVENT_TOUCH_DOWN
@ LE_EVENT_TOUCH_DOWN
Definition: legato_event.h:68
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
_leWidget_SetCornerRadius
leResult _leWidget_SetCornerRadius(leWidget *_this, uint32_t radius)
Set widget scheme.
Definition: legato_widget.c:1091
leList
This struct represents a list.
Definition: legato_list.h:91
_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
leWidgetEventFilter
Used to define widget touch event filter.
Definition: legato_widget.h:454
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
leList_PushBack
int32_t leList_PushBack(leList *list, void *val)
Push value on back.
Definition: legato_list.c:141
LE_EVENT_TOUCH_UP
@ LE_EVENT_TOUCH_UP
Definition: legato_event.h:69
lePercentOf
LIB_EXPORT uint32_t lePercentOf(uint32_t num, uint32_t percent)
Calculate percent of a number.
Definition: legato_math.c:218
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
_leWidget_GetWidth
uint32_t _leWidget_GetWidth(const leWidget *_this)
Get widget width.
Definition: legato_widget.c:317
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
legato_widget_image.h
Image widget menu functions and definitions.
_leWidget_SetHeight
leResult _leWidget_SetHeight(leWidget *_this, uint32_t height)
Set widget height.
Definition: legato_widget.c:356
leList_Clear
void leList_Clear(leList *list)
Clear array.
Definition: legato_list.c:421
_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
LE_HALIGN_CENTER
@ LE_HALIGN_CENTER
Definition: legato_common.h:208
leList_Destroy
void leList_Destroy(leList *list)
Remove array.
Definition: legato_list.c:446
legato_widget.h
Legato widget definitions.
_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
_leWidget_LocalRect
leRect _leWidget_LocalRect(const leWidget *_this)
Get widget rectangle.
Definition: legato_widget.c:670
legato_widget_radial_menu.h
Radial menu functions and definitions.
leBool
leBool
This enum represents booleans.
Definition: legato_common.h:157
leWidgetEventFilter::filterEvent
leBool(* filterEvent)(leWidget *target, leWidgetEvent *evt, void *data)
Virtual function - Filter Event.
Definition: legato_widget.h:466
_leWidget_GetBackgroundType
leBackgroundType _leWidget_GetBackgroundType(const leWidget *_this)
Get widget background type.
Definition: legato_widget.c:982
leList_Remove
int32_t leList_Remove(leList *list, void *val)
Remove item.
Definition: legato_list.c:285
_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
_leWidget_InsertChild
leResult _leWidget_InsertChild(leWidget *_this, leWidget *child, uint32_t idx)
Adds child to widget at index.
Definition: legato_widget.c:759
length
virtual uint32_t length(const leString *_this)
Get length of the string.
legato_list.h
A linked list implementation.
_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
leRectContainsPoint
LIB_EXPORT leBool leRectContainsPoint(const leRect *rect, const lePoint *point)
Determines if a point is inside a rectangle.
Definition: legato_rect.c:31
_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
LE_EVENT_TOUCH_MOVE
@ LE_EVENT_TOUCH_MOVE
Definition: legato_event.h:70
_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
leList_RemoveAt
int32_t leList_RemoveAt(leList *list, uint32_t idx)
Remove item at index.
Definition: legato_list.c:331
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
leList_InsertAt
int32_t leList_InsertAt(leList *list, void *val, uint32_t idx)
Insert value at index.
Definition: legato_list.c:222
legato_string.h
Fixed string functions and definitions.
leList_Find
int32_t leList_Find(const leList *list, void *val)
Find index of a value.
Definition: legato_list.c:200
leClampi
LIB_EXPORT int32_t leClampi(int32_t min, int32_t max, int32_t i)
Calculates clamp of an integer.
Definition: legato_math.c:171
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
leWidget_Delete
LIB_EXPORT void leWidget_Delete(leWidget *wgt)
Delete widget.
Definition: legato_widget.c:166
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
_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
leList_Create
int32_t leList_Create(leList *list)
Create a new list.
Definition: legato_list.c:31
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
leArray_Get
void * leArray_Get(const leArray *arr, uint32_t idx)
Get entry at index.
Definition: legato_array.c:224
legato_widget_progressbar.h
Progressbar menu functions and definitions.
_leWidget_GetChildCount
uint32_t _leWidget_GetChildCount(const leWidget *_this)
Get child count.
Definition: legato_widget.c:881
_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
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
_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
_leWidget_SetPosition
leResult _leWidget_SetPosition(leWidget *_this, int32_t x, int32_t y)
Set widget x and y position.
Definition: legato_widget.c:247
_leWidget_Invalidate
void _leWidget_Invalidate(const leWidget *_this)
Invalidate widget.
Definition: legato_widget.c:1142
lePoint
This structure represents a integer Cartesian point.
Definition: legato_common.h:357
_leWidget_GetY
int32_t _leWidget_GetY(const leWidget *_this)
Get widget y position.
Definition: legato_widget.c:215
leList_Get
void * leList_Get(const leList *list, uint32_t idx)
Get a value from the list.
Definition: legato_list.c:181