dw::core::style::StyleAttrs Class Reference

#include <style.hh>

List of all members.

Public Member Functions

void initValues ()
void resetValues ()
 Reset those style attributes to their standard values, which are not inherited, according to CSS.
bool sizeDiffs (StyleAttrs *otherStyleAttrs)
 This method returns whether something may change its size, when its style changes from this style to otherStyle.
void setBorderColor (Color *val)
void setBorderStyle (BorderStyle val)
int boxOffsetX ()
int boxRestWidth ()
int boxDiffWidth ()
int boxOffsetY ()
int boxRestHeight ()
int boxDiffHeight ()
bool hasBackground ()
bool equals (lout::object::Object *other)
 Returns, whether two objects are equal.
int hashValue ()
 Return a hash value for the object.

Public Attributes

Fontfont
int textDecoration
Colorcolor
ColorbackgroundColor
TextAlignType textAlign
VAlignType valign
char textAlignChar
int hBorderSpacing
int vBorderSpacing
int wordSpacing
Length width
Length height
Length lineHeight
Length textIndent
Box margin
Box borderWidth
Box padding
BorderCollapse borderCollapse
struct {
   Color *   top
   Color *   right
   Color *   bottom
   Color *   left
borderColor
struct {
   BorderStyle   top
   BorderStyle   right
   BorderStyle   bottom
   BorderStyle   left
borderStyle
DisplayType display
WhiteSpace whiteSpace
ListStylePosition listStylePosition
ListStyleType listStyleType
Cursor cursor
int x_link
int x_img
Tooltipx_tooltip


Detailed Description

See also:
dw::core::style

Member Function Documentation

int dw::core::style::StyleAttrs::boxDiffHeight (  )  [inline]

int dw::core::style::StyleAttrs::boxDiffWidth (  )  [inline]

int dw::core::style::StyleAttrs::boxOffsetX (  )  [inline]

int dw::core::style::StyleAttrs::boxOffsetY (  )  [inline]

int dw::core::style::StyleAttrs::boxRestHeight (  )  [inline]

int dw::core::style::StyleAttrs::boxRestWidth (  )  [inline]

bool dw::core::style::StyleAttrs::equals ( lout::object::Object other  )  [virtual]

Returns, whether two objects are equal.

The caller should ensure, that this and the object have the same class; this makes casting of "other" safe. Typically, an implementation should check this == other first, the caller can assume a fast implementation.

Reimplemented from lout::object::Object.

References backgroundColor, borderCollapse, borderColor, borderStyle, borderWidth, bottom, color, cursor, display, dw::core::style::Box::equals(), font, hBorderSpacing, height, left, lineHeight, listStylePosition, listStyleType, margin, padding, right, textAlign, textAlignChar, textDecoration, textIndent, top, valign, vBorderSpacing, whiteSpace, width, wordSpacing, x_img, x_link, and x_tooltip.

bool dw::core::style::StyleAttrs::hasBackground (  )  [inline]

References backgroundColor.

Referenced by dw::Textblock::drawLine().

int dw::core::style::StyleAttrs::hashValue (  )  [virtual]

void dw::core::style::StyleAttrs::initValues (  ) 

void dw::core::style::StyleAttrs::resetValues (  ) 

void dw::core::style::StyleAttrs::setBorderColor ( Color val  )  [inline]

void dw::core::style::StyleAttrs::setBorderStyle ( BorderStyle  val  )  [inline]

References borderStyle.

Referenced by initValues(), and resetValues().

bool dw::core::style::StyleAttrs::sizeDiffs ( StyleAttrs otherStyle  ) 

This method returns whether something may change its size, when its style changes from this style to otherStyle.

It is mainly for optimizing style changes where only colors etc change (where false would be returned), in some cases it may return true, although a size change does not actually happen (e.g. when in a certain context a particular attribute is ignored).

Todo:
Should for CSS implemented properly. Currently, size changes are not needed, so always false is returned. See also dw::core::Widget::setStyle.

Referenced by dw::core::Widget::setStyle().


Member Data Documentation


The documentation for this class was generated from the following files:

Generated on Wed Sep 7 02:00:37 2011 for Dillo by  doxygen 1.5.9