implemented all field types

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@29 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-10-19 12:31:51 +00:00
parent 5e1125c26e
commit 9f73e2e9dc
14 changed files with 448 additions and 46 deletions
+35
View File
@@ -9,5 +9,40 @@
#include <data/field/boolean.hpp>
// ----------------------------------------------------------------------------- : BooleanField
BooleanField::BooleanField() {
// choices->choices.push_back(new_shared1<Choice>(_("yes")));
// choices->choices.push_back(new_shared1<Choice>(_("no")));
// choices->initIds();
}
StyleP BooleanField::newStyle(const FieldP& thisP) const {
return new_shared<BooleanStyle>();
}
ValueP BooleanField::newValue(const FieldP& thisP) const {
return new_shared<BooleanValue>();
}
String BooleanField::typeName() const {
return _("boolean");
}
IMPLEMENT_REFLECTION(BooleanField) {
REFLECT_BASE(Field); // NOTE: don't reflect as a ChoiceField
REFLECT(script);
REFLECT_N("default", default_script);
REFLECT(initial);
}
// ----------------------------------------------------------------------------- : BooleanStyle
IMPLEMENT_REFLECTION(BooleanStyle) {
REFLECT_BASE(ChoiceStyle);
}
// ----------------------------------------------------------------------------- : BooleanValue
IMPLEMENT_REFLECTION_NAMELESS(BooleanValue) {
REFLECT_BASE(ChoiceValue);
}