MPLABĀ® Harmony Graphics Suite
legato_widget_keypad.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_keypad.h
32 
33  Summary:
34 
35 
36  Description:
37  This module implements keypad widget functions.
38 *******************************************************************************/
39 
46 #ifndef LEGATO_KEYPAD_H
47 #define LEGATO_KEYPAD_H
48 
50 
51 #if LE_KEYPAD_WIDGET_ENABLED == 1 && LE_BUTTON_WIDGET_ENABLED == 1
52 
55 
56 typedef struct leKeyPadWidget leKeyPadWidget;
57 typedef struct leButtonWidget leButtonWidget;
58 
59 // *****************************************************************************
60 /* Function Pointer:
61  leKeyPadWidget_KeyClickEvent
62 
63  Summary:
64  Key click event function callback type
65 */
66 typedef void (*leKeyPadWidget_KeyClickEvent)(leKeyPadWidget*,
67  leButtonWidget*,
68  uint32_t,
69  uint32_t);
70 
71 // *****************************************************************************
72 // *****************************************************************************
73 // Section: Data Types and Constants
74 // *****************************************************************************
75 // *****************************************************************************
76 
77 // *****************************************************************************
78 /* Structure:
79  leKeyPadCellAction
80 
81  Summary:
82  Defines an assigned action to a key pad cell
83 
84  Description:
85 
86 
87  Remarks:
88  None.
89 */
90 typedef enum leKeyPadCellAction
91 {
92  LE_KEYPAD_CELL_ACTION_NONE,
93  LE_KEYPAD_CELL_ACTION_APPEND,
94  LE_KEYPAD_CELL_ACTION_SET,
95  LE_KEYPAD_CELL_ACTION_BACKSPACE,
96  LE_KEYPAD_CELL_ACTION_CLEAR,
97  LE_KEYPAD_CELL_ACTION_ACCEPT
98 } leKeyPadCellAction;
99 
100 // *****************************************************************************
101 /* Structure:
102  leKeyPadActionTrigger
103 
104  Summary:
105  Defines the trigger for keypad action and events
106 
107  Description:
108 
109 
110  Remarks:
111  None.
112 */
113 typedef enum leKeyPadActionTrigger
114 {
115  LE_KEYPAD_TRIGGER_KEYRELEASED,
116  LE_KEYPAD_TRIGGER_KEYPRESSED,
117 } leKeyPadActionTrigger;
118 
119 // *****************************************************************************
120 /* Structure:
121  leKeyPadCell
122 
123  Summary:
124  Defines a key pad cell struct
125 
126  Description:
127  A key pad is made up of an array of key pad cells. Each cell is individually
128  an leButtonWidget, an action, a value, and a few other options.
129 
130  Remarks:
131  None.
132 */
133 typedef struct leKeyPadCell
134 {
135  leBool enabled; // indicates if the cell should be drawn
136  leButtonWidget* button; // the button that handles the cell input events
137  // and rendering
138  leKeyPadCellAction action; // the action that occurs when the cell is
139  // activated
140  const leString* value; // the value that is passed to the edit event system
141 } leKeyPadCell;
142 
143 /* internal use only */
148 #define LE_KEYPADWIDGET_VTABLE(THIS_TYPE) \
149  LE_WIDGET_VTABLE(THIS_TYPE) \
150  \
151  leKeyPadActionTrigger (*getKeyPadActionTrigger)(const THIS_TYPE* _this); \
152  leResult (*setKeyPadActionTrigger)(THIS_TYPE* _this, leKeyPadActionTrigger trg); \
153  leKeyPadWidget_KeyClickEvent (*getKeyClickEventCallback)(const THIS_TYPE* _this); \
154  leResult (*setKeyClickEventCallback)(THIS_TYPE* _this, leKeyPadWidget_KeyClickEvent cb); \
155  leResult (*setKeyVisible)(THIS_TYPE* _this, uint32_t row, uint32_t col, leBool b); \
156  leKeyPadCellAction (*getKeyAction)(const THIS_TYPE* _this, uint32_t row, uint32_t col); \
157  leResult (*setKeyAction)(THIS_TYPE* _this, uint32_t row, uint32_t col, leKeyPadCellAction action); \
158  leString* (*getKeyValue)(const THIS_TYPE* _this, uint32_t row, uint32_t col); \
159  leResult (*setKeyValue)(THIS_TYPE* _this, uint32_t row, uint32_t col, const leString* val); \
160  leButtonWidget* (*getCellButton)(const THIS_TYPE* _this, uint32_t row, uint32_t col); \
161 
162 typedef struct leKeyPadWidgetVTable
163 {
164  LE_KEYPADWIDGET_VTABLE(leKeyPadWidget)
165 } leKeyPadWidgetVTable;
166 
172 // *****************************************************************************
180 typedef struct leKeyPadWidget
181 {
182  leWidget widget; // widget base class
183 
184  const leKeyPadWidgetVTable* fn;
185 
186  uint32_t rows; // number of button rows
187  uint32_t cols; // number of button columns
188 
189  leKeyPadActionTrigger trigger; //trigger for action and events
190 
191  leKeyPadCell* cells; // key cell array
192 
193  leKeyPadWidget_KeyClickEvent clickEvt; // key click callback event
194 } leKeyPadWidget;
195 
196 // *****************************************************************************
197 // *****************************************************************************
198 // Section: Routines
199 // *****************************************************************************
200 // *****************************************************************************
201 
213 LIB_EXPORT leKeyPadWidget* leKeyPadWidget_New(uint32_t rows,
214  uint32_t cols);
215 
230 LIB_EXPORT void leKeyPadWidget_Constructor(leKeyPadWidget* wgt,
231  uint32_t rows,
232  uint32_t cols);
233 
234 #ifdef _DOXYGEN_
235 #define THIS_TYPE struct leWidget
236 
237 // *****************************************************************************
238 /* Virtual Member Function:
239  leKeyPadActionTrigger getKeyPadActionTrigger(const leKeyPadWidget* _this)
240 
241  Summary:
242  Gets the keypad trigger action
243 
244  Description:
245  Gets the keypad trigger action
246 
247  Parameters:
248  const leKeyPadWidget* _this - The keypad widget to operate on
249 
250  Remarks:
251  Usage - _this->fn->getKeyPadActionTrigger(_this);
252 
253  Returns:
254  leKeyPadActionTrigger - the trigger action
255 */
256 
257 // *****************************************************************************
258 /* Virtual Member Function:
259  leResult setKeyPadActionTrigger(leKeyPadWidget* _this,
260  leKeyPadActionTrigger trg)
261 
262  Summary:
263  Sets the keypad trigger action
264 
265  Description:
266  Sets the keypad trigger action
267 
268  Parameters:
269  leKeyPadWidget* _this - The keypad widget to operate on
270  leKeyPadActionTrigger trg - the trigger action
271 
272  Remarks:
273  Usage - _this->fn->setKeyPadActionTrigger(_this, trg);
274 
275  Returns:
276  leResult - the result of the operation
277 */
278 
289 virtual leKeyPadWidget_KeyClickEvent getKeyClickEventCallback(const leKeyPadWidget* _this);
290 
304 virtual leResult setKeyClickEventCallback(leKeyPadWidget* _this,
305  leKeyPadWidget_KeyClickEvent cb);
306 
307 // *****************************************************************************
308 /* Virtual Member Function:
309  leResult setKeyClickEventCallback(leKeyPadWidget* _this,
310  leKeyPadWidget_KeyClickEvent cb)
311 
312  Summary:
313  Sets the key click event callback
314 
315  Description:
316  Sets the key click event callback
317 
318  Parameters:
319  leKeyPadWidget* _this - The keypad widget to operate on
320  leKeyPadWidget_KeyClickEvent cb - the callback pointer
321 
322  Remarks:
323  Usage - _this->fn->setKeyClickEventCallback(_this, cb);
324 
325  Returns:
326  leResult - the result of the operation
327 */
328 
329 // *****************************************************************************
330 /* Virtual Member Function:
331  leResult setKeyVisible(leKeyPadWidget* _this,
332  uint32_t row,
333  uint32_t col,
334  leBool b)
335 
336  Summary:
337  Sets the enabled state of a key
338 
339  Description:
340  Sets the enabled state of a key
341 
342  Parameters:
343  leKeyPadWidget* _this - The keypad widget to operate on
344  uint32_t row - the row index
345  uint32_t col - the column index
346  leBool b -
347 
348  Remarks:
349  Usage - _this->fn->setKeyVisible(_this, row, col, b);
350 
351  Returns:
352  leResult - the result of the operation
353 */
354 
355 // *****************************************************************************
356 /* Virtual Member Function:
357  leKeyPadCellAction getKeyAction(const leKeyPadWidget* _this,
358  uint32_t row,
359  uint32_t col)
360 
361  Summary:
362  Gets the key action setting
363 
364  Description:
365  Gets the key action setting
366 
367  Parameters:
368  const leKeyPadWidget* _this - The keypad widget to operate on
369  uint32_t row - the row index
370  uint32_t col - the column index
371 
372  Remarks:
373  Usage - _this->fn->getKeyAction(_this, row, col);
374 
375  Returns:
376  leKeyPadCellAction - the cell action value
377 */
378 
379 // *****************************************************************************
380 /* Virtual Member Function:
381  leResult setKeyAction(leKeyPadWidget* _this,
382  uint32_t row,
383  uint32_t col,
384  leKeyPadCellAction action)
385 
386  Summary:
387  Sets the key action setting
388 
389  Description:
390  Sets the key action setting
391 
392  Parameters:
393  leKeyPadWidget* _this - The keypad widget to operate on
394  uint32_t row - the row index
395  uint32_t col - the column index
396  leKeyPadCellAction action - the cell action value
397 
398  Remarks:
399  Usage - _this->fn->setKeyAction(_this, row, col, action);
400 
401  Returns:
402  leResult - the result of the operation
403 */
404 
405 // *****************************************************************************
406 /* Virtual Member Function:
407  leString* getKeyValue(const leKeyPadWidget* _this,
408  uint32_t row,
409  uint32_t col)
410 
411  Summary:
412  Gets the key value
413 
414  Description:
415  Gets the key value
416 
417  Parameters:
418  const leKeyPadWidget* _this - The keypad widget to operate on
419  uint32_t row - the row index
420  uint32_t col - the column index
421 
422  Remarks:
423  Usage - _this->fn->getKeyValue(_this, row, col);
424 
425  Returns:
426  leString* - the string pointer
427 */
428 
429 // *****************************************************************************
430 /* Virtual Member Function:
431  leResult setKeyValue(leKeyPadWidget* _this,
432  uint32_t row,
433  uint32_t col,
434  const leString* val)
435 
436  Summary:
437  Sets the key value
438 
439  Description:
440  Sets the key value
441 
442  Parameters:
443  leKeyPadWidget* _this - The keypad widget to operate on
444  uint32_t row - the row index
445  uint32_t col - the column index
446  const leString* val - the string pointer
447 
448  Remarks:
449  Usage - _this->fn->setKeyValue(_this, row, col, val);
450 
451  Returns:
452  leResult - the result of the operation
453 */
454 
455 // *****************************************************************************
456 /* Virtual Member Function:
457  leButtonWidget* getCellButton(const leKeyPadWidget* _this,
458  uint32_t row,
459  uint32_t col)
460 
461  Summary:
462  Get a button widget pointer from the keypad
463 
464  Description:
465  Get a button widget pointer from the keypad
466 
467  Parameters:
468  const leKeyPadWidget* _this - The keypad widget to operate on
469  uint32_t row - the row index
470  uint32_t col - the column index
471 
472  Remarks:
473  Usage - _this->fn->getCellButton(_this, row, col);
474 
475  Returns:
476  leButtonWidget* - pointer to the button widget
477 */
478 
479 #undef THIS_TYPE
480 #endif
481 
482 
483 #endif // LE_WIDGET_KEYPAD_ENABLED && LE_WIDGET_BUTTON_ENABLED
484 #endif /* LEGATO_KEYPAD_H */
_leWidget_SetAlphaAmount
leResult _leWidget_SetAlphaAmount(leWidget *_this, uint32_t alpha)
Set alpha amount.
Definition: legato_widget.c:570
legato_widget_button.h
Button widget functions and definitions.
legato_error.h
Error functions, macros and definitions.
_leWidget_GetType
leWidgetType _leWidget_GetType(const leWidget *_this)
Get widget type.
Definition: legato_widget.c:176
_leWidget_GetScheme
leScheme * _leWidget_GetScheme(const leWidget *_this)
Get widget scheme.
Definition: legato_widget.c:938
leResult
leResult
This enum represents function call results.
Definition: legato_common.h:134
_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
_leWidget_InvalidateContents
void _leWidget_InvalidateContents(const leWidget *_this)
Invalidate widget contents.
Definition: legato_widget.c:1210
_leWidget_SetCornerRadius
leResult _leWidget_SetCornerRadius(leWidget *_this, uint32_t radius)
Set widget scheme.
Definition: legato_widget.c:1091
_leWidget_InstallEventFilter
leResult _leWidget_InstallEventFilter(leWidget *_this, leWidgetEventFilter fltr)
Install event filter.
Definition: legato_widget.c:1215
_leWidget_SetX
leResult _leWidget_SetX(leWidget *_this, int32_t x)
Set widget x position.
Definition: legato_widget.c:190
_leWidget_SetSize
leResult _leWidget_SetSize(leWidget *_this, uint32_t width, uint32_t height)
Set widget height.
Definition: legato_widget.c:381
_leWidget_HasFocus
leBool _leWidget_HasFocus(const leWidget *_this)
Determines the focus status.
Definition: legato_widget.c:1110
legato_memory.h
Memory functions and definitions.
_leWidget_Resize
leResult _leWidget_Resize(leWidget *_this, int32_t width, int32_t height)
Resize widget.
Definition: legato_widget.c:426
_leWidget_SetAlphaEnabled
leResult _leWidget_SetAlphaEnabled(leWidget *_this, leBool enable)
Set cumulative alpha enable status.
Definition: legato_widget.c:501
_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
_leWidget_GetCumulativeAlphaEnabled
leBool _leWidget_GetCumulativeAlphaEnabled(const leWidget *_this)
Get cumulative alpha enable status.
Definition: legato_widget.c:484
_leWidget_RectToParentSpace
leRect _leWidget_RectToParentSpace(const leWidget *_this)
Get widget rectangle.
Definition: legato_widget.c:684
_leWidget_Translate
leResult _leWidget_Translate(leWidget *_this, int32_t x, int32_t y)
Translate widget x and y position.
Definition: legato_widget.c:282
legato_renderer.h
_leWidget_SetHeight
leResult _leWidget_SetHeight(leWidget *_this, uint32_t height)
Set widget height.
Definition: legato_widget.c:356
_leWidget_SetWidth
leResult _leWidget_SetWidth(leWidget *_this, uint32_t width)
Set the widget width.
Definition: legato_widget.c:324
leWidget_ResizeEvent
Used to define widget resize event.
Definition: legato_widget.h:329
_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
legato_widget_imagesequence.h
Imagesequence widget functions and definitions.
_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
legato_editwidget.h
Edit widget functions and definitions.
_leWidget_SetScheme
leResult _leWidget_SetScheme(leWidget *_this, const leScheme *scheme)
Set widget scheme.
Definition: legato_widget.c:945
_leWidget_SetHAlignment
leResult _leWidget_SetHAlignment(leWidget *_this, leHAlignment align)
Set widget scheme.
Definition: legato_widget.c:1010
_leWidget_GetEnabled
leBool _leWidget_GetEnabled(const leWidget *_this)
Get widget enabled flag.
Definition: legato_widget.c:615
leRectClipAdj
LIB_EXPORT leRect leRectClipAdj(const leRect *l_rect, const leRect *r_rect, leRect *adj)
Clips a rectangle to the space of another rectangle.
Definition: legato_rect.c:75
_leWidget_SetFocus
leResult _leWidget_SetFocus(leWidget *_this)
Set widget scheme.
Definition: legato_widget.c:1117
LE_FALSE
@ LE_FALSE
Definition: legato_common.h:158
_leWidget_GetAlphaEnabled
leBool _leWidget_GetAlphaEnabled(const leWidget *_this)
Get alpha enable status.
Definition: legato_widget.c:473
_leWidget_GetChildAtIndex
leWidget * _leWidget_GetChildAtIndex(const leWidget *_this, uint32_t idx)
Get child at index.
Definition: legato_widget.c:888
_leWidget_GetCumulativeAlphaAmount
uint32_t _leWidget_GetCumulativeAlphaAmount(const leWidget *_this)
Get cumulative alpha amount.
Definition: legato_widget.c:538
_leWidget_SetY
leResult _leWidget_SetY(leWidget *_this, int32_t y)
Set widget y position.
Definition: legato_widget.c:222
_leWidget_GetBorderType
leBorderType _leWidget_GetBorderType(const leWidget *_this)
Get widget bordertype.
Definition: legato_widget.c:960
_leWidget_SetMargins
leResult _leWidget_SetMargins(leWidget *_this, uint32_t l, uint32_t t, uint32_t r, uint32_t b)
Set widget margins.
Definition: legato_widget.c:1058
legato_utils.h
General internal utilities for the library.
_leWidget_GetVAlignment
leVAlignment _leWidget_GetVAlignment(const leWidget *_this)
Get widget vertical alignment.
Definition: legato_widget.c:1027
leImage_Draw
LIB_EXPORT leResult leImage_Draw(const leImage *img, const leRect *sourceRect, int32_t x, int32_t y, uint32_t a)
Draw an Image.
Definition: legato_image.c:131
legato_string.h
Fixed string functions and definitions.
LE_WIDGET_BACKGROUND_NONE
@ LE_WIDGET_BACKGROUND_NONE
Definition: legato_widget.h:225
leWidget
Used to define a widget.
Definition: legato_widget.h:623
leUtils_RectToScreenSpace
void leUtils_RectToScreenSpace(const leWidget *widget, leRect *rect)
Convert rectangle from widget local space to screen space.
Definition: legato_utils.c:151
legato.h
The header file joins all header files used in the graphics object library.
_leWidget_GetX
int32_t _leWidget_GetX(const leWidget *_this)
Get widget x position.
Definition: legato_widget.c:183
_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
_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
legato_widget_keypad.h
Keypad widget functions and definitions.
_leWidget_GetChildCount
uint32_t _leWidget_GetChildCount(const leWidget *_this)
Get child count.
Definition: legato_widget.c:881
_leWidget_GetMargins
leMargin _leWidget_GetMargins(const leWidget *_this)
Get widget margins.
Definition: legato_widget.c:1051
leWidget_Constructor
LIB_EXPORT void leWidget_Constructor(leWidget *wgt)
Initialize widget.
Definition: legato_widget.c:67
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
legato_state.h
leUtils_ArrangeRectangle
void leUtils_ArrangeRectangle(leRect *sub, leRect obj, leRect bounds, leHAlignment hAlignment, leVAlignment vAlignment, leRelativePosition position, uint8_t leftMargin, uint8_t topMargin, uint8_t rightMargin, uint8_t bottomMargin, uint16_t rectMargin)
Calculates the position of a rectangle within the given bound.
Definition: legato_utils.c:213
_leWidget_RemoveChild
leResult _leWidget_RemoveChild(leWidget *_this, leWidget *child)
Remove child from widget.
Definition: legato_widget.c:785
destructor
virtual void destructor(leString *_this)
Destruct string.
_leWidget_SetEnabled
leResult _leWidget_SetEnabled(leWidget *_this, leBool enable)
Set widget enabled flag.
Definition: legato_widget.c:620
_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
_leWidget_GetY
int32_t _leWidget_GetY(const leWidget *_this)
Get widget y position.
Definition: legato_widget.c:215