MeshTex  3.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
MainMenu Class Reference

Subclass of GenericMainMenu that constructs the commands for this plugin. More...

#include <MainMenu.h>

Inheritance diagram for MainMenu:
GenericMainMenu RefCounted

List of all members.

Classes

class  PresetFuncVisitor
 Visitor for invoking a function on a MeshEntity when that function does not require any arguments other than the texture axes. More...

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.
- Public Member Functions inherited from RefCounted
 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.

Private Attributes

VisitorMap _visitorMap
 Associations between commands and visitors that implement them.
const CommandCallbackMethod
< MainMenu,&MainMenu::CommandMeshVisitor
_commandMeshVisitor
 Callback for all of the commands that trigger CommandMeshVisitor.

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

MainMenu::MainMenu ( SmartPointer< GenericDialog > &  setScaleDialog,
SmartPointer< GenericDialog > &  getInfoDialog,
SmartPointer< GenericDialog > &  genFuncDialog 
)

Constructor.

Instantiate the command callbacks and construct the command list.

Parameters:
setScaleDialogReference-counted handle on the Set S/T Scale dialog.
getInfoDialogReference-counted handle on the Get Info dialog.
genFuncDialogReference-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:
commandLabelThe command label.
commandThe command token.
visitorThe mesh visitor.
void MainMenu::CommandAbout ( const std::string &  commandString)

Callback triggered when the About menu entry is selected.

Parameters:
commandStringThe command token.
void MainMenu::CommandHelp ( const std::string &  commandString)

Callback triggered when the Help menu entry is selected.

Parameters:
commandStringThe 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:
commandStringThe command token.

Member Data Documentation

const CommandCallbackMethod<MainMenu, &MainMenu::CommandMeshVisitor> MainMenu::_commandMeshVisitor
private

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: