Dillo v3.1.1-46-g8a360e32
Loading...
Searching...
No Matches
dw::Textblock::WordImgRenderer Class Reference

Implementation used for words. More...

#include <textblock.hh>

Public Member Functions

 WordImgRenderer (Textblock *textblock, int wordNo)
 
 ~WordImgRenderer ()
 
void setData (int xWordWidget, int lineNo)
 
bool readyToDraw ()
 If this method returns false, nothing is done at all.
 
void getBgArea (int *x, int *y, int *width, int *height)
 Return the area covered by the background image.
 
void getRefArea (int *xRef, int *yRef, int *widthRef, int *heightRef)
 Return the "reference area".
 
core::style::StylegetStyle ()
 Return the style this background image is part of.
 
void draw (int x, int y, int width, int height)
 Draw (or queue for drawing) an area, which is given in canvas coordinates.
 
- Public Member Functions inherited from dw::core::style::StyleImage::ExternalWidgetImgRenderer
void getPaddingArea (int *x, int *y, int *width, int *height)
 
StyleImagegetBackgroundImage ()
 
BackgroundRepeat getBackgroundRepeat ()
 
BackgroundAttachment getBackgroundAttachment ()
 
Length getBackgroundPositionX ()
 
Length getBackgroundPositionY ()
 
- Public Member Functions inherited from dw::core::style::StyleImage::ExternalImgRenderer
void setBuffer (core::Imgbuf *buffer, bool resize)
 Called, when an image buffer is attached.
 
void drawRow (int row)
 Called, when data from a row is available and has been copied into the image buffer.
 
void finish ()
 Called, when all image data has been retrieved.
 
void fatal ()
 Called, when there are problems with the retrieval of image data.
 
- Public Member Functions inherited from dw::core::ImgRenderer
virtual ~ImgRenderer ()
 

Protected Attributes

Textblocktextblock
 
int wordNo
 
int xWordWidget
 
int lineNo
 
bool dataSet
 

Detailed Description

Implementation used for words.

Definition at line 303 of file textblock.hh.

Constructor & Destructor Documentation

◆ WordImgRenderer()

dw::Textblock::WordImgRenderer::WordImgRenderer ( Textblock textblock,
int  wordNo 
)

Definition at line 48 of file textblock.cc.

References dataSet, textblock, and wordNo.

◆ ~WordImgRenderer()

dw::Textblock::WordImgRenderer::~WordImgRenderer ( )

Definition at line 58 of file textblock.cc.

Member Function Documentation

◆ draw()

void dw::Textblock::WordImgRenderer::draw ( int  x,
int  y,
int  width,
int  height 
)
virtual

Draw (or queue for drawing) an area, which is given in canvas coordinates.

Implements dw::core::style::StyleImage::ExternalImgRenderer.

Definition at line 103 of file textblock.cc.

◆ getBgArea()

void dw::Textblock::WordImgRenderer::getBgArea ( int *  x,
int *  y,
int *  width,
int *  height 
)
virtual

Return the area covered by the background image.

Implements dw::core::style::StyleImage::ExternalImgRenderer.

Definition at line 80 of file textblock.cc.

References dw::Textblock::Line::borderAscent, and dw::Textblock::Line::borderDescent.

Referenced by dw::Textblock::SpaceImgRenderer::getBgArea().

◆ getRefArea()

void dw::Textblock::WordImgRenderer::getRefArea ( int *  xRef,
int *  yRef,
int *  widthRef,
int *  heightRef 
)
virtual

Return the "reference area".

See comment of "drawBackground".

Implements dw::core::style::StyleImage::ExternalImgRenderer.

Definition at line 91 of file textblock.cc.

◆ getStyle()

core::style::Style * dw::Textblock::WordImgRenderer::getStyle ( )
virtual

Return the style this background image is part of.

Implements dw::core::style::StyleImage::ExternalWidgetImgRenderer.

Definition at line 98 of file textblock.cc.

◆ readyToDraw()

bool dw::Textblock::WordImgRenderer::readyToDraw ( )
virtual

If this method returns false, nothing is done at all.

Implements dw::core::style::StyleImage::ExternalImgRenderer.

Definition at line 70 of file textblock.cc.

References dw::core::Widget::wasAllocated().

◆ setData()

void dw::Textblock::WordImgRenderer::setData ( int  xWordWidget,
int  lineNo 
)

Definition at line 63 of file textblock.cc.

Referenced by dw::Textblock::addLine().

Member Data Documentation

◆ dataSet

bool dw::Textblock::WordImgRenderer::dataSet
protected

Definition at line 309 of file textblock.hh.

Referenced by WordImgRenderer().

◆ lineNo

int dw::Textblock::WordImgRenderer::lineNo
protected

Definition at line 308 of file textblock.hh.

◆ textblock

Textblock* dw::Textblock::WordImgRenderer::textblock
protected

Definition at line 307 of file textblock.hh.

Referenced by WordImgRenderer().

◆ wordNo

int dw::Textblock::WordImgRenderer::wordNo
protected

Definition at line 308 of file textblock.hh.

Referenced by WordImgRenderer().

◆ xWordWidget

int dw::Textblock::WordImgRenderer::xWordWidget
protected

Definition at line 308 of file textblock.hh.


The documentation for this class was generated from the following files: