Cafu Engine
UpdateGuiFixture.hpp
1 /*
2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
6 
7 #ifndef CAFU_MODELEDITOR_UPDATE_GUI_FIXTURE_HPP_INCLUDED
8 #define CAFU_MODELEDITOR_UPDATE_GUI_FIXTURE_HPP_INCLUDED
9 
10 #include "../../CommandPattern.hpp"
11 #include "Models/Model_cmdl.hpp"
12 
13 
14 namespace ModelEditor
15 {
16  class ModelDocumentT;
17 
19  {
20  public:
21 
22  CommandUpdateGuiFixtureT(ModelDocumentT* ModelDoc, unsigned int GFNr, const CafuModelT::GuiFixtureT& GF);
23 
24  // CommandT implementation.
25  bool Do();
26  void Undo();
27  wxString GetName() const;
28 
29 
30  private:
31 
32  ModelDocumentT* m_ModelDoc;
33  const unsigned int m_GFNr;
34  const CafuModelT::GuiFixtureT m_NewGF;
35  const CafuModelT::GuiFixtureT m_OldGF;
36  };
37 }
38 
39 #endif
bool Do()
This method executes the command.
Definition: UpdateGuiFixture.cpp:24
Definition: UpdateGuiFixture.hpp:18
wxString GetName() const
Returns the name (a description) of the command.
Definition: UpdateGuiFixture.cpp:66
This class represents a general command for implementing modifications to the applications document...
Definition: CommandPattern.hpp:30
void Undo()
This method un-does the command.
Definition: UpdateGuiFixture.cpp:52
This struct defines how and where a GUI can be fixed to the model.
Definition: Model_cmdl.hpp:156
Definition: ModelDocument.hpp:30