dillo  3.0.5
About: dillo is a small, fast, extensible Web browser particularly suitable for older or smaller computers and embedded systems (but only limited or no support for frames, CSS, JavaScript, Java).
  Fossies Dox: dillo-3.0.5.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

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

#include <style.hh>

Inheritance diagram for dw::core::style::StyleAttrs:
[legend]
Collaboration diagram for dw::core::style::StyleAttrs:
[legend]

Public Member Functions

void initValues ()
 
void resetValues ()
 Reset those style attributes to their standard values, which are not inherited, according to CSS. More...
 
bool sizeDiffs (StyleAttrs *otherStyleAttrs)
 This method returns whether something may change its size, when its style changes from this style to otherStyle. More...
 
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. More...
 
int hashValue ()
 Return a hash value for the object. More...
 
- 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. More...
 
virtual Objectclone ()
 Return an exact copy of the object. More...
 
virtual void intoStringBuffer (misc::StringBuffer *sb)
 Store a textual representation of the object in a misc::StringBuffer. More...
 
const char * toString ()
 Use object::Object::intoStringBuffer to return a textual representation of the object. More...
 
virtual size_t sizeOf ()
 Return the number of bytes, this object totally uses. More...
 

Public Attributes

Fontfont
 
int textDecoration
 
Colorcolor
 
ColorbackgroundColor
 
StyleImagebackgroundImage
 
BackgroundRepeat backgroundRepeat
 
BackgroundAttachment backgroundAttachment
 
Length backgroundPositionX
 
Length backgroundPositionY
 
TextAlignType textAlign
 
VAlignType valign
 
char textAlignChar
 
TextTransform textTransform
 
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
 
char x_lang [2]
 

Detailed Description

See also
dw::core::style

Definition at line 489 of file style.hh.

Member Function Documentation

◆ boxDiffHeight()

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

◆ boxDiffWidth()

◆ boxOffsetX()

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

◆ boxOffsetY()

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

◆ boxRestHeight()

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

Definition at line 554 of file style.hh.

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

Referenced by boxDiffHeight(), and dw::Ruler::sizeRequestImpl().

◆ boxRestWidth()

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

Definition at line 545 of file style.hh.

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

Referenced by boxDiffWidth().

◆ 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 142 of file style.cc.

References backgroundAttachment, backgroundColor, backgroundImage, backgroundPositionX, backgroundPositionY, backgroundRepeat, borderCollapse, borderColor, borderStyle, borderWidth, bottom, color, cursor, display, font, hBorderSpacing, height, left, lineHeight, listStylePosition, listStyleType, margin, padding, right, textAlign, textAlignChar, textDecoration, textIndent, textTransform, top, valign, vBorderSpacing, whiteSpace, width, wordSpacing, x_img, x_lang, x_link, and x_tooltip.

◆ hasBackground()

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

Definition at line 560 of file style.hh.

References backgroundColor, and backgroundImage.

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

◆ hashValue()

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

Return a hash value for the object.

Reimplemented from lout::object::Object.

Definition at line 190 of file style.cc.

References hashValue().

Referenced by hashValue().

◆ initValues()

◆ resetValues()

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

◆ setBorderColor()

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

Definition at line 534 of file style.hh.

References borderColor.

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

◆ setBorderStyle()

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

Definition at line 537 of file style.hh.

References borderStyle.

◆ 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 137 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

◆ borderColor

◆ borderStyle

◆ borderWidth

◆ bottom [1/2]

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

◆ bottom [2/2]

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

Definition at line 513 of file style.hh.

◆ color

◆ cursor

Cursor dw::core::style::StyleAttrs::cursor

◆ display

DisplayType dw::core::style::StyleAttrs::display

◆ font

◆ hBorderSpacing

int dw::core::style::StyleAttrs::hBorderSpacing

◆ height

Length dw::core::style::StyleAttrs::height

◆ left [1/2]

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

◆ left [2/2]

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

Definition at line 513 of file style.hh.

◆ lineHeight

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

◆ listStylePosition

ListStylePosition dw::core::style::StyleAttrs::listStylePosition

◆ listStyleType

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

◆ margin

◆ padding

◆ right [1/2]

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

◆ right [2/2]

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

Definition at line 513 of file style.hh.

◆ textAlign

◆ textAlignChar

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

Definition at line 504 of file style.hh.

Referenced by dw::core::style::Style::copyAttrs(), equals(), and dw::TableCell::wordWrap().

◆ textDecoration

int dw::core::style::StyleAttrs::textDecoration

◆ textIndent

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

Definition at line 508 of file style.hh.

Referenced by StyleEngine::apply(), dw::core::style::Style::copyAttrs(), and equals().

◆ textTransform

TextTransform dw::core::style::StyleAttrs::textTransform

◆ top [1/2]

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

◆ top [2/2]

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

Definition at line 513 of file style.hh.

◆ valign

◆ vBorderSpacing

int dw::core::style::StyleAttrs::vBorderSpacing

◆ whiteSpace

WhiteSpace dw::core::style::StyleAttrs::whiteSpace

◆ width

◆ wordSpacing

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

◆ x_img

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

Definition at line 522 of file style.hh.

Referenced by StyleEngine::apply(), dw::core::style::Style::copyAttrs(), and equals().

◆ x_lang

char dw::core::style::StyleAttrs::x_lang[2]

◆ x_link

◆ x_tooltip

Tooltip* dw::core::style::StyleAttrs::x_tooltip

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