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
+2 -14
View File
@@ -25,11 +25,9 @@ DECLARE_POINTER_TYPE(SymbolValue);
/// A field for image values
class SymbolField : public Field {
public:
// no extra data
DECLARE_FIELD_TYPE(Symbol);
private:
DECLARE_REFLECTION();
// no extra data
};
// ----------------------------------------------------------------------------- : SymbolStyle
@@ -46,9 +44,6 @@ class SymbolStyle : public Style {
double max_aspect_ratio; ///< Bounds for the symbol's aspect ratio
vector<SymbolVariationP> variations; ///< Different variantions of the same symbol
private:
DECLARE_REFLECTION();
};
/// Styling for a symbol variation, defines color, border, etc.
@@ -71,17 +66,10 @@ class SymbolVariation : public IntrusivePtrBase<SymbolVariation> {
class SymbolValue : public Value {
public:
inline SymbolValue(const SymbolFieldP& field) : Value(field) {}
DECLARE_HAS_FIELD(Symbol)
DECLARE_VALUE_TYPE(Symbol, FileName);
typedef FileName ValueType;
ValueType filename; ///< Filename of the symbol (in the current package)
Age last_update; ///< When was the symbol last changed?
virtual ValueP clone() const;
virtual String toString() const;
private:
DECLARE_REFLECTION();
};
// ----------------------------------------------------------------------------- : EOF