Class InnerMenuFactory
Provides functionality for creating, managing, and interacting with menus, including context menus, main menus, and menu items.
public class InnerMenuFactory : DisposableObject, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IDisposableObject, IDisposable, IBaseObject, IMenuFactory
- Inheritance
-
InnerMenuFactory
- Implements
- Derived
Remarks
The InnerMenuFactory class implements the IMenuFactory interface, offering methods to create and destroy menus and menu items, as well as to configure their properties such as text, shortcuts, and submenus. It also provides event handling for menu interactions, such as clicks, highlights, and open/close events.
This class is designed to be extensible, allowing derived classes to override its virtual methods to customize behavior. It also inherits from DisposableObject, ensuring proper resource management.
Methods
- CoercePosition(PointD?, ref AbstractControl)
Calculates the position of a point relative to the platform control, adjusting for nested control locations as necessary. Control references are updated to point to the platform control.
- RaiseMenuClosed(StringEventArgs)
Calls the RaiseClosed() method if instance specified by
argsis MenuItem. Calls the RaiseClosing(EventArgs, bool) method if instance specified byargsis ContextMenu.
- RaiseMenuHighlight(StringEventArgs)
Calls the RaiseHighlighted() method of the MenuItem instance specified by
args.
- RaiseMenuOpened(StringEventArgs)
Calls the RaiseOpened() method of the MenuItem instance specified by
args.
- SetMainMenu(Window, MainMenu?)
Sets the main menu for the specified window.
- Show(ContextMenu, AbstractControl, PointD?, Action?)
Show menu on screen.