Show / Hide Table of Contents

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 Source

OnCommand(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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX