A bit of refactoring:

- common code of ChoiceValueViewer and MultipleChoiceValueViewer put into functions
 - RotatedDC can now draw text with shadow.
 - DECLARE_STYLE_TYPE macro and friends do slightly more.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@788 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-12-26 17:46:40 +00:00
parent 2fb7de196e
commit 8d86e4a25c
19 changed files with 125 additions and 233 deletions
+10 -1
View File
@@ -247,6 +247,7 @@ inline String type_name(const Value&) {
// ----------------------------------------------------------------------------- : Utilities
#define DECLARE_FIELD_TYPE(Type) \
DECLARE_REFLECTION(); public: \
virtual ValueP newValue(const FieldP& thisP) const; \
virtual StyleP newStyle(const FieldP& thisP) const; \
virtual String typeName() const
@@ -269,10 +270,18 @@ inline String type_name(const Value&) {
}
#define DECLARE_STYLE_TYPE(Type) \
DECLARE_REFLECTION(); public: \
DECLARE_HAS_FIELD(Type) \
virtual StyleP clone() const; \
virtual ValueViewerP makeViewer(DataViewer& parent, const StyleP& thisP); \
virtual ValueViewerP makeEditor(DataEditor& parent, const StyleP& thisP);
virtual ValueViewerP makeEditor(DataEditor& parent, const StyleP& thisP)
#define DECLARE_VALUE_TYPE(Type,ValueType_) \
DECLARE_REFLECTION(); public: \
DECLARE_HAS_FIELD(Type) \
virtual ValueP clone() const; \
virtual String toString() const; \
typedef ValueType_ ValueType
// implement field() which returns a field with the right (derived) type
#define DECLARE_HAS_FIELD(Type) \