46 #ifndef __D4D_CHECKBOX_H
47 #define __D4D_CHECKBOX_H
59 #ifndef D4D_CHECKBOX_BORDER_OFFSET
60 #define D4D_CHECKBOX_BORDER_OFFSET 3
65 #ifndef D4D_CHECKBOX_TEXT_OFFSET
66 #define D4D_CHECKBOX_TEXT_OFFSET 4
71 #ifndef D4D_COLOR_CHECKBOX_ICON_BCKG
72 #define D4D_COLOR_CHECKBOX_ICON_BCKG D4D_COLOR_WHITE
87 #define D4D_CHECKBOX_F_ICON_RECTANGLE (0x01 << D4D_OBJECT_F_OBJECT_SHIFT)
96 #ifndef D4D_CHECKBOX_F_DEFAULT
97 #define D4D_CHECKBOX_F_DEFAULT (D4D_OBJECT_F_VISIBLE | D4D_OBJECT_F_ENABLED | D4D_OBJECT_F_TABSTOP | D4D_OBJECT_F_TOUCHENABLE\
98 | D4D_OBJECT_F_MOUSE_NORMAL | D4D_OBJECT_F_BEVEL_RAISED | D4D_CHECKBOX_F_ICON_RECTANGLE )
103 #ifndef D4D_CHECKBOX_TXT_PRTY_DEFAULT
104 #define D4D_CHECKBOX_TXT_PRTY_DEFAULT (D4D_ALIGN_H_LEFT_MASK | D4D_ALIGN_V_CENTER_MASK)
109 #ifndef D4D_CHECKBOX_FNT_PRTY_DEFAULT
110 #define D4D_CHECKBOX_FNT_PRTY_DEFAULT ( 0 )
142 #define D4D_CHECKBOX_STATUS_PRESSED_MASK (0x01)
143 #define D4D_CHECKBOX_STATUS_CHECKED_MASK (0x02)
160 #define D4D_GET_CHECKBOX(pObj) ((D4D_CHECKBOX*)((pObj)->pParam))
161 #define D4D_GET_CHECKBOX_STATUS(pObj) ((D4D_CHECKBOX_STATUS*)(D4D_GET_CHECKBOX(pObj)->pStatus))
197 #define _D4D_DECLARE_CHECKBOX(type, name, text, x, y, cx, cy, radius, pMargin, pRelations, flags, pbmpChecked, pbmpUnChecked, pScheme, fontId, pUser, onchange, pOnUsrMsg) \
198 static D4D_CHECKBOX_STATUS name##_status = { 0 }; \
199 static D4D_STR_PROPERTIES name##_strPrties = { D4D_CHECKBOX_FNT_PRTY_DEFAULT, D4D_CHECKBOX_TXT_PRTY_DEFAULT}; \
200 static type D4D_CHECKBOX name##_params = \
202 { text, D4D_TEXT_LEN(text), fontId, &name##_strPrties, D4D_OBJECT_MAX_TEXT_LEN(text), 0}, \
209 D4D_DECLARE_OBJECT(type, name, x, y, cx, cy, radius, pMargin, pRelations, pOnUsrMsg, &d4d_checkBoxSysFunc, &(name##_params), flags, pUser, pScheme)
233 #define D4D_DECLARE_CHECKBOX(name, text, x, y, cx, cy, flags, pbmpChecked, pbmpUnChecked, pScheme, fontId, pUser, onchange, pOnUsrMsg) \
234 _D4D_DECLARE_CHECKBOX(D4D_CONST, name, text, x, y, cx, cy, 0, (D4D_MARGIN*)&d4d_marginDefault, NULL, flags, pbmpChecked, pbmpUnChecked, pScheme, fontId, pUser, onchange, pOnUsrMsg)
254 #define D4D_DECLARE_STD_CHECKBOX(name, text, x, y, cx, cy, pbmpChecked, pbmpUnChecked, fontId, onchange) \
255 D4D_DECLARE_CHECKBOX(name, text, x, y, cx, cy, (D4D_CHECKBOX_F_DEFAULT), pbmpChecked, pbmpUnChecked, NULL, fontId, NULL, onchange, NULL)
282 #define D4D_DECLARE_RCHECKBOX(name, text, x, y, cx, cy, radius, flags, pbmpChecked, pbmpUnChecked, pScheme, fontId, pUser, onchange, pOnUsrMsg) \
283 _D4D_DECLARE_CHECKBOX(D4D_CONST, name, text, x, y, cx, cy, radius, (D4D_MARGIN*)&d4d_marginDefault, NULL, flags, pbmpChecked, pbmpUnChecked, pScheme, fontId, pUser, onchange, pOnUsrMsg)
304 #define D4D_DECLARE_STD_RCHECKBOX(name, text, x, y, cx, cy, radius, pbmpChecked, pbmpUnChecked, fontId, onchange) \
305 D4D_DECLARE_RCHECKBOX(name, text, x, y, cx, cy, radius, (D4D_CHECKBOX_F_DEFAULT), pbmpChecked, pbmpUnChecked, NULL, fontId, NULL, onchange, NULL)
312 #define D4D_DECLARE_CHECKBOX_INRAM(name, text, x, y, cx, cy, flags, pbmpChecked, pbmpUnChecked, pScheme, fontId, pUser, onchange, pOnUsrMsg) \
313 _D4D_DECLARE_CHECKBOX(D4D_NO_CONST, name, text, x, y, cx, cy, 0, (D4D_MARGIN*)&d4d_marginDefault, NULL, flags, pbmpChecked, pbmpUnChecked, pScheme, fontId, pUser, onchange, pOnUsrMsg)
318 #define D4D_DECLARE_STD_CHECKBOX_INRAM(name, text, x, y, cx, cy, pbmpChecked, pbmpUnChecked, fontId, onchange) \
319 D4D_DECLARE_CHECKBOX_INRAM(name, text, x, y, cx, cy, 0, (D4D_CHECKBOX_F_DEFAULT), pbmpChecked, pbmpUnChecked, NULL, fontId, NULL, onchange, NULL)
326 #define D4D_DECLARE_RCHECKBOX_INRAM(name, text, x, y, cx, cy, radius, flags, pbmpChecked, pbmpUnChecked, pScheme, fontId, pUser, onchange, pOnUsrMsg) \
327 _D4D_DECLARE_CHECKBOX(D4D_NO_CONST, name, text, x, y, cx, cy, radius, (D4D_MARGIN*)&d4d_marginDefault, NULL, flags, pbmpChecked, pbmpUnChecked, pScheme, fontId, pUser, onchange, pOnUsrMsg)
332 #define D4D_DECLARE_STD_RCHECKBOX_INRAM(name, text, x, y, cx, cy, radius, pbmpChecked, pbmpUnChecked, fontId, onchange) \
333 D4D_DECLARE_RCHECKBOX_INRAM(name, text, x, y, cx, cy, radius, (D4D_CHECKBOX_F_DEFAULT), pbmpChecked, pbmpUnChecked, NULL, fontId, NULL, onchange, NULL)
345 #define D4D_CheckBoxSetText D4D_SetText
void D4D_CheckBoxSetValue(D4D_OBJECT_PTR pThis, D4D_BOOL value)
Function Sets the the check box value.
The string type. This structure contains all properties about string in eGUI.
D4D_CHCKBX_ON_CHANGE OnChange
const D4D_BMP * pBmpChecked
unsigned char Byte
Type definition of Byte (unsigned 8-bit).
void(* D4D_CHCKBX_ON_CHANGE)(D4D_OBJECT *pThis)
Type definition of check box on change callback function.
D4D_BMP eGUI main image structure.
const D4D_OBJECT_SYS_FUNCTION d4d_checkBoxSysFunc
The object main structure type definition.
The object system function needed for each object - this is part of D4D_OBJECT main structure...
const D4D_BMP * pBmpUnChecked
LWord D4D_BOOL
Type definition of eGUI boolean.
D4D_CHECKBOX_STATUS * pStatus
D4D_BOOL D4D_CheckBoxGetValue(D4D_OBJECT_PTR pThis)
Function Gets the the check box value.