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.
◆ FontItemRenderer() [1/2]
Construct with object to give value to render.
- Parameters
-
vv | object that returns a string to render |
◆ FontItemRenderer() [2/2]
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 |
◆ baseline() [1/2]
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
◆ baseline() [2/2]
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. |
◆ font()
void tbx::view::FontItemRenderer::font |
( |
tbx::Font |
font | ) |
|
Set the font to render an item.
Also sets the height and baseline
- Parameters
-
◆ height() [1/3]
unsigned int tbx::view::FontItemRenderer::height |
( |
| ) |
const |
|
inline |
Get the height of the renderer.
- Returns
- height of the renderer
◆ height() [2/3]
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 |
◆ height() [3/3]
virtual unsigned int tbx::view::FontItemRenderer::height |
( |
unsigned int |
index | ) |
const |
|
inlinevirtual |
◆ render()
Render text in black using font set.
- Parameters
-
info | Information on what to render and where |
Implements tbx::view::ItemRenderer.
◆ size()
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.
◆ width()
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: