eGUI alias D4D  Release 3.0
Reference Manual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
D4D MENU API Macro's Specification
Collaboration diagram for D4D MENU API Macro's Specification:

Macros

#define _D4D_DECLARE_MENU_BEGIN(type, name, title_text, title_font, x, y, cx, cy, radius, pMargin, pParent, flags, pScheme, indexFontId, itemsFontId, posCnt, menuItemsOff, pIcon, pUser, pOnClick, pOnUsrMsg)
 Macro that create the Menu object structure in memory including all substructures. More...
 
#define D4D_DECLARE_MENU_ITEM(pText, pIcon)
 Macro that is used to add item to menu definition. More...
 
#define D4D_DECLARE_MENU_ITEM_FULL(pText, pIcon, pUser)
 Macro that is used to add item with user data menu definition. More...
 
#define _D4D_DECLARE_MENU_END()
 Macro that is used to close the item list for menu definition. More...
 
#define D4D_DECLARE_MENU_END(name)
 Macro that is used to close the item list for menu definition. More...
 
#define D4D_DECLARE_MENU_BEGIN(name, title_text, title_font, x, y, cx, cy, flags, pScheme, indexFontId, itemsFontId, posCnt, menuItemsOff, pIcon, pUser, pOnClick, pOnUsrMsg)
 Macro that create the Menu object structure in memory including all substructures with restricted count of parameters to simplify definition. More...
 
#define D4D_DECLARE_STD_MENU_BEGIN(name, title_text, title_font, x, y, cx, cy, indexFontId, itemsFontId, pIcon, pOnClick)
 Macro that create the Menu object structure in memory including all substructures with restricted count of parameters to simplify definition The missing parameters are replaced by default values. More...
 
#define D4D_DECLARE_RMENU_BEGIN(name, title_text, title_font, x, y, cx, cy, radius, flags, pScheme, indexFontId, itemsFontId, posCnt, menuItemsOff, pIcon, pUser, pOnClick, pOnUsrMsg)
 Macro that create the rounded Menu object structure in memory including all substructures with restricted count of parameters to simplify definition. More...
 
#define D4D_DECLARE_STD_RMENU_BEGIN(name, title_text, title_font, x, y, cx, cy, radius, indexFontId, itemsFontId, pIcon, pOnClick)
 Macro that create the rounded Menu object structure in memory including all substructures with restricted count of parameters to simplify definition The missing parameters are replaced by default values. More...
 
#define D4D_DECLARE_MENU_BEGIN_INRAM(name, title_text, title_font, x, y, cx, cy, flags, pScheme, indexFontId, itemsFontId, posCnt, menuItemsOff, pIcon, pUser, pOnClick, pOnUsrMsg)
 Same as D4D_DECLARE_MENU_BEGIN, but is created in RAM instead of the ROM memory. More...
 
#define D4D_DECLARE_STD_MENU_BEGIN_INRAM(name, title_text, title_font, x, y, cx, cy, IndexFontId, ItemsFontId, pIcon, pOnClick)
 Same as D4D_DECLARE_STD_MENU_BEGIN, but is created in RAM instead of the ROM memory. More...
 
#define D4D_DECLARE_RMENU_BEGIN_INRAM(name, title_text, title_font, x, y, cx, cy, radius, flags, pScheme, indexFontId, itemsFontId, posCnt, menuItemsOff, pIcon, pUser, pOnClick, pOnUsrMsg)
 Same as D4D_DECLARE_RMENU_BEGIN, but is created in RAM instead of the ROM memory. More...
 
#define D4D_DECLARE_STD_RMENU_BEGIN_INRAM(name, title_text, title_font, x, y, cx, cy, radius, IndexFontId, ItemsFontId, pIcon, pOnClick)
 Same as D4D_DECLARE_STD_RMENU_BEGIN, but is created in RAM instead of the ROM memory. More...
 

Detailed Description

This section specifies the exact usage for each API macro.

Macro Definition Documentation

#define _D4D_DECLARE_MENU_BEGIN (   type,
  name,
  title_text,
  title_font,
  x,
  y,
  cx,
  cy,
  radius,
  pMargin,
  pParent,
  flags,
  pScheme,
  indexFontId,
  itemsFontId,
  posCnt,
  menuItemsOff,
  pIcon,
  pUser,
  pOnClick,
  pOnUsrMsg 
)

Macro that create the Menu object structure in memory including all substructures.

Parameters
type- type of object <D4D_CONST; D4D_NO_CONST>
name- name of menu object
title_text- title text
title_font- title text font id
x- coordination of menu in X axis
y- coordination of menu in Y axis
cx- size of menu in X axis (width)
cy- size of menu in Y axis (height) (with hidden list box)
radius- radius of corners
pMargin- pointer to margin structure (*D4D_MARGIN)(Could be NULL)
pParent- pointer to parent object (Could be NULL)
flags- bitmask that specifies initial D4D OBJECT Defines masks of object behaviour flags and D4D MENU Defines masks of menu specific behaviour flags
pScheme- pointer to color scheme. In case that this parameter is NULL, the default scheme color will be used for draw menu
indexFontId- identification number of the used index text font
itemsFontId- identification number of the used item text font
posCnt- count of visible positions
menuItemsOff- offset between the individual items in pixels
pIcon- pointer to D4D_BMP structure to title
pUser- user data of menu
pOnClick- Pointer to an on-click user callback function D4D_MENU_ON_CLICK
pOnUsrMsg-Pointer to an on user message callback function D4D_ON_USR_MSG. This callback is called before this message event is sent to the object itself. The message can be skipped by the D4D_MSG_SKIP return value, in a normal case the return value must be D4D_MSG_NOSKIP
Note
This macro create complete D4D_MENU structure, including the object data sub structure. Is used to define all properties of menu. It must be followed by D4D_DECLARE_MENU_ITEM or D4D_DECLARE_MENU_ITEM_FULL or at least D4D_DECLARE_MENU_END.

Definition at line 235 of file d4d_menu.h.

#define _D4D_DECLARE_MENU_END ( )

Macro that is used to close the item list for menu definition.

Note
This macro is used after the menu items declaration to close the list of items Here is an example demonstrating how to used it.
* D4D_DECLARE_STD_RMENU_AUTOSIZE_BEGIN(my_menu, D4D_DEFSTR("My Menu"), MU_BIG_FONT, 10, 10, 100, 120, 6, MY_SMALL_FONT, MY_FONT, &my_icon, NULL)
* D4D_DECLARE_MENU_ITEM(D4D_DEFSTR("My Item1"), &myIcon1, 0)
* D4D_DECLARE_MENU_ITEM(D4D_DEFSTR("My Item2"), &myIcon2, 1)
*

Definition at line 305 of file d4d_menu.h.

#define D4D_DECLARE_MENU_BEGIN (   name,
  title_text,
  title_font,
  x,
  y,
  cx,
  cy,
  flags,
  pScheme,
  indexFontId,
  itemsFontId,
  posCnt,
  menuItemsOff,
  pIcon,
  pUser,
  pOnClick,
  pOnUsrMsg 
)

Macro that create the Menu object structure in memory including all substructures with restricted count of parameters to simplify definition.

Parameters
name- name of menu object
title_text- title text
title_font- title text font id
x- coordination of menu in X axis
y- coordination of menu in Y axis
cx- size of menu in X axis (width)
cy- size of menu in Y axis (height) (with hidden list box)
flags- bitmask that specifies initial D4D OBJECT Defines masks of object behaviour flags and D4D MENU Defines masks of menu specific behaviour flags
pScheme- pointer to color scheme. In case that this parameter is NULL, the default scheme color will be used for draw menu
indexFontId- identification number of the used index text font
itemsFontId- identification number of the used item text font
posCnt- count of visible positions
menuItemsOff- offset between the individual items in pixels
pIcon- pointer to D4D_BMP structure to title
pUser- user data of menu
pOnClick- Pointer to an on-click user callback function D4D_MENU_ON_CLICK
pOnUsrMsg-Pointer to an on user message callback function D4D_ON_USR_MSG. This callback is called before this message event is sent to the object itself. The message can be skipped by the D4D_MSG_SKIP return value, in a normal case the return value must be D4D_MSG_NOSKIP
Note
This macro create complete D4D_MENU structure, including the object data sub structure. Is used to define all properties of menu. If there is missing parameter that is needed by user application used the full macro _D4D_DECLARE_MENU_BEGIN instead of this one. It must be followed by D4D_DECLARE_MENU_ITEM or D4D_DECLARE_MENU_ITEM_FULL or at least D4D_DECLARE_MENU_END.

Definition at line 348 of file d4d_menu.h.

#define D4D_DECLARE_MENU_BEGIN_INRAM (   name,
  title_text,
  title_font,
  x,
  y,
  cx,
  cy,
  flags,
  pScheme,
  indexFontId,
  itemsFontId,
  posCnt,
  menuItemsOff,
  pIcon,
  pUser,
  pOnClick,
  pOnUsrMsg 
)

Same as D4D_DECLARE_MENU_BEGIN, but is created in RAM instead of the ROM memory.

Definition at line 442 of file d4d_menu.h.

#define D4D_DECLARE_MENU_END (   name)

Macro that is used to close the item list for menu definition.

Note
This macro is used after the menu items declaration to close the list of items Here is an example demonstrating how to used it. This is obsolete macro, the parameter is not needed. It can be used _D4D_DECLARE_MENU_END() instead of.
* D4D_DECLARE_STD_RMENU_AUTOSIZE_BEGIN(my_menu, D4D_DEFSTR("My Menu"), MU_BIG_FONT, 10, 10, 100, 120, 6, MY_SMALL_FONT, MY_FONT, &my_icon, NULL)
* D4D_DECLARE_MENU_ITEM(D4D_DEFSTR("My Item1"), &myIcon1, 0)
* D4D_DECLARE_MENU_ITEM(D4D_DEFSTR("My Item2"), &myIcon2, 1)
*

Definition at line 319 of file d4d_menu.h.

#define D4D_DECLARE_MENU_ITEM (   pText,
  pIcon 
)

Macro that is used to add item to menu definition.

Parameters
pText- text of item
pIcon- pointer to item icon bitmap
Note
This macro is used after the menu declaration to add new item Here is an example demonstrating how to used it.
* D4D_DECLARE_STD_RMENU_AUTOSIZE_BEGIN(my_menu, D4D_DEFSTR("My Menu"), MU_BIG_FONT, 10, 10, 100, 120, 6, MY_SMALL_FONT, MY_FONT, &my_icon, NULL)
* D4D_DECLARE_MENU_ITEM(D4D_DEFSTR("My Item1"), &myIcon1)
* D4D_DECLARE_MENU_ITEM(D4D_DEFSTR("My Item2"), &myIcon2)
*

Definition at line 276 of file d4d_menu.h.

#define D4D_DECLARE_MENU_ITEM_FULL (   pText,
  pIcon,
  pUser 
)

Macro that is used to add item with user data menu definition.

Parameters
pText- text of item
pIcon- pointer to item icon bitmap
pUser- pointer to user data
Note
This macro is used after the menu declaration to add new item with user data Here is an example demonstrating how to used it.
* D4D_DECLARE_STD_RMENU_AUTOSIZE_BEGIN(my_menu, D4D_DEFSTR("My Menu"), MU_BIG_FONT, 10, 10, 100, 120, 6, MY_SMALL_FONT, MY_FONT, &my_icon, NULL)
* D4D_DECLARE_MENU_ITEM(D4D_DEFSTR("My Item1"), &myIcon1, 0)
* D4D_DECLARE_MENU_ITEM(D4D_DEFSTR("My Item2"), &myIcon2, 1)
*

Definition at line 292 of file d4d_menu.h.

#define D4D_DECLARE_RMENU_BEGIN (   name,
  title_text,
  title_font,
  x,
  y,
  cx,
  cy,
  radius,
  flags,
  pScheme,
  indexFontId,
  itemsFontId,
  posCnt,
  menuItemsOff,
  pIcon,
  pUser,
  pOnClick,
  pOnUsrMsg 
)

Macro that create the rounded Menu object structure in memory including all substructures with restricted count of parameters to simplify definition.

Parameters
name- name of menu object
title_text- title text
title_font- title text font id
x- coordination of menu in X axis
y- coordination of menu in Y axis
cx- size of menu in X axis (width)
cy- size of menu in Y axis (height) (with hidden list box)
radius- radius of corners
flags- bitmask that specifies initial D4D OBJECT Defines masks of object behaviour flags and D4D MENU Defines masks of menu specific behaviour flags
pScheme- pointer to color scheme. In case that this parameter is NULL, the default scheme color will be used for draw menu
indexFontId- identification number of the used index text font
itemsFontId- identification number of the used item text font
posCnt- count of visible positions
menuItemsOff- offset between the individual items in pixels
pIcon- pointer to D4D_BMP structure to title
pUser- user data of menu
pOnClick- Pointer to an on-click user callback function D4D_MENU_ON_CLICK
pOnUsrMsg-Pointer to an on user message callback function D4D_ON_USR_MSG. This callback is called before this message event is sent to the object itself. The message can be skipped by the D4D_MSG_SKIP return value, in a normal case the return value must be D4D_MSG_NOSKIP
Note
This macro create complete D4D_MENU structure, including the object data sub structure. Is used to define all properties of menu. If there is missing parameter that is needed by user application used the full macro _D4D_DECLARE_MENU_BEGIN instead of this one. It must be followed by D4D_DECLARE_MENU_ITEM or D4D_DECLARE_MENU_ITEM_FULL or at least D4D_DECLARE_MENU_END.

Definition at line 405 of file d4d_menu.h.

#define D4D_DECLARE_RMENU_BEGIN_INRAM (   name,
  title_text,
  title_font,
  x,
  y,
  cx,
  cy,
  radius,
  flags,
  pScheme,
  indexFontId,
  itemsFontId,
  posCnt,
  menuItemsOff,
  pIcon,
  pUser,
  pOnClick,
  pOnUsrMsg 
)

Same as D4D_DECLARE_RMENU_BEGIN, but is created in RAM instead of the ROM memory.

Definition at line 460 of file d4d_menu.h.

#define D4D_DECLARE_STD_MENU_BEGIN (   name,
  title_text,
  title_font,
  x,
  y,
  cx,
  cy,
  indexFontId,
  itemsFontId,
  pIcon,
  pOnClick 
)

Macro that create the Menu object structure in memory including all substructures with restricted count of parameters to simplify definition The missing parameters are replaced by default values.

Parameters
name- name of menu object
title_text- title text
title_font- title text font id
x- coordination of menu in X axis
y- coordination of menu in Y axis
cx- size of menu in X axis (width)
cy- size of menu in Y axis (height) (with hidden list box)
indexFontId- identification number of the used index text font
itemsFontId- identification number of the used item text font
pIcon- pointer to D4D_BMP structure to title
pOnClick- Pointer to an on-click user callback function D4D_MENU_ON_CLICK
Note
This macro create complete D4D_MENU structure, including the object data sub structure. Is used to define all properties of menu. If there is missing parameter that is needed by user application used the full macro _D4D_DECLARE_MENU_BEGIN instead of this one. The main advantage is less parameters of this macro against the full version. It must be followed by D4D_DECLARE_MENU_ITEM or D4D_DECLARE_MENU_ITEM_FULL or at least D4D_DECLARE_MENU_END.

Definition at line 373 of file d4d_menu.h.

#define D4D_DECLARE_STD_MENU_BEGIN_INRAM (   name,
  title_text,
  title_font,
  x,
  y,
  cx,
  cy,
  IndexFontId,
  ItemsFontId,
  pIcon,
  pOnClick 
)

Same as D4D_DECLARE_STD_MENU_BEGIN, but is created in RAM instead of the ROM memory.

Definition at line 451 of file d4d_menu.h.

#define D4D_DECLARE_STD_RMENU_BEGIN (   name,
  title_text,
  title_font,
  x,
  y,
  cx,
  cy,
  radius,
  indexFontId,
  itemsFontId,
  pIcon,
  pOnClick 
)

Macro that create the rounded Menu object structure in memory including all substructures with restricted count of parameters to simplify definition The missing parameters are replaced by default values.

Parameters
name- name of menu object
title_text- title text
title_font- title text font id
x- coordination of menu in X axis
y- coordination of menu in Y axis
cx- size of menu in X axis (width)
cy- size of menu in Y axis (height) (with hidden list box)
radius- radius of corners
indexFontId- identification number of the used index text font
itemsFontId- identification number of the used item text font
pIcon- pointer to D4D_BMP structure to title
pOnClick- Pointer to an on-click user callback function D4D_MENU_ON_CLICK
Note
This macro create complete D4D_MENU structure, including the object data sub structure. Is used to define all properties of menu. If there is missing parameter that is needed by user application used the full macro _D4D_DECLARE_MENU_BEGIN instead of this one. The main advantage is less parameters of this macro against the full version. It must be followed by D4D_DECLARE_MENU_ITEM or D4D_DECLARE_MENU_ITEM_FULL or at least D4D_DECLARE_MENU_END.

Definition at line 433 of file d4d_menu.h.

#define D4D_DECLARE_STD_RMENU_BEGIN_INRAM (   name,
  title_text,
  title_font,
  x,
  y,
  cx,
  cy,
  radius,
  IndexFontId,
  ItemsFontId,
  pIcon,
  pOnClick 
)

Same as D4D_DECLARE_STD_RMENU_BEGIN, but is created in RAM instead of the ROM memory.

Definition at line 470 of file d4d_menu.h.