Added value actions for common value types; drop down list is now correctly aligned

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@92 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-11-24 16:36:17 +00:00
parent edfe24a05f
commit 0a916f89bc
23 changed files with 268 additions and 66 deletions
+2 -1
View File
@@ -9,6 +9,7 @@
#include <gui/value/color.hpp>
#include <gui/drop_down_list.hpp>
#include <gui/util.hpp>
#include <data/action/value.hpp>
#include <wx/colordlg.h>
DECLARE_TYPEOF_COLLECTION(ColorField::ChoiceP);
@@ -141,7 +142,7 @@ void ColorValueEditor::determineSize() {
}
void ColorValueEditor::change(const Defaultable<Color>& c) {
// getSet().actions.add(new ColorChangeAction(value(), c));
getSet().actions.add(value_action(static_pointer_cast<ColorValue>(valueP), c));
}
void ColorValueEditor::changeCustom() {
Color c = wxGetColourFromUser(0, value().value());
+1 -1
View File
@@ -47,7 +47,7 @@ class ValueEditor {
virtual void onMouseWheel (const RealPoint& pos, wxMouseEvent& ev) {}
/// Key events
virtual void onChar(wxKeyEvent ev) {}
virtual void onChar(wxKeyEvent& ev) {}
/// a context menu is requested, add extra items to the menu m
/** return false to suppress menu */