Dillo
Classes | Namespaces | Typedefs | Enumerations | Functions
style.hh File Reference
#include <stdint.h>
#include <limits.h>
#include "../lout/signal.hh"
#include "../lout/debug.hh"
Include dependency graph for style.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  dw::core::style::Box
 Represents a dimension box according to the CSS box model. More...
 
class  dw::core::style::StyleAttrs
 
class  dw::core::style::Style
 
class  dw::core::style::TooltipAttrs
 
class  dw::core::style::Tooltip
 
class  dw::core::style::FontAttrs
 
class  dw::core::style::Font
 
class  dw::core::style::ColorAttrs
 
class  dw::core::style::Color
 
class  dw::core::style::StyleImage
 
class  dw::core::style::StyleImage::StyleImgRenderer
 
class  dw::core::style::StyleImage::ExternalImgRenderer
 Useful (but not mandatory) base class for updates of areas with background images. More...
 
class  dw::core::style::StyleImage::ExternalWidgetImgRenderer
 Suitable for widgets and parts of widgets. More...
 

Namespaces

 dw
 Dw is in this namespace, or sub namespaces of this one.
 
 dw::core
 The core of Dw is defined in this namespace.
 
 dw::core::style
 Anything related to Dillo Widget styles is defined here.
 

Typedefs

typedef int dw::core::style::Length
 Type for representing all lengths within dw::core::style. More...
 

Enumerations

enum  dw::core::style::Cursor {
  dw::core::style::CURSOR_CROSSHAIR, dw::core::style::CURSOR_DEFAULT, dw::core::style::CURSOR_POINTER, dw::core::style::CURSOR_MOVE,
  dw::core::style::CURSOR_E_RESIZE, dw::core::style::CURSOR_NE_RESIZE, dw::core::style::CURSOR_NW_RESIZE, dw::core::style::CURSOR_N_RESIZE,
  dw::core::style::CURSOR_SE_RESIZE, dw::core::style::CURSOR_SW_RESIZE, dw::core::style::CURSOR_S_RESIZE, dw::core::style::CURSOR_W_RESIZE,
  dw::core::style::CURSOR_TEXT, dw::core::style::CURSOR_WAIT, dw::core::style::CURSOR_HELP
}
 
enum  dw::core::style::BorderCollapse { dw::core::style::BORDER_MODEL_SEPARATE, dw::core::style::BORDER_MODEL_COLLAPSE }
 
enum  dw::core::style::BorderStyle {
  dw::core::style::BORDER_NONE, dw::core::style::BORDER_HIDDEN, dw::core::style::BORDER_DOTTED, dw::core::style::BORDER_DASHED,
  dw::core::style::BORDER_SOLID, dw::core::style::BORDER_DOUBLE, dw::core::style::BORDER_GROOVE, dw::core::style::BORDER_RIDGE,
  dw::core::style::BORDER_INSET, dw::core::style::BORDER_OUTSET
}
 
enum  dw::core::style::BackgroundRepeat { dw::core::style::BACKGROUND_REPEAT, dw::core::style::BACKGROUND_REPEAT_X, dw::core::style::BACKGROUND_REPEAT_Y, dw::core::style::BACKGROUND_NO_REPEAT }
 
enum  dw::core::style::BackgroundAttachment { dw::core::style::BACKGROUND_ATTACHMENT_SCROLL, dw::core::style::BACKGROUND_ATTACHMENT_FIXED }
 
enum  dw::core::style::TextAlignType {
  dw::core::style::TEXT_ALIGN_LEFT, dw::core::style::TEXT_ALIGN_RIGHT, dw::core::style::TEXT_ALIGN_CENTER, dw::core::style::TEXT_ALIGN_JUSTIFY,
  dw::core::style::TEXT_ALIGN_STRING
}
 
enum  dw::core::style::VAlignType {
  dw::core::style::VALIGN_TOP, dw::core::style::VALIGN_BOTTOM, dw::core::style::VALIGN_MIDDLE, dw::core::style::VALIGN_BASELINE,
  dw::core::style::VALIGN_SUB, dw::core::style::VALIGN_SUPER, dw::core::style::VALIGN_TEXT_TOP, dw::core::style::VALIGN_TEXT_BOTTOM
}
 
enum  dw::core::style::TextTransform { dw::core::style::TEXT_TRANSFORM_NONE, dw::core::style::TEXT_TRANSFORM_CAPITALIZE, dw::core::style::TEXT_TRANSFORM_UPPERCASE, dw::core::style::TEXT_TRANSFORM_LOWERCASE }
 
enum  dw::core::style::DisplayType {
  dw::core::style::DISPLAY_BLOCK, dw::core::style::DISPLAY_INLINE, dw::core::style::DISPLAY_INLINE_BLOCK, dw::core::style::DISPLAY_LIST_ITEM,
  dw::core::style::DISPLAY_NONE, dw::core::style::DISPLAY_TABLE, dw::core::style::DISPLAY_TABLE_ROW_GROUP, dw::core::style::DISPLAY_TABLE_HEADER_GROUP,
  dw::core::style::DISPLAY_TABLE_FOOTER_GROUP, dw::core::style::DISPLAY_TABLE_ROW, dw::core::style::DISPLAY_TABLE_CELL
}
 
enum  dw::core::style::LineType { dw::core::style::LINE_NORMAL, dw::core::style::LINE_DOTTED, dw::core::style::LINE_DASHED }
 
enum  dw::core::style::ListStylePosition { dw::core::style::LIST_STYLE_POSITION_INSIDE, dw::core::style::LIST_STYLE_POSITION_OUTSIDE }
 
enum  dw::core::style::ListStyleType {
  dw::core::style::LIST_STYLE_TYPE_DISC, dw::core::style::LIST_STYLE_TYPE_CIRCLE, dw::core::style::LIST_STYLE_TYPE_SQUARE, dw::core::style::LIST_STYLE_TYPE_DECIMAL,
  dw::core::style::LIST_STYLE_TYPE_DECIMAL_LEADING_ZERO, dw::core::style::LIST_STYLE_TYPE_LOWER_ROMAN, dw::core::style::LIST_STYLE_TYPE_UPPER_ROMAN, dw::core::style::LIST_STYLE_TYPE_LOWER_GREEK,
  dw::core::style::LIST_STYLE_TYPE_LOWER_ALPHA, dw::core::style::LIST_STYLE_TYPE_LOWER_LATIN, dw::core::style::LIST_STYLE_TYPE_UPPER_ALPHA, dw::core::style::LIST_STYLE_TYPE_UPPER_LATIN,
  dw::core::style::LIST_STYLE_TYPE_HEBREW, dw::core::style::LIST_STYLE_TYPE_ARMENIAN, dw::core::style::LIST_STYLE_TYPE_GEORGIAN, dw::core::style::LIST_STYLE_TYPE_CJK_IDEOGRAPHIC,
  dw::core::style::LIST_STYLE_TYPE_HIRAGANA, dw::core::style::LIST_STYLE_TYPE_KATAKANA, dw::core::style::LIST_STYLE_TYPE_HIRAGANA_IROHA, dw::core::style::LIST_STYLE_TYPE_KATAKANA_IROHA,
  dw::core::style::LIST_STYLE_TYPE_NONE
}
 
enum  dw::core::style::FontStyle { dw::core::style::FONT_STYLE_NORMAL, dw::core::style::FONT_STYLE_ITALIC, dw::core::style::FONT_STYLE_OBLIQUE }
 
enum  dw::core::style::FontVariant { dw::core::style::FONT_VARIANT_NORMAL, dw::core::style::FONT_VARIANT_SMALL_CAPS }
 
enum  dw::core::style::Overflow { dw::core::style::OVERFLOW_VISIBLE, dw::core::style::OVERFLOW_HIDDEN, dw::core::style::OVERFLOW_SCROLL, dw::core::style::OVERFLOW_AUTO }
 
enum  dw::core::style::Position { dw::core::style::POSITION_STATIC, dw::core::style::POSITION_RELATIVE, dw::core::style::POSITION_ABSOLUTE, dw::core::style::POSITION_FIXED }
 
enum  dw::core::style::TextDecoration {
  dw::core::style::TEXT_DECORATION_NONE = 0, dw::core::style::TEXT_DECORATION_UNDERLINE = 1 << 0, dw::core::style::TEXT_DECORATION_OVERLINE = 1 << 1, dw::core::style::TEXT_DECORATION_LINE_THROUGH = 1 << 2,
  dw::core::style::TEXT_DECORATION_BLINK = 1 << 3
}
 
enum  dw::core::style::WhiteSpace {
  dw::core::style::WHITE_SPACE_NORMAL, dw::core::style::WHITE_SPACE_PRE, dw::core::style::WHITE_SPACE_NOWRAP, dw::core::style::WHITE_SPACE_PRE_WRAP,
  dw::core::style::WHITE_SPACE_PRE_LINE
}
 
enum  dw::core::style::FloatType { dw::core::style::FLOAT_NONE, dw::core::style::FLOAT_LEFT, dw::core::style::FLOAT_RIGHT }
 
enum  dw::core::style::ClearType { dw::core::style::CLEAR_LEFT, dw::core::style::CLEAR_RIGHT, dw::core::style::CLEAR_BOTH, dw::core::style::CLEAR_NONE }
 
enum  { dw::core::style::Z_INDEX_AUTO = INT_MAX }
 
enum  { dw::core::style::LENGTH_AUTO = 0 }
 

Functions

Length dw::core::style::createAbsLength (int n)
 Returns a length of n pixels. More...
 
Length dw::core::style::createPerLength (double v)
 Returns a percentage, v is relative to 1, not to 100. More...
 
Length dw::core::style::createRelLength (double v)
 Returns a relative length. More...
 
bool dw::core::style::isAbsLength (Length l)
 Returns true if l is an absolute length. More...
 
bool dw::core::style::isPerLength (Length l)
 Returns true if l is a percentage. More...
 
bool dw::core::style::isRelLength (Length l)
 Returns true if l is a relative length. More...
 
int dw::core::style::absLengthVal (Length l)
 Returns the value of a length in pixels, as an integer. More...
 
double dw::core::style::perLengthVal_useThisOnlyForDebugging (Length l)
 Returns the value of a percentage, relative to 1, as a double. More...
 
double dw::core::style::relLengthVal (Length l)
 Returns the value of a relative length, as a float. More...
 
int dw::core::style::multiplyWithPerLength (int x, Length l)
 Multiply an int with a percentage length, returning int. More...
 
int dw::core::style::multiplyWithPerLengthRounded (int x, Length l)
 Like multiplyWithPerLength, but rounds to nearest integer instead of down. More...
 
int dw::core::style::multiplyWithRelLength (int x, Length l)
 
void dw::core::style::drawBorder (View *view, Layout *layout, Rectangle *area, int x, int y, int width, int height, Style *style, bool inverse)
 Draw the border of a region in window, according to style. More...
 
void dw::core::style::drawBackground (View *view, Layout *layout, Rectangle *area, int x, int y, int width, int height, int xRef, int yRef, int widthRef, int heightRef, Style *style, Color *bgColor, bool inverse, bool atTop)
 Draw the background (content plus padding) of a region in window, according to style. More...
 
void dw::core::style::drawBackgroundImage (View *view, StyleImage *backgroundImage, BackgroundRepeat backgroundRepeat, BackgroundAttachment backgroundAttachment, Length backgroundPositionX, Length backgroundPositionY, int x, int y, int width, int height, int xRef, int yRef, int widthRef, int heightRef)
 
void dw::core::style::numtostr (int num, char *buf, int buflen, ListStyleType listStyleType)
 Convert a number into a string, in a given list style. More...