 |
MPLABĀ® Harmony Graphics Suite
|
Go to the documentation of this file.
46 #ifndef LEGATO_RADIOBUTTON_H
47 #define LEGATO_RADIOBUTTON_H
51 #if LE_RADIOBUTTON_WIDGET_ENABLED == 1
58 typedef struct leRadioButtonWidget leRadioButtonWidget;
59 typedef struct leRadioButtonGroup leRadioButtonGroup;
74 typedef void (*leRadioButtonWidget_SelectedEvent)(leRadioButtonWidget*);
89 typedef void (*leRadioButtonWidget_DeselectedEvent)(leRadioButtonWidget*);
97 typedef struct leRadioButtonWidget leRadioButtonWidget;
103 #define LE_RADIOBUTTONWIDGET_VTABLE(THIS_TYPE) \
104 LE_WIDGET_VTABLE(THIS_TYPE) \
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); \
128 typedef struct leRadioButtonWidgetVTable
130 LE_RADIOBUTTONWIDGET_VTABLE(leRadioButtonWidget)
131 } leRadioButtonWidgetVTable;
161 typedef struct leRadioButtonWidget
165 const leRadioButtonWidgetVTable* fn;
172 const leImage* unselectedImage;
176 uint32_t imageMargin;
177 uint32_t circleButtonSize;
179 leRadioButtonWidget_SelectedEvent selectedEvent;
180 leRadioButtonWidget_DeselectedEvent deselectedEvent;
182 leRadioButtonGroup* group;
183 } leRadioButtonWidget;
223 LIB_EXPORT leRadioButtonWidget* leRadioButtonWidget_New();
235 LIB_EXPORT
void leRadioButtonWidget_Constructor(leRadioButtonWidget* wgt);
239 #define THIS_TYPE struct leWidget
271 virtual leBool getSelected(
const leRadioButtonWidget* _this);
302 virtual leBool getSelected(
const leRadioButtonWidget* _this);
334 virtual leResult setSelected(leRadioButtonWidget* _this);
382 virtual leString* getString(
const leRadioButtonWidget* _this);
418 virtual leResult setString(leRadioButtonWidget* _this,
451 virtual leString* getString(
const leRadioButtonWidget* _this);
488 virtual leResult setSelectedImage(leRadioButtonWidget* _this,
521 virtual leImage* getUnselectedImage(
const leRadioButtonWidget* _this);
557 virtual leResult setUnselectedImage(leRadioButtonWidget* _this,
625 virtual leResult setImagePosition(leRadioButtonWidget* _this,
658 virtual uint32_t getImageMargin(
const leRadioButtonWidget* _this);
694 virtual leResult setImageMargin(leRadioButtonWidget* _this,
708 uint32_t getCircleButtonSize(
const leRadioButtonWidget* _this);
724 virtual leResult setCircleButtonSize(leRadioButtonWidget* _this,
737 virtual leRadioButtonWidget_SelectedEvent getSelectedEventCallback
738 (
const leRadioButtonWidget* _this);
753 virtual leResult setSelectedEventCallback(leRadioButtonWidget* _this,
754 leRadioButtonWidget_SelectedEvent cb);
766 virtual leRadioButtonWidget_DeselectedEvent getDeselectedEventCallback
767 (
const leRadioButtonWidget* _this);
782 virtual leResult setDeselectedEventCallback(leRadioButtonWidget* _this,
783 leRadioButtonWidget_DeselectedEvent cb);
788 #endif // LE_RADIOBUTTON_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
@ 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.
Fixed string functions and definitions.
@ LE_HALIGN_LEFT
Definition: legato_common.h:207
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
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
virtual void destructor(leString *_this)
Destruct string.
This structure represents a integer Cartesian point.
Definition: legato_common.h:357