FarMenuItem

Far Manager

FarMenuItem

The FarMenuItem structure describes a single menu item. An array of these structures is passed to the Menu function to show a menu.
struct FarMenuItem
{
  char Text[128];
  int Selected;
  int Checked;
  int Separator;
};

Elements

Text
Item text.
Selected
Item selection flag. There must be only one item for which Selected is equal to 1.
Checked
If nonzero, a selection mark is displayed before the item text. If Checked is 1, the standard mark is displayed, otherwise the value of Checked is used as the mark character.
Separator
If nonzero, the menu item is displayed as a separator line. The other fields are ignored in this case.

Remarks

As the FarMenuItem.Text field is large, direct initialization of an array of FarMenuItem structures can significantly increase plugin size. To prevent this, the InitMenuItem non-standard structure can be used.

See also: