tbx  0.7.5
Public Member Functions | Protected Attributes | List of all members
tbx::view::TypedItemRenderer< T > Class Template Reference

Base class for item renderer that work on a specific type and use an ItemViewValue object to return the value to use. More...

#include <itemrenderer.h>

Inheritance diagram for tbx::view::TypedItemRenderer< T >:
tbx::view::ItemRenderer

Public Member Functions

 TypedItemRenderer (ItemViewValue< T > *vp)
 Construct the item view renderer. More...
 
- Public Member Functions inherited from tbx::view::ItemRenderer
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...
 

Protected Attributes

ItemViewValue< T > * _value_provider
 Object to retrieve the value for a rendered.
 

Detailed Description

template<class T>
class tbx::view::TypedItemRenderer< T >

Base class for item renderer that work on a specific type and use an ItemViewValue object to return the value to use.

Constructor & Destructor Documentation

◆ TypedItemRenderer()

template<class T>
tbx::view::TypedItemRenderer< T >::TypedItemRenderer ( ItemViewValue< T > *  vp)
inline

Construct the item view renderer.

Parameters
vpobject used to retrieve values to render

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