Interface ICommandHandler
Objects that implement this interface can receive menu command. Usually used in calls to LoadMenuDefinition(String, Boolean, ICommandHandler) to specify the target object for that menu.
Namespace: CADability.UserInterface
Assembly: CADability.dll
Syntax
public interface ICommandHandler
Methods
| Improve this Doc View SourceOnCommand(String)
Process the command with the given MenuId. Return true if handled, false otherwise.
Declaration
bool OnCommand(string MenuId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | MenuId | Id of the menu command to be processed |
Returns
| Type | Description |
|---|---|
| System.Boolean | true, if handled, false otherwise |
OnSelected(MenuWithHandler, Boolean)
Notify that the menu item is being selected. No need to react on this notification
Declaration
void OnSelected(MenuWithHandler selectedMenu, bool selected)
Parameters
| Type | Name | Description |
|---|---|---|
| MenuWithHandler | selectedMenu | |
| System.Boolean | selected | true, if selected, false if deselected |
OnUpdateCommand(String, CommandState)
Update the command user interface of the given command. Return true if handled, false otherwise.
Declaration
bool OnUpdateCommand(string MenuId, CommandState CommandState)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | MenuId | Id of the menu command to be processed |
| CommandState | CommandState | State object to modify if appropriate |
Returns
| Type | Description |
|---|---|
| System.Boolean | true, if handled, false otherwise |