Added placeholder ValueEditors for all field types

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@75 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-11-19 19:41:26 +00:00
parent ed336dea06
commit a218251fd6
27 changed files with 436 additions and 71 deletions
+2 -2
View File
@@ -95,7 +95,7 @@ class Style {
virtual ValueViewerP makeViewer(DataViewer& parent, const StyleP& thisP) = 0;
/// Make an editor object for values using this style
/** thisP is a smart pointer to this */
virtual ValueEditorP makeEditor(DataEditor& parent, const StyleP& thisP) = 0;
virtual ValueViewerP makeEditor(DataEditor& parent, const StyleP& thisP) = 0;
/// Update scripted values of this style, return true if anything has changed
virtual bool update(Context&);
@@ -157,7 +157,7 @@ template <> ValueP read_new<Value>(Reader&);
#define DECLARE_STYLE_TYPE(Type) \
DECLARE_HAS_FIELD(Type) \
virtual ValueViewerP makeViewer(DataViewer& parent, const StyleP& thisP); \
virtual ValueEditorP makeEditor(DataEditor& parent, const StyleP& thisP)
virtual ValueViewerP makeEditor(DataEditor& parent, const StyleP& thisP)
// implement field() which returns a field with the right (derived) type
#define DECLARE_HAS_FIELD(Type) \
+1 -1
View File
@@ -36,7 +36,7 @@ class BooleanField : public ChoiceField {
class BooleanStyle : public ChoiceStyle {
public:
inline BooleanStyle(const ChoiceFieldP& field) : ChoiceStyle(field) {}
DECLARE_STYLE_TYPE(Boolean);
DECLARE_HAS_FIELD(Boolean); // not DECLARE_STYLE_TYPE, because we use a normal ChoiceValueViewer/Editor
// no extra data