Muteki
EABI code execution on Besta® RTOS devices.
Loading...
Searching...
No Matches
menu_common.h File Reference

Menu type definitions that are shared among several menu implementations. More...

#include "../../common.h"

Go to the source code of this file.

Data Structures

struct  ui_menu_entry_s
 Menu entry struct used by various menu widgets. More...

Macros

#define UI_MENU_ENTRY_END   { .label_wide = _BUL(""), .event = 0, .attributes = 0 }
 End of menu entry record.

Typedefs

typedef struct ui_menu_entry_s ui_menu_entry_t
 Menu entry struct used by various menu widgets.

Enumerations

enum  ui_menu_entry_attribute_e {
  UI_MENU_ENTRY_ATTR_SEPARATOR_AFTER = 0x0001 , UI_CONTROLMENU_ENTRY_ATTR_BOLD_FONT = 0x0002 , UI_MENU_ENTRY_ATTR_SEPARATOR_BEFORE = 0x0004 , UI_CONTROLMENU_ENTRY_ATTR_VALUE_ITEM = 0x0080 ,
  UI_MENU_ENTRY_ATTR_ENCODING_CP950 = 0x0100 , UI_MENU_ENTRY_ATTR_ENCODING_CP936 = 0x0200 , UI_MENU_ENTRY_ATTR_ENCODING_CP949 = 0x0400 , UI_MENU_ENTRY_ATTR_DEFAULT = 0x1000
}
 Menu entry attribute flags. More...

Detailed Description

Menu type definitions that are shared among several menu implementations.

Typedef Documentation

◆ ui_menu_entry_t

Menu entry struct used by various menu widgets.

Normally should be used in an empty-record-terminated array. For example:

const ui_menu_entry_t MENU[] = {
{ .label_wide = _BUL("Item"), .event = 0x10000, .attributes = 0 },
{ .label_wide = _BUL(""), .event = 0, .attributes = 0 }, // or UI_MENU_ENTRY_END
};
#define _BUL(x)
Besta UTF-16 string literal.
Definition common.h:61
struct ui_menu_entry_s ui_menu_entry_t
Menu entry struct used by various menu widgets.

ui_menu_entry_s::attributes defines extra attributes that apply to the menu entries. Some attributes are exclusive to certain subtype of menu widgets.

Enumeration Type Documentation

◆ ui_menu_entry_attribute_e

Menu entry attribute flags.

Enumerator
UI_MENU_ENTRY_ATTR_SEPARATOR_AFTER 

Put separator after current item.

UI_CONTROLMENU_ENTRY_ATTR_BOLD_FONT 

Render the widget label using bold font.

Use ::SERIF_BOLD_CJK in place of the usual ::SERIF_CJK font when rendering the label.

Note
This attribute only takes effect when the user of the entry item is a ui_controlmenu_t. It will be ignored otherwise.
UI_MENU_ENTRY_ATTR_SEPARATOR_BEFORE 

Put separator before current item.

UI_CONTROLMENU_ENTRY_ATTR_VALUE_ITEM 

Item can be selected as a control menu value.

Only items with this flag can be selected as a value. Otherwise selecting the item will only emit an event.

Note
This attribute only takes effect when the user of the entry item is a ui_controlmenu_t. It will be ignored otherwise.
UI_MENU_ENTRY_ATTR_ENCODING_CP950 

Label uses 8-bit encoding with codepage CP950.

UI_MENU_ENTRY_ATTR_ENCODING_CP936 

Label uses 8-bit encoding with codepage CP936.

UI_MENU_ENTRY_ATTR_ENCODING_CP949 

Label uses 8-bit encoding with codepage CP949.

UI_MENU_ENTRY_ATTR_DEFAULT 

Default selection.

Make this item (or the last item that had this bit set) the default selection. Prioritized over the default item selected by PopUpList().