mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
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:
@@ -32,6 +32,7 @@ String Card::identification() const {
|
||||
}
|
||||
|
||||
IMPLEMENT_REFLECTION(Card) {
|
||||
REFLECT(stylesheet);
|
||||
REFLECT(notes);
|
||||
REFLECT_NAMELESS(data);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user