Specify the display contents and parameters of each list item in the list display.

Syntax

typedef struct {
  const char *listText;
  int paletteIndex;
  int showControl;
  bool checked;
  int userParam1;
  int userParam2;
  char userParam3[16];
} AL_ListItem;

Members

listText
Display string:
Specifies the string to display in the list item.
paletteIndex
Palette index:
Specify the display color of the list item with the pallete index. Specify 0 if you have not registered your own color palette.
showControl
Type of control:
Specify the type of control to add to this list item with one of the following values.
ValueDescription
AM_NO_CONTROLNo control is added.
AM_CHECK_BOXDisplays a check box in front of the display string.
AM_RADIO_BTNDisplays a radio button in front of the display string.

checked
checked attribute:
When the value of showControl is AM_CHECK_BOX or AM_RADIO_BTN, specifies the state of the radio button or check box. If true, the checked state is displayed, otherwise the unchecked state is displayed.
userParam1
int parameter for application program.
userParam2
int parameter for application program.
userParam3
16 bytes char array parameter for application program.

Remarks

When adding a list item to the list resource with AL_AddListItem function, define the list item in this structure. You can also add a list item with AL_AddListItemEx function without using this structure.

The data set in the list item can be obtained by AL_GetListItemData function.

userParam1, userParam2, and userParam3 of the list items can be freely used in the application program. The values of these parameters set by AL_AddListItem function or AL_AddListItemEx functions can be changed with AL_SetUserParam1 function, AL_SetUserParam2 function, or AL_SetUserParam3 function.

16 bytes char array of userParam3 can be set to any binary data, including NUL.

Requirements

Header file:
lib.h
AdvancedMenu.h

See also

Last updated: 2020/10/13