The
FarMenuItemEx structure describes a single menu item.
An array of structures of this type is passed to the
Menu function.
In order to use the
FarMenuItemEx structure the
FMENU_USEEXT
flag should be set when the
Menu function is called.
Flags
Combination of the following values (the
FARMENUFLAGS enumeration):
| Flag | Description |
| MIF_SELECTED |
Denotes a selected menu item. Only one item can be selected. |
| MIF_CHECKED |
Denotes a checked menu item. Check sign will be shown near the item. |
| MIF_SEPARATOR |
The menu item is shown as delimiter.
Unlike in the FarMenuItem structure,
the delimiter can contain text. The text is center-aligned and is not selectable. |
| MIF_DISABLE |
Denotes a disabled menu item. |
| MIF_GRAYED |
If this flag is set, the menu item is shown, but cannot be selected. |
| MIF_HIDDEN |
If this flag is set, the menu item is not shown. |
| MIF_USETEXTPTR |
The menu item uses the Text.TextPtr field. |
Text.Text
The text of the menu item.
Text.TextPtr
A pointer to the menu item text.
Used in conjunction with the
MIF_USETEXTPTR flag,
if the
Text.Text array has insufficient size or
a string from a
language file is used, for example:
struct FarMenuItemEx Item;
Item.Flags=MIF_USETEXTPTR;
Item.Text.TextPtr=Info.GetMsg(Info.ModuleNumber,MFooItem);
AccelKey
The FAR Manager
key code
which will be used to activate the menu item. Example: in the "Commands" menu pressing
Ctrl-O is used to the select the "Panels On/Off" menu item.
As opposed to the
BreakKeys parameter of the
Menu
function, the
AccelKey field is analogous to the hotkey.
Reserved
Reserved for future use, should be set to 0.
UserData
User data associated with the menu item. FAR Manager does not use this field.