tbx
0.7.6
|
Item renderer to render a sprite in a cell. More...
#include <itemrenderer.h>
Public Member Functions | |
SpriteItemRenderer (ItemViewValue< tbx::Sprite * > *vv) | |
Construct with object to give value to render. More... | |
virtual void | render (const ItemRenderer::Info &info) |
Render the sprite to the screen. More... | |
virtual unsigned int | width (unsigned int index) const |
Used to measure the width of a column. | |
virtual unsigned int | height (unsigned int index) const |
Used to measure the height. | |
virtual Size | size (unsigned int index) const |
Called to get the size of the cell. More... | |
![]() | |
TypedItemRenderer (ItemViewValue< tbx::Sprite * > *vp) | |
Construct the item view renderer. 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... | |
Additional Inherited Members | |
![]() | |
ItemViewValue< tbx::Sprite * > * | _value_provider |
Object to retrieve the value for a rendered. | |
Item renderer to render a sprite in a cell.
Uses an ItemViewValue<Sprite> to provide the sprite to render
|
inline |
Construct with object to give value to render.
vv | object that returns a sprite to render |
|
virtual |
|
virtual |
Called to get the size of the cell.
Called to get the size of an item.
Implements tbx::view::ItemRenderer.