46 #ifndef __D4D_RADIOBUTTON_H
47 #define __D4D_RADIOBUTTON_H
71 #define D4D_RADIOBUTTON_F_ICON_RING (0x01 << D4D_OBJECT_F_OBJECT_SHIFT)
74 //******************************************************************************
79 #ifndef D4D_RADIOBUTTON_F_DEFAULT
80 #define D4D_RADIOBUTTON_F_DEFAULT (D4D_OBJECT_F_VISIBLE | D4D_OBJECT_F_ENABLED | D4D_OBJECT_F_TABSTOP | D4D_OBJECT_F_TOUCHENABLE\
81 | D4D_OBJECT_F_MOUSE_NORMAL | D4D_OBJECT_F_FOCUSRECT | D4D_RADIOBUTTON_F_ICON_RING )
87 #ifndef D4D_RADIOBUTTON_TXT_PRTY_DEFAULT
88 #define D4D_RADIOBUTTON_TXT_PRTY_DEFAULT (D4D_ALIGN_H_LEFT_MASK | D4D_ALIGN_V_CENTER_MASK)
93 #ifndef D4D_RADIOBUTTON_FNT_PRTY_DEFAULT
94 #define D4D_RADIOBUTTON_FNT_PRTY_DEFAULT ( 0 )
99 #ifndef D4D_RADIOBUTTON_BORDER_OFFSET
100 #define D4D_RADIOBUTTON_BORDER_OFFSET 3
105 #ifndef D4D_RADIOBUTTON_TEXT_OFFSET
106 #define D4D_RADIOBUTTON_TEXT_OFFSET 4
111 #ifndef D4D_RADIOBUTTON_ICON_RING
112 #define D4D_RADIOBUTTON_ICON_RING 2
117 #ifndef D4D_RADIOBUTTON_MIN_SIZE
118 #define D4D_RADIOBUTTON_MIN_SIZE 8
123 #ifndef D4D_COLOR_RADIOBUTTON_ICON_BCKG
124 #define D4D_COLOR_RADIOBUTTON_ICON_BCKG D4D_COLOR_WHITE
155 #define D4D_RADIOBUTTON_STATUS_PRESSED_MASK (0x01)
156 #define D4D_RADIOBUTTON_STATUS_CHECKED_MASK (0x02)
173 #define D4D_GET_RADIOBUTTON(pObj) ((D4D_RADIOBUTTON*)((pObj)->pParam))
174 #define D4D_GET_RADIOBUTTON_STATUS(pObj) ((D4D_RADIOBUTTON_STATUS*)(D4D_GET_RADIOBUTTON(pObj)->pStatus))
209 #define _D4D_DECLARE_RADIOBUTTON(type, name, text, x, y, cx, cy, radius, pMargin, pRelations, flags, pbmpChecked, pbmpUnChecked, pScheme, fontId, pUser, onchange, pOnUsrMsg) \
210 static D4D_RADIOBUTTON_STATUS name##_status = { 0 }; \
211 static D4D_STR_PROPERTIES name##_strPrties = { D4D_RADIOBUTTON_FNT_PRTY_DEFAULT, D4D_RADIOBUTTON_TXT_PRTY_DEFAULT}; \
212 static type D4D_RADIOBUTTON name##_params = \
214 { text, D4D_TEXT_LEN(text), fontId, &name##_strPrties, D4D_OBJECT_MAX_TEXT_LEN(text), 0}, \
221 D4D_DECLARE_OBJECT(type, name, x, y, cx, cy, radius, pMargin, pRelations, pOnUsrMsg, &d4d_radioButtonSysFunc, &(name##_params), flags, pUser, pScheme)
246 #define D4D_DECLARE_RADIOBUTTON(name, text, x, y, cx, cy, flags, pbmpChecked, pbmpUnChecked, pScheme, fontId, pUser, onchange, pOnUsrMsg) \
247 _D4D_DECLARE_RADIOBUTTON(D4D_CONST, name, text, x, y, cx, cy, 0, flags, NULL, NULL, pbmpChecked, pbmpUnChecked, pScheme, fontId, pUser, onchange, pOnUsrMsg)
267 #define D4D_DECLARE_STD_RADIOBUTTON(name, text, x, y, cx, cy, pbmpChecked, pbmpUnChecked, fontId, onchange) \
268 D4D_DECLARE_RADIOBUTTON(name, text, x, y, cx, cy, (D4D_RADIOBUTTON_F_DEFAULT), pbmpChecked, pbmpUnChecked, NULL, fontId, NULL, onchange, NULL)
295 #define D4D_DECLARE_RRADIOBUTTON(name, text, x, y, cx, cy, radius, flags, pbmpChecked, pbmpUnChecked, pScheme, fontId, pUser, onchange, pOnUsrMsg) \
296 _D4D_DECLARE_RADIOBUTTON(D4D_CONST, name, text, x, y, cx, cy, radius, NULL, NULL, flags, pbmpChecked, pbmpUnChecked, pScheme, fontId, pUser, onchange, pOnUsrMsg)
317 #define D4D_DECLARE_STD_RRADIOBUTTON(name, text, x, y, cx, cy, radius, pbmpChecked, pbmpUnChecked, fontId, onchange) \
318 D4D_DECLARE_RRADIOBUTTON(name, text, x, y, cx, cy, radius, (D4D_RADIOBUTTON_F_DEFAULT), pbmpChecked, pbmpUnChecked, NULL, fontId, NULL, onchange, NULL)
326 #define D4D_DECLARE_RADIOBUTTON_INRAM(name, text, x, y, cx, cy, flags, pbmpChecked, pbmpUnChecked, pScheme, fontId, pUser, onchange, pOnUsrMsg) \
327 _D4D_DECLARE_RADIOBUTTON(D4D_NO_CONST, name, text, x, y, cx, cy, 0, NULL, NULL, flags, pbmpChecked, pbmpUnChecked, pScheme, fontId, pUser, onchange, pOnUsrMsg)
332 #define D4D_DECLARE_STD_RADIOBUTTON_INRAM(name, text, x, y, cx, cy, pbmpChecked, pbmpUnChecked, fontId, onchange) \
333 D4D_DECLARE_RADIOBUTTON_INRAM(name, text, x, y, cx, cy, (D4D_RADIOBUTTON_F_DEFAULT), pbmpChecked, pbmpUnChecked, NULL, fontId, NULL, onchange, NULL)
341 #define D4D_DECLARE_RRADIOBUTTON_INRAM(name, text, x, y, cx, cy, radius, flags, pbmpChecked, pbmpUnChecked, pScheme, fontId, pUser, onchange, pOnUsrMsg) \
342 _D4D_DECLARE_RADIOBUTTON(D4D_NO_CONST, name, text, x, y, cx, cy, radius, NULL, NULL, flags, pbmpChecked, pbmpUnChecked, pScheme, fontId, pUser, onchange, pOnUsrMsg)
347 #define D4D_DECLARE_STD_RRADIOBUTTON_INRAM(name, text, x, y, cx, cy, radius, pbmpChecked, pbmpUnChecked, fontId, onchange) \
348 D4D_DECLARE_RRADIOBUTTON_INRAM(name, text, x, y, cx, cy, radius, (D4D_RADIOBUTTON_F_DEFAULT), pbmpChecked, pbmpUnChecked, NULL, fontId, NULL, onchange, NULL)
360 #define D4D_RadioButtonSetText D4D_SetText
The string type. This structure contains all properties about string in eGUI.
D4D_RADIOBUTTON_STATUS * pStatus
const D4D_BMP * pBmpChecked
unsigned char Byte
Type definition of Byte (unsigned 8-bit).
D4D_BMP eGUI main image structure.
D4D_RDBTN_ON_CHANGE OnChange
const D4D_BMP * pBmpUnChecked
The object main structure type definition.
The object system function needed for each object - this is part of D4D_OBJECT main structure...
LWord D4D_BOOL
Type definition of eGUI boolean.