MPLABĀ® Harmony Graphics Suite
legato_widget_scrollbar.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_scrollbar.h
32 
33  Summary:
34 
35 
36  Description:
37  This module implements scroll bar widget functions.
38 *******************************************************************************/
39 
46 #ifndef LEGATO_SCROLLBAR_H
47 #define LEGATO_SCROLLBAR_H
48 
50 
51 #if LE_SCROLLBAR_WIDGET_ENABLED == 1
52 
55 
56 // *****************************************************************************
57 // *****************************************************************************
58 // Section: Data Types and Constants
59 // *****************************************************************************
60 // *****************************************************************************
61 
62 // *****************************************************************************
63 /* Enumeration:
64  leScrollBarState
65 
66  Summary:
67  Defines the various scroll bar state values
68 
69  Description:
70 
71 
72  Remarks:
73  None.
74 */
79 typedef enum leScrollBarState
80 {
81  LE_SCROLLBAR_STATE_NONE,
82  LE_SCROLLBAR_STATE_TOP_PRESSED,
83  LE_SCROLLBAR_STATE_TOP_INSIDE,
84  LE_SCROLLBAR_STATE_BOTTOM_PRESSED,
85  LE_SCROLLBAR_STATE_BOTTOM_INSIDE,
86  LE_SCROLLBAR_STATE_HANDLE_DOWN
87 } leScrollBarState;
88 
89 typedef struct leScrollBarWidget leScrollBarWidget;
90 
91 // *****************************************************************************
92 /* Function Pointer:
93  leScrollBarWidget_ValueChangedEvent
94 
95  Summary:
96  Value changed event function callback type
97 */
98 typedef void (*leScrollBarWidget_ValueChangedEvent)(leScrollBarWidget*);
99 
100 /* internal use only */typedef struct leScrollBarWidget leScrollBarWidget;
105 
106 #define LE_SCROLLBARWIDGET_VTABLE(THIS_TYPE) \
107  LE_WIDGET_VTABLE(THIS_TYPE) \
108  \
109  leOrientation (*getOrientation)(const THIS_TYPE* _this); \
110  leResult (*setOrientation)(THIS_TYPE* _this, leOrientation align, leBool swapDimensions); \
111  uint32_t (*getMaximumValue)(const THIS_TYPE* _this); \
112  leResult (*setMaximumValue)(THIS_TYPE* _this, uint32_t val); \
113  uint32_t (*getExtentValue)(const THIS_TYPE* _this); \
114  leResult (*setExtentValue)(THIS_TYPE* _this, uint32_t val); \
115  uint32_t (*getScrollPercentage)(const THIS_TYPE* _this); \
116  leResult (*setScrollPercentage)(THIS_TYPE* _this, uint32_t val); \
117  uint32_t (*getScrollValue)(const THIS_TYPE* _this); \
118  leResult (*setScrollValue)(THIS_TYPE* _this, uint32_t val); \
119  uint32_t (*getStepSize)(const THIS_TYPE* _this); \
120  leResult (*setStepSize)(THIS_TYPE* _this, uint32_t val); \
121  leResult (*stepBackward)(THIS_TYPE* _this); \
122  leResult (*stepForward)(THIS_TYPE* _this); \
123  leScrollBarWidget_ValueChangedEvent (*getValueChangedEventCallback)(const THIS_TYPE* _this); \
124  leResult (*setValueChangedEventCallback)(THIS_TYPE* _this, leScrollBarWidget_ValueChangedEvent cb); \
125 
126 typedef struct leScrollBarWidgetVTable
127 {
128  LE_SCROLLBARWIDGET_VTABLE(leScrollBarWidget)
129 } leScrollBarWidgetVTable;
130 
136 // *****************************************************************************
144 typedef struct leScrollBarWidget
145 {
146  leWidget widget; // widget base class
147 
148  const leScrollBarWidgetVTable* fn;
149 
150  leScrollBarState state; // scrollbar input state
151  leOrientation alignment; // scroll bar direction
152 
153  uint32_t max; // maximum scroll value
154  uint32_t extent; // visible space/handle size
155  uint32_t value; // current scroll value
156  uint32_t step; // discreet scroll stepping value
157 
158  leScrollBarWidget_ValueChangedEvent valueChangedEvent; // value changed callback
159 
160  lePoint handleDownOffset;
161 } leScrollBarWidget;
162 
163 // *****************************************************************************
164 // *****************************************************************************
165 // Section: Routines
166 // *****************************************************************************
167 // *****************************************************************************
168 
169 // *****************************************************************************
170 /* Function:
171  leScrollBarWidget* leScrollBarWidget_New()
172 
173  Summary:
174  Allocates memory for a new widget of this type. The application is
175  responsible for the managment of this memory until the widget is added to
176  a widget tree.
177 
178  Description:
179 
180 
181  Parameters:
182 
183  Returns:
184  leScrollBarWidget*
185 
186  Remarks:
187  Use leWidget_Delete() to free this pointer.
188 */
200 LIB_EXPORT leScrollBarWidget* leScrollBarWidget_New();
201 
212 LIB_EXPORT void leScrollBarWidget_Constructor(leScrollBarWidget* wgt);
213 
214 #ifdef _DOXYGEN_
215 #define THIS_TYPE struct leWidget
216 
217 // *****************************************************************************
218 /* Virtual Member Function:
219  leOrientation getOrientation(const leScrollBarWidget* _this)
220 
221  Summary:
222  Gets the scroll bar orientation
223 
224  Description:
225  Gets the scroll bar orientation
226 
227  Parameters:
228  const leScrollBarWidget* _this - The scroll bar widget to operate on
229 
230  Remarks:
231  Usage - _this->fn->getOrientation(_this);
232 
233  Returns:
234  leOrientation - the orientation value
235 */
247 leOrientation getOrientation(const leScrollBarWidget* _this);
248 
249 // *****************************************************************************
250 /* Virtual Member Function:
251  leResult setOrientation(leScrollBarWidget* _this,
252  leOrientation align,
253  leBool swapDimensions)
254 
255  Summary:
256  Sets the scroll bar orientation
257 
258  Description:
259  Sets the scroll bar orientation
260 
261  Parameters:
262  leScrollBarWidget* _this - The scroll bar widget to operate on
263  leOrientation align - the orientation value
264  leBool swapDimensions - swap the width and height values when changing this
265 
266  Remarks:
267  Usage - _this->fn->setOrientation(_this, align, swapDimensions);
268 
269  Returns:
270  leResult - the result of the operation
271 */
288 virtual leResult setOrientation(leScrollBarWidget* _this,
289  leOrientation align,
290  leBool swapDimensions);
291 
292 // *****************************************************************************
293 /* Virtual Member Function:
294  uint32_t getMaximumValue(const leScrollBarWidget* _this)
295 
296  Summary:
297  Gets the maximum scroll value
298 
299  Description:
300  Gets the maximum scroll value
301 
302  Parameters:
303  const leScrollBarWidget* _this - The scroll bar widget to operate on
304 
305  Remarks:
306  Usage - _this->fn->getMaximumValue(_this);
307 
308  Returns:
309  uint32_t - the value
310 */
321 virtual uint32_t getMaximumValue(const leScrollBarWidget* _this);
322 
323 // *****************************************************************************
324 /* Virtual Member Function:
325  leResult setMaximumValue(leScrollBarWidget* _this,
326  uint32_t val)
327 
328  Summary:
329  Sets the maximum scroll value
330 
331  Description:
332  Sets the maximum scroll value
333 
334  Parameters:
335  leScrollBarWidget* _this - The scroll bar widget to operate on
336  uint32_t val - the value
337 
338  Remarks:
339  Usage - _this->fn->setMaximumValue(_this, val);
340 
341  Returns:
342  leResult - the result of the operation
343 */
357 virtual leResult setMaximumValue(leScrollBarWidget* _this,
358  uint32_t val);
359 
360 // *****************************************************************************
361 /* Virtual Member Function:
362  uint32_t getExtentValue(const leScrollBarWidget* _this)
363 
364  Summary:
365  Gets the extent value
366 
367  Description:
368  Gets the extent value
369 
370  Parameters:
371  const leScrollBarWidget* _this - The scroll bar widget to operate on
372 
373  Remarks:
374  Usage - _this->fn->getExtentValue(_this);
375 
376  Returns:
377  uint32_t - the value
378 */
389 virtual uint32_t getExtentValue(const leScrollBarWidget* _this);
390 
391 // *****************************************************************************
392 /* Virtual Member Function:
393  leResult setExtentValue(leScrollBarWidget* _this,
394  uint32_t val)
395 
396  Summary:
397  Sets the extent value
398 
399  Description:
400  Sets the extent value
401 
402  Parameters:
403  leScrollBarWidget* _this - The scroll bar widget to operate on
404  uint32_t val - the value
405 
406  Remarks:
407  Usage - _this->fn->setExtentValue(_this, val);
408 
409  Returns:
410  leResult - the result of the operation
411 */
425 virtual leResult setExtentValue(leScrollBarWidget* _this,
426  uint32_t val);
427 
428 
429 // *****************************************************************************
430 /* Virtual Member Function:
431  uint32_t getScrollPercentage(const leScrollBarWidget* _this)
432 
433  Summary:
434  Gets the scroll value as a percentage
435 
436  Description:
437  Gets the scroll value as a percentage
438 
439  Parameters:
440  const leScrollBarWidget* _this - The scroll bar widget to operate on
441 
442  Remarks:
443  Usage - _this->fn->getScrollPercentage(_this);
444 
445  Returns:
446  uint32_t - the scroll value percentage
447 */
458 virtual uint32_t getScrollPercentage(const leScrollBarWidget* _this);
459 
460 
461 // *****************************************************************************
462 /* Virtual Member Function:
463  leResult setScrollPercentage(leScrollBarWidget* _this,
464  uint32_t val)
465 
466  Summary:
467  Sets the scroll value using a percentage
468 
469  Description:
470  Sets the scroll value using a percentage
471 
472  Parameters:
473  leScrollBarWidget* _this - The scroll bar widget to operate on
474  uint32_t val - the percentage value
475 
476  Remarks:
477  Usage - _this->fn->setScrollPercentage(_this, val);
478 
479  Returns:
480  leResult - the result of the operation
481 */
495 virtual leResult setScrollPercentage(leScrollBarWidget* _this,
496  uint32_t val);
497 
498 // *****************************************************************************
499 /* Virtual Member Function:
500  uint32_t getScrollValue(const leScrollBarWidget* _this)
501 
502  Summary:
503  Gets the scroll value
504 
505  Description:
506  Gets the scroll value
507 
508  Parameters:
509  const leScrollBarWidget* _this - The scroll bar widget to operate on
510 
511  Remarks:
512  Usage - _this->fn->getScrollValue(_this);
513 
514  Returns:
515  uint32_t - the value
516 */
527 virtual uint32_t getScrollValue(const leScrollBarWidget* _this);
528 
529 // *****************************************************************************
530 /* Virtual Member Function:
531  leResult setScrollValue(leScrollBarWidget* _this,
532  uint32_t val)
533 
534  Summary:
535  Sets the scroll value
536 
537  Description:
538  Sets the scroll value
539 
540  Parameters:
541  leScrollBarWidget* _this - The scroll bar widget to operate on
542  uint32_t val - the value
543 
544  Remarks:
545  Usage - _this->fn->setScrollValue(_this, val);
546 
547  Returns:
548  leResult - the result of the operation
549 */
563 virtual leResult setScrollValue(leScrollBarWidget* _this,
564  uint32_t val);
565 
566 // *****************************************************************************
567 /* Virtual Member Function:
568  uint32_t getStepSize(const leScrollBarWidget* _this)
569 
570  Summary:
571  Gets the step size
572 
573  Description:
574  Gets the step size
575 
576  Parameters:
577  const leScrollBarWidget* _this - The scroll bar widget to operate on
578 
579  Remarks:
580  Usage - _this->fn->getStepSize(_this);
581 
582  Returns:
583  uint32_t - the step size
584 */
595 virtual uint32_t getStepSize(const leScrollBarWidget* _this);
596 
597 
598 // *****************************************************************************
599 /* Virtual Member Function:
600  leResult setStepSize(leScrollBarWidget* _this,
601  uint32_t val)
602 
603  Summary:
604  Sets the step size
605 
606  Description:
607  Sets the step size
608 
609  Parameters:
610  leScrollBarWidget* _this - The scroll bar widget to operate on
611  uint32_t val - the step size
612 
613  Remarks:
614  Usage - _this->fn->setStepSize(_this, val);
615 
616  Returns:
617  leResult - the result of the operation
618 */
632 virtual leResult setStepSize(leScrollBarWidget* _this,
633  uint32_t val);
634 
635 // *****************************************************************************
636 /* Virtual Member Function:
637  leResult stepBackward(leScrollBarWidget* _this)
638 
639  Summary:
640  Steps the value backwards
641 
642  Description:
643  Steps the value backwards
644 
645  Parameters:
646  leScrollBarWidget* _this - The scroll bar widget to operate on
647 
648  Remarks:
649  Usage - _this->fn->stepBackward(_this);
650 
651  Returns:
652  leResult - the result of the operation
653 */
664 virtual leResult stepBackward(leScrollBarWidget* _this);
665 
666 // *****************************************************************************
667 /* Virtual Member Function:
668  leResult stepForward(leScrollBarWidget* _this)
669 
670  Summary:
671  Steps the value forwards
672 
673  Description:
674  Steps the value forwards
675 
676  Parameters:
677  leScrollBarWidget* _this - The scroll bar widget to operate on
678 
679  Remarks:
680  Usage - _this->fn->stepForward(_this);
681 
682  Returns:
683  leResult - the result of the operation
684 */
695 virtual leResult stepForward(leScrollBarWidget* _this);
696 
707 virtual leScrollBarWidget_ValueChangedEvent getValueChangedEventCallback
708  (const leScrollBarWidget* _this);
709 
723 virtual leResult setValueChangedEventCallback(leScrollBarWidget* _this,
724  leScrollBarWidget_ValueChangedEvent cb);
725 
726 #undef THIS_TYPE
727 #endif
728 
729 
730 #endif // LE_SCROLLBAR_WIDGET_ENABLED
731 #endif /* LEGATO_SCROLLBAR_H */
_leWidget_SetAlphaAmount
leResult _leWidget_SetAlphaAmount(leWidget *_this, uint32_t alpha)
Set alpha amount.
Definition: legato_widget.c:570
legato_math.h
Defines common math functions for general use.
legato_error.h
Error functions, macros and definitions.
_leWidget_GetType
leWidgetType _leWidget_GetType(const leWidget *_this)
Get widget type.
Definition: legato_widget.c:176
_leWidget_GetScheme
leScheme * _leWidget_GetScheme(const leWidget *_this)
Get widget scheme.
Definition: legato_widget.c:938
leResult
leResult
This enum represents function call results.
Definition: legato_common.h:134
lePercentWholeRounded
LIB_EXPORT uint32_t lePercentWholeRounded(uint32_t l, uint32_t r)
Calculate percent whole rounded.
Definition: legato_math.c:204
_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_widget_rectangle.h
Rectangle widget functions and definitions.
_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
lePercentOf
LIB_EXPORT uint32_t lePercentOf(uint32_t num, uint32_t percent)
Calculate percent of a number.
Definition: legato_math.c:218
leWidgetEvent_TouchDown
Used to define widget touch down event.
Definition: legato_widget.h:377
_leWidget_ContainsDescendant
leBool _leWidget_ContainsDescendant(const leWidget *_this, const leWidget *wgt)
Determine widget exists.
Definition: legato_widget.c:910
_leWidget_SetBackgroundType
leResult _leWidget_SetBackgroundType(leWidget *_this, leBackgroundType type)
Set widget scheme.
Definition: legato_widget.c:989
_leWidget_GetWidth
uint32_t _leWidget_GetWidth(const leWidget *_this)
Get widget width.
Definition: legato_widget.c:317
_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_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.
leOrientation
leOrientation
This enum represents the orientation modes for objects.
Definition: legato_common.h:340
_leWidget_GetHAlignment
leHAlignment _leWidget_GetHAlignment(const leWidget *_this)
Get widget horizontal alignment.
Definition: legato_widget.c:1003
_leWidget_GetHeight
uint32_t _leWidget_GetHeight(const leWidget *_this)
Get widget height.
Definition: legato_widget.c:349
_leWidget_LocalRect
leRect _leWidget_LocalRect(const leWidget *_this)
Get widget rectangle.
Definition: legato_widget.c:670
legato_widget_scrollbar.h
Scrollbar functions and definitions.
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_WIDGET_BACKGROUND_NONE
@ LE_WIDGET_BACKGROUND_NONE
Definition: legato_widget.h:225
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
_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
_leWidget_GetMargins
leMargin _leWidget_GetMargins(const leWidget *_this)
Get widget margins.
Definition: legato_widget.c:1051
leWidget_Constructor
LIB_EXPORT void leWidget_Constructor(leWidget *wgt)
Initialize widget.
Definition: legato_widget.c:67
leScheme_GetRenderColor
leColor leScheme_GetRenderColor(const leScheme *schm, leSchemeColor clr)
Gets a scheme render color for the current layer color mode.
Definition: legato_scheme.c:68
LE_TRUE
@ LE_TRUE
Definition: legato_common.h:159
_leWidget_GetAlphaAmount
uint32_t _leWidget_GetAlphaAmount(const leWidget *_this)
Get alpha amount.
Definition: legato_widget.c:527
_leWidget_GetCornerRadius
uint32_t _leWidget_GetCornerRadius(const leWidget *_this)
Get widget corner radius.
Definition: legato_widget.c:1084
legato_common.h
Common macros and definitions used by Legato.
_leWidget_RemoveEventFilter
leResult _leWidget_RemoveEventFilter(leWidget *_this, leWidgetEventFilter fltr)
Remove event filter.
Definition: legato_widget.c:1238
_leWidget_RemoveChild
leResult _leWidget_RemoveChild(leWidget *_this, leWidget *child)
Remove child from widget.
Definition: legato_widget.c:785
destructor
virtual void destructor(leString *_this)
Destruct string.
_leWidget_SetEnabled
leResult _leWidget_SetEnabled(leWidget *_this, leBool enable)
Set widget enabled flag.
Definition: legato_widget.c:620
_leWidget_SetPosition
leResult _leWidget_SetPosition(leWidget *_this, int32_t x, int32_t y)
Set widget x and y position.
Definition: legato_widget.c:247
_leWidget_Invalidate
void _leWidget_Invalidate(const leWidget *_this)
Invalidate widget.
Definition: legato_widget.c:1142
lePoint
This structure represents a integer Cartesian point.
Definition: legato_common.h:357
_leWidget_GetY
int32_t _leWidget_GetY(const leWidget *_this)
Get widget y position.
Definition: legato_widget.c:215