aboutsummaryrefslogtreecommitdiff
path: root/dw
diff options
context:
space:
mode:
Diffstat (limited to 'dw')
-rw-r--r--dw/style.cc20
-rw-r--r--dw/style.hh10
2 files changed, 30 insertions, 0 deletions
diff --git a/dw/style.cc b/dw/style.cc
index 2f64e468..51dda098 100644
--- a/dw/style.cc
+++ b/dw/style.cc
@@ -49,6 +49,8 @@ void StyleAttrs::initValues ()
width = height = lineHeight = LENGTH_AUTO;
vloat = FLOAT_NONE;
clear = CLEAR_NONE;
+ position = POSITION_STATIC;
+ top = bottom = left = right = LENGTH_AUTO;
textIndent = 0;
margin.setVal (0);
borderWidth.setVal (0);
@@ -77,6 +79,9 @@ void StyleAttrs::resetValues ()
textAlignChar = '.';
vloat = FLOAT_NONE; /** \todo Correct? Check specification. */
clear = CLEAR_NONE; /** \todo Correct? Check specification. */
+ position = POSITION_STATIC; /** \todo Correct? Check specification. */
+ top = bottom = left = right = LENGTH_AUTO; /** \todo Correct? Check
+ specification. */
backgroundColor = NULL;
width = LENGTH_AUTO;
height = LENGTH_AUTO;
@@ -124,6 +129,11 @@ bool StyleAttrs::equals (object::Object *other) {
textTransform == otherAttrs->textTransform &&
vloat == otherAttrs->vloat &&
clear == otherAttrs->clear &&
+ position == otherAttrs->position &&
+ top == otherAttrs->top &&
+ bottom == otherAttrs->bottom &&
+ left == otherAttrs->left &&
+ right == otherAttrs->right &&
hBorderSpacing == otherAttrs->hBorderSpacing &&
vBorderSpacing == otherAttrs->vBorderSpacing &&
wordSpacing == otherAttrs->wordSpacing &&
@@ -166,6 +176,11 @@ int StyleAttrs::hashValue () {
textTransform +
vloat +
clear +
+ position +
+ top +
+ bottom +
+ left +
+ right +
hBorderSpacing +
vBorderSpacing +
wordSpacing +
@@ -260,6 +275,11 @@ void Style::copyAttrs (StyleAttrs *attrs)
textTransform = attrs->textTransform;
vloat = attrs->vloat;
clear = attrs->clear;
+ position = attrs->position;
+ top = attrs->top;
+ bottom = attrs->bottom;
+ left = attrs->left;
+ right = attrs->right;
hBorderSpacing = attrs->hBorderSpacing;
vBorderSpacing = attrs->vBorderSpacing;
wordSpacing = attrs->wordSpacing;
diff --git a/dw/style.hh b/dw/style.hh
index 41784c79..92ea0fe7 100644
--- a/dw/style.hh
+++ b/dw/style.hh
@@ -316,6 +316,13 @@ enum FontVariant {
FONT_VARIANT_SMALL_CAPS
};
+enum Position {
+ POSITION_STATIC,
+ POSITION_RELATIVE,
+ POSITION_ABSOLUTE,
+ POSITION_FIXED,
+};
+
enum TextDecoration {
TEXT_DECORATION_NONE = 0,
TEXT_DECORATION_UNDERLINE = 1 << 0,
@@ -466,6 +473,9 @@ public:
FloatType vloat; /* "float" is a keyword. */
ClearType clear;
+ Position position;
+ Length top, bottom, left, right;
+
int hBorderSpacing, vBorderSpacing, wordSpacing;
Length width, height, lineHeight, textIndent;