Source-highlight Library
|
Generates line numbers in the output. More...
#include <linenumgenerator.h>
Public Member Functions | |
LineNumGenerator (const TextStyle &lineStyle, unsigned int digitNum, char padding= '0') | |
void | setAnchorStyle (const TextStyle &_anchorStyle) |
void | setAnchorPrefix (const std::string &_anchorLinePrefix) |
void | setDigitNum (unsigned int _digitNum) |
const std::string | generateLine (unsigned int line) |
Generates a string representing the formatting of the passed line number. More... | |
Private Attributes | |
unsigned int | digitNum |
number of digits to represent line number | |
char | padding |
character to use for padding the line number | |
TextStyle | lineStyle |
for actually formatting the line number | |
TextStyle | anchorStyle |
for possible line anchor generation (can be null) | |
std::string | anchorLinePrefix |
when generating an anchor for a line, use this prefix for the anchor name | |
Generates line numbers in the output.
const std::string srchilite::LineNumGenerator::generateLine | ( | unsigned int | line | ) |
Generates a string representing the formatting of the passed line number.
line |