31 #ifndef FONTITEMRENDERER_H_
32 #define FONTITEMRENDERER_H_
35 #include "itemrenderer.h"
46 unsigned int _baseline;
57 _baseline(0), _height(40)
69 _baseline(0), _height(40)
95 unsigned int height()
const {
return _height;}
128 virtual unsigned int width(
unsigned int index)
const;
135 virtual unsigned int height(
unsigned int index)
const {
return _height;}
Information on what needs to be redrawn.
Definition: itemrenderer.h:64
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:35
Class to handle painting and measuring text using an outline font.
Definition: font.h:61
virtual unsigned int width(unsigned int index) const
Used to measure the width of a column.
Definition: fontitemrenderer.cc:70
ItemRenderer to render text with a given font in a fixed height.
Definition: fontitemrenderer.h:44
virtual unsigned int height(unsigned int index) const
Get font row height.
Definition: fontitemrenderer.h:135
unsigned int height() const
Get the height of the renderer.
Definition: fontitemrenderer.h:95
FontItemRenderer(tbx::view::ItemViewValue< std::string > *vv)
Construct with object to give value to render.
Definition: fontitemrenderer.h:55
tbx::Font font()
Get the font used to render an item.
Definition: fontitemrenderer.h:80
Class to represent a two-dimensional size.
Definition: size.h:35
unsigned int baseline() const
Get the font base line.
Definition: fontitemrenderer.h:107
void baseline(unsigned int baseline)
Set the font base line.
Definition: fontitemrenderer.h:114
virtual tbx::Size size(unsigned int index) const
Called to get the size of the cell.
Definition: fontitemrenderer.cc:76
void height(unsigned int height)
Set the height of the renderer.
Definition: fontitemrenderer.h:101
virtual void render(const ItemRenderer::Info &info)
Render text in black using font set.
Definition: fontitemrenderer.cc:54
FontItemRenderer(tbx::Font font, ItemViewValue< std::string > *vv)
Construct renderer with give font and object to give value to render.
Definition: fontitemrenderer.h:67
Base class for item renderer that work on a specific type and use an ItemViewValue object to return t...
Definition: itemrenderer.h:160