Cafu Engine
Delete.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_DELETE_HPP_INCLUDED
8 #define CAFU_GUIEDITOR_COMMAND_DELETE_HPP_INCLUDED
9 
10 #include "../../CommandPattern.hpp"
11 #include "Templates/Pointer.hpp"
12 
13 
14 namespace cf { namespace GuiSys { class WindowT; } }
15 
16 
17 namespace GuiEditor
18 {
19  class CommandSelectT;
20  class GuiDocumentT;
21 
22 
23  class CommandDeleteT : public CommandT
24  {
25  public:
26 
29  ~CommandDeleteT();
30 
31  // CommandT implementation.
32  bool Do();
33  void Undo();
34  wxString GetName() const;
35 
36 
37  private:
38 
39  GuiDocumentT* m_GuiDocument;
40 
43  ArrayT<unsigned long> m_Indices;
44  CommandSelectT* m_CommandSelect; ///< The command that unselects all windows before they are deleted.
45  };
46 }
47 
48 #endif
Definition: Delete.hpp:23
bool Do()
This method executes the command.
Definition: Delete.cpp:59
wxString GetName() const
Returns the name (a description) of the command.
Definition: Delete.cpp:113
Definition: Select.hpp:21
void Undo()
This method un-does the command.
Definition: Delete.cpp:90
Definition: Select.hpp:18
Definition: GuiDocument.hpp:39
This class represents a general command for implementing modifications to the applications document...
Definition: CommandPattern.hpp:30
Definition: Renderer.hpp:16