|
Dillo
|
#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 Object * | clone () |
| 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 | |
| Font * | font |
| int | textDecoration |
| Color * | color |
| Color * | backgroundColor |
| 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 |
| Tooltip * | x_tooltip |
| char | x_lang [2] |
|
inline |
References boxOffsetY(), and boxRestHeight().
Referenced by dw::Textblock::calcWidgetSize(), dw::core::Widget::getContentHeight(), and dw::fltk::ui::FltkComplexButtonResource::widgetCallback().
|
inline |
|
inline |
References borderWidth, dw::core::style::Box::left, margin, and padding.
Referenced by boxDiffWidth(), dw::Textblock::lineXOffsetWidget(), and dw::fltk::ui::FltkComplexButtonResource::widgetCallback().
|
inline |
References borderWidth, margin, padding, and dw::core::style::Box::top.
Referenced by boxDiffHeight(), dw::Ruler::sizeRequestImpl(), and dw::fltk::ui::FltkComplexButtonResource::widgetCallback().
|
inline |
References borderWidth, dw::core::style::Box::bottom, margin, and padding.
Referenced by boxDiffHeight(), and dw::Ruler::sizeRequestImpl().
|
inline |
References borderWidth, margin, padding, and dw::core::style::Box::right.
Referenced by boxDiffWidth().
|
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, 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.
|
inline |
References backgroundColor.
Referenced by dw::Textblock::drawLine(), and dw::Textblock::drawWord().
|
virtual |
Return a hash value for the object.
Reimplemented from lout::object::Object.
References hashValue().
Referenced by hashValue().
| void dw::core::style::StyleAttrs::initValues | ( | ) |
References dw::core::style::BORDER_MODEL_SEPARATE, dw::core::style::BORDER_NONE, dw::core::style::CURSOR_DEFAULT, dw::core::style::DISPLAY_INLINE, dw::core::style::LENGTH_AUTO, dw::core::style::LIST_STYLE_POSITION_OUTSIDE, dw::core::style::LIST_STYLE_TYPE_DISC, dw::core::style::TEXT_ALIGN_LEFT, dw::core::style::TEXT_DECORATION_NONE, dw::core::style::TEXT_TRANSFORM_NONE, dw::core::style::VALIGN_BASELINE, and dw::core::style::WHITE_SPACE_NORMAL.
| void dw::core::style::StyleAttrs::resetValues | ( | ) |
Reset those style attributes to their standard values, which are not inherited, according to CSS.
References dw::core::style::BORDER_NONE, dw::core::style::DISPLAY_INLINE, dw::core::style::LENGTH_AUTO, and dw::core::style::VALIGN_BASELINE.
|
inline |
References borderColor.
Referenced by dw::Textblock::changeLinkColor().
|
inline |
References borderStyle.
| 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).
Referenced by dw::core::Widget::setStyle().
| Color * dw::core::style::StyleAttrs::backgroundColor |
| BorderCollapse dw::core::style::StyleAttrs::borderCollapse |
Referenced by dw::core::style::Style::copyAttrs(), and equals().
| struct { ... } dw::core::style::StyleAttrs::borderColor |
| struct { ... } dw::core::style::StyleAttrs::borderStyle |
| Box dw::core::style::StyleAttrs::borderWidth |
Referenced by boxOffsetX(), boxOffsetY(), boxRestHeight(), boxRestWidth(), dw::core::style::Style::copyAttrs(), dw::core::style::drawBackground(), dw::core::style::drawBorderBottom(), dw::core::style::drawBorderLeft(), dw::core::style::drawBorderRight(), dw::core::style::drawBorderTop(), and equals().
| Color * dw::core::style::StyleAttrs::bottom |
Referenced by dw::core::style::drawBorderBottom(), and equals().
| BorderStyle dw::core::style::StyleAttrs::bottom |
| Color* dw::core::style::StyleAttrs::color |
| Cursor dw::core::style::StyleAttrs::cursor |
Referenced by dw::core::style::Style::copyAttrs(), equals(), and dw::Textblock::motionNotifyImpl().
| DisplayType dw::core::style::StyleAttrs::display |
Referenced by dw::core::style::Style::copyAttrs(), and equals().
| Font* dw::core::style::StyleAttrs::font |
Referenced by dw::Textblock::accumulateWordForLine(), dw::Textblock::addHyphen(), dw::Textblock::addLinebreak(), dw::Textblock::calcTextSize(), dw::core::style::Style::copyAttrs(), dw::Textblock::decorateText(), dw::Bullet::draw(), dw::Textblock::drawSpace(), dw::Textblock::drawText(), dw::Textblock::drawWord0(), equals(), dw::Textblock::fillSpace(), dw::Textblock::findWord(), dw::TableCell::getValue(), dw::Textblock::hyphenateWord(), dw::Textblock::sendSelectionEvent(), dw::fltk::ui::FltkResource::setWidgetStyle(), dw::fltk::ui::FltkLabelButtonResource::sizeRequest(), dw::fltk::ui::FltkEntryResource::sizeRequest(), dw::fltk::ui::FltkMultiLineTextResource::sizeRequest(), dw::fltk::ui::FltkOptionMenuResource::sizeRequest(), dw::fltk::ui::FltkListResource::sizeRequest(), and dw::Textblock::textWidth().
| int dw::core::style::StyleAttrs::hBorderSpacing |
Referenced by dw::core::style::Style::copyAttrs(), and equals().
| Length dw::core::style::StyleAttrs::height |
Referenced by dw::Textblock::calcWidgetSize(), dw::core::style::Style::copyAttrs(), and equals().
| Color * dw::core::style::StyleAttrs::left |
Referenced by dw::core::style::drawBorderLeft(), and equals().
| BorderStyle dw::core::style::StyleAttrs::left |
| Length dw::core::style::StyleAttrs::lineHeight |
Referenced by dw::Textblock::calcTextSize(), dw::core::style::Style::copyAttrs(), and equals().
| ListStylePosition dw::core::style::StyleAttrs::listStylePosition |
| ListStyleType dw::core::style::StyleAttrs::listStyleType |
Referenced by dw::core::style::Style::copyAttrs(), and equals().
| Box dw::core::style::StyleAttrs::margin |
| Box dw::core::style::StyleAttrs::padding |
Referenced by boxOffsetX(), boxOffsetY(), boxRestHeight(), boxRestWidth(), dw::core::style::Style::copyAttrs(), and equals().
| Color * dw::core::style::StyleAttrs::right |
Referenced by dw::core::style::drawBorderRight(), and equals().
| BorderStyle dw::core::style::StyleAttrs::right |
| TextAlignType dw::core::style::StyleAttrs::textAlign |
Referenced by dw::Textblock::alignLine(), dw::core::style::Style::copyAttrs(), equals(), and dw::Textblock::fillSpace().
| char dw::core::style::StyleAttrs::textAlignChar |
Referenced by dw::core::style::Style::copyAttrs(), equals(), and dw::TableCell::wordWrap().
| int dw::core::style::StyleAttrs::textDecoration |
| Length dw::core::style::StyleAttrs::textIndent |
Referenced by dw::core::style::Style::copyAttrs(), and equals().
| TextTransform dw::core::style::StyleAttrs::textTransform |
Referenced by dw::core::style::Style::copyAttrs(), dw::Textblock::drawText(), equals(), and dw::Textblock::textWidth().
| Color* dw::core::style::StyleAttrs::top |
Referenced by dw::core::style::drawBorderTop(), and equals().
| BorderStyle dw::core::style::StyleAttrs::top |
| VAlignType dw::core::style::StyleAttrs::valign |
| int dw::core::style::StyleAttrs::vBorderSpacing |
Referenced by dw::core::style::Style::copyAttrs(), and equals().
| WhiteSpace dw::core::style::StyleAttrs::whiteSpace |
Referenced by dw::core::style::Style::copyAttrs(), equals(), and dw::Textblock::setBreakOption().
| Length dw::core::style::StyleAttrs::width |
| int dw::core::style::StyleAttrs::wordSpacing |
Referenced by dw::core::style::Style::copyAttrs(), equals(), and dw::Textblock::fillSpace().
| int dw::core::style::StyleAttrs::x_img |
Referenced by dw::core::style::Style::copyAttrs(), and equals().
| char dw::core::style::StyleAttrs::x_lang[2] |
Referenced by dw::core::style::Style::copyAttrs(), equals(), dw::Textblock::hyphenateWord(), and dw::Textblock::wordWrap().
| int dw::core::style::StyleAttrs::x_link |
| Tooltip* dw::core::style::StyleAttrs::x_tooltip |
Referenced by dw::core::style::Style::copyAttrs(), equals(), and dw::Textblock::motionNotifyImpl().
1.8.2