1 //
2 // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008
3 //
4 // Copyright: See COPYING file that comes with this distribution
5 //
6
7 #ifndef LINENUMGENERATOR_H_
8 #define LINENUMGENERATOR_H_
9
10 #include <string>
11
12 #include "textstyle.h"
13
15
22
25
28
31
34
35 public:
38
39 void setAnchorStyle(
const TextStyle &_anchorStyle) {
40 anchorStyle = _anchorStyle;
41 }
42
43 void setAnchorPrefix(const std::string &_anchorLinePrefix) {
44 anchorLinePrefix = _anchorLinePrefix;
45 }
46
47 void setDigitNum(unsigned int _digitNum) {
48 digitNum = _digitNum;
49 }
50
57 };
58
59 }
60
61 #endif /*LINENUMGENERATOR_H_*/
TextStyle anchorStyle
for possible line anchor generation (can be null)
Definition: linenumgenerator.h:30
char padding
character to use for padding the line number
Definition: linenumgenerator.h:24
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
Generates line numbers in the output.
Definition: linenumgenerator.h:19
Represents a formatting template where there can be some variables (starting with $...
Definition: textstyle.h:36
const std::string generateLine(unsigned int line)
Generates a string representing the formatting of the passed line number.
Definition: linenumgenerator.cpp:31
std::string anchorLinePrefix
when generating an anchor for a line, use this prefix for the anchor name
Definition: linenumgenerator.h:33
unsigned int digitNum
number of digits to represent line number
Definition: linenumgenerator.h:21
TextStyle lineStyle
for actually formatting the line number
Definition: linenumgenerator.h:27