added SymbolValueEditor + minor fixes

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@96 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-11-26 18:51:31 +00:00
parent 8dcda6fd93
commit e2701a646f
19 changed files with 104 additions and 37 deletions
+1 -1
View File
@@ -112,5 +112,5 @@ void ChoiceValueEditor::determineSize() {
}
void ChoiceValueEditor::change(const Defaultable<String>& c) {
getSet().actions.add(value_action(static_pointer_cast<ChoiceValue>(valueP), c));
getSet().actions.add(value_action(valueP(), c));
}
+1 -1
View File
@@ -148,7 +148,7 @@ void ColorValueEditor::determineSize() {
}
void ColorValueEditor::change(const Defaultable<Color>& c) {
getSet().actions.add(value_action(static_pointer_cast<ColorValue>(valueP), c));
getSet().actions.add(value_action(valueP(), c));
}
void ColorValueEditor::changeCustom() {
Color c = wxGetColourFromUser(0, value().value());
+12 -1
View File
@@ -7,7 +7,18 @@
// ----------------------------------------------------------------------------- : Includes
#include <gui/value/symbol.hpp>
#include <gui/symbol/window.hpp>
// ----------------------------------------------------------------------------- :
// ----------------------------------------------------------------------------- : SymbolValueEditor
IMPLEMENT_VALUE_EDITOR(Symbol) {}
void SymbolValueEditor::onLeftDClick(const RealPoint& pos, wxMouseEvent&) {
// TODO : use SetWindow as parent? Maybe not, the symbol editor will stay open when mainwindow closes
SymbolWindow* wnd = new SymbolWindow(nullptr, valueP(), viewer.getSet());
wnd->Show();
}
void SymbolValueEditor::determineSize() {
style().height = 50;
}
+3
View File
@@ -19,6 +19,9 @@
class SymbolValueEditor : public SymbolValueViewer, public ValueEditor {
public:
DECLARE_VALUE_EDITOR(Symbol);
virtual void onLeftDClick(const RealPoint& pos, wxMouseEvent&);
virtual void determineSize();
};
// ----------------------------------------------------------------------------- : EOF
+1
View File
@@ -20,6 +20,7 @@ class TextValueEditor : public TextValueViewer, public ValueEditor {
public:
DECLARE_VALUE_EDITOR(Text);
// virtual void determineSize();
};
// ----------------------------------------------------------------------------- : EOF