MPLABĀ® Harmony Graphics Suite
legato_widget_circular_slider.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_circular_slider.h
32 
33  Summary:
34 
35 
36  Description:
37  This module implements slider drawing widget functions.
38 *******************************************************************************/
39 
46 #ifndef LEGATO_WIDGET_CIRCULAR_SLIDER_H
47 #define LEGATO_WIDGET_CIRCULAR_SLIDER_H
48 
50 
51 #if LE_CIRCULARSLIDER_WIDGET_ENABLED == 1
52 
54 
55 // *****************************************************************************
56 // *****************************************************************************
57 // Section: Data Types and Constants
58 // *****************************************************************************
59 // *****************************************************************************
60 
61 // *****************************************************************************
62 /* Structure:
63  leCircularSliderButtonState
64 
65  Summary:
66  State of the slider button
67 
68  Description:
69  State of the slider button
70 
71  Remarks:
72  None.
73 */
79 typedef enum leCircularSliderButtonState
80 {
81  LE_CIRCULAR_SLIDER_STATE_UP,
82  LE_CIRCULAR_SLIDER_STATE_DOWN,
83 } leCircularSliderButtonState;
84 
85 // *****************************************************************************
86 /* Enumeration:
87  leCircularSliderWidgetArcType
88 
89  Summary:
90  The arcs that compose the circular slider
91 
92  Description:
93  The arcs that compose the circular slider
94 
95  Remarks:
96  None.
97 */
103 typedef enum leCircularSliderWidgetArcType
104 {
105  OUTSIDE_CIRCLE_BORDER,
106  INSIDE_CIRCLE_BORDER,
107  ACTIVE_AREA,
108  INACTIVE_AREA,
109  CIRCLE_BUTTON,
110 } leCircularSliderWidgetArcType;
111 
112 // *****************************************************************************
113 /* Structure:
114  leCircularSliderArc
115 
116  Summary:
117  Internal structure for the arcs in the circular slider widget
118 
119  Description:
120  Describs the arc instances in the circular gauge widget
121 
122  Remarks:
123  None.
124 */
130 typedef struct leCircularSliderArc
131 {
132  leBool visible;
133  uint32_t radius;
134  uint32_t thickness;
135  const leScheme* scheme;
136 } leCircularSliderArc;
137 
138 typedef struct leCircularSliderWidget leCircularSliderWidget;
139 
140 // *****************************************************************************
141 /* Function Pointer:
142  leCircularSliderWidget_PressedEvent
143 
144  Summary:
145  Button pressed event function callback type
146 */
152 typedef void (*leCircularSliderWidget_PressedEvent)(leCircularSliderWidget *, int32_t);
153 
154 // *****************************************************************************
155 /* Function Pointer:
156  leCircularSliderWidget_ValueChangedEvent
157 
158  Summary:
159  Value changed event function callback type
160 */
166 typedef void (*leCircularSliderWidget_ValueChangedEvent)(leCircularSliderWidget *, int32_t);
167 
168 // *****************************************************************************
169 /* Function Pointer:
170  leCircularSliderWidget_ReleasedEvent
171 
172  Summary:
173  Button released event function callback type
174 */
180 typedef void (*leCircularSliderWidget_ReleasedEvent)(leCircularSliderWidget *, int32_t);
181 
182 /* internal use only */
187 #define LE_CIRCULARSLIDERWIDGET_VTABLE(THIS_TYPE) \
188  LE_WIDGET_VTABLE(THIS_TYPE) \
189  \
190  uint32_t (*getRadius)(const THIS_TYPE* _this); \
191  leResult (*setRadius)(THIS_TYPE* _this, uint32_t rad); \
192  int32_t (*getStartAngle)(const THIS_TYPE* _this); \
193  leResult (*setStartAngle)(THIS_TYPE* _this, int32_t ang); \
194  int32_t (*getSpanAngle)(const THIS_TYPE* _this); \
195  leResult (*setSpanAngle)(THIS_TYPE* _this, int32_t ang); \
196  uint32_t (*getArcThickness)(const THIS_TYPE* _this, leCircularSliderWidgetArcType type); \
197  leResult (*setArcThickness)(THIS_TYPE* _this, leCircularSliderWidgetArcType type, uint32_t thck); \
198  uint32_t (*getArcRadius)(const THIS_TYPE* _this, leCircularSliderWidgetArcType type); \
199  leResult (*setArcRadius)(THIS_TYPE* _this, leCircularSliderWidgetArcType type, uint32_t rad); \
200  leScheme* (*getArcScheme)(const THIS_TYPE* _this, leCircularSliderWidgetArcType type); \
201  leResult (*setArcScheme)(THIS_TYPE* _this, leCircularSliderWidgetArcType type, const leScheme* schm); \
202  leBool (*getArcVisible)(const THIS_TYPE* _this, leCircularSliderWidgetArcType type); \
203  leResult (*setArcVisible)(THIS_TYPE* _this, leCircularSliderWidgetArcType type, leBool vis); \
204  uint32_t (*getValue)(const THIS_TYPE* _this); \
205  leResult (*setValue)(THIS_TYPE* _this, uint32_t val); \
206  leBool (*getRoundEdges)(const THIS_TYPE* _this); \
207  leResult (*setRoundEdges)(THIS_TYPE* _this, leBool rnd); \
208  leBool (*getStickyButton)(const THIS_TYPE* _this); \
209  leResult (*setStickyButton)(THIS_TYPE* _this, leBool stk); \
210  uint32_t (*getSnapDivisions)(const THIS_TYPE* _this); \
211  leResult (*setSnapDivisions)(THIS_TYPE* _this, uint32_t div); \
212  leBool (*getTouchOnButtonOnly)(const THIS_TYPE* _this); \
213  leResult (*setTouchOnButtonOnly)(THIS_TYPE* _this, leBool tch); \
214  leRotationDirection (*getDirection)(const THIS_TYPE* _this); \
215  leResult (*setDirection)(THIS_TYPE* _this, leRotationDirection dir); \
216  leResult (*setPressedEventCallback)(THIS_TYPE* _this, leCircularSliderWidget_PressedEvent cb); \
217  leResult (*setValueChangedEventCallback)(THIS_TYPE* _this, leCircularSliderWidget_ValueChangedEvent cb); \
218  leResult (*setReleasedEventCallback)(THIS_TYPE* _this, leCircularSliderWidget_ReleasedEvent cb); \
219 
220 typedef struct leCircularSliderWidgetVTable
221 {
222  LE_CIRCULARSLIDERWIDGET_VTABLE(leCircularSliderWidget)
223 } leCircularSliderWidgetVTable;
224 
230 // *****************************************************************************
231 /* Structure:
232  leCircularSliderWidget
233 
234  Summary:
235  Implementation of a slider widget.
236 
237  Description:
238  A slider widget draws a slider of the specified origin and radius inside
239  the widget bounds. All coordinates are expressed in local widget space.
240 
241  The color of the slider is determined by the widget scheme's 'foreground'
242  color.
243 
244  Remarks:
245  None.
246 */
247 typedef struct leCircularSliderWidget
248 {
249  leWidget widget; // base widget header
250 
251  const leCircularSliderWidgetVTable* fn;
252 
253  uint32_t radius; // the radius of the slider
254 
255  int32_t startAngle; //the start angle of the slider
256  int32_t spanAngle; //the span angle of the slider
257 
258  uint32_t value; //the value of the slider
259 
260  leBool roundEdges; //round edges
261  leBool sticky; //snaps to start value before wrapping around
262  uint32_t snapDivisions;
263  leBool buttonTouch; //only button is active to touch
264 
265  leRotationDirection direction; //the direction of the slider
266 
267  leCircularSliderArc activeArc; //the arc for the slider value
268  leCircularSliderArc inActiveArc; //the arc for the slider remainder
269  leCircularSliderArc outsideBorderArc; //the arc for the outside border
270  leCircularSliderArc insideBorderArc; //the arc for the inside border
271  leCircularSliderArc circleButtonArc; //the arc for the circle button
272 
273  leCircularSliderButtonState btnState; //the state of the circular slider button
274 
275  leCircularSliderWidget_PressedEvent pressedCallback;
276  leCircularSliderWidget_ValueChangedEvent valueChangedCallback;
277  leCircularSliderWidget_ReleasedEvent releasedCallback;
278 } leCircularSliderWidget;
279 
280 // *****************************************************************************
281 // *****************************************************************************
282 // Section: Routines
283 // *****************************************************************************
284 // *****************************************************************************
285 
297 LIB_EXPORT leCircularSliderWidget* leCircularSliderWidget_New();
298 
309 LIB_EXPORT void leCircularSliderWidget_Constructor(leCircularSliderWidget* wgt);
310 
311 #ifdef _DOXYGEN_
312 #define THIS_TYPE struct leWidget
313 
314 // *****************************************************************************
325 virtual uint32_t getRadius(const leCircularSliderWidget* _this);
326 
327 
328 // *****************************************************************************
342 virtual leResult setRadius(leCircularSliderWidget* _this,
343  uint32_t rad);
344 
345 
346 // *****************************************************************************
357 virtual uint32_t getStartAngle(const leCircularSliderWidget* _this);
358 
359 
360 // *****************************************************************************
374 virtual leResult setStartAngle(leCircularSliderWidget* _this,
375  int32_t ang);
376 
377 
390 virtual uint32_t getArcThickness(const leCircularSliderWidget* _this,
391  leCircularSliderWidgetArcType type);
392 
393 
394 
395 
411 virtual leResult setArcThickness(leCircularSliderWidget* _this,
412  leCircularSliderWidgetArcType type,
413  uint32_t thck);
414 
415 / *****************************************************************************
428 virtual uint32_t getArcRadius(const leCircularSliderWidget* _this,
429  leCircularSliderWidgetArcType type);
430 
431 
432 // *****************************************************************************
447 virtual leResult setArcRadius(leCircularSliderWidget* _this,
448  leCircularSliderWidgetArcType type,
449  uint32_t rad);
450 
451 
464 virtual leScheme* getArcScheme(const leCircularSliderWidget* _this,
465  leCircularSliderWidgetArcType type);
466 
483 leResult setArcScheme(leCircularSliderWidget* _this,
484  leCircularSliderWidgetArcType type,
485  const leScheme* schm;
486 
487 * @brief Get arc visibility
488 * @details Gets arc visilibilty for <span class="param">type</span> using
489 * <span class="param">_this</span>.
490 * @code
491 * leCircularSliderWidget* _this;
492 * leCircularSliderWidgetArcType type;
493 * leBool visible = _this->fn->getArcVisible(_this, axis);
494 * @endcode
495 * @param _this is the widget to query.
496 * @param type the type to query.
497 * @returns LE_TRUE if set, otherwise LE_FALSE;
498 */
499 virtual leBool getArcVisible(const leCircularSliderWidget* _this,
500  leCircularSliderWidgetArcType type);
501 
516 virtual leBool setArcVisible(const leCircularSliderWidget* _this,
517  leCircularSliderWidgetArcType type);
518 
519 // *****************************************************************************
530 virtual uint32_t getStartValue(const leCircularSliderWidget* _this);
531 
532 
533 // *****************************************************************************
547 virtual leResult setStartValue(leCircularSliderWidget* _this,
548  uint32_t val);
549 
550 / *****************************************************************************
561 virtual uint32_t getEndValue(const leCircularSliderWidget* _this);
562 
563 
564 // *****************************************************************************
578 virtual leResult setEndValue(leCircularSliderWidget* _this,
579  uint32_t val);
580 
581 // *****************************************************************************
592 virtual leBool getRoundEdges(const leCircularSliderWidget* _this);
593 
594 
595 // *****************************************************************************
609 virtual leResult setRoundEdges(leCircularSliderWidget* _this,
610  leBool rnd);
611 
612 
613 // *****************************************************************************
624 virtual leBool getStickyButton(const leCircularSliderWidget* _this);
625 
626 
627 // *****************************************************************************
641 virtual leResult setStickyButton(leCircularSliderWidget* _this,
642  leBool stk);
643 
644 // *****************************************************************************
655 virtual leBool getTouchOnButtonOnly(const leCircularSliderWidget* _this);
656 
657 
658 // *****************************************************************************
672 virtual leResult setTouchOnButtonOnly(leCircularSliderWidget* _this,
673  leBool tch);
674 
675 
676 // *****************************************************************************
687 virtual leRotationDirection getDirection(const leCircularSliderWidget* _this);
688 
689 
690 // *****************************************************************************
704 virtual leResult setDirection(leCircularSliderWidget* _this,
705  leRotationDirection dir);
706 
707 
721 virtual leResult setPressedEventCallback(leCircularSliderWidget* _this,
722  leCircularSliderWidget_PressedEvent cb);
723 
724 
738 leResult setValueChangedEventCallback(leCircularSliderWidget* _this,
739  leCircularSliderWidget_ValueChangedEvent cb)
740 
741 
742 
755 virtual leResult setReleasedEventCallback(leCircularSliderWidget* _this,
756  leCircularSliderWidget_ReleasedEvent cb);
757 
758 #undef THIS_TYPE
759 #endif
760 
761 #endif // LE_CIRCULARSLIDER_WIDGET_ENABLED
762 #endif /* LEGATO_WIDGET_CIRCULAR_SLIDER_H */
_leWidget_SetAlphaAmount
leResult _leWidget_SetAlphaAmount(leWidget *_this, uint32_t alpha)
Set alpha amount.
Definition: legato_widget.c:570
getStartAngle
virtual int32_t getStartAngle(const leArcWidget *_this)
Get start angle of the arc.
leUtils_PointScreenToLocalSpace
void leUtils_PointScreenToLocalSpace(const leWidget *widget, lePoint *pnt)
Convert point from layer space into the local space of a widget.
Definition: legato_utils.c:90
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
_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
legato_string_renderer.h
String Renderer.
_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
leFixedString_Constructor
LIB_EXPORT void leFixedString_Constructor(leFixedString *str, leChar *buf, uint32_t size)
Consructs a fixed string.
Definition: legato_fixedstring.c:42
LE_COUNTER_CLOCKWISE
@ LE_COUNTER_CLOCKWISE
Definition: legato_common.h:290
_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
LE_HALIGN_CENTER
@ LE_HALIGN_CENTER
Definition: legato_common.h:208
legato_widget.h
Legato widget definitions.
leFont
This struct represents a font object.
Definition: legato_font.h:136
_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
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
getRadius
virtual uint32_t getRadius(const leArcWidget *_this)
Get radius of an arc.
length
virtual uint32_t length(const leString *_this)
Get length of the string.
leUtils_PointToScreenSpace
void leUtils_PointToScreenSpace(const leWidget *widget, lePoint *pnt)
Converts a point from widget space into screen space.
Definition: legato_utils.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
setStartAngle
virtual leResult setStartAngle(leArcWidget *_this, int32_t angle)
Set start angle of an arc.
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
legato_widget_circular_gauge.h
Circular guage widget functions and definitions.
_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
leRotationDirection
leRotationDirection
This enum represents the two rotation direction modes for objects.
Definition: legato_common.h:289
lePolarToXY
LIB_EXPORT leResult lePolarToXY(int32_t r, int32_t a, lePoint *p)
Generate points in an arc.
Definition: legato_math.c:124
legato_stringutils.h
String utility functions and definitions.
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
leScheme
Definition: legato_scheme.h:154
_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
leFixedString
This struct represents a fixed string.
Definition: legato_fixedstring.h:57
legato_widget_circular_slider.h
Slider widget functions and definitions.
leArray_Get
void * leArray_Get(const leArray *arr, uint32_t idx)
Get entry at index.
Definition: legato_array.c:224
leChar
uint16_t leChar
This typedef represents Legato character.
Definition: legato_common.h:424
setRadius
virtual leResult setRadius(leArcWidget *_this, uint32_t rad)
Set radius of an arc.
_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
_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