23#include "TextOutputDev.h"
25#include <tqvaluevector.h>
39 enum Alignment { Left = 0, Center, Right, Character };
40 enum Filling { Blank = 0, Dots, Line, Dash, DashDot, DashDotDot };
42 Tabulator() : alignment(Left) {}
44 TQDomElement createElement(Data &data) const;
53inline bool operator <( const Tabulator &t1, const Tabulator &t2)
54{ return t1.pos<t2.pos; }
69enum Align { AlignLeft, AlignRight, AlignCenter, AlignBlock };
77 const DRect &rect() const { return _rect; }
79 bool hasOneLine() const { return _lines.count()==1; }
80 const TQValueList<TextLine *> lines() const { return _lines; }
81 bool isFirst( const TextLine *line) const { return line==_lines.first();}
82 bool isSecond( const TextLine* line) const
83 { return (_lines.count()>1 && line==_lines.first()->next); }
84 bool isLast( const TextLine *line) const { return line==_lines.last(); }
86 int findTab( double xMin, const TextLine *) const;
87 uint findNbTabs(uint i, double prevXMax) const;
88 int charFromEnd(uint dec, uint &blockIndex) const;
93 double firstIndent, leftIndent, offset;
95 TQValueVector<Tabulator> tabs;
96 TQValueList<Block> blocks;
99 TQValueList<TextLine *> _lines;
104class String : public TextString
107 String(GfxState *state, double x0, double y0,
108 double fontSize, uint frameIndex);
110 uint frameIndex() const { return _frameIndex; }
111 const Font &font() const { return _font; }
112 DRect rect() const { return DRect(xMin, xMax, yMin, yMax); }
113 bool checkCombination(TextString *s);
119 void addChar(GfxState *state, double x, double y,
120 double dx, double dy, Unicode u);
|