69 #define D4D_MENU_F_INDEX (0x01 << D4D_OBJECT_F_OBJECT_SHIFT)
70 #define D4D_MENU_F_SIDEBAR (0x02 << D4D_OBJECT_F_OBJECT_SHIFT)
75 #ifndef D4D_MENU_F_DEFAULT
76 #define D4D_MENU_F_DEFAULT (D4D_OBJECT_F_VISIBLE | D4D_OBJECT_F_ENABLED | D4D_OBJECT_F_TABSTOP | D4D_OBJECT_F_TOUCHENABLE | D4D_OBJECT_F_MOUSE_NORMAL | D4D_OBJECT_F_BEVEL_RAISED | D4D_MENU_F_INDEX | D4D_MENU_F_SIDEBAR)
81 #ifndef D4D_MENU_F_SCRLBRS_DEFAULT
82 #define D4D_MENU_F_SCRLBRS_DEFAULT (D4D_OBJECT_F_ENABLED | D4D_OBJECT_F_TOUCHENABLE | D4D_OBJECT_F_FASTTOUCH | D4D_OBJECT_F_MOUSE_NORMAL)
87 #ifndef D4D_MENU_SCRLBR_WIDTH
88 #define D4D_MENU_SCRLBR_WIDTH ( 20 )
93 #ifndef D4D_MENU_SCRLBR_STEP
94 #define D4D_MENU_SCRLBR_STEP ( 1 )
99 #ifndef D4D_MENU_TXT_PRTY_DEFAULT
100 #define D4D_MENU_TXT_PRTY_DEFAULT (D4D_ALIGN_H_CENTER_MASK | D4D_ALIGN_V_CENTER_MASK)
105 #ifndef D4D_MENU_FNT_PRTY_DEFAULT
106 #define D4D_MENU_FNT_PRTY_DEFAULT ( 0 )
111 #ifndef D4D_MENU_IX_FNT_PRTY_DEFAULT
112 #define D4D_MENU_IX_FNT_PRTY_DEFAULT ( 0 )
117 #ifndef D4D_MENU_IX_TXT_PRTY_DEFAULT
118 #define D4D_MENU_IX_TXT_PRTY_DEFAULT ( D4D_ALIGN_H_CENTER_MASK | D4D_ALIGN_V_CENTER_MASK )
123 #ifndef D4D_MENU_ITEM_FNT_PRTY_DEFAULT
124 #define D4D_MENU_ITEM_FNT_PRTY_DEFAULT ( 0 )
129 #ifndef D4D_MENU_ITEM_TXT_PRTY_DEFAULT
130 #define D4D_MENU_ITEM_TXT_PRTY_DEFAULT ( D4D_ALIGN_V_CENTER_MASK | D4D_ALIGN_H_LEFT_MASK )
192 #define D4D_MENU_CHILD_SCROLL_BAR_VER_IX 1
195 #define D4D_GET_MENU(pObj) ((D4D_MENU*)((pObj)->pParam))
197 #define D4D_GET_MENU_SCROLL_BAR_HOR(pObj) ((D4D_OBJECT*)((pObj)->pRelations[D4D_MENU_CHILD_SCROLL_BAR_VER_IX]))
235 #define _D4D_DECLARE_MENU_BEGIN(type, name, title_text, title_font, x, y, cx, cy, radius, pMargin, pParent, flags, pScheme,\
236 indexFontId, itemsFontId, posCnt, menuItemsOff, pIcon, pUser, pOnClick, pOnUsrMsg) \
237 extern type D4D_MENU_ITEM name##_items[];\
238 extern D4D_OBJECT name##_scrollBarVer;\
239 static const D4D_OBJECT * name##_relations[] = {pParent, &name##_scrollBarVer, NULL};\
240 static D4D_MENU_DATA name##_data = { 0, 0};\
241 static D4D_STR_PROPERTIES name##_strPrties = { D4D_MENU_FNT_PRTY_DEFAULT , D4D_MENU_TXT_PRTY_DEFAULT }; \
242 static type D4D_MENU name##_params = \
244 { title_text, D4D_TEXT_LEN(title_text), title_font, &name##_strPrties, D4D_OBJECT_MAX_TEXT_LEN(title_text), 0}, \
251 (const D4D_MENU_ITEM*)&(name##_items[0]),\
255 D4D_DECLARE_OBJECT(type, name, x, y, cx, cy, radius, pMargin, name##_relations, pOnUsrMsg, &d4d_menuSysFunc, &(name##_params), flags, pUser, pScheme)\
257 static const D4D_OBJECT* const name##_scrollBarRelations[] = {&name, NULL};\
259 _D4D_DECLARE_SCROLL_BAR(D4D_NO_CONST, name##_scrollBarVer, 20, 100, 100, 20, radius, NULL, name##_scrollBarRelations, D4D_MENU_F_SCRLBRS_DEFAULT, pScheme, NULL, D4D_MenuScrollBarsFeedBack, NULL) \
261 type D4D_MENU_ITEM name##_items[] = {
276 #define D4D_DECLARE_MENU_ITEM(pText, pIcon) { {(pText), D4D_TEXT_LEN(pText), 0, NULL, D4D_OBJECT_MAX_TEXT_LEN(pText), 0}, pIcon, NULL},
292 #define D4D_DECLARE_MENU_ITEM_FULL(pText, pIcon, pUser) { {(pText), D4D_TEXT_LEN(pText), 0, NULL, D4D_OBJECT_MAX_TEXT_LEN(pText), 0}, pIcon, (void*)pUser},
305 #define _D4D_DECLARE_MENU_END() { {NULL, 0, 0, NULL, 0, 0}, NULL, NULL} };
319 #define D4D_DECLARE_MENU_END(name) _D4D_DECLARE_MENU_END()
348 #define D4D_DECLARE_MENU_BEGIN(name, title_text, title_font, x, y, cx, cy, flags, pScheme,\
349 indexFontId, itemsFontId, posCnt, menuItemsOff, pIcon, pUser, pOnClick, pOnUsrMsg) \
350 _D4D_DECLARE_MENU_BEGIN(D4D_CONST, name, title_text, title_font, x, y, cx, cy, 0, NULL, NULL, flags, pScheme,\
351 indexFontId, itemsFontId, posCnt, menuItemsOff, pIcon, pUser, pOnClick, pOnUsrMsg)
373 #define D4D_DECLARE_STD_MENU_BEGIN(name, title_text, title_font, x, y, cx, cy, indexFontId, itemsFontId, pIcon, pOnClick) \
374 D4D_DECLARE_MENU_BEGIN(name, title_text, title_font, x, y, cx, cy, (D4D_MENU_F_DEFAULT), NULL,\
375 IndexFontId, ItemsFontId, 0, 0, pIcon, NULL, pOnClick, NULL)
405 #define D4D_DECLARE_RMENU_BEGIN(name, title_text, title_font, x, y, cx, cy, radius, flags, pScheme,\
406 indexFontId, itemsFontId, posCnt, menuItemsOff, pIcon, pUser, pOnClick, pOnUsrMsg) \
407 _D4D_DECLARE_MENU_BEGIN(D4D_CONST, name, title_text, title_font, x, y, cx, cy, radius, NULL, NULL, flags, pScheme,\
408 indexFontId, itemsFontId, posCnt, menuItemsOff, pIcon, pUser, pOnClick, pOnUsrMsg)
433 #define D4D_DECLARE_STD_RMENU_BEGIN(name, title_text, title_font, x, y, cx, cy, radius, indexFontId, itemsFontId, pIcon, pOnClick) \
434 D4D_DECLARE_RMENU_BEGIN(name, title_text, title_font, x, y, cx, cy, radius, (D4D_MENU_F_DEFAULT), NULL,\
435 indexFontId, itemsFontId, 0, 0, pIcon, NULL, pOnClick, NULL)
442 #define D4D_DECLARE_MENU_BEGIN_INRAM(name, title_text, title_font, x, y, cx, cy, flags, pScheme,\
443 indexFontId, itemsFontId, posCnt, menuItemsOff, pIcon, pUser, pOnClick, pOnUsrMsg) \
444 _D4D_DECLARE_MENU_BEGIN(D4D_NO_CONST, name, title_text, title_font, x, y, cx, cy, 0, NULL, NULL, flags, pScheme,\
445 indexFontId, itemsFontId, posCnt, menuItemsOff, pIcon, pUser, pOnClick, pOnUsrMsg)
451 #define D4D_DECLARE_STD_MENU_BEGIN_INRAM(name, title_text, title_font, x, y, cx, cy, IndexFontId, ItemsFontId, pIcon, pOnClick) \
452 D4D_DECLARE_MENU_BEGIN_INRAM(name, title_text, title_font, x, y, cx, cy, (D4D_MENU_F_DEFAULT), NULL,\
453 IndexFontId, ItemsFontId, 0, 0, pIcon, NULL, pOnClick, NULL)
460 #define D4D_DECLARE_RMENU_BEGIN_INRAM(name, title_text, title_font, x, y, cx, cy, radius, flags, pScheme,\
461 indexFontId, itemsFontId, posCnt, menuItemsOff, pIcon, pUser, pOnClick, pOnUsrMsg) \
462 _D4D_DECLARE_MENU_BEGIN(D4D_NO_CONST, name, title_text, title_font, x, y, cx, cy, radius, NULL, NULL, flags, pScheme,\
463 indexFontId, itemsFontId, posCnt, menuItemsOff, pIcon, pUser, pOnClick, pOnUsrMsg)
470 #define D4D_DECLARE_STD_RMENU_BEGIN_INRAM(name, title_text, title_font, x, y, cx, cy, radius, IndexFontId, ItemsFontId, pIcon, pOnClick) \
471 D4D_DECLARE_RMENU_BEGIN_INRAM(name, title_text, title_font, x, y, cx, cy, radius, (D4D_MENU_F_DEFAULT), NULL,\
472 IndexFontId, ItemsFontId, 0, 0, pIcon, NULL, pOnClick, NULL)
478 #define D4D_DECLARE_RMENU_END(name) D4D_DECLARE_MENU_END(name)
479 #define D4D_DECLARE_MENU_END_INRAM(name) _D4D_DECLARE_MENU_END()
480 #define D4D_DECLARE_RMENU_END_INRAM(name) D4D_DECLARE_MENU_END_INRAM(name)
The string type. This structure contains all properties about string in eGUI.
Byte D4D_COOR
Type definition of eGUI coordination variables.
D4D_MENU_ON_CLICK OnClicked
D4D_BMP eGUI main image structure.
const D4D_MENU_ITEM * pItems
LWord D4D_INDEX
Type definition of eGUI general index variables.
The object main structure type definition.
signed char sByte
Type definition of sByte (signed 8-bit).
The object system function needed for each object - this is part of D4D_OBJECT main structure...