ItemRenderer to render text with a given font in a fixed height.
More...
#include <fontitemrenderer.h>
ItemRenderer to render text with a given font in a fixed height.
Construct with object to give value to render.
- Parameters
-
vv | object that returns a string to render |
Construct renderer with give font and object to give value to render.
- Parameters
-
font | Font to use |
vv | object that returns a string to render |
unsigned int tbx::view::FontItemRenderer::baseline |
( |
| ) |
const |
|
inline |
Get the font base line.
- Returns
- position above the bottom of the item for the text baseline
void tbx::view::FontItemRenderer::baseline |
( |
unsigned int |
baseline | ) |
|
|
inline |
Set the font base line.
- Parameters
-
baseline | new font base line. Not checked so invalid values could cause display problems. |
void tbx::view::FontItemRenderer::font |
( |
tbx::Font |
font | ) |
|
Set the font to render an item.
Also sets the height and baseline
- Parameters
-
unsigned int tbx::view::FontItemRenderer::height |
( |
| ) |
const |
|
inline |
Get the height of the renderer.
- Returns
- height of the renderer
void tbx::view::FontItemRenderer::height |
( |
unsigned int |
height | ) |
|
|
inline |
Set the height of the renderer.
- Parameters
-
height | the new height. This is not checked so should be larger than the tallest character |
virtual unsigned int tbx::view::FontItemRenderer::height |
( |
unsigned int |
index | ) |
const |
|
inlinevirtual |
Render text in black using font set.
- Parameters
-
info | Information on what to render and where |
Implements tbx::view::ItemRenderer.
tbx::Size tbx::view::FontItemRenderer::size |
( |
unsigned int |
index | ) |
const |
|
virtual |
Called to get the size of the cell.
- Parameters
-
index | zero based index of item to get the size for |
Implements tbx::view::ItemRenderer.
unsigned int tbx::view::FontItemRenderer::width |
( |
unsigned int |
index | ) |
const |
|
virtual |
Used to measure the width of a column.
- Parameters
-
index | zero based index of item to get the width for |
Implements tbx::view::ItemRenderer.
The documentation for this class was generated from the following files: