MeshTex  3.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
MainMenu.h
Go to the documentation of this file.
1 
7 /*
8  * Copyright 2012 Joel Baxter
9  *
10  * This file is part of MeshTex.
11  *
12  * MeshTex is free software: you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation, either version 3 of the License, or
15  * (at your option) any later version.
16  *
17  * MeshTex is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with MeshTex. If not, see <http://www.gnu.org/licenses/>.
24  */
25 
26 #if !defined(INCLUDED_MAINMENU_H)
27 #define INCLUDED_MAINMENU_H
28 
29 #include "GenericMainMenu.h"
30 #include "MeshVisitor.h"
31 
37 class MainMenu : public GenericMainMenu
38 {
39 private: // private types
40 
48  {
49  public:
54  public:
55  PresetFuncVisitor(const VisitorFunctor& visitorFunctor,
57  private:
58  bool Execute(MeshEntity& meshEntity) const;
59 
60  private:
61  const VisitorFunctor _visitorFunctor;
63  };
64 
65 public: // public methods
66 
67  MainMenu(SmartPointer<GenericDialog>& setScaleDialog,
68  SmartPointer<GenericDialog>& getInfoDialog,
69  SmartPointer<GenericDialog>& genFuncDialog);
70  ~MainMenu();
71  void CommandMeshVisitor(const std::string& commandString);
72  void CommandHelp(const std::string& commandString);
73  void CommandAbout(const std::string& commandString);
74 
75 private: // private methods
76 
77  void AddMeshVisitorEntry(const char *commandLabel,
78  const char *command,
79  const SmartPointer<MeshVisitor>& visitor);
80 
81 private: // private types
82 
86  typedef std::map<std::string, SmartPointer<MeshVisitor> > VisitorMap;
87 
88 private:
89 
94 
103 };
104 
105 #endif // #if !defined(INCLUDED_MAINMENU_H)