tbx
0.7.5
|
Base class to render an indexed item. More...
#include <itemrenderer.h>
Classes | |
struct | Info |
Information on what needs to be redrawn. More... | |
Public Member Functions | |
virtual void | render (const ItemRenderer::Info &info)=0 |
Called to render each item that needs drawing. More... | |
virtual unsigned int | width (unsigned int index) const =0 |
Used to measure the width of a column. | |
virtual unsigned int | height (unsigned int index) const =0 |
Used to measure the height of column. | |
virtual Size | size (unsigned int index) const =0 |
Called to get the size of the item. More... | |
virtual bool | hit_test (unsigned int index, const Size &size, const Point &pos) const |
Check if the point given hits content of the cell rather then a margin or background. More... | |
virtual bool | intersects (unsigned int index, const Size &size, const BBox &box) const |
Check if the given rectangle intersects the content of the cell rather than a margin or background. More... | |
Base class to render an indexed item.
|
inlinevirtual |
Check if the point given hits content of the cell rather then a margin or background.
Default returns true so all the cell is content.
index | index of item to check |
size | of area item is rendered in |
pos | location to check relative to bottom left of cell |
Reimplemented in tbx::view::IconItemRenderer.
|
inlinevirtual |
Check if the given rectangle intersects the content of the cell rather than a margin or background.
Default returns true so all cell is content.
index | index of item to check |
size | of area item is rendered in |
box | box to check if it intersect the cell |
Reimplemented in tbx::view::IconItemRenderer.
|
pure virtual |
Called to render each item that needs drawing.
The item is only clipped to the containing Windows visible area, not to the cell bounds so the content must be drawn entirely inside the cell bounding box or the clip area should be set before drawing.
info | Information on redraw event and item to be redrawn |
Implemented in tbx::view::SpriteItemRenderer, tbx::view::WimpFontItemRenderer, tbx::view::FontItemRenderer, and tbx::view::IconItemRenderer.
|
pure virtual |
Called to get the size of the item.
Should return the equivalent of Size(width(index), height(index))
Implemented in tbx::view::SpriteItemRenderer, tbx::view::WimpFontItemRenderer, tbx::view::FontItemRenderer, and tbx::view::IconItemRenderer.