Dillo v3.1.1-98-g318d1f14
Loading...
Searching...
No Matches
dw::core::style::StyleAttrs Class Reference

#include <style.hh>

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 Member Functions inherited from lout::object::Object
virtual ~Object ()
 The destructor is defined as virtual (but not abstract), so that destruction of Object's works properly.
 
virtual Objectclone ()
 Return an exact copy of the object.
 
virtual void intoStringBuffer (misc::StringBuffer *sb)
 Store a textual representation of the object in a misc::StringBuffer.
 
const char * toString ()
 Use object::Object::intoStringBuffer to return a textual representation of the object.
 
virtual size_t sizeOf ()
 Return the number of bytes, this object totally uses.
 

Public Attributes

Fontfont
 
int textDecoration
 
Colorcolor
 
ColorbackgroundColor
 
StyleImagebackgroundImage
 
BackgroundRepeat backgroundRepeat
 
BackgroundAttachment backgroundAttachment
 
Length backgroundPositionX
 
Length backgroundPositionY
 
TextAlignType textAlign
 
VAlignType valign
 
char textAlignChar
 
TextTransform textTransform
 
FloatType vloat
 
ClearType clear
 
Overflow overflow
 
Position position
 
Length top
 
Length bottom
 
Length left
 
Length right
 
int hBorderSpacing
 
int vBorderSpacing
 
int wordSpacing
 
Length width
 
Length height
 
Length lineHeight
 
Length textIndent
 
Length minWidth
 
Length maxWidth
 
Length minHeight
 
Length maxHeight
 
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 zIndex
 
int x_link
 
int x_img
 
Tooltipx_tooltip
 
char x_lang [2]
 

Detailed Description

See also
dw::core::style

Definition at line 530 of file style.hh.

Member Function Documentation

◆ boxDiffHeight()

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

◆ boxDiffWidth()

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

◆ boxOffsetX()

◆ boxOffsetY()

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

◆ boxRestHeight()

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

Definition at line 599 of file style.hh.

References borderWidth, dw::core::style::Box::bottom, margin, and padding.

Referenced by boxDiffHeight(), and dw::core::Widget::boxRestHeight().

◆ boxRestWidth()

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

◆ equals()

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.

Definition at line 155 of file style.cc.

References backgroundAttachment, backgroundColor, backgroundImage, backgroundPositionX, backgroundPositionY, backgroundRepeat, borderCollapse, borderColor, borderStyle, borderWidth, bottom, clear, color, cursor, display, dw::core::style::Box::equals(), font, hBorderSpacing, height, left, lineHeight, listStylePosition, listStyleType, margin, maxHeight, maxWidth, minHeight, minWidth, overflow, padding, position, right, textAlign, textAlignChar, textDecoration, textIndent, textTransform, top, valign, vBorderSpacing, vloat, whiteSpace, width, wordSpacing, x_img, x_lang, x_link, x_tooltip, and zIndex.

◆ hasBackground()

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

Definition at line 603 of file style.hh.

References backgroundColor, and backgroundImage.

Referenced by dw::Textblock::drawLine(), and dw::Textblock::drawWord().

◆ hashValue()

◆ initValues()

◆ resetValues()

◆ setBorderColor()

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

Definition at line 585 of file style.hh.

References borderColor.

Referenced by dw::Textblock::changeLinkColor(), initValues(), main(), and resetValues().

◆ setBorderStyle()

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

Definition at line 588 of file style.hh.

References borderStyle.

Referenced by initValues(), main(), and resetValues().

◆ sizeDiffs()

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.

Definition at line 150 of file style.cc.

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

Member Data Documentation

◆ backgroundAttachment

◆ backgroundColor

◆ backgroundImage

◆ backgroundPositionX

◆ backgroundPositionY

◆ backgroundRepeat

◆ borderCollapse

BorderCollapse dw::core::style::StyleAttrs::borderCollapse

◆ [struct]

◆ [struct]

◆ borderWidth

◆ bottom [1/3]

◆ bottom [2/3]

Color * dw::core::style::StyleAttrs::bottom

Definition at line 562 of file style.hh.

◆ bottom [3/3]

BorderStyle dw::core::style::StyleAttrs::bottom

Definition at line 563 of file style.hh.

◆ clear

◆ color

◆ cursor

◆ display

◆ font

◆ hBorderSpacing

◆ height

◆ left [1/3]

◆ left [2/3]

Color * dw::core::style::StyleAttrs::left

Definition at line 562 of file style.hh.

◆ left [3/3]

BorderStyle dw::core::style::StyleAttrs::left

Definition at line 563 of file style.hh.

◆ lineHeight

Length dw::core::style::StyleAttrs::lineHeight

◆ listStylePosition

◆ listStyleType

ListStyleType dw::core::style::StyleAttrs::listStyleType

◆ margin

◆ maxHeight

◆ maxWidth

◆ minHeight

◆ minWidth

◆ overflow

◆ padding

◆ position

◆ right [1/3]

◆ right [2/3]

Color * dw::core::style::StyleAttrs::right

Definition at line 562 of file style.hh.

◆ right [3/3]

BorderStyle dw::core::style::StyleAttrs::right

Definition at line 563 of file style.hh.

◆ textAlign

◆ textAlignChar

char dw::core::style::StyleAttrs::textAlignChar

◆ textDecoration

◆ textIndent

Length dw::core::style::StyleAttrs::textIndent

◆ textTransform

◆ top [1/3]

◆ top [2/3]

Color* dw::core::style::StyleAttrs::top

Definition at line 562 of file style.hh.

◆ top [3/3]

BorderStyle dw::core::style::StyleAttrs::top

Definition at line 563 of file style.hh.

◆ valign

◆ vBorderSpacing

◆ vloat

◆ whiteSpace

◆ width

◆ wordSpacing

int dw::core::style::StyleAttrs::wordSpacing

◆ x_img

int dw::core::style::StyleAttrs::x_img

◆ x_lang

◆ x_link

◆ x_tooltip

◆ zIndex


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