MPLABĀ® Harmony Graphics Suite
legato_widget_radiobutton.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_radiobutton.h
32 
33  Summary:
34 
35 
36  Description:
37  This module implements radio button widget functions.
38 *******************************************************************************/
39 
46 #ifndef LEGATO_RADIOBUTTON_H
47 #define LEGATO_RADIOBUTTON_H
48 
50 
51 #if LE_RADIOBUTTON_WIDGET_ENABLED == 1
52 
57 
58 typedef struct leRadioButtonWidget leRadioButtonWidget;
59 typedef struct leRadioButtonGroup leRadioButtonGroup;
60 
61 // *****************************************************************************
62 /* Function Pointer:
63  leRadioButtonWidget_SelectedEvent
64 
65  Summary:
66  Radio button selected function callback type
67 */
74 typedef void (*leRadioButtonWidget_SelectedEvent)(leRadioButtonWidget*);
75 
76 // *****************************************************************************
77 /* Function Pointer:
78  leRadioButtonWidget_DeselectedEvent
79 
80  Summary:
81  Radio button deselected function callback type
82 */
89 typedef void (*leRadioButtonWidget_DeselectedEvent)(leRadioButtonWidget*);
90 
91 // *****************************************************************************
92 // *****************************************************************************
93 // Section: Data Types and Constants
94 // *****************************************************************************
95 // *****************************************************************************
96 
97 /* internal use only */typedef struct leRadioButtonWidget leRadioButtonWidget;
102 
103 #define LE_RADIOBUTTONWIDGET_VTABLE(THIS_TYPE) \
104  LE_WIDGET_VTABLE(THIS_TYPE) \
105  \
106  leRadioButtonGroup* (*getGroup)(const THIS_TYPE* _this); \
107  leBool (*getSelected)(const THIS_TYPE* _this); \
108  leResult (*setSelected)(THIS_TYPE* _this); \
109  void (*select)(THIS_TYPE* _this); \
110  void (*deselect)(THIS_TYPE* _this); \
111  leString* (*getString)(const THIS_TYPE* _this); \
112  leResult (*setString)(THIS_TYPE* _this, const leString* str); \
113  leImage* (*getSelectedImage)(const THIS_TYPE* _this); \
114  leResult (*setSelectedImage)(THIS_TYPE* _this, const leImage* img); \
115  leImage* (*getUnselectedImage)(const THIS_TYPE* _this); \
116  leResult (*setUnselectedImage)(THIS_TYPE* _this, const leImage* img); \
117  leRelativePosition (*getImagePosition)(const THIS_TYPE* _this); \
118  leResult (*setImagePosition)(THIS_TYPE* _this, leRelativePosition pos); \
119  uint32_t (*getImageMargin)(const THIS_TYPE* _this); \
120  leResult (*setImageMargin)(THIS_TYPE* _this, uint32_t mg); \
121  leRadioButtonWidget_SelectedEvent (*getSelectedEventCallback)(const THIS_TYPE* _this); \
122  leResult (*setSelectedEventCallback)(THIS_TYPE* _this, leRadioButtonWidget_SelectedEvent cb); \
123  leRadioButtonWidget_DeselectedEvent (*getDeselectedEventCallback)(const THIS_TYPE* _this); \
124  leResult (*setDeselectedEventCallback)(THIS_TYPE* _this, leRadioButtonWidget_DeselectedEvent cb); \
125  uint32_t (*getCircleButtonSize)(const THIS_TYPE* _this); \
126  leResult (*setCircleButtonSize)(THIS_TYPE* _this, uint32_t sz); \
127 
128 typedef struct leRadioButtonWidgetVTable
129 {
130  LE_RADIOBUTTONWIDGET_VTABLE(leRadioButtonWidget)
131 } leRadioButtonWidgetVTable;
132 
138 // *****************************************************************************
139 /* Enumeration:
140  leRadioButtonWidget
141 
142  Summary:
143  Implementation of a radio button widget struct
144 
145  Description:
146  A radio button is similar to a checkbox widget in that it has an on and
147  off state. It is further capable of being added to a radio button group.
148  This group provides a mutually exclusive selection capability so that
149  only one radio button may be selected at any one time.
150 
151  Remarks:
152  None.
153 */
161 typedef struct leRadioButtonWidget
162 {
163  leWidget widget; // widget base class
164 
165  const leRadioButtonWidgetVTable* fn;
166 
167  leBool selected; // indicates if the radio button is selected
168 
169  const leString* string; // radio button text
170 
171  const leImage* selectedImage; // button custom selected image
172  const leImage* unselectedImage; // buton custom unselected image
173 
174  leRelativePosition imagePosition; // image icon relative position
175 
176  uint32_t imageMargin; // image margin
177  uint32_t circleButtonSize; // size of radio circle button in pixels
178 
179  leRadioButtonWidget_SelectedEvent selectedEvent; // button selected event callback
180  leRadioButtonWidget_DeselectedEvent deselectedEvent; // button deselected event callback
181 
182  leRadioButtonGroup* group; // radio button group
183 } leRadioButtonWidget;
184 
185 
186 // *****************************************************************************
187 // *****************************************************************************
188 // Section: Routines
189 // *****************************************************************************
190 // *****************************************************************************
191 
192 // *****************************************************************************
193 /* Function:
194  leRadioButtonWidget* leRadioButtonWidget_New()
195 
196  Summary:
197  Allocates memory for a new widget of this type. The application is
198  responsible for the managment of this memory until the widget is added to
199  a widget tree.
200 
201  Description:
202 
203 
204  Parameters:
205 
206  Returns:
207  leRadioButtonWidget*
208 
209  Remarks:
210  Use leWidget_Delete() to free this pointer.
211 */
223 LIB_EXPORT leRadioButtonWidget* leRadioButtonWidget_New();
224 
235 LIB_EXPORT void leRadioButtonWidget_Constructor(leRadioButtonWidget* wgt);
236 
237 
238 #ifdef _DOXYGEN_
239 #define THIS_TYPE struct leWidget
240 
241 
242 // *****************************************************************************
243 /* Virtual Member Function:
244  leRadioButtonGroup* getGroup(const leRadioButtonWidget* _this)
245 
246  Summary:
247  Gets the button's group pointer
248 
249  Description:
250  Gets the button's group pointer
251 
252  Parameters:
253  const leRadioButtonWidget* _this - The radio button widget to operate on
254 
255  Remarks:
256  Usage - _this->fn->getGroup(_this);
257 
258  Returns:
259  leRadioButtonGroup* - the radio button group
260 */
271 virtual leBool getSelected(const leRadioButtonWidget* _this);
272 
273 // *****************************************************************************
274 /* Virtual Member Function:
275  leBool getSelected(const leRadioButtonWidget* _this)
276 
277  Summary:
278  Gets the button's selection state
279 
280  Description:
281  Gets the button's selection state
282 
283  Parameters:
284  const leRadioButtonWidget* _this - The radio button widget to operate on
285 
286  Remarks:
287  Usage - _this->fn->getSelected(_this);
288 
289  Returns:
290  leBool - the selected state
291 */
302 virtual leBool getSelected(const leRadioButtonWidget* _this);
303 
304 
305 // *****************************************************************************
306 /* Virtual Member Function:
307  leResult setSelected(leRadioButtonWidget* _this)
308 
309  Summary:
310  Selects the button
311 
312  Description:
313  Selects the button
314 
315  Parameters:
316  leRadioButtonWidget* _this - The radio button widget to operate on
317 
318  Remarks:
319  Usage - _this->fn->setSelected(_this);
320 
321  Returns:
322  leResult - the result of the operation
323 */
334 virtual leResult setSelected(leRadioButtonWidget* _this);
335 
336 
337 // *****************************************************************************
338 /* Virtual Member Function:
339  void select(leRadioButtonWidget* _this)
340 
341  Summary:
342  internal use only
343 */
344 
345 // *****************************************************************************
346 /* Virtual Member Function:
347  void deselect(leRadioButtonWidget* _this)
348 
349  Summary:
350  internal use only
351 */
352 
353 // *****************************************************************************
354 /* Virtual Member Function:
355  leString* getString(const leRadioButtonWidget* _this)
356 
357  Summary:
358  Gets the text string pointer
359 
360  Description:
361  Gets the text string pointer
362 
363  Parameters:
364  const leRadioButtonWidget* _this - The radio button widget to operate on
365 
366  Remarks:
367  Usage - _this->fn->getString(_this);
368 
369  Returns:
370  leString* - the string pointer
371 */
382 virtual leString* getString(const leRadioButtonWidget* _this);
383 
384 // *****************************************************************************
385 /* Virtual Member Function:
386  leResult setString(leRadioButtonWidget* _this,
387  const leString* str)
388 
389  Summary:
390  Sets the text string pointer
391 
392  Description:
393  Sets the text string pointer
394 
395  Parameters:
396  leRadioButtonWidget* _this - The radio button widget to operate on
397  const leString* str - the string pointer
398 
399  Remarks:
400  Usage - _this->fn->setString(_this, str);
401 
402  Returns:
403  leResult - the result of the operation
404 */
418 virtual leResult setString(leRadioButtonWidget* _this,
419  const leString* str);
420 
421 
422 // *****************************************************************************
423 /* Virtual Member Function:
424  leImage* getSelectedImage(const leRadioButtonWidget* _this)
425 
426  Summary:
427  Gets the selected image pointer
428 
429  Description:
430  Gets the selected image pointer
431 
432  Parameters:
433  const leRadioButtonWidget* _this - The radio button widget to operate on
434 
435  Remarks:
436  Usage - _this->fn->getSelectedImage(_this);
437 
438  Returns:
439  leImage* - the image pointer
440 */
451 virtual leString* getString(const leRadioButtonWidget* _this);
452 
453 
454 // *****************************************************************************
455 /* Virtual Member Function:
456  leResult setSelectedImage(leRadioButtonWidget* _this,
457  const leImage* img)
458 
459  Summary:
460  Sets the selected image pointer
461 
462  Description:
463  Sets the selected image pointer
464 
465  Parameters:
466  leRadioButtonWidget* _this - The radio button widget to operate on
467  const leImage* img - the image pointer
468 
469  Remarks:
470  Usage - _this->fn->setSelectedImage(_this, img);
471 
472  Returns:
473  leResult - the result of the operation
474 */
488 virtual leResult setSelectedImage(leRadioButtonWidget* _this,
489  const leImage* img);
490 
491 
492 // *****************************************************************************
493 /* Virtual Member Function:
494  leImage* getUnselectedImage(const leRadioButtonWidget* _this)
495 
496  Summary:
497  Gets the unselected image pointer
498 
499  Description:
500  Gets the unselected image pointer
501 
502  Parameters:
503  const leRadioButtonWidget* _this - The radio button widget to operate on
504 
505  Remarks:
506  Usage - _this->fn->getUnselectedImage(_this);
507 
508  Returns:
509  leImage* - the image pointer
510 */
521 virtual leImage* getUnselectedImage(const leRadioButtonWidget* _this);
522 
523 // *****************************************************************************
524 /* Virtual Member Function:
525  leResult setUnselectedImage(leRadioButtonWidget* _this,
526  const leImage* img)
527 
528  Summary:
529  Sets the unselected image pointer
530 
531  Description:
532  Sets the unselected image pointer
533 
534  Parameters:
535  leRadioButtonWidget* _this - The radio button widget to operate on
536  const leImage* img - the image pointer
537 
538  Remarks:
539  Usage - _this->fn->setUnselectedImage(_this, img);
540 
541  Returns:
542  leResult - the result of the operation
543 */
557 virtual leResult setUnselectedImage(leRadioButtonWidget* _this,
558  const leImage* img);
559 
560 // *****************************************************************************
561 /* Virtual Member Function:
562  leRelativePosition getImagePosition(const leRadioButtonWidget* _this)
563 
564  Summary:
565  Gets the image position
566 
567  Description:
568  Gets the image position
569 
570  Parameters:
571  const leRadioButtonWidget* _this - The radio button widget to operate on
572 
573  Remarks:
574  Usage - _this->fn->getImagePosition(_this);
575 
576  Returns:
577  leRelativePosition - the position
578 */
589 virtual leRelativePosition getImagePosition(const leRadioButtonWidget* _this);
590 
591 // *****************************************************************************
592 /* Virtual Member Function:
593  leResult setImagePosition(leRadioButtonWidget* _this,
594  leRelativePosition pos)
595 
596  Summary:
597  Sets the image position
598 
599  Description:
600  Sets the image position
601 
602  Parameters:
603  leRadioButtonWidget* _this - The radio button widget to operate on
604  leRelativePosition pos - the position value
605 
606  Remarks:
607  Usage - _this->fn->setImagePosition(_this, pos);
608 
609  Returns:
610  leResult - the result of the operation
611 */
625 virtual leResult setImagePosition(leRadioButtonWidget* _this,
626  leRelativePosition pos);
627 
628 
629 // *****************************************************************************
630 /* Virtual Member Function:
631  uint32_t getImageMargin(const leRadioButtonWidget* _this)
632 
633  Summary:
634  Gets the image margin
635 
636  Description:
637  Gets the image margin
638 
639  Parameters:
640  const leRadioButtonWidget* _this - The radio button widget to operate on
641 
642  Remarks:
643  Usage - _this->fn->getImageMargin(_this);
644 
645  Returns:
646  uint32_t - the margin value
647 */
658 virtual uint32_t getImageMargin(const leRadioButtonWidget* _this);
659 
660 // *****************************************************************************
661 /* Virtual Member Function:
662  leResult setImageMargin(leRadioButtonWidget* _this,
663  uint32_t mg)
664 
665  Summary:
666  Sets the image margin
667 
668  Description:
669  Sets the image margin
670 
671  Parameters:
672  leRadioButtonWidget* _this - The radio button widget to operate on
673  uint32_t mg - the margin value
674 
675  Remarks:
676  Usage - _this->fn->setImageMargin(_this, mg);
677 
678  Returns:
679  leResult - the result of the operation
680 */
694 virtual leResult setImageMargin(leRadioButtonWidget* _this,
695  uint32_t mg);
696 
697 // *****************************************************************************
708 uint32_t getCircleButtonSize(const leRadioButtonWidget* _this);
709 
710 // *****************************************************************************
724 virtual leResult setCircleButtonSize(leRadioButtonWidget* _this,
725  uint32_t sz);
726 
737 virtual leRadioButtonWidget_SelectedEvent getSelectedEventCallback
738  (const leRadioButtonWidget* _this);
739 
753 virtual leResult setSelectedEventCallback(leRadioButtonWidget* _this,
754  leRadioButtonWidget_SelectedEvent cb);
755 
766 virtual leRadioButtonWidget_DeselectedEvent getDeselectedEventCallback
767  (const leRadioButtonWidget* _this);
768 
782 virtual leResult setDeselectedEventCallback(leRadioButtonWidget* _this,
783  leRadioButtonWidget_DeselectedEvent cb);
784 
785 #undef THIS_TYPE
786 #endif
787 
788 #endif // LE_RADIOBUTTON_WIDGET_ENABLED
789 #endif /* LEGATO_RADIOBUTTON_H */
_leWidget_SetAlphaAmount
leResult _leWidget_SetAlphaAmount(leWidget *_this, uint32_t alpha)
Set alpha amount.
Definition: legato_widget.c:570
legato_error.h
Error functions, macros and definitions.
legato_widget_radiobutton.h
Radiobutton functions 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
legato_image.h
Image functions and defintions.
_leWidget_SetCornerRadius
leResult _leWidget_SetCornerRadius(leWidget *_this, uint32_t radius)
Set widget scheme.
Definition: legato_widget.c:1091
_leWidget_InstallEventFilter
leResult _leWidget_InstallEventFilter(leWidget *_this, leWidgetEventFilter fltr)
Install event filter.
Definition: legato_widget.c:1215
_leWidget_SetX
leResult _leWidget_SetX(leWidget *_this, int32_t x)
Set widget x position.
Definition: legato_widget.c:190
_leWidget_SetSize
leResult _leWidget_SetSize(leWidget *_this, uint32_t width, uint32_t height)
Set widget height.
Definition: legato_widget.c:381
_leWidget_HasFocus
leBool _leWidget_HasFocus(const leWidget *_this)
Determines the focus status.
Definition: legato_widget.c:1110
legato_memory.h
Memory functions and definitions.
_leWidget_Resize
leResult _leWidget_Resize(leWidget *_this, int32_t width, int32_t height)
Resize widget.
Definition: legato_widget.c:426
_leWidget_SetAlphaEnabled
leResult _leWidget_SetAlphaEnabled(leWidget *_this, leBool enable)
Set cumulative alpha enable status.
Definition: legato_widget.c:501
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
leImage
Definition: legato_image.h:180
LE_VALIGN_MIDDLE
@ LE_VALIGN_MIDDLE
Definition: legato_common.h:183
_leWidget_GetCumulativeAlphaEnabled
leBool _leWidget_GetCumulativeAlphaEnabled(const leWidget *_this)
Get cumulative alpha enable status.
Definition: legato_widget.c:484
_leWidget_RectToParentSpace
leRect _leWidget_RectToParentSpace(const leWidget *_this)
Get widget rectangle.
Definition: legato_widget.c:684
_leWidget_Translate
leResult _leWidget_Translate(leWidget *_this, int32_t x, int32_t y)
Translate widget x and y position.
Definition: legato_widget.c:282
_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_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
_leWidget_Update
void _leWidget_Update(leWidget *_this, uint32_t dt)
Update widget.
Definition: legato_widget.c:1491
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
leString
This struct represents a string.
Definition: legato_string.h:108
_leWidget_LocalRect
leRect _leWidget_LocalRect(const leWidget *_this)
Get widget rectangle.
Definition: legato_widget.c:670
leBool
leBool
This enum represents booleans.
Definition: legato_common.h:157
_leWidget_GetBackgroundType
leBackgroundType _leWidget_GetBackgroundType(const leWidget *_this)
Get widget background type.
Definition: legato_widget.c:982
_leWidget_SetScheme
leResult _leWidget_SetScheme(leWidget *_this, const leScheme *scheme)
Set widget scheme.
Definition: legato_widget.c:945
_leWidget_SetHAlignment
leResult _leWidget_SetHAlignment(leWidget *_this, leHAlignment align)
Set widget scheme.
Definition: legato_widget.c:1010
_leWidget_GetEnabled
leBool _leWidget_GetEnabled(const leWidget *_this)
Get widget enabled flag.
Definition: legato_widget.c:615
_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
_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
legato_string.h
Fixed string functions and definitions.
LE_HALIGN_LEFT
@ LE_HALIGN_LEFT
Definition: legato_common.h:207
leWidget
Used to define a widget.
Definition: legato_widget.h:623
legato.h
The header file joins all header files used in the graphics object library.
_leWidget_GetX
int32_t _leWidget_GetX(const leWidget *_this)
Get widget x position.
Definition: legato_widget.c:183
leRectClip
LIB_EXPORT void leRectClip(const leRect *l_rect, const leRect *r_rect, leRect *result)
Clips a rectangle to the space of another rectangle.
Definition: legato_rect.c:122
_leWidget_SetVAlignment
leResult _leWidget_SetVAlignment(leWidget *_this, leVAlignment align)
Set widget vertical alignment.
Definition: legato_widget.c:1034
_leWidget_GetVisible
leBool _leWidget_GetVisible(const leWidget *_this)
Get widget visible status.
Definition: legato_widget.c:642
leWidgetEvent_TouchMove
Used to define widget touch move event.
Definition: legato_widget.h:429
_leWidget_AddChild
leResult _leWidget_AddChild(leWidget *_this, leWidget *child)
Add child to widget.
Definition: legato_widget.c:734
_leWidget_GetIndexOfChild
uint32_t _leWidget_GetIndexOfChild(const leWidget *_this, const leWidget *child)
Get index of child.
Definition: legato_widget.c:899
_leWidget_GetChildCount
uint32_t _leWidget_GetChildCount(const leWidget *_this)
Get child count.
Definition: legato_widget.c:881
LE_RELATIVE_POSITION_LEFTOF
@ LE_RELATIVE_POSITION_LEFTOF
Definition: legato_common.h:314
_leWidget_GetMargins
leMargin _leWidget_GetMargins(const leWidget *_this)
Get widget margins.
Definition: legato_widget.c:1051
leWidget_Constructor
LIB_EXPORT void leWidget_Constructor(leWidget *wgt)
Initialize widget.
Definition: legato_widget.c:67
legato_radiobutton_group.h
Radiobutton widget functions and definitions.
leRelativePosition
leRelativePosition
This enum represents the relative position modes for objects.
Definition: legato_common.h:313
LE_TRUE
@ LE_TRUE
Definition: legato_common.h:159
_leWidget_GetAlphaAmount
uint32_t _leWidget_GetAlphaAmount(const leWidget *_this)
Get alpha amount.
Definition: legato_widget.c:527
_leWidget_GetCornerRadius
uint32_t _leWidget_GetCornerRadius(const leWidget *_this)
Get widget corner radius.
Definition: legato_widget.c:1084
legato_common.h
Common macros and definitions used by Legato.
_leWidget_RemoveEventFilter
leResult _leWidget_RemoveEventFilter(leWidget *_this, leWidgetEventFilter fltr)
Remove event filter.
Definition: legato_widget.c:1238
leString::fn
const leStringVTable * fn
Definition: legato_string.h:109
_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