46 #ifndef LEGATO_CHECKBOX_H 47 #define LEGATO_CHECKBOX_H 51 #if LE_CHECKBOX_WIDGET_ENABLED == 1 61 typedef struct leCheckBoxWidget leCheckBoxWidget;
75 typedef void (*leCheckBoxWidget_CheckedEvent)(leCheckBoxWidget*);
89 typedef void (*leCheckBoxWidget_UncheckedEvent)(leCheckBoxWidget*);
102 typedef struct leCheckBoxWidget leCheckBoxWidget;
104 #define LE_CHECKBOXWIDGET_VTABLE(THIS_TYPE) \ 105 LE_WIDGET_VTABLE(THIS_TYPE) \ 107 leBool (*getChecked)(const THIS_TYPE* _this); \ 108 leResult (*setChecked)(THIS_TYPE* _this, leBool toggleable); \ 109 leImage* (*getCheckedImage)(const THIS_TYPE* _this); \ 110 leResult (*setCheckedImage)(THIS_TYPE* _this, leImage* img); \ 111 leImage* (*getUncheckedImage)(const THIS_TYPE* _this); \ 112 leResult (*setUncheckedImage)(THIS_TYPE* _this, leImage* img); \ 113 leRelativePosition (*getImagePosition)(const THIS_TYPE* _this); \ 114 leResult (*setImagePosition)(THIS_TYPE* _this, leRelativePosition pos); \ 115 uint32_t (*getImageMargin)(const THIS_TYPE* _this); \ 116 leResult (*setImageMargin)(THIS_TYPE* _this, uint32_t mg); \ 117 leString* (*getString)(const THIS_TYPE* _this); \ 118 leResult (*setString)(THIS_TYPE* _this, const leString* str); \ 119 leCheckBoxWidget_CheckedEvent (*getCheckedEventCallback)(const THIS_TYPE* _this); \ 120 leResult (*setCheckedEventCallback)(THIS_TYPE* _this, leCheckBoxWidget_CheckedEvent cb); \ 121 leCheckBoxWidget_UncheckedEvent (*getUncheckedEventCallback)(const THIS_TYPE* _this); \ 122 leResult (*setUncheckedEventCallback)(THIS_TYPE* _this, leCheckBoxWidget_UncheckedEvent cb); \ 125 typedef struct leCheckBoxWidgetVTable
127 LE_CHECKBOXWIDGET_VTABLE(leCheckBoxWidget)
128 } leCheckBoxWidgetVTable;
151 typedef struct leCheckBoxWidget
155 const leCheckBoxWidgetVTable* fn;
168 uint32_t imageMargin;
170 leCheckBoxWidget_CheckedEvent checkedEvent;
171 leCheckBoxWidget_CheckedEvent uncheckedEvent;
191 leCheckBoxWidget* leCheckBoxWidget_New(
void);
203 void leCheckBoxWidget_Constructor(leCheckBoxWidget* _this);
206 #define THIS_TYPE struct leWidget 219 virtual leBool getChecked(
const leCheckBoxWidget* _this);
236 virtual leResult setChecked(leCheckBoxWidget* _this,
251 virtual leImage* getCheckedImage(
const leCheckBoxWidget* _this);
267 virtual leResult setCheckedImage(leCheckBoxWidget* _this,
282 virtual leImage* getUncheckedImage(
const leCheckBoxWidget* _this);
299 virtual leResult setUncheckedImage(leCheckBoxWidget* _this,
333 virtual setImagePosition(leCheckBoxWidget* _this,
348 virtual uint32_t getImageMargin(
const leCheckBoxWidget* _this);
365 virtual leResult setImageMargin(leCheckBoxWidget* _this,
379 virtual leString* getString(
const leCheckBoxWidget* _this);
396 virtual setString(leCheckBoxWidget* _this,
411 virtual leCheckBoxWidget_CheckedEvent getCheckedEventCallback(
const leCheckBoxWidget* _this);
427 virtual leResult setCheckedEventCallback(leCheckBoxWidget* _this,
428 leCheckBoxWidget_CheckedEvent cb);
442 virtual leCheckBoxWidget_UncheckedEvent getUncheckedEventCallback
443 (
const leCheckBoxWidget* _this);
458 virtual leResult setUncheckedEventCallback(leCheckBoxWidget* _this,
459 leCheckBoxWidget_UncheckedEvent cb);
468 #endif // LE_CHECKBOX_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.