added 'undone' parameter to onAction

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@43 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-10-20 14:24:36 +00:00
parent 44b516036d
commit 20f0efacd7
17 changed files with 93 additions and 55 deletions
+2 -2
View File
@@ -186,11 +186,11 @@ void CardsPanel::onCommand(int id) {
// ----------------------------------------------------------------------------- : Actions
bool CardsPanel::wantsToHandle(const Action&) const {
bool CardsPanel::wantsToHandle(const Action&, bool undone) const {
return false;
}
void CardsPanel::onAction(const Action& action) {
void CardsPanel::onAction(const Action& action, bool undo) {
// TODO
}
+2 -2
View File
@@ -34,8 +34,8 @@ class CardsPanel : public SetWindowPanel {
// --------------------------------------------------- : Actions
virtual bool wantsToHandle(const Action&) const;
virtual void onAction(const Action&);
virtual bool wantsToHandle(const Action&, bool undone) const;
virtual void onAction(const Action&, bool undone);
virtual void onRenderSettingsChange();
private:
void updateSize();
+2 -2
View File
@@ -46,9 +46,9 @@ class SetWindowPanel : public wxPanel, public SetView {
// --------------------------------------------------- : Actions/Events
/// Should return true if this panel wants to get focus to show an action
virtual bool wantsToHandle(const Action&) const { return false; }
virtual bool wantsToHandle(const Action&, bool undone) const { return false; }
/// Handle an action that changes the current set
virtual void onAction(const Action&) {}
virtual void onAction(const Action&, bool undone) {}
/// The settings for rendering cards have changed, refresh card viewers/editors
virtual void onRenderSettingsChange() {}
+1 -1
View File
@@ -234,7 +234,7 @@ void SetWindow::onChangeSet() {
fixMinWindowSize();
}
void SetWindow::onAction(const Action& action) {
void SetWindow::onAction(const Action& action, bool undone) {
// TYPE_CASE_(action, SetStyleChange) {
// // The style changed, maybe also the size of the viewer
// Layout();
+1 -1
View File
@@ -80,7 +80,7 @@ class SetWindow : public wxFrame, public SetView {
/// We want to respond to set changes
virtual void onChangeSet();
/// Actions that change the set
virtual void onAction(const Action&);
virtual void onAction(const Action&, bool undone);
private:
/// A different card has been selected