46 #ifndef LEGATO_RADIOBUTTON_H 47 #define LEGATO_RADIOBUTTON_H 51 #if LE_RADIOBUTTON_WIDGET_ENABLED == 1 62 typedef struct leRadioButtonWidget leRadioButtonWidget;
63 typedef struct leRadioButtonGroup leRadioButtonGroup;
78 typedef void (* leRadioButtonWidget_SelectedEvent)(leRadioButtonWidget*);
93 typedef void (* leRadioButtonWidget_DeselectedEvent)(leRadioButtonWidget*);
101 typedef struct leRadioButtonWidget leRadioButtonWidget;
107 #define LE_RADIOBUTTONWIDGET_VTABLE(THIS_TYPE) \ 108 LE_WIDGET_VTABLE(THIS_TYPE) \ 110 leRadioButtonGroup* (*getGroup)(const THIS_TYPE* _this); \ 111 leBool (*getSelected)(const THIS_TYPE* _this); \ 112 leResult (*setSelected)(THIS_TYPE* _this); \ 113 void (*select)(THIS_TYPE* _this); \ 114 void (*deselect)(THIS_TYPE* _this); \ 115 leString* (*getString)(const THIS_TYPE* _this); \ 116 leResult (*setString)(THIS_TYPE* _this, const leString* str); \ 117 leImage* (*getSelectedImage)(const THIS_TYPE* _this); \ 118 leResult (*setSelectedImage)(THIS_TYPE* _this, const leImage* img); \ 119 leImage* (*getUnselectedImage)(const THIS_TYPE* _this); \ 120 leResult (*setUnselectedImage)(THIS_TYPE* _this, const leImage* img); \ 121 leRelativePosition (*getImagePosition)(const THIS_TYPE* _this); \ 122 leResult (*setImagePosition)(THIS_TYPE* _this, leRelativePosition pos); \ 123 uint32_t (*getImageMargin)(const THIS_TYPE* _this); \ 124 leResult (*setImageMargin)(THIS_TYPE* _this, uint32_t mg); \ 125 leRadioButtonWidget_SelectedEvent (*getSelectedEventCallback)(const THIS_TYPE* _this); \ 126 leResult (*setSelectedEventCallback)(THIS_TYPE* _this, leRadioButtonWidget_SelectedEvent cb); \ 127 leRadioButtonWidget_DeselectedEvent (*getDeselectedEventCallback)(const THIS_TYPE* _this); \ 128 leResult (*setDeselectedEventCallback)(THIS_TYPE* _this, leRadioButtonWidget_DeselectedEvent cb); \ 129 uint32_t (*getCircleButtonSize)(const THIS_TYPE* _this); \ 130 leResult (*setCircleButtonSize)(THIS_TYPE* _this, uint32_t sz); \ 132 typedef struct leRadioButtonWidgetVTable
134 LE_RADIOBUTTONWIDGET_VTABLE(leRadioButtonWidget)
135 } leRadioButtonWidgetVTable;
165 typedef struct leRadioButtonWidget
169 const leRadioButtonWidgetVTable* fn;
176 const leImage* unselectedImage;
180 uint32_t imageMargin;
181 uint32_t circleButtonSize;
183 leRadioButtonWidget_SelectedEvent selectedEvent;
184 leRadioButtonWidget_DeselectedEvent deselectedEvent;
186 leRadioButtonGroup* group;
187 } leRadioButtonWidget;
227 leRadioButtonWidget* leRadioButtonWidget_New(
void);
239 void leRadioButtonWidget_Constructor(leRadioButtonWidget* wgt);
242 #define THIS_TYPE struct leWidget 274 virtual leBool getSelected(
const leRadioButtonWidget* _this);
305 virtual leBool getSelected(
const leRadioButtonWidget* _this);
337 virtual leResult setSelected(leRadioButtonWidget* _this);
385 virtual leString* getString(
const leRadioButtonWidget* _this);
421 virtual leResult setString(leRadioButtonWidget* _this,
454 virtual leString* getString(
const leRadioButtonWidget* _this);
491 virtual leResult setSelectedImage(leRadioButtonWidget* _this,
524 virtual leImage* getUnselectedImage(
const leRadioButtonWidget* _this);
560 virtual leResult setUnselectedImage(leRadioButtonWidget* _this,
628 virtual leResult setImagePosition(leRadioButtonWidget* _this,
661 virtual uint32_t getImageMargin(
const leRadioButtonWidget* _this);
697 virtual leResult setImageMargin(leRadioButtonWidget* _this,
711 uint32_t getCircleButtonSize(
const leRadioButtonWidget* _this);
727 virtual leResult setCircleButtonSize(leRadioButtonWidget* _this,
740 virtual leRadioButtonWidget_SelectedEvent getSelectedEventCallback
741 (
const leRadioButtonWidget* _this);
756 virtual leResult setSelectedEventCallback(leRadioButtonWidget* _this,
757 leRadioButtonWidget_SelectedEvent cb);
769 virtual leRadioButtonWidget_DeselectedEvent getDeselectedEventCallback
770 (
const leRadioButtonWidget* _this);
785 virtual leResult setDeselectedEventCallback(leRadioButtonWidget* _this,
786 leRadioButtonWidget_DeselectedEvent cb);
795 #endif // LE_RADIOBUTTON_WIDGET_ENABLED
Common macros and definitions used by Legato.
Image functions and defintions.
Definition: legato_image.h:181
This struct represents a string.
Definition: legato_string.h:107
leResult
This enum represents function call results.
Definition: legato_common.h:123
leRelativePosition
This enum represents the relative position modes for objects.
Definition: legato_common.h:302
leBool
This enum represents booleans.
Definition: legato_common.h:146
Fixed string functions and definitions.