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).
![]() ![]() |
#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. 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... | |
![]() | |
virtual | ~Object () |
The destructor is defined as virtual (but not abstract), so that destruction of Object's works properly. More... | |
virtual Object * | clone () |
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... | |
|
inline |
Definition at line 558 of file style.hh.
References boxOffsetY(), and boxRestHeight().
Referenced by dw::Textblock::calcWidgetSize(), dw::core::Widget::getContentHeight(), and dw::fltk::ui::FltkComplexButtonResource::widgetCallback().
|
inline |
Definition at line 549 of file style.hh.
References boxOffsetX(), and boxRestWidth().
Referenced by dw::Textblock::calcWidgetSize(), dw::core::Widget::getContentWidth(), dw::Textblock::getWordExtremes(), dw::Ruler::sizeRequestImpl(), and dw::fltk::ui::FltkComplexButtonResource::widgetCallback().
|
inline |
Definition at line 541 of file style.hh.
References borderWidth, dw::core::style::Box::left, margin, and padding.
Referenced by boxDiffWidth(), dw::Textblock::lineXOffsetWidget(), and dw::fltk::ui::FltkComplexButtonResource::widgetCallback().
|
inline |
Definition at line 550 of file style.hh.
References borderWidth, margin, padding, and dw::core::style::Box::top.
Referenced by boxDiffHeight(), dw::Ruler::sizeRequestImpl(), and dw::fltk::ui::FltkComplexButtonResource::widgetCallback().
|
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().
|
inline |
Definition at line 545 of file style.hh.
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.
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.
|
inline |
Definition at line 560 of file style.hh.
References backgroundColor, and backgroundImage.
Referenced by dw::Textblock::drawLine(), and dw::Textblock::drawWord().
|
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().
void dw::core::style::StyleAttrs::initValues | ( | ) |
Definition at line 58 of file style.cc.
References dw::core::style::BACKGROUND_ATTACHMENT_SCROLL, dw::core::style::BACKGROUND_REPEAT, dw::core::style::BORDER_MODEL_SEPARATE, dw::core::style::BORDER_NONE, dw::core::style::createPerLength(), 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.
Referenced by StyleEngine::StyleEngine().
void dw::core::style::StyleAttrs::resetValues | ( | ) |
Reset those style attributes to their standard values, which are not inherited, according to CSS.
Definition at line 98 of file style.cc.
References dw::core::style::BACKGROUND_ATTACHMENT_SCROLL, dw::core::style::BACKGROUND_REPEAT, dw::core::style::BORDER_NONE, dw::core::style::createPerLength(), dw::core::style::DISPLAY_INLINE, dw::core::style::LENGTH_AUTO, and dw::core::style::VALIGN_BASELINE.
Referenced by StyleEngine::style0(), and StyleEngine::wordStyle0().
|
inline |
Definition at line 534 of file style.hh.
References borderColor.
Referenced by dw::Textblock::changeLinkColor().
|
inline |
Definition at line 537 of file style.hh.
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).
Definition at line 137 of file style.cc.
Referenced by dw::core::Widget::setStyle().
BackgroundAttachment dw::core::style::StyleAttrs::backgroundAttachment |
Definition at line 498 of file style.hh.
Referenced by StyleEngine::apply(), StyleEngine::backgroundImage(), dw::core::style::Style::copyAttrs(), dw::core::style::drawBackground(), equals(), dw::core::style::StyleImage::ExternalWidgetImgRenderer::getBackgroundAttachment(), StyleEngine::preprocessAttrs(), and StyleEngine::wordStyle0().
Color * dw::core::style::StyleAttrs::backgroundColor |
Definition at line 495 of file style.hh.
Referenced by StyleEngine::apply(), StyleEngine::backgroundColor(), StyleEngine::backgroundStyle(), dw::core::style::Style::copyAttrs(), dw::core::style::drawBackground(), dw::Textblock::drawSpace(), dw::Textblock::drawWord0(), equals(), dw::core::Widget::getBgColor(), hasBackground(), Html_tag_open_body(), StyleEngine::preprocessAttrs(), dw::fltk::ui::FltkResource::setWidgetStyle(), StyleEngine::StyleEngine(), and StyleEngine::wordStyle0().
StyleImage* dw::core::style::StyleAttrs::backgroundImage |
Definition at line 496 of file style.hh.
Referenced by StyleEngine::apply(), StyleEngine::backgroundImage(), dw::core::style::Style::copyAttrs(), dw::core::style::drawBackground(), equals(), dw::core::style::StyleImage::ExternalWidgetImgRenderer::getBackgroundImage(), hasBackground(), StyleEngine::preprocessAttrs(), dw::Textblock::removeSpaceImgRenderer(), dw::Textblock::removeWordImgRenderer(), dw::Textblock::setSpaceImgRenderer(), dw::core::Widget::setStyle(), dw::Textblock::setWordImgRenderer(), and StyleEngine::wordStyle0().
Length dw::core::style::StyleAttrs::backgroundPositionX |
Definition at line 499 of file style.hh.
Referenced by StyleEngine::apply(), StyleEngine::backgroundImage(), dw::core::style::Style::copyAttrs(), dw::core::style::drawBackground(), equals(), dw::core::style::StyleImage::ExternalWidgetImgRenderer::getBackgroundPositionX(), StyleEngine::preprocessAttrs(), and StyleEngine::wordStyle0().
Length dw::core::style::StyleAttrs::backgroundPositionY |
Definition at line 500 of file style.hh.
Referenced by StyleEngine::apply(), StyleEngine::backgroundImage(), dw::core::style::Style::copyAttrs(), dw::core::style::drawBackground(), equals(), dw::core::style::StyleImage::ExternalWidgetImgRenderer::getBackgroundPositionY(), StyleEngine::preprocessAttrs(), and StyleEngine::wordStyle0().
BackgroundRepeat dw::core::style::StyleAttrs::backgroundRepeat |
Definition at line 497 of file style.hh.
Referenced by StyleEngine::apply(), StyleEngine::backgroundImage(), dw::core::style::Style::copyAttrs(), dw::core::style::drawBackground(), equals(), dw::core::style::StyleImage::ExternalWidgetImgRenderer::getBackgroundRepeat(), StyleEngine::preprocessAttrs(), and StyleEngine::wordStyle0().
BorderCollapse dw::core::style::StyleAttrs::borderCollapse |
Definition at line 511 of file style.hh.
Referenced by StyleEngine::apply(), dw::core::style::Style::copyAttrs(), equals(), and Html_tag_content_table_cell().
struct { ... } dw::core::style::StyleAttrs::borderColor |
Referenced by StyleEngine::apply(), dw::core::style::Style::copyAttrs(), dw::core::style::drawBorderBottom(), dw::core::style::drawBorderLeft(), dw::core::style::drawBorderRight(), dw::core::style::drawBorderTop(), equals(), Html_set_collapsing_border_model(), StyleEngine::postprocessAttrs(), StyleEngine::preprocessAttrs(), and setBorderColor().
struct { ... } dw::core::style::StyleAttrs::borderStyle |
Referenced by StyleEngine::apply(), dw::core::style::Style::copyAttrs(), dw::core::style::drawBorderBottom(), dw::core::style::drawBorderLeft(), dw::core::style::drawBorderRight(), dw::core::style::drawBorderTop(), equals(), Html_set_collapsing_border_model(), StyleEngine::postprocessAttrs(), and setBorderStyle().
Box dw::core::style::StyleAttrs::borderWidth |
Definition at line 510 of file style.hh.
Referenced by StyleEngine::apply(), boxOffsetX(), boxOffsetY(), boxRestHeight(), boxRestWidth(), dw::core::style::Style::copyAttrs(), dw::core::style::drawBorderBottom(), dw::core::style::drawBorderLeft(), dw::core::style::drawBorderRight(), dw::core::style::drawBorderTop(), dw::core::Widget::drawBox(), equals(), Html_set_collapsing_border_model(), StyleEngine::postprocessAttrs(), and StyleEngine::preprocessAttrs().
Color * dw::core::style::StyleAttrs::bottom |
Definition at line 512 of file style.hh.
Referenced by StyleEngine::apply(), dw::core::style::drawBorderBottom(), equals(), StyleEngine::postprocessAttrs(), and StyleEngine::preprocessAttrs().
BorderStyle dw::core::style::StyleAttrs::bottom |
Color* dw::core::style::StyleAttrs::color |
Definition at line 495 of file style.hh.
Referenced by StyleEngine::apply(), dw::Textblock::changeLinkColor(), dw::core::style::Style::copyAttrs(), dw::Textblock::decorateText(), dw::core::Rectangle::draw(), dw::core::Circle::draw(), dw::core::Polygon::draw(), dw::Textblock::drawText(), equals(), Html_tag_open_body(), StyleEngine::postprocessAttrs(), dw::fltk::ui::FltkResource::setWidgetStyle(), and StyleEngine::StyleEngine().
Cursor dw::core::style::StyleAttrs::cursor |
Definition at line 519 of file style.hh.
Referenced by StyleEngine::apply(), dw::core::style::Style::copyAttrs(), equals(), and dw::Textblock::motionNotifyImpl().
DisplayType dw::core::style::StyleAttrs::display |
Definition at line 515 of file style.hh.
Referenced by StyleEngine::apply(), dw::core::style::Style::copyAttrs(), equals(), and Html_process_tag().
Font* dw::core::style::StyleAttrs::font |
Definition at line 492 of file style.hh.
Referenced by dw::Textblock::accumulateWordForLine(), dw::Textblock::addLinebreak(), dw::Textblock::addText(), StyleEngine::apply(), 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(), StyleEngine::StyleEngine(), and dw::Textblock::textWidth().
int dw::core::style::StyleAttrs::hBorderSpacing |
Definition at line 507 of file style.hh.
Referenced by StyleEngine::apply(), dw::core::style::Style::copyAttrs(), equals(), and Html_set_collapsing_border_model().
Length dw::core::style::StyleAttrs::height |
Definition at line 508 of file style.hh.
Referenced by StyleEngine::apply(), dw::Textblock::calcWidgetSize(), dw::core::style::Style::copyAttrs(), and equals().
Color * dw::core::style::StyleAttrs::left |
Definition at line 512 of file style.hh.
Referenced by StyleEngine::apply(), dw::core::style::drawBorderLeft(), equals(), StyleEngine::postprocessAttrs(), and StyleEngine::preprocessAttrs().
BorderStyle dw::core::style::StyleAttrs::left |
Length dw::core::style::StyleAttrs::lineHeight |
Definition at line 508 of file style.hh.
Referenced by StyleEngine::apply(), dw::Textblock::calcTextSize(), dw::core::style::Style::copyAttrs(), and equals().
ListStylePosition dw::core::style::StyleAttrs::listStylePosition |
Definition at line 517 of file style.hh.
Referenced by StyleEngine::apply(), dw::core::style::Style::copyAttrs(), equals(), dw::ListItem::initWithText(), and dw::ListItem::initWithWidget().
ListStyleType dw::core::style::StyleAttrs::listStyleType |
Definition at line 518 of file style.hh.
Referenced by StyleEngine::apply(), dw::core::style::Style::copyAttrs(), equals(), Html_display_listitem(), and Html_tag_open_li().
Box dw::core::style::StyleAttrs::margin |
Definition at line 510 of file style.hh.
Referenced by dw::Textblock::accumulateWordForLine(), StyleEngine::apply(), boxOffsetX(), boxOffsetY(), boxRestHeight(), boxRestWidth(), dw::Textblock::calcWidgetSize(), dw::core::style::Style::copyAttrs(), dw::core::style::drawBorder(), dw::core::Widget::drawBox(), equals(), Html_set_collapsing_border_model(), Html_set_separate_border_model(), and dw::Textblock::sizeAllocateImpl().
Box dw::core::style::StyleAttrs::padding |
Definition at line 510 of file style.hh.
Referenced by StyleEngine::apply(), boxOffsetX(), boxOffsetY(), boxRestHeight(), boxRestWidth(), dw::core::style::Style::copyAttrs(), equals(), and Html_set_collapsing_border_model().
Color * dw::core::style::StyleAttrs::right |
Definition at line 512 of file style.hh.
Referenced by StyleEngine::apply(), dw::core::style::drawBorderRight(), equals(), StyleEngine::postprocessAttrs(), and StyleEngine::preprocessAttrs().
BorderStyle dw::core::style::StyleAttrs::right |
TextAlignType dw::core::style::StyleAttrs::textAlign |
Definition at line 502 of file style.hh.
Referenced by dw::Textblock::alignLine(), StyleEngine::apply(), dw::core::style::Style::copyAttrs(), equals(), dw::Textblock::getLineStretchability(), dw::Textblock::getSpaceShrinkability(), dw::Textblock::getSpaceStretchability(), and Html_tag_content_table_cell().
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().
int dw::core::style::StyleAttrs::textDecoration |
Definition at line 493 of file style.hh.
Referenced by StyleEngine::apply(), dw::core::style::Style::copyAttrs(), dw::Textblock::decorateText(), dw::Textblock::drawSpace(), dw::Textblock::drawWord0(), and equals().
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 dw::core::style::StyleAttrs::textTransform |
Definition at line 505 of file style.hh.
Referenced by StyleEngine::apply(), dw::core::style::Style::copyAttrs(), dw::Textblock::drawText(), equals(), and dw::Textblock::textWidth().
Color* dw::core::style::StyleAttrs::top |
Definition at line 512 of file style.hh.
Referenced by StyleEngine::apply(), dw::core::style::drawBorderTop(), equals(), StyleEngine::postprocessAttrs(), and StyleEngine::preprocessAttrs().
BorderStyle dw::core::style::StyleAttrs::top |
VAlignType dw::core::style::StyleAttrs::valign |
Definition at line 503 of file style.hh.
Referenced by dw::Textblock::accumulateWordForLine(), StyleEngine::apply(), dw::Textblock::calcTextSize(), dw::core::style::Style::copyAttrs(), dw::Textblock::drawSpace(), dw::Textblock::drawWord0(), equals(), StyleEngine::preprocessAttrs(), and StyleEngine::wordStyle0().
int dw::core::style::StyleAttrs::vBorderSpacing |
Definition at line 507 of file style.hh.
Referenced by StyleEngine::apply(), dw::core::style::Style::copyAttrs(), equals(), and Html_set_collapsing_border_model().
WhiteSpace dw::core::style::StyleAttrs::whiteSpace |
Definition at line 516 of file style.hh.
Referenced by StyleEngine::apply(), dw::core::style::Style::copyAttrs(), equals(), Html_process_space(), Html_process_tag(), and dw::Textblock::isBreakAllowed().
Length dw::core::style::StyleAttrs::width |
Definition at line 508 of file style.hh.
Referenced by StyleEngine::apply(), dw::Textblock::calcWidgetSize(), dw::core::style::Style::copyAttrs(), equals(), and dw::Textblock::getWordExtremes().
int dw::core::style::StyleAttrs::wordSpacing |
Definition at line 507 of file style.hh.
Referenced by StyleEngine::apply(), dw::core::style::Style::copyAttrs(), equals(), and dw::Textblock::fillSpace().
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().
char dw::core::style::StyleAttrs::x_lang[2] |
Definition at line 524 of file style.hh.
Referenced by StyleEngine::apply(), dw::core::style::Style::copyAttrs(), equals(), dw::Textblock::hyphenateWord(), and dw::Textblock::isHyphenationCandidate().
int dw::core::style::StyleAttrs::x_link |
Definition at line 521 of file style.hh.
Referenced by StyleEngine::apply(), dw::Textblock::changeLinkColor(), dw::core::style::Style::copyAttrs(), equals(), Html_tag_content_img(), dw::Textblock::motionNotifyImpl(), and dw::Textblock::sendSelectionEvent().
Tooltip* dw::core::style::StyleAttrs::x_tooltip |
Definition at line 523 of file style.hh.
Referenced by StyleEngine::apply(), dw::core::style::Style::copyAttrs(), equals(), and dw::Textblock::motionNotifyImpl().