MenuItemWidget

widget to draw menu item

Constructors

this
this(MenuItem item, bool mainMenu)

// call to update state for action (if action is assigned for widget)

Members

Functions

layout
void layout(Rect rc)

Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).

measure
void measure(int parentWidth, int parentHeight)

Measure widget according to desired width and height constraints. (Step 1 of two phase layout).

measureSubitems
void measureSubitems(int maxLabelWidth, int maxHeight, int maxIconWidth, int maxAccelWidth)
Undocumented in source. Be warned that the author may not have intended to support it.
setSubitemSizes
void setSubitemSizes(int maxLabelWidth, int maxHeight, int maxIconWidth, int maxAccelWidth)
Undocumented in source. Be warned that the author may not have intended to support it.
updateState
void updateState()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

item
MenuItem item [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_accel
TextWidget _accel;
Undocumented in source.
_accelWidth
int _accelWidth;
Undocumented in source.
_height
int _height;
Undocumented in source.
_icon
ImageWidget _icon;
Undocumented in source.
_iconWidth
int _iconWidth;
Undocumented in source.
_item
MenuItem _item;
Undocumented in source.
_label
TextWidget _label;
Undocumented in source.
_labelWidth
int _labelWidth;
Undocumented in source.
_mainMenu
bool _mainMenu;
Undocumented in source.

Inherited Members

From WidgetGroupDefaultDrawing

onDraw
void onDraw(DrawBuf buf)

Draw widget at its position to buffer

Meta