MainMenu

main menu (horizontal)

Constructors

this
this()
Undocumented in source.
this
this(MenuItem item)
Undocumented in source.

Members

Functions

activate
void activate()

request relayout of widget and its children bring focus to main menu, if not yet activated

close
void close()

closes this menu - ESC handling

deactivate
void deactivate(bool force)

close and remove focus, if activated

handleFocusChange
void handleFocusChange(bool focused, bool receivedFocusFromKeyboard)

override to handle focus changes

onKeyEvent
bool onKeyEvent(KeyEvent event)

list navigation using keys

onMenuItem
void onMenuItem(MenuItem item)
Undocumented in source. Be warned that the author may not have intended to support it.
performUndoSelection
void performUndoSelection()
Undocumented in source. Be warned that the author may not have intended to support it.
toggle
bool toggle()

activate or deactivate main menu, return true if it has been activated

updateActionState
void updateActionState(bool force)

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

Properties

activated
bool activated [@property getter]

return true if main menu is activated (focused or has open submenu)

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

get text flags (bit set of TextFlag enum values)

wantsKeyTracking
bool wantsKeyTracking [@property getter]

override and return true to track key events even when not focused

Variables

_menuTogglePreviousFocus
Widget _menuTogglePreviousFocus;
Undocumented in source.
_menuToggleState
int _menuToggleState;
Undocumented in source.

Inherited Members

From MenuWidgetBase

_parentMenu
MenuWidgetBase _parentMenu;
Undocumented in source.
_item
MenuItem _item;
Undocumented in source.
_openedMenu
PopupMenu _openedMenu;
Undocumented in source.
_openedPopup
PopupWidget _openedPopup;
Undocumented in source.
_openedPopupIndex
int _openedPopupIndex;
Undocumented in source.
menuItemClick
Signal!MenuItemClickHandler menuItemClick;

menu item click listener

menuItemAction
Signal!MenuItemActionHandler menuItemAction;

menu item action listener

onThemeChanged
void onThemeChanged()

handle theme change: e.g. reload some themed resources

menuItems
MenuItem menuItems [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
isMainMenu
bool isMainMenu [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
updateActionState
void updateActionState(bool force)

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

measure
void measure(int parentWidth, int parentHeight)

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

performUndoSelection
void performUndoSelection()
Undocumented in source. Be warned that the author may not have intended to support it.
_lastClosedPopupTs
long _lastClosedPopupTs;
Undocumented in source.
_lastClosedPopupMenu
MenuItem _lastClosedPopupMenu;
Undocumented in source.
REOPEN_MENU_THRESHOLD_MS
enum REOPEN_MENU_THRESHOLD_MS;
Undocumented in source.
isRecentlyClosedItem
bool isRecentlyClosedItem(MenuItem item)
Undocumented in source. Be warned that the author may not have intended to support it.
onPopupClosed
void onPopupClosed(PopupWidget p)
Undocumented in source. Be warned that the author may not have intended to support it.
deactivate
void deactivate(bool force)
Undocumented in source. Be warned that the author may not have intended to support it.
openSubmenu
void openSubmenu(int index, MenuItemWidget itemWidget)
Undocumented in source. Be warned that the author may not have intended to support it.
MENU_OPEN_DELAY_MS
enum MENU_OPEN_DELAY_MS;
Undocumented in source.
_submenuOpenTimer
ulong _submenuOpenTimer;
Undocumented in source.
_submenuOpenItemIndex
int _submenuOpenItemIndex;
Undocumented in source.
scheduleOpenSubmenu
void scheduleOpenSubmenu(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
cancelOpenSubmenu
void cancelOpenSubmenu()
Undocumented in source. Be warned that the author may not have intended to support it.
onTimer
bool onTimer(ulong id)

handle timer; return true to repeat timer event after next interval, false cancel timer

_ignoreItemSelection
MenuItem _ignoreItemSelection;
Undocumented in source.
_selectionChangingInProgress
bool _selectionChangingInProgress;
Undocumented in source.
selectionChanged
void selectionChanged(int index, int previouslySelectedItem)

override to handle change of selection

handleMenuItemClick
void handleMenuItemClick(MenuItem item)
Undocumented in source. Be warned that the author may not have intended to support it.
onMenuItem
void onMenuItem(MenuItem item)
Undocumented in source. Be warned that the author may not have intended to support it.
selectedMenuItemWidget
MenuItemWidget selectedMenuItemWidget [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
itemClicked
void itemClicked(int index)

override to handle mouse up on item

thisPopup
PopupWidget thisPopup [@property getter]

returns popup this menu is located in

_menuToggleState
int _menuToggleState;
Undocumented in source.
_menuTogglePreviousFocus
Widget _menuTogglePreviousFocus;
Undocumented in source.
handleActionStateRequest
bool handleActionStateRequest(Action a)

override to handle specific actions state (e.g. change enabled state for supported actions)

onKeyEvent
bool onKeyEvent(KeyEvent event)

list navigation using keys

close
void close()

closes this menu - handle ESC key

findKeyAction
Action findKeyAction(uint keyCode, uint flags)

map key to action

Meta