Implemented ImageValueViewer, and more of the related classes

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@54 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-10-27 22:10:09 +00:00
parent d9c9c40adf
commit 7192361c36
35 changed files with 485 additions and 37 deletions
+1
View File
@@ -32,6 +32,7 @@ String Card::identification() const {
}
IMPLEMENT_REFLECTION(Card) {
REFLECT(stylesheet);
REFLECT(notes);
REFLECT_NAMELESS(data);
}
+4
View File
@@ -79,6 +79,10 @@ class Style {
Scriptable<double> width, height; ///< Position of this field
Scriptable<bool> visible; ///< Is this field visible?
inline RealPoint getPos() const { return RealPoint(left, top ); }
inline RealSize getSize() const { return RealSize ( width, height); }
inline RealRect getRect() const { return RealRect (left, top, width, height); }
/// Make a viewer object for values using this style
/** thisP is a smart pointer to this */
virtual ValueViewerP makeViewer(DataViewer& parent, const StyleP& thisP) = 0;
+2
View File
@@ -15,6 +15,8 @@
// ----------------------------------------------------------------------------- : BooleanField
DECLARE_POINTER_TYPE(BooleanField);
DECLARE_POINTER_TYPE(BooleanStyle);
DECLARE_POINTER_TYPE(BooleanValue);
/// A field whos value is either true or false
class BooleanField : public ChoiceField {
+2
View File
@@ -18,6 +18,8 @@
// ----------------------------------------------------------------------------- : ChoiceField
DECLARE_POINTER_TYPE(ChoiceField);
DECLARE_POINTER_TYPE(ChoiceStyle);
DECLARE_POINTER_TYPE(ChoiceValue);
/// A field that contains a list of choices
class ChoiceField : public Field {
+2
View File
@@ -17,6 +17,8 @@
// ----------------------------------------------------------------------------- : ColorField
DECLARE_POINTER_TYPE(ColorField);
DECLARE_POINTER_TYPE(ColorStyle);
DECLARE_POINTER_TYPE(ColorValue);
/// A field for color values, it contains a list of choices for colors
class ColorField : public Field {
+2
View File
@@ -16,6 +16,8 @@
// ----------------------------------------------------------------------------- : ImageField
DECLARE_POINTER_TYPE(ImageField);
DECLARE_POINTER_TYPE(ImageStyle);
DECLARE_POINTER_TYPE(ImageValue);
/// A field for image values
class ImageField : public Field {
+2
View File
@@ -15,6 +15,8 @@
// ----------------------------------------------------------------------------- : MultipleChoiceField
DECLARE_POINTER_TYPE(MultipleChoiceField);
DECLARE_POINTER_TYPE(MultipleChoiceStyle);
DECLARE_POINTER_TYPE(MultipleChoiceValue);
/// A ChoiceField where multiple choices can be selected simultaniously
class MultipleChoiceField : public ChoiceField {
+2
View File
@@ -18,6 +18,8 @@ DECLARE_POINTER_TYPE(SymbolFilter);
// ----------------------------------------------------------------------------- : SymbolField
DECLARE_POINTER_TYPE(SymbolField);
DECLARE_POINTER_TYPE(SymbolStyle);
DECLARE_POINTER_TYPE(SymbolValue);
/// A field for image values
class SymbolField : public Field {
+2
View File
@@ -17,6 +17,8 @@
// ----------------------------------------------------------------------------- : TextField
DECLARE_POINTER_TYPE(TextField);
DECLARE_POINTER_TYPE(TextStyle);
DECLARE_POINTER_TYPE(TextValue);
/// A field for values containing tagged text
class TextField : public Field {