STLL
0.0
Simple Text Layouting Library
|
encapsulates a finished layout. More...
Classes | |
class | LinkInformation_c |
a helper structure to contain information about the interactive area for a link More... | |
class | Rectangle_c |
a little structure to hold information for one rectangle More... | |
Public Member Functions | |
const std::vector< CommandData_c > | getData (void) const |
get the command vector More... | |
template<class... Args> | |
void | addCommand (Args &&...args) |
add a single drawing command to the end of the command list More... | |
void | addCommand (const CommandData_c &c) |
add a single drawing command to the end of the command list More... | |
template<class... Args> | |
void | addCommandStart (Args &&...args) |
add a single drawing command to the start of the command list More... | |
void | addCommandStart (const CommandData_c &d) |
add a single drawing command to the start of the command list More... | |
void | append (const TextLayout_c &l, int dx=0, int dy=0) |
append a layout to this layout, which means that the drawing commands of the 2nd layout are copied into this layout More... | |
void | operator= (TextLayout_c &&l) |
move assignment More... | |
void | operator= (const TextLayout_c &l) |
copy assignment More... | |
~TextLayout_c (void) | |
TextLayout_c (void) | |
create empty layout More... | |
TextLayout_c (const TextLayout_c &src) | |
copy constructor More... | |
TextLayout_c (TextLayout_c &&src) | |
move constructor More... | |
void | shift (int32_t dx, int32_t dy) |
shift all the commands within the layout by the given amount More... | |
uint32_t | getHeight (void) const |
the height of the layout. This is supposed to be the vertical space that this layout takes up in 1/64th pixels More... | |
void | setHeight (uint32_t h) |
set the height in 1/64th pixels More... | |
int32_t | getLeft (void) const |
get the left edge of the layout in 1/64th pixels More... | |
void | setLeft (int32_t l) |
set the left edge in 1/64th pixels More... | |
int32_t | getRight (void) const |
get the right edge of the layout in 1/64th pixels More... | |
void | setRight (int32_t r) |
get the right edge in 1/64th pixels More... | |
void | setFirstBaseline (int32_t r) |
set the y position of the first baseline More... | |
int32_t | getFirstBaseline (void) const |
get the y position of the first baseline More... | |
Public Attributes | |
std::vector< LinkInformation_c > | links |
information for all links TODO this interface is bad More... | |
encapsulates a finished layout.
This class encapsulates a layout, it is a list of drawing commands.
|
inline |
STLL::TextLayout_c::TextLayout_c | ( | void | ) |
create empty layout
STLL::TextLayout_c::TextLayout_c | ( | const TextLayout_c & | src | ) |
copy constructor
STLL::TextLayout_c::TextLayout_c | ( | TextLayout_c && | src | ) |
move constructor
|
inline |
add a single drawing command to the end of the command list
args | this is a forwarding function that will give all arguments to the constructor of the CommandData_c class that will be added |
|
inline |
add a single drawing command to the end of the command list
c | the command to add |
|
inline |
add a single drawing command to the start of the command list
args | this is a forwarding function that will give all arguments to the constructor of the CommandData_c class that will be added |
|
inline |
add a single drawing command to the start of the command list
d | the command to add |
void STLL::TextLayout_c::append | ( | const TextLayout_c & | l, |
int | dx = 0 , |
||
int | dy = 0 |
||
) |
append a layout to this layout, which means that the drawing commands of the 2nd layout are copied into this layout
The height, left and right border are adjusted to completely accommodate all of the new layout, the firstBaseline is copied over, when this layout is currently empty, else it is left untouched
l | the layout to append |
dx | x-offset to apply when appending the layout |
dy | y-offset to apply when appending the layout |
|
inline |
get the command vector
|
inline |
get the y position of the first baseline
|
inline |
the height of the layout. This is supposed to be the vertical space that this layout takes up in 1/64th pixels
|
inline |
get the left edge of the layout in 1/64th pixels
|
inline |
get the right edge of the layout in 1/64th pixels
|
inline |
move assignment
|
inline |
copy assignment
|
inline |
set the y position of the first baseline
|
inline |
set the height in 1/64th pixels
|
inline |
set the left edge in 1/64th pixels
|
inline |
get the right edge in 1/64th pixels
void STLL::TextLayout_c::shift | ( | int32_t | dx, |
int32_t | dy | ||
) |
shift all the commands within the layout by the given amount
dx | x-offset in 1/64th pixels |
dy | y-offset in 1/64th pixels |
std::vector<LinkInformation_c> STLL::TextLayout_c::links |
information for all links TODO this interface is bad