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
+7 -6
View File
@@ -12,6 +12,7 @@
#include <util/prec.hpp>
#include <util/reflect.hpp>
#include <util/alignment.hpp>
#include <script/scriptable.hpp>
DECLARE_POINTER_TYPE(Field);
DECLARE_POINTER_TYPE(Style);
@@ -46,8 +47,6 @@ class Field {
/// Creates a new Style corresponding to this Field
/** thisP is a smart pointer to this */
virtual StyleP newStyle(const FieldP& thisP) const = 0;
/// create a copy of this field
virtual FieldP clone() const = 0;
/// Type of this field
virtual String typeName() const = 0;
@@ -66,6 +65,11 @@ class Style {
public:
virtual ~Style();
int z_index; ///< Stacking of values of this field, higher = on top
Scriptable<double> left, top; ///< Position of this field
Scriptable<double> width, height; ///< Position of this field
Scriptable<bool> visible; ///< Is this field visible?
private:
DECLARE_REFLECTION_VIRTUAL();
};
@@ -78,10 +82,7 @@ void initObject(const FieldP&, StyleP&);
class Value {
public:
virtual ~Value();
/// Create a copy of this value
virtual ValueP clone() const = 0;
/// Convert this value to a string for use in tables
virtual String toString() const = 0;