 |
MPLABĀ® Harmony Graphics Suite
|
Go to the documentation of this file.
46 #ifndef LEGATO_CHECKBOX_H
47 #define LEGATO_CHECKBOX_H
51 #if LE_CHECKBOX_WIDGET_ENABLED == 1
57 typedef struct leCheckBoxWidget leCheckBoxWidget;
71 typedef void (*leCheckBoxWidget_CheckedEvent)(leCheckBoxWidget*);
85 typedef void (*leCheckBoxWidget_UncheckedEvent)(leCheckBoxWidget*);
98 typedef struct leCheckBoxWidget leCheckBoxWidget;
100 #define LE_CHECKBOXWIDGET_VTABLE(THIS_TYPE) \
101 LE_WIDGET_VTABLE(THIS_TYPE) \
103 leBool (*getChecked)(const THIS_TYPE* _this); \
104 leResult (*setChecked)(THIS_TYPE* _this, leBool toggleable); \
105 leImage* (*getCheckedImage)(const THIS_TYPE* _this); \
106 leResult (*setCheckedImage)(THIS_TYPE* _this, leImage* img); \
107 leImage* (*getUncheckedImage)(const THIS_TYPE* _this); \
108 leResult (*setUncheckedImage)(THIS_TYPE* _this, leImage* img); \
109 leRelativePosition (*getImagePosition)(const THIS_TYPE* _this); \
110 leResult (*setImagePosition)(THIS_TYPE* _this, leRelativePosition pos); \
111 uint32_t (*getImageMargin)(const THIS_TYPE* _this); \
112 leResult (*setImageMargin)(THIS_TYPE* _this, uint32_t mg); \
113 leString* (*getString)(const THIS_TYPE* _this); \
114 leResult (*setString)(THIS_TYPE* _this, const leString* str); \
115 leCheckBoxWidget_CheckedEvent (*getCheckedEventCallback)(const THIS_TYPE* _this); \
116 leResult (*setCheckedEventCallback)(THIS_TYPE* _this, leCheckBoxWidget_CheckedEvent cb); \
117 leCheckBoxWidget_UncheckedEvent (*getUncheckedEventCallback)(const THIS_TYPE* _this); \
118 leResult (*setUncheckedEventCallback)(THIS_TYPE* _this, leCheckBoxWidget_UncheckedEvent cb); \
121 typedef struct leCheckBoxWidgetVTable
123 LE_CHECKBOXWIDGET_VTABLE(leCheckBoxWidget)
124 } leCheckBoxWidgetVTable;
147 typedef struct leCheckBoxWidget
151 const leCheckBoxWidgetVTable* fn;
164 uint32_t imageMargin;
166 leCheckBoxWidget_CheckedEvent checkedEvent;
167 leCheckBoxWidget_CheckedEvent uncheckedEvent;
187 LIB_EXPORT leCheckBoxWidget* leCheckBoxWidget_New();
199 LIB_EXPORT
void leCheckBoxWidget_Constructor(leCheckBoxWidget* _this);
202 #define THIS_TYPE struct leWidget
215 virtual leBool getChecked(
const leCheckBoxWidget* _this);
232 virtual leResult setChecked(leCheckBoxWidget* _this,
247 virtual leImage* getCheckedImage(
const leCheckBoxWidget* _this);
263 virtual leResult setCheckedImage(leCheckBoxWidget* _this,
278 virtual leImage* getUncheckedImage(
const leCheckBoxWidget* _this);
295 virtual leResult setUncheckedImage(leCheckBoxWidget* _this,
329 virtual setImagePosition(leCheckBoxWidget* _this,
344 virtual uint32_t getImageMargin(
const leCheckBoxWidget* _this);
361 virtual leResult setImageMargin(leCheckBoxWidget* _this,
375 virtual leString* getString(
const leCheckBoxWidget* _this);
392 virtual setString(leCheckBoxWidget* _this,
407 virtual leCheckBoxWidget_CheckedEvent getCheckedEventCallback(
const leCheckBoxWidget* _this);
423 virtual leResult setCheckedEventCallback(leCheckBoxWidget* _this,
424 leCheckBoxWidget_CheckedEvent cb);
438 virtual leCheckBoxWidget_UncheckedEvent getUncheckedEventCallback
439 (
const leCheckBoxWidget* _this);
454 virtual leResult setUncheckedEventCallback(leCheckBoxWidget* _this,
455 leCheckBoxWidget_UncheckedEvent cb);
461 #endif // LE_CHECKBOX_WIDGET_ENABLED
Error functions, macros and definitions.
leResult
This enum represents function call results.
Definition: legato_common.h:134
This struct represents a rectangle.
Definition: legato_common.h:405
Image functions and defintions.
Memory functions and definitions.
Definition: legato_image.h:180
@ LE_VALIGN_MIDDLE
Definition: legato_common.h:183
This struct represents a string.
Definition: legato_string.h:108
leBool
This enum represents booleans.
Definition: legato_common.h:157
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
@ LE_FALSE
Definition: legato_common.h:158
LIB_EXPORT leBool leRectContainsPoint(const leRect *rect, const lePoint *point)
Determines if a point is inside a rectangle.
Definition: legato_rect.c:31
General internal utilities for the library.
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
Fixed string functions and definitions.
@ LE_HALIGN_LEFT
Definition: legato_common.h:207
void leUtils_RectToScreenSpace(const leWidget *widget, leRect *rect)
Convert rectangle from widget local space to screen space.
Definition: legato_utils.c:151
The header file joins all header files used in the graphics object library.
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
@ LE_RELATIVE_POSITION_LEFTOF
Definition: legato_common.h:314
leColor leScheme_GetRenderColor(const leScheme *schm, leSchemeColor clr)
Gets a scheme render color for the current layer color mode.
Definition: legato_scheme.c:68
leRelativePosition
This enum represents the relative position modes for objects.
Definition: legato_common.h:313
@ LE_TRUE
Definition: legato_common.h:159
Common macros and definitions used by Legato.
const leStringVTable * fn
Definition: legato_string.h:109
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
void leUtils_ArrangeRectangleRelative(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 bounds.
Definition: legato_utils.c:286
This structure represents a integer Cartesian point.
Definition: legato_common.h:357