added FieldP to values and styles, implemented reflection for IndexMap

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@36 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-10-19 18:44:27 +00:00
parent 46a6ed39dc
commit ff96f1522a
30 changed files with 290 additions and 122 deletions
+7 -1
View File
@@ -17,6 +17,8 @@
// ----------------------------------------------------------------------------- : ChoiceField
DECLARE_POINTER_TYPE(ChoiceField);
/// A field that contains a list of choices
class ChoiceField : public Field {
public:
@@ -108,7 +110,8 @@ enum ChoiceRenderStyle
/// The Style for a ChoiceField
class ChoiceStyle : public Style {
public:
ChoiceStyle();
ChoiceStyle(const ChoiceFieldP& field);
HAS_FIELD(Choice)
ChoicePopupStyle popup_style; ///< Style of popups/menus
ChoiceRenderStyle render_style; ///< Style of rendering
@@ -129,6 +132,9 @@ class ChoiceStyle : public Style {
/// The Value in a ChoiceField
class ChoiceValue : public Value {
public:
inline ChoiceValue(const ChoiceFieldP& field) : Value(field) {}
HAS_FIELD(Choice)
Defaultable<String> value; /// The name of the selected choice
virtual String toString() const;