find/replace kind of working

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@299 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-04-23 22:25:14 +00:00
parent 5b89617148
commit 89ce208198
16 changed files with 199 additions and 69 deletions
+23
View File
@@ -94,6 +94,29 @@ class TextToggleReminderAction : public ValueAction {
Char old; ///< Old value of the <kw- tag
};
// ----------------------------------------------------------------------------- : Replace all
/// A TextValueAction without the start and end stuff
class SimpleTextValueAction : public ValueAction {
public:
SimpleTextValueAction(const TextValueP& value, const Defaultable<String>& new_value);
virtual void perform(bool to_undo);
bool merge(const SimpleTextValueAction& action);
private:
Defaultable<String> new_value;
};
/// An action from "Replace All"; just a bunch of value actions performed in sequence
class ReplaceAllAction : public Action {
public:
~ReplaceAllAction();
virtual String getName(bool to_undo) const;
virtual void perform(bool to_undo);
vector<SimpleTextValueAction> actions;
};
// ----------------------------------------------------------------------------- : Event
/// Notification that a script caused a value to change