Cafu Engine
AddComponent.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_GUIEDITOR_COMMAND_ADD_COMPONENT_HPP_INCLUDED
8 #define CAFU_GUIEDITOR_COMMAND_ADD_COMPONENT_HPP_INCLUDED
9 
10 #include "../../CommandPattern.hpp"
11 #include "Templates/Pointer.hpp"
12 
13 
14 namespace cf { namespace GuiSys { class ComponentBaseT; } }
15 namespace cf { namespace GuiSys { class WindowT; } }
16 
17 
18 namespace GuiEditor
19 {
20  class GuiDocumentT;
21 
23  {
24  public:
25 
27 
28  // CommandT implementation.
29  bool Do();
30  void Undo();
31  wxString GetName() const;
32 
33 
34  private:
35 
36  GuiDocumentT* m_GuiDocument;
39  const unsigned long m_Index;
40  };
41 }
42 
43 #endif
bool Do()
This method executes the command.
Definition: AddComponent.cpp:28
Definition: AddComponent.hpp:22
void Undo()
This method un-does the command.
Definition: AddComponent.cpp:43
Definition: GuiDocument.hpp:39
This class represents a general command for implementing modifications to the applications document...
Definition: CommandPattern.hpp:30
wxString GetName() const
Returns the name (a description) of the command.
Definition: AddComponent.cpp:57