class
MenuItemManager
Tracks main menu items that are registered in managed code using the MenuItem attribute.
Public
Constructors
MenuItemManager
Methods
~MenuItemManager
staticInstance
Returns a reference to the module instance.
Module has to have been started up first otherwise an exception will be thrown.
staticInstancePtr
Returns a pointer to the module instance.
Module has to have been started up first otherwise an exception will be thrown.
staticShutDown
Shuts down this module and frees any resources it is using.
staticIsStarted
Query if the module has been started.
Protected
Methods
~Module<T>
OnStartUp
Override if you want your module to be notified once it has been constructed and started.
OnShutDown
Override if you want your module to be notified just before it is deleted.
staticInstanceInternal
Returns a singleton instance of this module.
Private
Methods
ClearMenuItems
Removes all managed menu items from the main menu.
ReloadAssemblyData
Reloads all assembly types and attempts to find uses of MenuItem.
Old menu items are cleared and new are added.
ParseMenuItemMethod
Parse the provided method and detect whether it has a MenuItem attribute.
If it has extract needed data from it.
- method
- Managed method to parse.
- path
- Output path defined in the MenuItem attribute.
- shortcut
- Shortcut key defined in the MenuItem attribute.
- priority
- Menu item priority defined in the MenuItem attribute.
- separator
- Should the separator be inserted before the menu item.
Returns: True if the method has a MenuItem attribute. If false is returned output parameters from this method are undefined.
staticMenuItemCallback
Triggered when one of the managed menu items is clicked.
- method
- Managed method that the MenuItem is referencing.