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
+8 -10
View File
@@ -17,13 +17,7 @@ ChoiceField::ChoiceField()
, default_name(_("Default"))
{}
StyleP ChoiceField::newStyle(const FieldP& thisP) const {
return new_shared<ChoiceStyle>();
}
ValueP ChoiceField::newValue(const FieldP& thisP) const {
return new_shared<ChoiceValue>();
}
FIELD_TYPE(Choice)
String ChoiceField::typeName() const {
return _("choice");
@@ -153,8 +147,13 @@ template <> void GetMember::handle(const ChoiceField::Choice& c) {
// ----------------------------------------------------------------------------- : ChoiceStyle
ChoiceStyle::ChoiceStyle()
ChoiceStyle::ChoiceStyle(const ChoiceFieldP& field)
: Style(field)
, popup_style(POPUP_DROPDOWN)
, render_style(RENDER_TEXT)
, combine(COMBINE_NORMAL)
, alignment(ALIGN_STRETCH)
, colors_card_list(false)
{}
IMPLEMENT_REFLECTION_ENUM(ChoicePopupStyle) {
@@ -191,7 +190,6 @@ String ChoiceValue::toString() const {
return value();
}
IMPLEMENT_REFLECTION_NAMELESS(ChoiceValue) {
REFLECT_NAMELESS(value);
}