|
| CommandReplaceMatT (MapDocumentT &MapDoc_, const ArrayT< MapElementT * > &Selection_, const wxString &Find_, const wxString &Replace_, ReplaceActionT Action_, bool MarkOnly_, bool SearchSelection, bool SearchBrushes, bool SearchBPatches, bool SearchHidden) |
| Constructor to replace or just mark materials in the current selection of the map document or all map objects. More...
|
|
const wxString & | GetResultString () const |
| Returns a string describing the result after the command has been run (that is, Do() has been called). More...
|
|
bool | Do () |
| This method executes the command. More...
|
|
void | Undo () |
| This method un-does the command. More...
|
|
wxString | GetName () const |
| Returns the name (a description) of the command. More...
|
|
Public Member Functions inherited from CommandT |
| CommandT (bool ShowInHistory=true, bool SuggestsSave=true) |
| The constructor. More...
|
|
virtual | ~CommandT () |
| The virtual destructor. More...
|
|
bool | ShowInHistory () const |
| Whether the command should be shown in the undo/redo history. More...
|
|
bool | SuggestsSave () const |
| Whether the command suggests to save the document when its closed and hasn't been saved between the command execution and the closing (selection changes for example don't suggest to save the document since no important changes have been made). More...
|
|
bool | IsDone () const |
| Whether the command has been executed. More...
|
|
unsigned long | GetID () const |
| Returns the commands unique ID. More...
|
|
Enumerator |
---|
ExactMatches |
Find and replace exact matches only.
|
PartialMatchesFull |
Find partial matches and replace the entire string.
|
PartialMatchesSubst |
Find partial matches and replace the matching portion.
|
CommandReplaceMatT::CommandReplaceMatT |
( |
MapDocumentT & |
MapDoc_, |
|
|
const ArrayT< MapElementT * > & |
Selection_, |
|
|
const wxString & |
Find_, |
|
|
const wxString & |
Replace_, |
|
|
ReplaceActionT |
Action_, |
|
|
bool |
MarkOnly_, |
|
|
bool |
SearchSelection, |
|
|
bool |
SearchBrushes, |
|
|
bool |
SearchBPatches, |
|
|
bool |
SearchHidden |
|
) |
| |
Constructor to replace or just mark materials in the current selection of the map document or all map objects.
- Parameters
-
MapDoc_ | The map document in which the replace/mark should be performed. |
Selection_ | The set of elements to apply the mark or replace to. |
Find_ | What should be found. |
Replace_ | What it should be replaced with. |
Action_ | The replace action to be taken. |
MarkOnly_ | Whether matches should be replaced or just marked. |
SearchSelection | Whether we should search the current selection or all objects. If this is true, the SearchBrushes, SearchBPatches and SearchHidden parameters have no effect. |
SearchBrushes | Whether brushes should be included in the search. Only effective if SearchSelection is false. |
SearchBPatches | Whether bezier patches should be included in the search. Only effective if SearchSelection is false. |
SearchHidden | Whether also hidden groups should be searched. Only effective if SearchSelection is false. |
bool CommandReplaceMatT::Do |
( |
| ) |
|
|
virtual |
This method executes the command.
- Returns
- true if the command succeeded, false if it failed.
Implements CommandT.
wxString CommandReplaceMatT::GetName |
( |
| ) |
const |
|
virtual |
Returns the name (a description) of the command.
Implements CommandT.
const wxString & CommandReplaceMatT::GetResultString |
( |
| ) |
const |
Returns a string describing the result after the command has been run (that is, Do() has been called).
Useful for user feedback after the first run.
void CommandReplaceMatT::Undo |
( |
| ) |
|
|
virtual |
This method un-does the command.
Implements CommandT.
The documentation for this class was generated from the following files:
- CaWE/MapEditor/Commands/ReplaceMat.hpp
- CaWE/MapEditor/Commands/ReplaceMat.cpp