implemented choice editor with drop down list, todo: submenus

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@93 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-11-25 00:35:33 +00:00
parent 0a916f89bc
commit 563afde7a3
9 changed files with 211 additions and 22 deletions
+12 -2
View File
@@ -13,6 +13,7 @@
#include <data/card.hpp>
#include <data/field.hpp>
#include <data/settings.hpp>
#include <data/action/value.hpp>
DECLARE_TYPEOF_COLLECTION(ValueViewerP);
typedef IndexMap<FieldP,StyleP> IndexMap_FieldP_StyleP;
@@ -116,6 +117,15 @@ ValueViewerP DataViewer::makeViewer(const StyleP& style) {
return style->makeViewer(*this, style);
}
void DataViewer::onAction(const Action&, bool undone) {
// TODO
void DataViewer::onAction(const Action& action, bool undone) {
TYPE_CASE(action, ValueAction) {
FOR_EACH(v, viewers) {
if (v->getValue() == action.valueP) {
// refresh the viewer
v->onAction(action, undone);
onChange();
return;
}
}
}
}