Subclass of GenericMainMenu that constructs the commands for this plugin.
More...
#include <MainMenu.h>
List of all members.
Public Member Functions |
| MainMenu (SmartPointer< GenericDialog > &setScaleDialog, SmartPointer< GenericDialog > &getInfoDialog, SmartPointer< GenericDialog > &genFuncDialog) |
| Constructor.
|
| ~MainMenu () |
| Destructor.
|
void | CommandMeshVisitor (const std::string &commandString) |
| Callback common to all of the commands that trigger a processing by mesh visitor when selected.
|
void | CommandHelp (const std::string &commandString) |
| Callback triggered when the Help menu entry is selected.
|
void | CommandAbout (const std::string &commandString) |
| Callback triggered when the About menu entry is selected.
|
Public Member Functions inherited from GenericMainMenu |
virtual void | Dispatch (const char *command) |
| Invoke the handler for the given command token.
|
virtual void | CommandDialogShow (const std::string &commandString) |
| Handle a command that summons a dialog window.
|
const std::string & | GetCommandList () const |
| Get the command list for the plugin menu, as a semicolon-separated string of tokens representing each command.
|
const std::string & | GetCommandLabelList () const |
| Get the command label list for the plugin menu, as a semicolon-separated string of labels to appear in the menu.
|
| RefCounted () |
| Default constructor.
|
virtual | ~RefCounted () |
| Virtual destructor.
|
void | IncRef () |
| Increment reference count.
|
void | DecRef () |
| Decrement reference count, and self-delete if count is <= 0.
|
Private Types |
typedef std::map< std::string,
SmartPointer< MeshVisitor > > | VisitorMap |
| Type for a map between a string and a reference-counted visitor.
|
Private Member Functions |
void | AddMeshVisitorEntry (const char *commandLabel, const char *command, const SmartPointer< MeshVisitor > &visitor) |
| Register a mesh visitor to be used to implement a specified command.
|
Additional Inherited Members |
Protected Types inherited from GenericMainMenu |
typedef Callback1< const
std::string &, void > | CommandCallback |
| Function signature for a menu command callback.
|
Protected Member Functions inherited from GenericMainMenu |
| GenericMainMenu () |
| Default constructor.
|
virtual | ~GenericMainMenu () |
| Virtual destructor.
|
virtual void | BeginEntries () |
| Invoked before beginning construction of the command list (by subsequent Add* invocations).
|
virtual void | AddSeparator () |
| Append a command-group separator to the command list.
|
virtual std::string | AddEntry (const char *commandLabel, const char *command, const CommandCallback &commandCallback) |
| Append a command to the command list that will trigger a callback function when the menu entry is selected.
|
virtual void | AddDialogShowEntry (const char *commandLabel, const char *command, const SmartPointer< GenericDialog > &dialog) |
| Append a command to the command list that will summon a dialog when the menu entry is selected.
|
virtual void | EndEntries () |
| Invoked after ending construction of the command list.
|
Detailed Description
Subclass of GenericMainMenu that constructs the commands for this plugin.
Constructor & Destructor Documentation
Constructor.
Instantiate the command callbacks and construct the command list.
- Parameters:
-
setScaleDialog | Reference-counted handle on the Set S/T Scale dialog. |
getInfoDialog | Reference-counted handle on the Get Info dialog. |
genFuncDialog | Reference-counted handle on the General Function dialog. |
Member Function Documentation
void MainMenu::AddMeshVisitorEntry |
( |
const char * |
commandLabel, |
|
|
const char * |
command, |
|
|
const SmartPointer< MeshVisitor > & |
visitor |
|
) |
| |
|
private |
Register a mesh visitor to be used to implement a specified command.
- Parameters:
-
commandLabel | The command label. |
command | The command token. |
visitor | The mesh visitor. |
void MainMenu::CommandAbout |
( |
const std::string & |
commandString | ) |
|
Callback triggered when the About menu entry is selected.
- Parameters:
-
commandString | The command token. |
void MainMenu::CommandHelp |
( |
const std::string & |
commandString | ) |
|
Callback triggered when the Help menu entry is selected.
- Parameters:
-
commandString | The command token. |
void MainMenu::CommandMeshVisitor |
( |
const std::string & |
commandString | ) |
|
Callback common to all of the commands that trigger a processing by mesh visitor when selected.
This callback does its own internal dispatch to distinctly handle the various commands.
- Parameters:
-
commandString | The command token. |
Member Data Documentation
Callback for all of the commands that trigger CommandMeshVisitor.
This is stored in a member var rather than a local var just because otherwise it would need to be passed around and clutter up an already ugly set of invocations.
The documentation for this class was generated from the following files: