By deriving from this class (which includes ICommand and ICuiAction) and placing the DLL containing the implemented class in bin, 3ds Max will dynamically load an instance of this class as an action in its CUI interface.
When the action is executed, it will call ICommand.Execute().
This is an adapter class. A client only need to satisfy the ICuiActionCommand interface for their class to be loaded by the managed assembly loading process. However, this class is easier to use.
Public Member Functions |
|
virtual bool | CanExecute (object parameter) |
See ICommand.CanExecute() |
|
abstract void | Execute (object parameter) |
The method that is called when this action
is executed. |
|
Protected Member Functions |
|
virtual void | OnCanExecuteChanged (EventArgs args) |
This method will raise the CanExecuteChanged
event. |
|
Properties |
|
abstract string |
ActionText [get] |
The name of the action - to be used when
browsing a list of actions. |
|
abstract string |
Category [get] |
The name of the category to which this
action should belong. |
|
abstract string |
InternalActionText [get] |
This is internal text that is not used in
the user interface anywhere, but is used to uniquely identify the
action. |
|
abstract string |
InternalCategory [get] |
This is internal text that is not used in
the user interface anywhere, but is used to uniquely identify the
action category. |
|
virtual string |
ButtonText [get] |
The text that will be used if the action is
instantiated in a toolbar button. |
|
virtual string |
MenuText [get] |
The text that will be used if the action is
instantiated in the application menu or a quad-menu. |
|
virtual bool |
IsVisible [get] |
Marks whether this action should appear in a
menu. |
|
bool |
IsEnabled [get] |
Marks when this action should be available
for use. |
|
virtual bool |
IsChecked [get] |
Implement this method if the action is
"checked" (which means that the UI will show the button as pressed,
or the menu item as checked.) |
|
Events |
|
EventHandler | CanExecuteChanged |
The event that is raised when the value of
CanExecute changes. |
virtual bool MaxCustomControls::CuiActionCommandAdapter::CanExecute | ( | object | parameter | ) | [inline, virtual] |
See ICommand.CanExecute()
By default implementation is to return true.
virtual void MaxCustomControls::CuiActionCommandAdapter::OnCanExecuteChanged | ( | EventArgs | args | ) | [inline, protected, virtual] |
This method will raise the CanExecuteChanged event.
args | Should be EventArgs.Empty |
abstract void MaxCustomControls::CuiActionCommandAdapter::Execute | ( | object | parameter | ) | [pure virtual] |
The method that is called when this action is executed.
parameter | An optional parameter, usually null when called from the 3ds Max CUI system. |
abstract string
MaxCustomControls::CuiActionCommandAdapter::ActionText
[get] |
The name of the action - to be used when browsing a list of actions.
Required for ICuiAction.
Implements MaxCustomControls::ICuiAction.
abstract string
MaxCustomControls::CuiActionCommandAdapter::Category
[get] |
The name of the category to which this action should belong.
Required for ICuiAction.
Implements MaxCustomControls::ICuiAction.
abstract string
MaxCustomControls::CuiActionCommandAdapter::InternalActionText
[get] |
This is internal text that is not used in the user interface anywhere, but is used to uniquely identify the action.
This text should be identical across all localized versions of the product.
Required for ICuiAction.
Implements MaxCustomControls::ICuiAction.
abstract string
MaxCustomControls::CuiActionCommandAdapter::InternalCategory
[get] |
This is internal text that is not used in the user interface anywhere, but is used to uniquely identify the action category.
This text should be identical across all localized versions of the product.
Required for ICuiAction.
Implements MaxCustomControls::ICuiAction.
virtual string
MaxCustomControls::CuiActionCommandAdapter::ButtonText
[get] |
The text that will be used if the action is instantiated in a toolbar button.
By default implementation is to forward ActionText as the result.
Implements MaxCustomControls::ICuiAction.
virtual string
MaxCustomControls::CuiActionCommandAdapter::MenuText
[get] |
The text that will be used if the action is instantiated in the application menu or a quad-menu.
By default implementation is to forward ActionText as the result.
Implements MaxCustomControls::ICuiAction.
virtual bool
MaxCustomControls::CuiActionCommandAdapter::IsVisible
[get] |
Marks whether this action should appear in a menu.
This condition is evaluated whenever a menu is shown - meaning the result can be dynamic.
By default implementation is to return true.
Implements MaxCustomControls::ICuiAction.
bool
MaxCustomControls::CuiActionCommandAdapter::IsEnabled
[get] |
Marks when this action should be available for use.
This condition is evaluated whenever a menu is shown - meaning the result can be dynamic. If False, an item will appear "grayed out".
Implementation is to forward CanExecute(null) as the result. This implementation is non-virtual. To override the behaviour, override and implement CanExecute from the ICommand interface.
Implements MaxCustomControls::ICuiAction.
virtual bool
MaxCustomControls::CuiActionCommandAdapter::IsChecked
[get] |
Implement this method if the action is "checked" (which means that the UI will show the button as pressed, or the menu item as checked.)
By default implementation is to return false.
Implements MaxCustomControls::ICuiAction.
EventHandler MaxCustomControls::CuiActionCommandAdapter::CanExecuteChanged |
The event that is raised when the value of CanExecute changes.
Deriving classes can call OnCanExecuteChanged(EventArgs.Empty) to raise this event when appropriate.