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. 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 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 |
References boxOffsetY(), and boxRestHeight().
Referenced by dw::oof::OOFPosRelMgr::getChildPosY(), and dw::fltk::ui::FltkComplexButtonResource::widgetCallback().
|
inline |
References boxOffsetX(), and boxRestWidth().
Referenced by dw::oof::OOFPosRelMgr::getChildPosX(), dw::oof::OOFFloatsMgr::getFloatsExtremes(), and dw::fltk::ui::FltkComplexButtonResource::widgetCallback().
|
inline |
|
inline |
References dw::core::style::Box::top.
Referenced by boxDiffHeight(), dw::core::Widget::boxOffsetY(), and dw::fltk::ui::FltkComplexButtonResource::widgetCallback().
|
inline |
References dw::core::style::Box::bottom.
Referenced by boxDiffHeight(), and dw::core::Widget::boxRestHeight().
|
inline |
References dw::core::style::Box::right.
Referenced by boxDiffWidth(), dw::core::Widget::boxRestWidth(), dw::oof::OOFFloatsMgr::calcFloatX(), and dw::oof::OOFFloatsMgr::getBorder().
|
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 backgroundAttachment, backgroundColor, backgroundImage, backgroundPositionX, backgroundPositionY, backgroundRepeat, borderCollapse, borderColor, borderStyle, borderWidth, bottom, clear, color, cursor, display, 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.
|
inline |
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::BACKGROUND_ATTACHMENT_SCROLL, dw::core::style::BACKGROUND_REPEAT, dw::core::style::BORDER_MODEL_SEPARATE, dw::core::style::BORDER_NONE, dw::core::style::CLEAR_NONE, dw::core::style::createPerLength(), dw::core::style::CURSOR_DEFAULT, dw::core::style::DISPLAY_INLINE, dw::core::style::FLOAT_NONE, dw::core::style::LENGTH_AUTO, dw::core::style::LIST_STYLE_POSITION_OUTSIDE, dw::core::style::LIST_STYLE_TYPE_DISC, dw::core::style::OVERFLOW_VISIBLE, dw::core::style::POSITION_STATIC, dw::core::style::TEXT_ALIGN_LEFT, dw::core::style::TEXT_DECORATION_NONE, dw::core::style::TEXT_TRANSFORM_NONE, dw::core::style::VALIGN_BASELINE, dw::core::style::WHITE_SPACE_NORMAL, and dw::core::style::Z_INDEX_AUTO.
Referenced by main().
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::BACKGROUND_ATTACHMENT_SCROLL, dw::core::style::BACKGROUND_REPEAT, dw::core::style::BORDER_NONE, dw::core::style::CLEAR_NONE, dw::core::style::createPerLength(), dw::core::style::DISPLAY_INLINE, dw::core::style::FLOAT_NONE, dw::core::style::LENGTH_AUTO, dw::core::style::OVERFLOW_VISIBLE, dw::core::style::POSITION_STATIC, and dw::core::style::VALIGN_BASELINE.
|
inline |
References borderColor.
Referenced by dw::Textblock::changeLinkColor(), and main().
|
inline |
References borderStyle.
Referenced by main().
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().
BackgroundAttachment dw::core::style::StyleAttrs::backgroundAttachment |
Color * dw::core::style::StyleAttrs::backgroundColor |
Referenced by dw::core::style::Style::copyAttrs(), dw::core::Widget::drawBox(), dw::Textblock::drawSpace(), dw::core::Widget::drawWidgetBox(), dw::Textblock::drawWord0(), equals(), dw::core::Widget::getBgColor(), main(), dw::core::Widget::setStyle(), and dw::fltk::ui::FltkResource::setWidgetStyle().
StyleImage* dw::core::style::StyleAttrs::backgroundImage |
Referenced by dw::core::style::Style::copyAttrs(), dw::core::style::drawBackground(), equals(), dw::core::style::StyleImage::ExternalWidgetImgRenderer::getBackgroundImage(), main(), dw::Textblock::removeSpaceImgRenderer(), dw::Textblock::removeWordImgRenderer(), dw::Textblock::setSpaceImgRenderer(), dw::core::Widget::setStyle(), and dw::Textblock::setWordImgRenderer().
Length dw::core::style::StyleAttrs::backgroundPositionX |
Length dw::core::style::StyleAttrs::backgroundPositionY |
BackgroundRepeat dw::core::style::StyleAttrs::backgroundRepeat |
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 |
Length dw::core::style::StyleAttrs::bottom |
Color * dw::core::style::StyleAttrs::bottom |
BorderStyle dw::core::style::StyleAttrs::bottom |
ClearType dw::core::style::StyleAttrs::clear |
Referenced by dw::core::style::Style::copyAttrs(), equals(), and dw::oof::OOFFloatsMgr::getClearPosition().
Color* dw::core::style::StyleAttrs::color |
Cursor dw::core::style::StyleAttrs::cursor |
Referenced by dw::core::style::Style::copyAttrs(), equals(), main(), and dw::Textblock::motionNotifyImpl().
DisplayType dw::core::style::StyleAttrs::display |
Referenced by dw::core::style::Style::copyAttrs(), equals(), and dw::core::Widget::setStyle().
Font* dw::core::style::StyleAttrs::font |
Referenced by dw::Textblock::accumulateWordForLine(), dw::Textblock::addLinebreak(), dw::Textblock::addText(), 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::AlignedTableCell::getValue(), dw::Textblock::hyphenateWord(), main(), 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(), equals(), main(), and dw::core::Widget::setStyle().
Length dw::core::style::StyleAttrs::height |
Referenced by dw::core::Widget::affectsSizeChangeContainerChild(), dw::oof::OOFPosAbsLikeMgr::calcVPosAndSizeChildOfChild(), dw::core::style::Style::copyAttrs(), dw::core::Widget::correctReqHeightOfChild(), equals(), dw::oof::OOFPosAbsLikeMgr::getAvailHeightOfChild(), dw::core::Widget::getAvailHeightOfChild(), main(), and dw::core::Widget::setStyle().
Length dw::core::style::StyleAttrs::left |
Color * dw::core::style::StyleAttrs::left |
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 |
Length dw::core::style::StyleAttrs::maxHeight |
Length dw::core::style::StyleAttrs::maxWidth |
Length dw::core::style::StyleAttrs::minHeight |
Length dw::core::style::StyleAttrs::minWidth |
Overflow dw::core::style::StyleAttrs::overflow |
Referenced by dw::core::style::Style::copyAttrs(), and equals().
Box dw::core::style::StyleAttrs::padding |
Position dw::core::style::StyleAttrs::position |
Referenced by dw::core::style::Style::copyAttrs(), equals(), dw::oof::OOFAwareWidget::getOOFMIndex(), dw::core::StackingContextMgr::isEstablishingStackingContext(), dw::oof::OOFAwareWidget::testStyleAbsolutelyPositioned(), dw::oof::OOFAwareWidget::testStyleFixedlyPositioned(), and dw::oof::OOFAwareWidget::testStyleRelativelyPositioned().
Length dw::core::style::StyleAttrs::right |
Color * dw::core::style::StyleAttrs::right |
BorderStyle dw::core::style::StyleAttrs::right |
TextAlignType dw::core::style::StyleAttrs::textAlign |
char dw::core::style::StyleAttrs::textAlignChar |
Referenced by dw::core::style::Style::copyAttrs(), equals(), main(), and dw::AlignedTableCell::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().
Length dw::core::style::StyleAttrs::top |
Color* dw::core::style::StyleAttrs::top |
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(), equals(), main(), and dw::core::Widget::setStyle().
FloatType dw::core::style::StyleAttrs::vloat |
Referenced by dw::oof::OOFFloatsMgr::addWidgetOOF(), dw::oof::OOFFloatsMgr::affectsLeftBorder(), dw::oof::OOFFloatsMgr::affectsRightBorder(), dw::oof::OOFFloatsMgr::calcFloatX(), dw::oof::OOFFloatsMgr::collidesH(), dw::core::style::Style::copyAttrs(), equals(), dw::oof::OOFFloatsMgr::getFloatsListsAndSide(), dw::oof::OOFAwareWidget::getOOFMIndex(), main(), and dw::oof::OOFAwareWidget::testStyleFloat().
WhiteSpace dw::core::style::StyleAttrs::whiteSpace |
Referenced by dw::core::style::Style::copyAttrs(), equals(), dw::Textblock::fillSpace(), and dw::Textblock::isBreakAllowed().
Length dw::core::style::StyleAttrs::width |
Referenced by dw::core::Widget::affectsSizeChangeContainerChild(), dw::core::Widget::calcFinalWidth(), dw::oof::OOFPosAbsLikeMgr::calcHPosAndSizeChildOfChild(), dw::core::style::Style::copyAttrs(), dw::core::Widget::correctExtremesOfChild(), dw::core::ui::ComplexButtonResource::correctExtremesOfChild(), dw::core::ui::ComplexButtonResource::correctRequisitionOfChild(), equals(), dw::oof::OOFPosAbsLikeMgr::getAvailWidthOfChild(), dw::core::Widget::getAvailWidthOfChild(), main(), and dw::core::Widget::setStyle().
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] |
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().
int dw::core::style::StyleAttrs::zIndex |