MPLABĀ® Harmony Graphics Suite
legato_widget.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.h
32 
33  Summary:
34 
35 
36  Description:
37  This module implements top level widget control functions.
38 *******************************************************************************/
39 
47 #ifndef LEGATO_WIDGET_H
48 #define LEGATO_WIDGET_H
49 
50 
56 
57 /* internal use only */#define DEFAULT_BORDER_MARGIN 4
66 // *****************************************************************************
67 // *****************************************************************************
68 // Section: Data Types and Constants
69 // *****************************************************************************
70 // *****************************************************************************
71 
72 /*
73 Enumeration:
74  leWidgetType
75 
76  Summary:
77  Specifies the different widget types used in the library
78 
79  Description:
80  This enumeration specifies the different widget types
81  used in the library.
82 
83  Remarks:
84  None.
85  */
90 typedef enum leWidgetType
91 {
92  LE_WIDGET_WIDGET,
93 #if LE_ARC_WIDGET_ENABLED == 1
94  LE_WIDGET_ARC,
95 #endif
96 #if LE_BARGRAPH_WIDGET_ENABLED == 1
97  LE_WIDGET_BAR_GRAPH,
98 #endif
99 #if LE_BUTTON_WIDGET_ENABLED == 1
100  LE_WIDGET_BUTTON,
101 #endif
102 #if LE_CHECKBOX_WIDGET_ENABLED == 1
103  LE_WIDGET_CHECKBOX,
104 #endif
105 #if LE_CIRCLE_WIDGET_ENABLED == 1
106  LE_WIDGET_CIRCLE,
107 #endif
108 #if LE_CIRCULARGAUGE_WIDGET_ENABLED == 1
109  LE_WIDGET_CIRCULAR_GAUGE,
110 #endif
111 #if LE_CIRCULARSLIDER_WIDGET_ENABLED == 1
112  LE_WIDGET_CIRCULAR_SLIDER,
113 #endif
114 #if LE_DRAWSURFACE_WIDGET_ENABLED == 1
115  LE_WIDGET_DRAWSURFACE,
116 #endif
117 #if LE_IMAGE_WIDGET_ENABLED == 1
118  LE_WIDGET_IMAGE,
119 #endif
120 #if LE_IMAGEROTATE_WIDGET_ENABLED == 1
121  LE_WIDGET_IMAGEROTATE,
122 #endif
123 #if LE_IMAGESCALE_WIDGET_ENABLED == 1
124  LE_WIDGET_IMAGESCALE,
125 #endif
126 #if LE_IMAGESEQUENCE_WIDGET_ENABLED == 1
127  LE_WIDGET_IMAGESEQUENCE,
128 #endif
129 #if LE_GRADIENT_WIDGET_ENABLED == 1
130  LE_WIDGET_GRADIENT,
131 #endif
132 #if LE_GROUPBOX_WIDGET_ENABLED == 1
133  LE_WIDGET_GROUPBOX,
134 #endif
135 #if LE_KEYPAD_WIDGET_ENABLED == 1 && LE_BUTTON_WIDGET_ENABLED == 1
136  LE_WIDGET_KEYPAD,
137 #endif
138 #if LE_LABEL_WIDGET_ENABLED == 1
139  LE_WIDGET_LABEL,
140 #endif
141 #if LE_LINE_WIDGET_ENABLED == 1
142  LE_WIDGET_LINE,
143 #endif
144 #if LE_LINEGRAPH_WIDGET_ENABLED == 1
145  LE_WIDGET_LINE_GRAPH,
146 #endif
147 #if LE_LIST_WIDGET_ENABLED == 1 && LE_SCROLLBAR_WIDGET_ENABLED == 1
148  LE_WIDGET_LIST,
149 #endif
150 #if LE_LISTWHEEL_WIDGET_ENABLED == 1
151  LE_WIDGET_LISTWHEEL,
152 #endif
153 #if LE_PIECHART_WIDGET_ENABLED == 1
154  LE_WIDGET_PIE_CHART,
155 #endif
156 #if LE_PROGRESSBAR_WIDGET_ENABLED == 1
157  LE_WIDGET_PROGRESSBAR,
158 #endif
159 #if LE_RADIALMENU_WIDGET_ENABLED == 1
160  LE_WIDGET_RADIAL_MENU,
161 #endif
162 #if LE_RADIOBUTTON_WIDGET_ENABLED == 1
163  LE_WIDGET_RADIOBUTTON,
164 #endif
165 #if LE_RECTANGLE_WIDGET_ENABLED == 1
166  LE_WIDGET_RECTANGLE,
167 #endif
168 #if LE_SCROLLBAR_WIDGET_ENABLED == 1
169  LE_WIDGET_SCROLLBAR,
170 #endif
171 #if LE_SLIDER_WIDGET_ENABLED == 1
172  LE_WIDGET_SLIDER,
173 #endif
174 #if LE_TEXTFIELD_WIDGET_ENABLED == 1
175  LE_WIDGET_TEXTFIELD,
176 #endif
177 #if LE_TOUCHTEST_WIDGET_ENABLED == 1
178  LE_WIDGET_TOUCHTEST,
179 #endif
180 #if LE_WINDOW_WIDGET_ENABLED == 1
181  LE_WIDGET_WINDOW,
182 #endif
183  // begin custom types, not essential but good for identifying base pointers
184 
185  // end custom types
186  //LE_WIDGET_LAST = LE_WIDGET_WINDOW, // change this if adding custom
187  //LE_WIDGET_TYPE_COUNT = LE_WIDGET_LAST + 1
189 
190 /*
191 Enumeration:
192  leBackgroundType
193 
194  Summary:
195  Specifies the different background types used for the widgets in the library
196 
197  Description:
198  Specifies the different background types used for the widgets in the library
199 
200  None - No background fill. Widget must defer to its parent to erase dirty
201  pixels. This may cause additional overhead as clean pixels may be
202  repainted as well.
203 
204  Fill - a scheme color is used to fill the widget rectangle.
205 
206  Cache - a local framebuffer cache is maintained by the widget and used to
207  clean up dirty pixels. Will not cause a parent repaint event but
208  will use additional memory to contain the cache.
209 
210  Remarks:
211  None.
212  */
223 typedef enum leBackgroundType
224 {
229 
230 /*
231 Enumeration:
232  leBorderType
233 
234  Summary:
235  Specifies the different border types used for the widgets in the library
236 
237  Description:
238  Specifies the different border types used for the widgets in the library
239 
240  Remarks:
241  None.
242  */
247 typedef enum leBorderType
248 {
249  LE_WIDGET_BORDER_NONE,
250  LE_WIDGET_BORDER_LINE,
251  LE_WIDGET_BORDER_BEVEL,
252  LE_WIDGET_BORDER_LAST = LE_WIDGET_BORDER_BEVEL
254 
255 /*
256 Enumeration:
257  leWidgetDirtyState
258 
259  Summary:
260  Specifies the different dirty states the widget can be assigned
261 
262  Description:
263  Specifies the different dirty states the widget can be assigned
264  This decides whether the particular widget would be re-drawn or not.
265  Dirty widget are re-drawn and clean are not painted over.
266 
267  Remarks:
268  None.
269  */
276 typedef enum leWidgetDirtyState
277 {
278  LE_WIDGET_DIRTY_STATE_CLEAN,
279  LE_WIDGET_DIRTY_STATE_CHILD,
280  LE_WIDGET_DIRTY_STATE_DIRTY,
282 
283 /*
284 Enumeration:
285  leWidgetDrawState
286 
287  Summary:
288  Specifies the different draw states the widget can be assigned
289 
290  Description:
291  Specifies the different draw states the widget can be assigned
292 
293  Remarks:
294  None.
295  */
302 typedef enum leWidgetDrawState
303 {
304  LE_WIDGET_DRAW_STATE_READY,
305  LE_WIDGET_DRAW_STATE_DONE,
306 
307  // widget-specific draw states start here
309 
314 typedef struct leWidget_MoveEvent
315 {
316  leEvent evt;
317 
318  int32_t oldX;
319  int32_t oldY;
320  int32_t newX;
321  int32_t newY;
323 
328 typedef struct leWidget_ResizeEvent
329 {
330  leEvent evt;
331 
332  uint32_t oldWidth;
333  uint32_t oldHeight;
334  uint32_t newWidth;
335  uint32_t newHeight;
337 
338 typedef struct leWidget leWidget;
339 
340 // *****************************************************************************
341 /* Structure:
342  leWidgetEvent
343 
344  Summary:
345  Basic widget event definition
346 */
351 typedef struct leWidgetEvent
352 {
353  leEventID id;
354  leBool accepted;
355  leWidget* owner;
357 
358 
359 // *****************************************************************************
360 /* Structure:
361  leInput_TouchDownEvent_t
362 
363  Summary:
364  Register and handle the touch press detect event
365 
366  Description:
367  Register and handle the touch press detect event
368 
369  Remarks:
370  None.
371 */
377 {
378  leWidgetEvent event;
379 
380  int32_t touchID;
381  int32_t x;
382  int32_t y;
384 
385 // *****************************************************************************
386 /* Structure:
387  leInput_TouchUpEvent
388 
389  Summary:
390  Register and handle the touch release detect event
391 
392  Description:
393  Register and handle the touch release detect event
394 
395  Remarks:
396  None.
397 */
402 typedef struct leWidgetEvent_TouchUp
403 {
404  leWidgetEvent event;
405 
406  int32_t touchID;
407  int32_t x;
408  int32_t y;
410 
411 // *****************************************************************************
412 /* Structure:
413  leInput_TouchMoveEvent
414 
415  Summary:
416  Register and handle the touch coordinates changed event
417 
418  Description:
419  Register and handle the touch coordinates changed event
420 
421  Remarks:
422  None.
423 */
429 {
430  leWidgetEvent event;
431 
432  uint32_t touchID;
433  int32_t prevX;
434  int32_t prevY;
435  int32_t x;
436  int32_t y;
438 
439 void leWidgetEvent_Accept(leWidgetEvent* evt, leWidget* owner);
440 
441 // *****************************************************************************
442 /* Struct Definition:
443  leWidgetEventFilter
444 
445  Summary:
446  Struct that defines an event filter. Event filters allow a
447  receiver to discard undesirable events
448 */
453 typedef struct
454 {
466  leBool (*filterEvent)(leWidget* target, leWidgetEvent* evt, void* data);
467  void* data;
469 
470 /* internal use only */
475 typedef struct leWidget leWidget;
476 
477 #define LE_WIDGET_VTABLE(THIS_TYPE) \
478  leWidgetType (*getType)(const THIS_TYPE* _this); \
479  int32_t (*getX)(const THIS_TYPE* _this); \
480  leResult (*setX)(THIS_TYPE* _this, int32_t x); \
481  int32_t (*getY)(const THIS_TYPE* _this); \
482  leResult (*setY)(THIS_TYPE* _this, int32_t y); \
483  leResult (*setPosition)(THIS_TYPE* _this, int32_t x, int32_t y); \
484  leResult (*translate)(THIS_TYPE* _this, int32_t x, int32_t y); \
485  uint32_t (*getWidth)(const THIS_TYPE* _this); \
486  leResult (*setWidth)(THIS_TYPE* _this, uint32_t w); \
487  uint32_t (*getHeight)(const THIS_TYPE* _this); \
488  leResult (*setHeight)(THIS_TYPE* _this, uint32_t h); \
489  leResult (*setSize)(THIS_TYPE* _this, uint32_t w, uint32_t h); \
490  leResult (*resize)(THIS_TYPE* _this, int32_t w, int32_t h); \
491  leBool (*getAlphaEnabled)(const THIS_TYPE* _this); \
492  leBool (*getCumulativeAlphaEnabled)(const THIS_TYPE* _this); \
493  leResult (*setAlphaEnabled)(THIS_TYPE* _this, leBool enbl); \
494  uint32_t (*getAlphaAmount)(const THIS_TYPE* _this); \
495  uint32_t (*getCumulativeAlphaAmount)(const THIS_TYPE* _this); \
496  leResult (*setAlphaAmount)(THIS_TYPE* _this, uint32_t a); \
497  leBool (*isOpaque)(const THIS_TYPE* _this); \
498  leBool (*getEnabled)(const THIS_TYPE* _this); \
499  leResult (*setEnabled)(THIS_TYPE* _this, leBool enbl); \
500  leBool (*getVisible)(const THIS_TYPE* _this); \
501  leResult (*setVisible)(THIS_TYPE* _this, leBool vis); \
502  leRect (*localRect)(const THIS_TYPE* _this); \
503  leRect (*rectToParent)(const THIS_TYPE* _this); \
504  leRect (*rectToScreen)(const THIS_TYPE* _this); \
505  leResult (*addChild)(THIS_TYPE* _this, leWidget* chld); \
506  leResult (*insertChild)(THIS_TYPE* _this, leWidget* chld, uint32_t idx); \
507  leResult (*removeChild)(THIS_TYPE* _this, leWidget* chld); \
508  leResult (*removeChildAt)(THIS_TYPE* _this, uint32_t idx); \
509  void (*removeAllChildren)(THIS_TYPE* _this); \
510  leWidget* (*getRootWidget)(const THIS_TYPE* _this); \
511  leResult (*setParent)(THIS_TYPE* _this, leWidget* pnt); \
512  uint32_t (*getChildCount)(const THIS_TYPE* _this); \
513  leWidget* (*getChildAtIndex)(const THIS_TYPE* _this, uint32_t idx); \
514  uint32_t (*getIndexOfChild)(const THIS_TYPE* _this, const leWidget* chld); \
515  leBool (*containsDescendant)(const THIS_TYPE* _this, const leWidget* wgt); \
516  leScheme* (*getScheme)(const THIS_TYPE* _this); \
517  leResult (*setScheme)(THIS_TYPE* _this, const leScheme* schm); \
518  leBorderType (*getBorderType)(const THIS_TYPE* _this); \
519  leResult (*setBorderType)(THIS_TYPE* _this, leBorderType type); \
520  leBackgroundType (*getBackgroundType)(const THIS_TYPE* _this); \
521  leResult (*setBackgroundType)(THIS_TYPE* _this, leBackgroundType type); \
522  leHAlignment (*getHAlignment)(const THIS_TYPE* _this); \
523  leResult (*setHAlignment)(THIS_TYPE* _this, leHAlignment halgn); \
524  leVAlignment (*getVAlignment)(const THIS_TYPE* _this); \
525  leResult (*setVAlignment)(THIS_TYPE* _this, leVAlignment valgn); \
526  leMargin (*getMargins)(const THIS_TYPE* _this); \
527  leResult (*setMargins)(THIS_TYPE* _this, uint32_t l, uint32_t t, uint32_t r, uint32_t b); \
528  uint32_t (*getCornerRadius)(const THIS_TYPE* _this); \
529  leResult (*setCornerRadius)(THIS_TYPE* _this, uint32_t rad); \
530  leBool (*hasFocus)(const THIS_TYPE* _this); \
531  leResult (*setFocus)(THIS_TYPE* _this); \
532  /* internal functions follow */ \
533  void (*invalidate)(const THIS_TYPE* _this); \
534  void (*invalidateContents)(const THIS_TYPE* _this); \
535  leResult (*installEventFilter)(THIS_TYPE* _this, leWidgetEventFilter fltr); \
536  leResult (*removeEventFilter)(THIS_TYPE* _this, leWidgetEventFilter fltr); \
537  void (*update)(THIS_TYPE* _this, uint32_t dt); \
538  \
539  void (*moveEvent)(THIS_TYPE* _this, leWidget_MoveEvent* evt); \
540  void (*resizeEvent)(THIS_TYPE* _this, leWidget_ResizeEvent* evt); \
541  void (*focusGainedEvent)(THIS_TYPE* _this); \
542  void (*focusLostEvent)(THIS_TYPE* _this); \
543  void (*languageChangeEvent)(THIS_TYPE* _this); \
544  void (*touchDownEvent)(THIS_TYPE* _this, leWidgetEvent_TouchDown* evt); \
545  void (*touchUpEvent)(THIS_TYPE* _this, leWidgetEvent_TouchUp* evt); \
546  void (*touchMoveEvent)(THIS_TYPE* _this, leWidgetEvent_TouchMove* evt); \
547  \
548  void (*_destructor)(THIS_TYPE* _this); \
549  \
550  void (*_handleEvent)(THIS_TYPE* _this, leEvent* evt); \
551  void (*_validateChildren)(THIS_TYPE* _this); \
552  void (*_increaseDirtyState)(THIS_TYPE* _this, uint32_t state); \
553  void (*_setDirtyState)(THIS_TYPE* _this, uint32_t state); \
554  void (*_clearDirtyState)(THIS_TYPE* _this); \
555  void (*_invalidateBorderAreas)(const THIS_TYPE* _this); \
556  void (*_damageArea)(const THIS_TYPE* _this, leRect* rect); \
557  void (*_paint)(THIS_TYPE* _this); \
558 
559 typedef struct leWidgetVTable
560 {
561  LE_WIDGET_VTABLE(leWidget)
562 } leWidgetVTable;
563 
564 
565 typedef struct leWidget leWidget;
566 typedef struct leRectArray leRectArray;
567 
568 typedef void (*leWidget_DrawFunction_FnPtr)(void*);
569 
570 enum leWidgetFlags
571 {
572  LE_WIDGET_ENABLED = 0x1, // indicates that the widget is enabled
573  LE_WIDGET_VISIBLE = 0x2, // indicates that the widget is visible
574  LE_WIDGET_ALPHAENABLED = 0x4, // indicates that the widget is using alpha blending
575  LE_WIDGET_ISROOT = 0x8, // indicates that this widget is a root widget
576  LE_WIDGET_IGNOREEVENTS = 0x10, // indicates that the widget should ignore input/focus events
577  LE_WIDGET_IGNOREPICK = 0x20 // indicates that the widget should be ignored for pick tests
578 };
579 
580 typedef struct leWidgetStyle
581 {
582  uint8_t backgroundType; // the widget background type
583  uint8_t borderType; // the widget border type
584  uint8_t halign; // horizontal alignment of the widget
585  uint8_t valign; // vertical alignment of the widget
586  uint8_t alphaAmount; // the global alpha amount to apply to this widget (cumulative with parent widgets)
587  uint8_t cornerRadius; //corner radius, draws round corners if > 0
588 } leWidgetStyle;
589 
590 typedef struct leWidgetStatus
591 {
592  uint8_t dirtyState;
593  uint8_t drawState;
594 
595 } leWidgetStatus;
596 
603 /* Structure:
604  leWidget
605 
606  Summary:
607  Specifies Graphics widget structure to manage all properties and events associated with the widget
608 
609  Description:
610  Specifies Graphics widget structure to manage all properties and events associated with the widget.
611  It also contains information about the parent and children for the widget to manage the tree structure that the library supports.
612 
613 
614  Remarks:
615  None.
616 
617 */
622 typedef struct leWidget
623 {
624  const leWidgetVTable* fn;
625 
626  uint32_t id; // the id of the widget
627  leWidgetType type; // the type of the widget
628 
629  leRect rect; // the bounding rectangle of the widget
630 
631  uint32_t flags; // widget state flags
632  leWidgetStyle style; // widget style values
633  leWidgetStatus status; // widget status values
634 
635  leMargin margin; // the margin settings for the widget
636 
637  uint32_t drawCount; // number of times this widget has been drawn
638  // for the active screen
639 
640  leWidget_DrawFunction_FnPtr drawFunc; // the next draw function to call
641 
642  const leScheme* scheme; // the widget's color scheme
643 
644  leWidgetEventFilter eventFilters[LE_WIDGET_MAX_EVENT_FILTERS];
645 
646  leWidget* parent; // pointer to the widget's parent
647  leArray children; // pointers for the widget's children
648 } leWidget;
649 
650 // *****************************************************************************
651 // *****************************************************************************
652 // Section: Routines
653 // *****************************************************************************
654 // *****************************************************************************
655 
656 /* Function:
657  leWidget* leWidget_New()
658 
659  Summary:
660  Create a new widget.
661 
662 
663  Description:
664  Create a new widget, allocate memory for the widget through the current
665  active context. Returns a widget object pointer. Application is
666  responsible for managing the widget pointer until the widget is added
667  to a widget tree.
668 
669  Parameters:
670 
671 
672  Returns:
673  lawidget*
674 
675 */
686 LIB_EXPORT leWidget* leWidget_New();
687 
698 LIB_EXPORT void leWidget_Constructor(leWidget* wgt);
699 
700 /* Function:
701  void leWidget_Delete(leWidget* wgt)
702 
703  Summary:
704  Delete the widget object specified
705 
706  Description:
707  Delete a widget object specified, de-allocate memory for the widget
708  through the current active context. All child widgets are also
709  destructed and freed.
710 
711  Parameters:
712  leWidget* wgt - the widget to be freed
713 
714  Returns:
715  void
716 
717  Remarks:
718  All widgets that are dynamically allocated using should be freed using
719  this function regardless of widget type. This ensures tha all widget
720  destructors are properly called.
721 
722 */
733 LIB_EXPORT void leWidget_Delete(leWidget* wgt);
734 
735 // *****************************************************************************
736 /* Virtual Member Function:
737  leWidgetType getType(const leWidgetWidget* _this)
738 
739  Summary:
740  Gets the widget type
741 
742  Description:
743  Gets the widget type
744 
745  Parameters:
746  const leWidgetWidget* _this - The widget to operate on
747 
748  Remarks:
749  Usage - _this->fn->getType(_this);
750 
751  Returns:
752  leWidgetType - the type
753 */
766 
767 // *****************************************************************************
768 /* Virtual Member Function:
769  int32_t getX(const leWidgetWidget* _this)
770 
771  Summary:
772  Gets the widget X position
773 
774  Description:
775  Gets the widget X position
776 
777  Parameters:
778  const leWidgetWidget* _this - The widget to operate on
779 
780  Remarks:
781  Usage - _this->fn->getX(_this);
782 
783  Returns:
784  int32_t - the x value
785 */
797 int32_t _leWidget_GetX(const leWidget* _this);
798 
799 // *****************************************************************************
800 /* Virtual Member Function:
801  leResult setX(leWidgetWidget* _this,
802  int32_t x)
803 
804  Summary:
805  Sets the widget X position
806 
807  Description:
808  Sets the widget X position
809 
810  Parameters:
811  leWidgetWidget* _this - The widget to operate on
812  int32_t x - the X value
813 
814  Remarks:
815  Usage - _this->fn->setX(_this, x);
816 
817  Returns:
818  leResult - the result of the operation
819 */
834  int32_t x);
835 
836 // *****************************************************************************
837 /* Virtual Member Function:
838  int32_t getY(const leWidgetWidget* _this)
839 
840  Summary:
841  Gets the widget Y position
842 
843  Description:
844  Gets the widget Y position
845 
846  Parameters:
847  const leWidgetWidget* _this - The widget to operate on
848 
849  Remarks:
850  Usage - _this->fn->getY(_this);
851 
852  Returns:
853  int32_t - the y value
854 */
866 int32_t _leWidget_GetY(const leWidget* _this);
867 
868 // *****************************************************************************
869 /* Virtual Member Function:
870  leResult setY(leWidgetWidget* _this,
871  int32_t y)
872 
873  Summary:
874  Sets the widget Y position
875 
876  Description:
877  Sets the widget Y position
878 
879  Parameters:
880  leWidgetWidget* _this - The widget to operate on
881  int32_t y - the Y value
882 
883  Remarks:
884  Usage - _this->fn->setY(_this, y);
885 
886  Returns:
887  leResult - the result of the operation
888 */
903  int32_t y);
904 
905 // *****************************************************************************
906 /* Virtual Member Function:
907  leResult setPosition(leWidgetWidget* _this,
908  int32_t x,
909  int32_t y)
910 
911  Summary:
912  Sets the widget position
913 
914  Description:
915  Sets the widget position
916 
917  Parameters:
918  leWidgetWidget* _this - The widget to operate on
919  int32_t x - the X value
920  int32_t y - the Y value
921 
922  Remarks:
923  Usage - _this->fn->setPosition(_this, x, y);
924 
925  Returns:
926  leResult - the result of the operation
927 */
943  int32_t x,
944  int32_t y);
945 
946 // *****************************************************************************
947 /* Virtual Member Function:
948  leResult translate(leWidgetWidget* _this,
949  int32_t x,
950  int32_t y)
951 
952  Summary:
953  Translate the widget position
954 
955  Description:
956  Translate the widget position
957 
958  Parameters:
959  leWidgetWidget* _this - The widget to operate on
960  int32_t x - the X value
961  int32_t y - the Y value
962 
963  Remarks:
964  Usage - _this->fn->translate(_this, x, y);
965 
966  Returns:
967  leResult - the result of the operation
968 */
984  int32_t x,
985  int32_t y);
986 
987 // *****************************************************************************
988 /* Virtual Member Function:
989  uint32_t getWidth(const leWidgetWidget* _this)
990 
991  Summary:
992  Gets the widget width
993 
994  Description:
995  Gets the widget width
996 
997  Parameters:
998  const leWidgetWidget* _this - The widget to operate on
999 
1000  Remarks:
1001  Usage - _this->fn->getWidth(_this);
1002 
1003  Returns:
1004  uint32_t - the width value
1005 */
1017 uint32_t _leWidget_GetWidth(const leWidget* _this);
1018 
1019 // *****************************************************************************
1020 /* Virtual Member Function:
1021  leResult setWidth(leWidgetWidget* _this,
1022  uint32_t w)
1023 
1024  Summary:
1025  Sets the widget width
1026 
1027  Description:
1028  Sets the widget width
1029 
1030  Parameters:
1031  leWidgetWidget* _this - The widget to operate on
1032  uint32_t w - the width value
1033 
1034  Remarks:
1035  Usage - _this->fn->setWidth(_this, w);
1036 
1037  Returns:
1038  leResult - the result of the operation
1039 */
1055  uint32_t width);
1056 
1057 // *****************************************************************************
1058 /* Virtual Member Function:
1059  uint32_t getHeight(const leWidgetWidget* _this)
1060 
1061  Summary:
1062  Gets the widget height
1063 
1064  Description:
1065  Gets the widget height
1066 
1067  Parameters:
1068  const leWidgetWidget* _this - The widget to operate on
1069 
1070  Remarks:
1071  Usage - _this->fn->getHeight(_this);
1072 
1073  Returns:
1074  uint32_t - the height value
1075 */
1087 uint32_t _leWidget_GetHeight(const leWidget* _this);
1088 
1089 // *****************************************************************************
1090 /* Virtual Member Function:
1091  leResult setHeight(leWidgetWidget* _this,
1092  uint32_t h)
1093 
1094  Summary:
1095  Sets the widget height
1096 
1097  Description:
1098  Sets the widget height
1099 
1100  Parameters:
1101  leWidgetWidget* _this - The widget to operate on
1102  uint32_t h - the height value
1103 
1104  Remarks:
1105  Usage - _this->fn->setHeight(_this, h);
1106 
1107  Returns:
1108  leResult - the result of the operation
1109 */
1125  uint32_t height);
1126 
1127 // *****************************************************************************
1128 /* Virtual Member Function:
1129  leResult setSize(leWidgetWidget* _this,
1130  uint32_t w,
1131  uint32_t h)
1132 
1133  Summary:
1134  Sets the widget size
1135 
1136  Description:
1137  Sets the widget size
1138 
1139  Parameters:
1140  leWidgetWidget* _this - The widget to operate on
1141  uint32_t w - the width value
1142  uint32_t h - the height value
1143 
1144  Remarks:
1145  Usage - _this->fn->setSize(_this, w, h);
1146 
1147  Returns:
1148  leResult - the result of the operation
1149 */
1165  uint32_t width,
1166  uint32_t height);
1167 
1168 // *****************************************************************************
1169 /* Virtual Member Function:
1170  leResult resize(leWidgetWidget* _this,
1171  int32_t w,
1172  int32_t h)
1173 
1174  Summary:
1175  Resizes the widget
1176 
1177  Description:
1178  Resizes the widget
1179 
1180  Parameters:
1181  leWidgetWidget* _this - The widget to operate on
1182  int32_t w - the width value
1183  int32_t h - the height value
1184 
1185  Remarks:
1186  Usage - _this->fn->resize(_this, w, h);
1187 
1188  Returns:
1189  leResult - the result of the operation
1190 */
1208  int32_t width,
1209  int32_t height);
1210 
1211 // *****************************************************************************
1212 /* Virtual Member Function:
1213  leBool getAlphaEnabled(const leWidgetWidget* _this)
1214 
1215  Summary:
1216  Gets the widget alpha enabled flag
1217 
1218  Description:
1219  Gets the widget alpha enabled flag
1220 
1221  Parameters:
1222  const leWidgetWidget* _this - The widget to operate on
1223 
1224  Remarks:
1225  Usage - _this->fn->getAlphaEnabled(_this);
1226 
1227  Returns:
1228  leBool - true if alpha blending is enabled
1229 */
1242 
1243 // *****************************************************************************
1244 /* Virtual Member Function:
1245  leBool getCumulativeAlphaEnabled(const leWidgetWidget* _this)
1246 
1247  Summary:
1248  Determines if any widget in this widget's hierarchy has its alpha flag
1249  enabled
1250 
1251  Description:
1252  Determines if any widget in this widget's hierarchy has its alpha flag
1253  enabled
1254 
1255  Parameters:
1256  const leWidgetWidget* _this - The widget to operate on
1257 
1258  Remarks:
1259  Usage - _this->fn->getCumulativeAlphaEnabled(_this);
1260 
1261  Returns:
1262  leBool - true if alpha blending is enabled
1263 */
1276 
1277 // *****************************************************************************
1278 /* Virtual Member Function:
1279  leResult setAlphaEnabled(leWidgetWidget* _this,
1280  leBool enbl)
1281 
1282  Summary:
1283  Sets the widget's alpha flag enable state
1284 
1285  Description:
1286  Sets the widget's alpha flag enable state
1287 
1288  Parameters:
1289  leWidgetWidget* _this - The widget to operate on
1290  leBool enbl -
1291 
1292  Remarks:
1293  Usage - _this->fn->setAlphaEnabled(_this, enbl);
1294 
1295  Returns:
1296  leResult - the result of the operation
1297 */
1311  leBool enable);
1312 
1313 // *****************************************************************************
1314 /* Virtual Member Function:
1315  uint32_t getAlphaAmount(const leWidgetWidget* _this)
1316 
1317  Summary:
1318  Gets the widget alpha blending value
1319 
1320  Description:
1321  Gets the widget alpha blending value
1322 
1323  Parameters:
1324  const leWidgetWidget* _this - The widget to operate on
1325 
1326  Remarks:
1327  Usage - _this->fn->getAlphaAmount(_this);
1328 
1329  Returns:
1330  uint32_t - the alpha amount
1331 */
1343 uint32_t _leWidget_GetAlphaAmount(const leWidget* _this);
1344 
1345 // *****************************************************************************
1346 /* Virtual Member Function:
1347  uint32_t getCumulativeAlphaAmount(const leWidgetWidget* _this)
1348 
1349  Summary:
1350  Gets the cumulative amount of alpha blending applied to this widget
1351 
1352  Description:
1353  Gets the cumulative amount of alpha blending applied to this widget
1354 
1355  Parameters:
1356  const leWidgetWidget* _this - The widget to operate on
1357 
1358  Remarks:
1359  Usage - _this->fn->getCumulativeAlphaAmount(_this);
1360 
1361  Returns:
1362  uint32_t - the alpha amount
1363 */
1375 uint32_t _leWidget_GetCumulativeAlphaAmount(const leWidget* _this);
1376 
1377 // *****************************************************************************
1378 /* Virtual Member Function:
1379  leResult setAlphaAmount(leWidgetWidget* _this,
1380  uint32_t a)
1381 
1382  Summary:
1383  Sets this widget's alpha amount
1384 
1385  Description:
1386  Sets this widget's alpha amount
1387 
1388  Parameters:
1389  leWidgetWidget* _this - The widget to operate on
1390  uint32_t a - the alpha amount
1391 
1392  Remarks:
1393  Usage - _this->fn->setAlphaAmount(_this, a);
1394 
1395  Returns:
1396  leResult - the result of the operation
1397 */
1411  uint32_t alpha);
1412 
1413 // *****************************************************************************
1414 /* Virtual Member Function:
1415  leBool isOpaque(const leWidgetWidget* _this)
1416 
1417  Summary:
1418  Determines if this widget is opaque
1419 
1420  Description:
1421  Determines if this widget is opaque
1422 
1423  Parameters:
1424  const leWidgetWidget* _this - The widget to operate on
1425 
1426  Remarks:
1427  Usage - _this->fn->isOpaque(_this);
1428 
1429  Returns:
1430  leBool - true if opaque
1431 */
1443 leBool _leWidget_IsOpaque(const leWidget* _this);
1444 
1445 // *****************************************************************************
1446 /* Virtual Member Function:
1447  leBool getEnabled(const leWidgetWidget* _this)
1448 
1449  Summary:
1450  Gets this widget's enabled flag
1451 
1452  Description:
1453  Gets this widget's enabled flag
1454 
1455  Parameters:
1456  const leWidgetWidget* _this - The widget to operate on
1457 
1458  Remarks:
1459  Usage - _this->fn->getEnabled(_this);
1460 
1461  Returns:
1462  leBool - the setting value
1463 */
1475 leBool _leWidget_GetEnabled(const leWidget* _this);
1476 
1477 // *****************************************************************************
1478 /* Virtual Member Function:
1479  leResult setEnabled(leWidgetWidget* _this,
1480  leBool enbl)
1481 
1482  Summary:
1483  Sets this widget's enabled flag
1484 
1485  Description:
1486  Sets this widget's enabled flag
1487 
1488  Parameters:
1489  leWidgetWidget* _this - The widget to operate on
1490  leBool enbl - the setting value
1491 
1492  Remarks:
1493  Usage - _this->fn->setEnabled(_this, enbl);
1494 
1495  Returns:
1496  leResult - the result of the operation
1497 */
1512 
1513 // *****************************************************************************
1514 /* Virtual Member Function:
1515  leBool getVisible(const leWidgetWidget* _this)
1516 
1517  Summary:
1518  Gets this widget's visible flag
1519 
1520  Description:
1521  Gets this widget's visible flag
1522 
1523  Parameters:
1524  const leWidgetWidget* _this - The widget to operate on
1525 
1526  Remarks:
1527  Usage - _this->fn->getVisible(_this);
1528 
1529  Returns:
1530  leBool - the visibility setting
1531 */
1543 leBool _leWidget_GetVisible(const leWidget* _this);
1544 
1545 // *****************************************************************************
1546 /* Virtual Member Function:
1547  leResult setVisible(leWidgetWidget* _this,
1548  leBool vis)
1549 
1550  Summary:
1551  Sets this widget's visible flag
1552 
1553  Description:
1554  Sets this widget's visible flag
1555 
1556  Parameters:
1557  leWidgetWidget* _this - The widget to operate on
1558  leBool vis - the visibility setting
1559 
1560  Remarks:
1561  Usage - _this->fn->setVisible(_this, vis);
1562 
1563  Returns:
1564  leResult - the result of the operation
1565 */
1580 leResult _leWidget_SetVisible(leWidget* _this, leBool visible);
1581 
1582 // *****************************************************************************
1583 /* Virtual Member Function:
1584  leRect localRect(const leWidgetWidget* _this)
1585 
1586  Summary:
1587  Gets the widget's bounding rectangle in local space
1588 
1589  Description:
1590  Gets the widget's bounding rectangle in local space
1591 
1592  Parameters:
1593  const leWidgetWidget* _this - The widget to operate on
1594 
1595  Remarks:
1596  Usage - _this->fn->localRect(_this);
1597 
1598  Returns:
1599  leRect - the bounding rectangle
1600 */
1612 leRect _leWidget_LocalRect(const leWidget* _this);
1613 
1614 // *****************************************************************************
1615 /* Virtual Member Function:
1616  leRect rectToParent(const leWidgetWidget* _this)
1617 
1618  Summary:
1619  Gets the widget's bounding rectangle in parent space
1620 
1621  Description:
1622  Gets the widget's bounding rectangle in parent space
1623 
1624  Parameters:
1625  const leWidgetWidget* _this - The widget to operate on
1626 
1627  Remarks:
1628  Usage - _this->fn->rectToParent(_this);
1629 
1630  Returns:
1631  leRect - the bounding rectangle
1632 */
1646 
1647 // *****************************************************************************
1648 /* Virtual Member Function:
1649  leRect rectToScreen(const leWidgetWidget* _this)
1650 
1651  Summary:
1652  Gets the widget's bounding rectangle in screen space
1653 
1654  Description:
1655  Gets the widget's bounding rectangle in screen space
1656 
1657  Parameters:
1658  const leWidgetWidget* _this - The widget to operate on
1659 
1660  Remarks:
1661  Usage - _this->fn->rectToScreen(_this);
1662 
1663  Returns:
1664  leRect - the bounding rectangle
1665 */
1679 
1680 // *****************************************************************************
1681 /* Virtual Member Function:
1682  leResult addChild(leWidgetWidget* _this,
1683  leWidget* chld)
1684 
1685  Summary:
1686  Adds a child widget to this widget
1687 
1688  Description:
1689  Adds a child widget to this widget
1690 
1691  Parameters:
1692  leWidgetWidget* _this - The widget to operate on
1693  leWidget* chld - the child widget
1694 
1695  Remarks:
1696  Usage - _this->fn->addChild(_this, chld);
1697 
1698  Returns:
1699  leResult - the result of the operation
1700 */
1715  leWidget* child);
1716 
1732  leWidget* child,
1733  uint32_t idx);
1734 
1735 // *****************************************************************************
1736 /* Virtual Member Function:
1737  leResult removeChild(leWidgetWidget* _this,
1738  leWidget* chld)
1739 
1740  Summary:
1741  Removes a child widget from this widget
1742 
1743  Description:
1744  Removes a child widget from this widget
1745 
1746  Parameters:
1747  leWidgetWidget* _this - The widget to operate on
1748  leWidget* chld - the child widget
1749 
1750  Remarks:
1751  Usage - _this->fn->removeChild(_this, chld);
1752 
1753  Returns:
1754  leResult - the result of the operation
1755 */
1770  leWidget* child);
1771 
1786  uint32_t idx);
1787 
1788 // *****************************************************************************
1789 /* Virtual Member Function:
1790  void removeAllChildren(leWidgetWidget* _this)
1791 
1792  Summary:
1793  Removes all children from this widget
1794 
1795  Description:
1796  Removes all children from this widget
1797 
1798  Parameters:
1799  leWidgetWidget* _this - The widget to operate on
1800 
1801  Remarks:
1802  Usage - _this->fn->removeAllChildren(_this);
1803 
1804  Returns:
1805  void
1806 */
1819 
1820 // *****************************************************************************
1821 /* Virtual Member Function:
1822  leWidget* getRootWidget(const leWidgetWidget* _this)
1823 
1824  Summary:
1825  Gets the topmost ancestor for this widget
1826 
1827  Description:
1828  Gets the topmost ancestor for this widget
1829 
1830  Parameters:
1831  const leWidgetWidget* _this - The widget to operate on
1832 
1833  Remarks:
1834  Usage - _this->fn->getRootWidget(_this);
1835 
1836  Returns:
1837  leWidget* - the root widget
1838 */
1851 
1852 // *****************************************************************************
1853 /* Virtual Member Function:
1854  leResult setParent(leWidgetWidget* _this,
1855  leWidget* pnt)
1856 
1857  Summary:
1858  Sets this widget's parent
1859 
1860  Description:
1861  Sets this widget's parent
1862 
1863  Parameters:
1864  leWidgetWidget* _this - The widget to operate on
1865  leWidget* pnt - the parent widget
1866 
1867  Remarks:
1868  Usage - _this->fn->setParent(_this, pnt);
1869 
1870  Returns:
1871  leResult - the result of the operation
1872 */
1887  leWidget* parent);
1888 
1889 // *****************************************************************************
1890 /* Virtual Member Function:
1891  uint32_t getChildCount(const leWidgetWidget* _this)
1892 
1893  Summary:
1894  Gets the number of children this widget owns
1895 
1896  Description:
1897  Gets the number of children this widget owns
1898 
1899  Parameters:
1900  const leWidgetWidget* _this - The widget to operate on
1901 
1902  Remarks:
1903  Usage - _this->fn->getChildCount(_this);
1904 
1905  Returns:
1906  uint32_t - the child count
1907 */
1919 uint32_t _leWidget_GetChildCount(const leWidget* _this);
1920 
1921 // *****************************************************************************
1922 /* Virtual Member Function:
1923  leWidget* getChildAtIndex(const leWidgetWidget* _this,
1924  uint32_t idx)
1925 
1926  Summary:
1927  Gets a widget child at a given index
1928 
1929  Description:
1930  Gets a widget child at a given index
1931 
1932  Parameters:
1933  const leWidgetWidget* _this - The widget to operate on
1934  uint32_t idx - the index
1935 
1936  Remarks:
1937  Usage - _this->fn->getChildAtIndex(_this, idx);
1938 
1939  Returns:
1940  leWidget* - the child widget
1941 */
1955  uint32_t idx);
1956 
1957 // *****************************************************************************
1958 /* Virtual Member Function:
1959  uint32_t getIndexOfChild(const leWidgetWidget* _this,
1960  const leWidget* chld)
1961 
1962  Summary:
1963  Get the index of a given child widget
1964 
1965  Description:
1966  Get the index of a given child widget
1967 
1968  Parameters:
1969  const leWidgetWidget* _this - The widget to operate on
1970  const leWidget* chld - the child widget
1971 
1972  Remarks:
1973  Usage - _this->fn->getIndexOfChild(_this, chld);
1974 
1975  Returns:
1976  uint32_t -
1977 */
1991 uint32_t _leWidget_GetIndexOfChild(const leWidget* _this,
1992  const leWidget* child);
1993 
1994 // *****************************************************************************
1995 /* Virtual Member Function:
1996  leBool containsDescendant(const leWidgetWidget* _this,
1997  const leWidget* wgt)
1998 
1999  Summary:
2000  Determines of a widget's descendant tree contains a given widget
2001 
2002  Description:
2003  Determines of a widget's descendant tree contains a given widget
2004 
2005  Parameters:
2006  const leWidgetWidget* _this - The widget to operate on
2007  const leWidget* wgt - the widget
2008 
2009  Remarks:
2010  Usage - _this->fn->containsDescendant(_this, wgt);
2011 
2012  Returns:
2013  leBool - LE_TRUE if the widget is a descentdent of this
2014 */
2030  const leWidget* wgt);
2031 
2032 // *****************************************************************************
2033 /* Virtual Member Function:
2034  leScheme* getScheme(const leWidgetWidget* _this)
2035 
2036  Summary:
2037  Gets this widget's scheme
2038 
2039  Description:
2040  Gets this widget's scheme
2041 
2042  Parameters:
2043  const leWidgetWidget* _this - The widget to operate on
2044 
2045  Remarks:
2046  Usage - _this->fn->getScheme(_this);
2047 
2048  Returns:
2049  leScheme* - the scheme pointer
2050 */
2062 leScheme* _leWidget_GetScheme(const leWidget* _this);
2063 
2064 // *****************************************************************************
2065 /* Virtual Member Function:
2066  leResult setScheme(const leWidgetWidget* _this,
2067  leScheme* schm)
2068 
2069  Summary:
2070  Sets this widget's scheme
2071 
2072  Description:
2073  Sets this widget's scheme
2074 
2075  Parameters:
2076  leWidgetWidget* _this - The widget to operate on
2077  const leScheme* schm - the scheme pointer
2078 
2079  Remarks:
2080  Usage - _this->fn->setScheme(_this, schm);
2081 
2082  Returns:
2083  leResult - the result of the operation
2084 */
2100  const leScheme* scheme);
2101 
2102 // *****************************************************************************
2103 /* Virtual Member Function:
2104  leBorderType getBorderType(const leWidgetWidget* _this)
2105 
2106  Summary:
2107  Gets this widget's border type
2108 
2109  Description:
2110  Gets this widget's border type
2111 
2112  Parameters:
2113  const leWidgetWidget* _this - The widget to operate on
2114 
2115  Remarks:
2116  Usage - _this->fn->getBorderType(_this);
2117 
2118  Returns:
2119  leBorderType - the type
2120 */
2133 
2134 // *****************************************************************************
2135 /* Virtual Member Function:
2136  leResult setBorderType(leWidgetWidget* _this,
2137  leBorderType type)
2138 
2139  Summary:
2140  Sets this widget's border type
2141 
2142  Description:
2143  Sets this widget's border type
2144 
2145  Parameters:
2146  leWidgetWidget* _this - The widget to operate on
2147  leBorderType type - the type
2148 
2149  Remarks:
2150  Usage - _this->fn->setBorderType(_this, type);
2151 
2152  Returns:
2153  leResult - the result of the operation
2154 */
2170  leBorderType type);
2171 
2172 // *****************************************************************************
2173 /* Virtual Member Function:
2174  leBackgroundType getBackgroundType(const leWidgetWidget* _this)
2175 
2176  Summary:
2177  Gets this widget's background type
2178 
2179  Description:
2180  Gets this widget's background type
2181 
2182  Parameters:
2183  const leWidgetWidget* _this - The widget to operate on
2184 
2185  Remarks:
2186  Usage - _this->fn->getBackgroundType(_this);
2187 
2188  Returns:
2189  leBackgroundType - the type
2190 */
2203 
2204 // *****************************************************************************
2205 /* Virtual Member Function:
2206  leResult setBackgroundType(leWidgetWidget* _this,
2207  leBackgroundType type)
2208 
2209  Summary:
2210  Sets this widget's background type
2211 
2212  Description:
2213  Sets this widget's background type
2214 
2215  Parameters:
2216  leWidgetWidget* _this - The widget to operate on
2217  leBackgroundType type - the type
2218 
2219  Remarks:
2220  Usage - _this->fn->setBackgroundType(_this, type);
2221 
2222  Returns:
2223  leResult - the result of the operation
2224 */
2240  leBackgroundType type);
2241 
2242 // *****************************************************************************
2243 /* Virtual Member Function:
2244  leHAlignment getHAlignment(const leWidgetWidget* _this)
2245 
2246  Summary:
2247  Gets this widget's horizontal alignment setting
2248 
2249  Description:
2250  Gets this widget's horizontal alignment setting
2251 
2252  Parameters:
2253  const leWidgetWidget* _this - The widget to operate on
2254 
2255  Remarks:
2256  Usage - _this->fn->getHAlignment(_this);
2257 
2258  Returns:
2259  leHAlignment - the horizontal alignment
2260 */
2273 
2274 // *****************************************************************************
2275 /* Virtual Member Function:
2276  leResult setHAlignment(leWidgetWidget* _this,
2277  leHAlignment halgn)
2278 
2279  Summary:
2280  Sets this widget's horizontal alignment setting
2281 
2282  Description:
2283  Sets this widget's horizontal alignment setting
2284 
2285  Parameters:
2286  leWidgetWidget* _this - The widget to operate on
2287  leHAlignment halgn - the horizontal alignment
2288 
2289  Remarks:
2290  Usage - _this->fn->setHAlignment(_this, halgn);
2291 
2292  Returns:
2293  leResult - the result of the operation
2294 */
2310  leHAlignment align);
2311 
2312 // *****************************************************************************
2313 /* Virtual Member Function:
2314  leVAlignment getVAlignment(const leWidgetWidget* _this)
2315 
2316  Summary:
2317  Gets this widget's vertical alignment setting
2318 
2319  Description:
2320  Gets this widget's vertical alignment setting
2321 
2322  Parameters:
2323  const leWidgetWidget* _this - The widget to operate on
2324 
2325  Remarks:
2326  Usage - _this->fn->getVAlignment(_this);
2327 
2328  Returns:
2329  leVAlignment - the vertical alignment
2330 */
2343 
2344 // *****************************************************************************
2345 /* Virtual Member Function:
2346  leResult setVAlignment(leWidgetWidget* _this,
2347  leVAlignment valgn)
2348 
2349  Summary:
2350  Sets this widget's vertical alignment setting
2351 
2352  Description:
2353  Sets this widget's vertical alignment setting
2354 
2355  Parameters:
2356  leWidgetWidget* _this - The widget to operate on
2357  leVAlignment valgn - the vertical alignment
2358 
2359  Remarks:
2360  Usage - _this->fn->setVAlignment(_this, valgn);
2361 
2362  Returns:
2363  leResult - the result of the operation
2364 */
2380  leVAlignment align);
2381 
2382 // *****************************************************************************
2383 /* Virtual Member Function:
2384  leMargin getMargins(const leWidgetWidget* _this)
2385 
2386  Summary:
2387  Gets this widget's margins
2388 
2389  Description:
2390  Gets this widget's margins
2391 
2392  Parameters:
2393  const leWidgetWidget* _this - The widget to operate on
2394 
2395  Remarks:
2396  Usage - _this->fn->getMargins(_this);
2397 
2398  Returns:
2399  leMargin - the margin value
2400 */
2412 leMargin _leWidget_GetMargins(const leWidget* _this);
2413 
2414 // *****************************************************************************
2415 /* Virtual Member Function:
2416  leResult setMargins(leWidgetWidget* _this,
2417  uint32_t l,
2418  uint32_t t,
2419  uint32_t r,
2420  uint32_t b)
2421 
2422  Summary:
2423  Sets this widget's margins
2424 
2425  Description:
2426  Sets this widget's margins
2427 
2428  Parameters:
2429  leWidgetWidget* _this - The widget to operate on
2430  uint32_t l - the left margin value
2431  uint32_t t - the top margin value
2432  uint32_t r - the right margin value
2433  uint32_t b - the bottom margin value
2434 
2435  Remarks:
2436  Usage - _this->fn->setMargins(_this, l, t, r, b);
2437 
2438  Returns:
2439  leResult - the result of the operation
2440 */
2458  uint32_t l,
2459  uint32_t t,
2460  uint32_t r,
2461  uint32_t b);
2462 
2463 // *****************************************************************************
2464 /* Virtual Member Function:
2465  uint32_t getCornerRadius(const leWidgetWidget* _this)
2466 
2467  Summary:
2468  Gets this widget's corner radius value
2469 
2470  Description:
2471  Gets this widget's corner radius value
2472 
2473  Parameters:
2474  const leWidgetWidget* _this - The widget to operate on
2475 
2476  Remarks:
2477  Usage - _this->fn->getCornerRadius(_this);
2478 
2479  Returns:
2480  uint32_t - the radius value
2481 */
2493 uint32_t _leWidget_GetCornerRadius(const leWidget* _this);
2494 
2495 // *****************************************************************************
2496 /* Virtual Member Function:
2497  leResult setCornerRadius(leWidgetWidget* _this,
2498  uint32_t rad)
2499 
2500  Summary:
2501  Sets this widget's corner radius value
2502 
2503  Description:
2504  Sets this widget's corner radius value
2505 
2506  Parameters:
2507  leWidgetWidget* _this - The widget to operate on
2508  uint32_t rad - the radius value
2509 
2510  Remarks:
2511  Usage - _this->fn->setCornerRadius(_this, rad);
2512 
2513  Returns:
2514  leResult - the result of the operation
2515 */
2531  uint32_t radius);
2532 
2533 // *****************************************************************************
2534 /* Virtual Member Function:
2535  leBool hasFocus(const leWidgetWidget* _this)
2536 
2537  Summary:
2538  Indicates if this widget currently has input focus
2539 
2540  Description:
2541  Indicates if this widget currently has input focus
2542 
2543  Parameters:
2544  const leWidgetWidget* _this - The widget to operate on
2545 
2546  Remarks:
2547  Usage - _this->fn->hasFocus(_this);
2548 
2549  Returns:
2550  leBool - true if focused
2551 */
2563 leBool _leWidget_HasFocus(const leWidget* _this);
2564 
2565 // *****************************************************************************
2566 /* Virtual Member Function:
2567  leResult setFocus(leWidgetWidget* _this)
2568 
2569  Summary:
2570  Attempts to focus this widget
2571 
2572  Description:
2573  Attempts to focus this widget
2574 
2575  Parameters:
2576  leWidgetWidget* _this - The widget to operate on
2577 
2578  Remarks:
2579  Usage - _this->fn->setFocus(_this);
2580 
2581  Returns:
2582  leResult - the result of the operation
2583 */
2599 
2600 // *****************************************************************************
2601 /* Virtual Member Function:
2602  void invalidate(const leWidgetWidget* _this)
2603 
2604  Summary:
2605  Invalidates this widget so it will redraw itself
2606 
2607  Description:
2608  Invalidates this widget so it will redraw itself
2609 
2610  Parameters:
2611  const leWidgetWidget* _this - The widget to operate on
2612 
2613  Remarks:
2614  Usage - _this->fn->invalidate(_this);
2615 
2616  Returns:
2617  void
2618 */
2631 void _leWidget_Invalidate(const leWidget* _this);
2632 
2633 // *****************************************************************************
2634 /* Virtual Member Function:
2635  void invalidateContents(const leWidgetWidget* _this)
2636 
2637  Summary:
2638  Invalidates the contents of this widget
2639 
2640  Description:
2641  Invalidates the contents of this widget
2642 
2643  Parameters:
2644  const leWidgetWidget* _this - The widget to operate on
2645 
2646  Remarks:
2647  Usage - _this->fn->invalidateContents(_this);
2648 
2649  Returns:
2650  void
2651 */
2663 void _leWidget_InvalidateContents(const leWidget* _this);
2664 
2665 // *****************************************************************************
2666 /* Virtual Member Function:
2667  leResult installEventFilter(leWidgetWidget* _this,
2668  leWidgetEventFilter fltr)
2669 
2670  Summary:
2671  Installs a widget event filter
2672 
2673  Description:
2674  Installs a widget event filter
2675 
2676  Parameters:
2677  leWidgetWidget* _this - The widget to operate on
2678  leWidgetEventFilter fltr - the callback pointer
2679 
2680  Remarks:
2681  Usage - _this->fn->installEventFilter(_this, fltr);
2682 
2683  Returns:
2684  leResult - the result of the operation
2685 */
2701  leWidgetEventFilter fltr);
2702 
2703 // *****************************************************************************
2704 /* Virtual Member Function:
2705  leResult removeEventFilter(leWidgetWidget* _this,
2706  leWidgetEventFilter fltr)
2707 
2708  Summary:
2709  Removes a widget event filter
2710 
2711  Description:
2712  Removes a widget event filter
2713 
2714  Parameters:
2715  leWidgetWidget* _this - The widget to operate on
2716  leWidgetEventFilter fltr - the callback pointer
2717 
2718  Remarks:
2719  Usage - _this->fn->removeEventFilter(_this, fltr);
2720 
2721  Returns:
2722  leResult - the result of the operation
2723 */
2739  leWidgetEventFilter fltr);
2740 
2741 // *****************************************************************************
2742 /* Virtual Member Function:
2743  void update(leWidgetWidget* _this,
2744  uint32_t dt)
2745 
2746  Summary:
2747  The widget update/tasks function
2748 
2749  Description:
2750  The widget update/tasks function
2751 
2752  Parameters:
2753  leWidgetWidget* _this - The widget to operate on
2754  uint32_t dt -
2755 
2756  Remarks:
2757  Usage - _this->fn->update(_this, dt);
2758 
2759  Returns:
2760  void
2761 */
2776 void _leWidget_Update(leWidget* _this, uint32_t dt);
2777 
2778 void _leWidget_HandleEvent(leWidget*, leEvent*);
2779 void _leWidget_ValidateChildren(leWidget*);
2780 void _leWidget_IncreaseDirtyState(leWidget*, uint32_t);
2781 void _leWidget_SetDirtyState(leWidget*, uint32_t);
2782 void _leWidget_ClearDirtyState(leWidget*);
2783 void _leWidget_InvalidateBorderAreas(const leWidget*);
2784 void _leWidget_DamageArea(const leWidget*, leRect*);
2785 void _leWidget_TouchDownEvent(leWidget*, leWidgetEvent_TouchDown*);
2786 void _leWidget_TouchUpEvent(leWidget*, leWidgetEvent_TouchUp*);
2787 void _leWidget_TouchMoveEvent(leWidget*, leWidgetEvent_TouchMove*);
2788 void _leWidget_MoveEvent(leWidget*, leWidget_MoveEvent*);
2789 void _leWidget_ResizeEvent(leWidget*, leWidget_ResizeEvent*);
2790 void _leWidget_FocusLostEvent(leWidget*);
2791 void _leWidget_FocusGainedEvent(leWidget*);
2792 void _leWidget_LanguageChangeEvent(leWidget*);
2793 
2794 #endif /* LEGATO_WIDGET_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.
leWidget_New
LIB_EXPORT leWidget * leWidget_New()
Create widget.
Definition: legato_widget.c:150
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
lePercentWholeRounded
LIB_EXPORT uint32_t lePercentWholeRounded(uint32_t l, uint32_t r)
Calculate percent whole rounded.
Definition: legato_math.c:204
LE_WIDGET_EVENT_MOVED
@ LE_WIDGET_EVENT_MOVED
Definition: legato_event.h:75
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
leMargin::left
uint8_t left
Definition: legato_common.h:232
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
leEventID
leEventID
This enum represents valid event IDs.
Definition: legato_event.h:65
leArray::size
uint32_t size
Definition: legato_array.h:63
_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
leSetEditWidget
LIB_EXPORT leResult leSetEditWidget(leEditWidget *widget)
Set edit widget.
Definition: legato_state.c:526
leEvent
This enum presents a event. An event contains valid event ids.
Definition: legato_event.h:88
_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
LE_EVENT_TOUCH_UP
@ LE_EVENT_TOUCH_UP
Definition: legato_event.h:69
legato_event.h
Legato event definitions.
leArray_Find
int32_t leArray_Find(const leArray *arr, void *val)
Find a first index of value.
Definition: legato_array.c:242
lePercentOf
LIB_EXPORT uint32_t lePercentOf(uint32_t num, uint32_t percent)
Calculate percent of a number.
Definition: legato_math.c:218
leArray_PushBack
leResult leArray_PushBack(leArray *arr, void *val)
Push value on back.
Definition: legato_array.c:147
leHAlignment
leHAlignment
This enum represents the horizontal alignment mode of objects.
Definition: legato_common.h:206
leWidgetEvent_TouchDown
Used to define widget touch down event.
Definition: legato_widget.h:377
leGetFocusWidget
LIB_EXPORT leWidget * leGetFocusWidget()
Get focus widget.
Definition: legato_state.c:490
_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
leWidgetType
leWidgetType
Used to define widget types.
Definition: legato_widget.h:91
_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
_leWidget_Update
void _leWidget_Update(leWidget *_this, uint32_t dt)
Update widget.
Definition: legato_widget.c:1491
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.
leRectArray
This struct represents a rectange array.
Definition: legato_rectarray.h:71
legato_array.h
An array implementation for storing pointers.
leArray::values
void ** values
Definition: legato_array.h:62
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
_leWidget_LocalRect
leRect _leWidget_LocalRect(const leWidget *_this)
Get widget rectangle.
Definition: legato_widget.c:670
LE_WIDGET_EVENT_FOCUS_LOST
@ LE_WIDGET_EVENT_FOCUS_LOST
Definition: legato_event.h:78
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
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
_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
leWidget
struct leWidget leWidget
Used to define a widget.
Definition: legato_widget.h:338
LE_WIDGET_EVENT_PAINT
@ LE_WIDGET_EVENT_PAINT
Definition: legato_event.h:74
leWidgetDrawState
leWidgetDrawState
Used to define widget dirty state.
Definition: legato_widget.h:303
_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
LE_WIDGET_EVENT_RESIZED
@ LE_WIDGET_EVENT_RESIZED
Definition: legato_event.h:76
leWidget_MoveEvent
struct leWidget_MoveEvent leWidget_MoveEvent
Used to define widget move event.
leGetEditWidget
LIB_EXPORT leEditWidget * leGetEditWidget()
Get edit widget.
Definition: legato_state.c:521
leUtils_ChildIntersectsParent
leBool leUtils_ChildIntersectsParent(const leWidget *parent, const leWidget *child)
Determines if parent and child intersect.
Definition: legato_utils.c:166
_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
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
leState::focus
leWidget * focus
Definition: legato_state.h:78
leWidgetIsInScene
leBool leWidgetIsInScene(const leWidget *wgt)
Determines whether the widget is in the scene.
Definition: legato_state.c:596
leEvent::id
leEventID id
Definition: legato_event.h:89
leArray_Clear
leResult leArray_Clear(leArray *arr)
Clear array.
Definition: legato_array.c:279
LE_WIDGET_BACKGROUND_NONE
@ LE_WIDGET_BACKGROUND_NONE
Definition: legato_widget.h:225
leWidget
Used to define a widget.
Definition: legato_widget.h:623
leWidgetEvent_TouchMove
struct leWidgetEvent_TouchMove leWidgetEvent_TouchMove
Used to define widget touch move event.
leWidget_MoveEvent
Used to define widget move event.
Definition: legato_widget.h:315
legato_scheme.h
Schemes support various properties that make it possible to customize the color of widgets.
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_rect.h
Rectangle functions and definitions.
LE_WIDGET_BACKGROUND_LAST
@ LE_WIDGET_BACKGROUND_LAST
Definition: legato_widget.h:227
_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
leWidgetEvent_TouchMove
Used to define widget touch move event.
Definition: legato_widget.h:429
leMargin
This struct represents the four margin settings for objects.
Definition: legato_common.h:231
leWidgetEvent_TouchUp
struct leWidgetEvent_TouchUp leWidgetEvent_TouchUp
Used to define widget touch up event.
leMargin::right
uint8_t right
Definition: legato_common.h:234
leScheme
Definition: legato_scheme.h:154
leWidgetEvent
struct leWidgetEvent leWidgetEvent
Used to define widget event.
_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
LE_WIDGET_EVENT_FOCUS_GAINED
@ LE_WIDGET_EVENT_FOCUS_GAINED
Definition: legato_event.h:77
leArray_Get
void * leArray_Get(const leArray *arr, uint32_t idx)
Get entry at index.
Definition: legato_array.c:224
leWidgetDirtyState
leWidgetDirtyState
Used to define widget dirty state.
Definition: legato_widget.h:277
_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
leWidgetEvent_TouchDown
struct leWidgetEvent_TouchDown leWidgetEvent_TouchDown
Used to define widget touch down event.
leMargin::top
uint8_t top
Definition: legato_common.h:233
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_ResizeEvent
struct leWidget_ResizeEvent leWidget_ResizeEvent
Used to define widget resize event.
legato_state.h
_leWidget_RemoveChild
leResult _leWidget_RemoveChild(leWidget *_this, leWidget *child)
Remove child from widget.
Definition: legato_widget.c:785
_leWidget_SetEnabled
leResult _leWidget_SetEnabled(leWidget *_this, leBool enable)
Set widget enabled flag.
Definition: legato_widget.c:620
leState::widgetIDs
uint32_t widgetIDs
Definition: legato_state.h:73
_leWidget_SetPosition
leResult _leWidget_SetPosition(leWidget *_this, int32_t x, int32_t y)
Set widget x and y position.
Definition: legato_widget.c:247
leArray_Remove
leResult leArray_Remove(leArray *arr, void *val)
Remove value.
Definition: legato_array.c:207
leMargin::bottom
uint8_t bottom
Definition: legato_common.h:235
leSetFocusWidget
LIB_EXPORT leResult leSetFocusWidget(leWidget *widget)
Get language by index.
Definition: legato_state.c:495
leVAlignment
leVAlignment
This enum represents the vertical alignment mode of objects.
Definition: legato_common.h:181
_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
_leWidget_RemoveChildAt
leResult _leWidget_RemoveChildAt(leWidget *_this, uint32_t idx)
Remove child from widget at index.
Definition: legato_widget.c:803