STLL  0.0
Simple Text Layouting Library
STLL::TextLayout_c Class Reference

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_cgetData (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_clinks
 information for all links TODO this interface is bad More...
 

Detailed Description

encapsulates a finished layout.

This class encapsulates a layout, it is a list of drawing commands.

Constructor & Destructor Documentation

STLL::TextLayout_c::~TextLayout_c ( void  )
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

Member Function Documentation

template<class... Args>
void STLL::TextLayout_c::addCommand ( Args &&...  args)
inline

add a single drawing command to the end of the command list

Parameters
argsthis is a forwarding function that will give all arguments to the constructor of the CommandData_c class that will be added
Note
if you add a command, you must update the left, right and height fields as well as the firstBaseline your own
void STLL::TextLayout_c::addCommand ( const CommandData_c c)
inline

add a single drawing command to the end of the command list

Parameters
cthe command to add
Note
if you add a command, you must update the left, right and height fields as well as the firstBaseline your own
template<class... Args>
void STLL::TextLayout_c::addCommandStart ( Args &&...  args)
inline

add a single drawing command to the start of the command list

Parameters
argsthis is a forwarding function that will give all arguments to the constructor of the CommandData_c class that will be added
Note
if you add a command, you must update the left, right and height fields as well as the firstBaseline your own
void STLL::TextLayout_c::addCommandStart ( const CommandData_c d)
inline

add a single drawing command to the start of the command list

Parameters
dthe command to add
Note
if you add a command, you must update the left, right and height fields as well as the firstBaseline your own
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

Parameters
lthe layout to append
dxx-offset to apply when appending the layout
dyy-offset to apply when appending the layout
const std::vector<CommandData_c> STLL::TextLayout_c::getData ( void  ) const
inline

get the command vector

int32_t STLL::TextLayout_c::getFirstBaseline ( void  ) const
inline

get the y position of the first baseline

uint32_t STLL::TextLayout_c::getHeight ( void  ) const
inline

the height of the layout. This is supposed to be the vertical space that this layout takes up in 1/64th pixels

int32_t STLL::TextLayout_c::getLeft ( void  ) const
inline

get the left edge of the layout in 1/64th pixels

int32_t STLL::TextLayout_c::getRight ( void  ) const
inline

get the right edge of the layout in 1/64th pixels

void STLL::TextLayout_c::operator= ( TextLayout_c &&  l)
inline

move assignment

void STLL::TextLayout_c::operator= ( const TextLayout_c l)
inline

copy assignment

void STLL::TextLayout_c::setFirstBaseline ( int32_t  r)
inline

set the y position of the first baseline

void STLL::TextLayout_c::setHeight ( uint32_t  h)
inline

set the height in 1/64th pixels

void STLL::TextLayout_c::setLeft ( int32_t  l)
inline

set the left edge in 1/64th pixels

void STLL::TextLayout_c::setRight ( int32_t  r)
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

Parameters
dxx-offset in 1/64th pixels
dyy-offset in 1/64th pixels

Member Data Documentation

std::vector<LinkInformation_c> STLL::TextLayout_c::links

information for all links TODO this interface is bad


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