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) 
|
Go to the documentation of this file. 1 #ifndef __DW_STYLE_HH__ 2 #define __DW_STYLE_HH__ 6 #ifndef __INCLUDED_FROM_DW_CORE_HH__ 7 # error Do not include this file directly, use "core.hh" instead. 10 #include "../lout/signal.hh" 11 #include "../lout/debug.hh" 396 return ((
int)(v * (1 << 18)) & ~3) | 2; }
400 return ((
int)(v * (1 << 18)) & ~3) | 3; }
471 return top == other->
top &&
592 style =
new Style (attrs);
627 {
if (--
refCount == 0)
delete this; }
736 {
if (--
refCount == 0)
delete this; }
786 virtual void getBgArea (
int *x,
int *y,
int *width,
int *height) = 0;
793 virtual void getRefArea (
int *xRef,
int *yRef,
int *widthRef,
806 virtual void draw (
int x,
int y,
int width,
int height) = 0;
833 {
if (--
refCount == 0)
delete this; }
859 int x,
int y,
int width,
int height,
860 Style *style,
bool inverse);
862 int x,
int y,
int width,
int height,
863 int xRef,
int yRef,
int widthRef,
int heightRef,
864 Style *style,
bool inverse,
bool atTop);
868 Length backgroundPositionX,
869 Length backgroundPositionY,
870 int x,
int y,
int width,
int height,
871 int xRef,
int yRef,
int widthRef,
int heightRef);
878 #endif // __DW_STYLE_HH__
void fatal()
Called, when there are problems with the retrieval of image data.
TextTransform textTransform
virtual void getBgArea(int *x, int *y, int *width, int *height)=0
Return the area covered by the background image.
void putExternalImgRenderer(ImgRenderer *ir)
Add an additional ImgRenderer, especially used for drawing.
Length backgroundPositionY
virtual Length getBackgroundPositionY()=0
bool isPerLength(Length l)
Returns true if l is a percentage.
virtual void draw(int x, int y, int width, int height)=0
Draw (or queue for drawing) an area, which is given in canvas coordinates.
int absLengthVal(Length l)
Returns the value of a length in pixels, as an integer.
static lout::container::typed::HashTable< StyleAttrs, Style > * styleTable
int getTilesX(bool repeatX, bool repeatY)
#define DBG_OBJ_CREATE(klass)
Represents "auto" lengths.
int hashValue()
Return a hash value for the object.
Useful (but not mandatory) base class for updates of areas with background images.
void copyAttrs(FontAttrs *attrs)
virtual Length getBackgroundPositionX()=0
BorderCollapse borderCollapse
Implementation of ImgRenderer, which distributes all calls to a set of other implementations of ImgRe...
static Style * create(StyleAttrs *attrs)
ListStylePosition listStylePosition
void 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.
void resetValues()
Reset those style attributes to their standard values, which are not inherited, according to CSS.
bool equals(lout::object::Object *other)
Returns, whether two objects are equal.
BackgroundRepeat backgroundRepeat
int multiplyWithPerLength(int x, Length l)
Multiply an int with a percentage length, returning int.
void setBorderStyle(BorderStyle val)
void numtostr(int num, char *buf, int buflen, ListStyleType listStyleType)
Convert a number into a string, in a given list style.
ImgRenderer * getMainImgRenderer()
virtual StyleImage * getBackgroundImage()=0
double relLengthVal(Length l)
Returns the value of a relative length, as a float.
void finish()
Called, when all image data has been retrieved.
An object::Object wrapper for strings (char*).
int multiplyWithPerLengthRounded(int x, Length l)
Like multiplyWithPerLength, but rounds to nearest integer instead of down.
int multiplyWithRelLength(int x, Length l)
ListStyleType listStyleType
void finish()
Called, when all image data has been retrieved.
void setBorderColor(Color *val)
struct dw::core::style::StyleAttrs::@14 borderStyle
Typed version of container::untyped::HashTable.
This is the base class for many other classes, which defines very common virtual methods.
static Font * create(Layout *layout, FontAttrs *attrs)
double perLengthVal(Length l)
Returns the value of a percentage, relative to 1, as a double.
void copyAttrs(StyleAttrs *attrs)
bool equals(lout::object::Object *other)
Returns, whether two objects are equal.
static bool exists(Layout *layout, const char *name)
void setBuffer(core::Imgbuf *buffer, bool resize)
Called, when an image buffer is attached.
StyleImgRenderer(StyleImage *image)
struct dw::core::style::StyleAttrs::@13 borderColor
BackgroundAttachment backgroundAttachment
bool isAbsLength(Length l)
Returns true if l is an absolute length.
static Color * create(Layout *layout, int color)
virtual BackgroundAttachment getBackgroundAttachment()=0
The central class for managing and drawing a widget tree.
bool sizeDiffs(StyleAttrs *otherStyleAttrs)
This method returns whether something may change its size, when its style changes from this style to ...
bool isRelLength(Length l)
Returns true if l is a relative length.
void remove(ImgRenderer *child)
The platform independent interface for image buffers.
static StyleImage * create()
Length createPerLength(double v)
Returns a percentage, v is relative to 1, not to 100.
dw::core::Shape implemtation for simple rectangles.
int getTilesY(bool repeatX, bool repeatY)
An interface to encapsulate platform dependent drawing.
int hashValue()
Return a hash value for the object.
void remove(dw::core::Layout *layout)
virtual bool readyToDraw()=0
If this method returns false, nothing is done at all.
Represents a dimension box according to the CSS box model.
virtual BackgroundRepeat getBackgroundRepeat()=0
void drawRow(int row)
Called, when data from a row is available and has been copied into the image buffer.
void 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 drawRow(int row)
Called, when data from a row is available and has been copied into the image buffer.
An observed object has a signal emitter, which tells the receivers, when the object is deleted.
void setBuffer(core::Imgbuf *buffer, bool resize)
Called, when an image buffer is attached.
static Font * create0(Layout *layout, FontAttrs *attrs, bool tryEverything)
int Length
Type for representing all lengths within dw::core::style.
StyleImgRenderer * styleImgRenderer
StyleImage * backgroundImage
ImgRendererDist * imgRendererDist
void put(ImgRenderer *child)
Imgbuf * getImgbufTiled(bool repeatX, bool repeatY)
virtual void getRefArea(int *xRef, int *yRef, int *widthRef, int *heightRef)=0
Return the "reference area".
bool equals(lout::object::Object *other)
Returns, whether two objects are equal.
Dw is in this namespace, or sub namespaces of this one.
void removeExternalImgRenderer(ImgRenderer *ir)
Remove a previously added additional ImgRenderer.
int shadeColor(int color, int d)
Length backgroundPositionX
int hashValue()
Return a hash value for the object.
Length createRelLength(double v)
Returns a relative length.
void 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, bool inverse, bool atTop)
Draw the background (content plus padding) of a region in window, according to style.
Length createAbsLength(int n)
Returns a length of n pixels.
void fatal()
Called, when there are problems with the retrieval of image data.