7 #ifndef CAFU_COMMAND_PATTERN_HPP_INCLUDED
8 #define CAFU_COMMAND_PATTERN_HPP_INCLUDED
14 #include "Templates/Array.hpp"
49 virtual void Undo()=0;
52 virtual wxString
GetName()
const=0;
101 virtual wxString
GetName()
const;
107 const wxString m_Name;
virtual wxString GetName() const =0
Returns the name (a description) of the command.
virtual ~CommandT()
The virtual destructor.
Definition: CommandPattern.hpp:42
const unsigned long m_ID
The commands unique ID.
Definition: CommandPattern.hpp:78
CommandT(bool ShowInHistory=true, bool SuggestsSave=true)
The constructor.
Definition: CommandPattern.cpp:18
bool m_Done
Whether the command has been executed.
Definition: CommandPattern.hpp:75
Definition: CommandPattern.hpp:91
const bool m_SuggestsSave
Whether the command suggests saving of the document on close.
Definition: CommandPattern.hpp:77
bool IsDone() const
Whether the command has been executed.
Definition: CommandPattern.hpp:67
virtual bool Do()
This method executes the command.
Definition: CommandPattern.cpp:49
virtual void Undo()
This method un-does the command.
Definition: CommandPattern.cpp:72
virtual void Undo()=0
This method un-does the command.
virtual bool Do()=0
This method executes the command.
unsigned long GetID() const
Returns the commands unique ID.
Definition: CommandPattern.hpp:70
bool SuggestsSave() const
Whether the command suggests to save the document when its closed and hasn't been saved between the c...
Definition: CommandPattern.hpp:64
virtual wxString GetName() const
Returns the name (a description) of the command.
Definition: CommandPattern.cpp:85
const bool m_ShowInHistory
Whether the command should have an entry in the undo/redo history.
Definition: CommandPattern.hpp:76
This class represents a general command for implementing modifications to the applications document...
Definition: CommandPattern.hpp:30
bool ShowInHistory() const
Whether the command should be shown in the undo/redo history.
Definition: CommandPattern.hpp:58