Cleaned up Set::Styling/Card::Styling by spliting that functionality into a 'DelayedIndexMaps' class;

Added 'right' and 'bottom' properties to style as an alternative way of specifying width/height;
Added content_width, content_height and content_lines properties that give feedback on text rendering;
Always show warnings when showing errors and vice-versa, this prevents script errors from appearing before the reader/parse error that caused them;
Finally some preliminairy work on export templates

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@428 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-06-22 23:12:41 +00:00
parent 97e0e8d6d6
commit e46cbe66b2
33 changed files with 384 additions and 138 deletions
+5 -2
View File
@@ -12,7 +12,7 @@
// ----------------------------------------------------------------------------- : TextValueViewer
void TextValueViewer::draw(RotatedDC& dc) {
void TextValueViewer::prepare(RotatedDC& dc) {
if (!style().mask_filename.empty() && !style().mask.ok()) {
// load contour mask
Image image;
@@ -21,8 +21,11 @@ void TextValueViewer::draw(RotatedDC& dc) {
style().mask.load(image);
}
}
drawFieldBorder(dc);
v.prepare(dc, value().value(), style(), viewer.getContext());
}
void TextValueViewer::draw(RotatedDC& dc) {
drawFieldBorder(dc);
v.draw(dc, style(), (DrawWhat)(
DRAW_NORMAL
| (viewer.drawBorders() ? DRAW_BORDERS : 0)
+1
View File
@@ -21,6 +21,7 @@ class TextValueViewer : public ValueViewer {
public:
DECLARE_VALUE_VIEWER(Text) : ValueViewer(parent,style) {}
virtual void prepare(RotatedDC& dc);
virtual void draw(RotatedDC& dc);
virtual void onValueChange();
virtual void onStyleChange();
+4 -1
View File
@@ -39,7 +39,10 @@ class ValueViewer : public StyleListener {
/// Return the associated value
inline const ValueP& getValue() const { return valueP; }
// Draw this value
/// Prepare before drawing.
/** Scripts are updated after preparing, allowing */
virtual void prepare(RotatedDC& dc) {};
/// Draw this value
virtual void draw(RotatedDC& dc) = 0;
/// Does this field contian the given point?