20#ifndef kotextformatter_h
21#define kotextformatter_h
23#include "KoRichText.h"
34class KOTEXT_EXPORT KoTextFormatter : public KoTextFormatterBase
38 virtual ~KoTextFormatter();
40 virtual bool format( KoTextDocument *doc, KoTextParag *parag, int start, const TQMap<int, KoTextParagLineStart*> &oldLineStarts, int& y, int& widthUsed );
43 virtual void postFormat( KoTextParag* parag );
55class KoTextFormatterCore
58 KoTextFormatterCore( KoTextFormatter* settings, KoTextDocument *doc, KoTextParag *parag, int start );
66 int widthUsed() const { return wused; }
67 int resultY() const { return y; }
72 TQPair<int, int> determineCharWidth();
74 KoTextParagLineStart *koFormatLine(
75 KoTextZoomHandler *zh,
76 KoTextParag * , KoTextString * string, KoTextParagLineStart *line,
77 KoTextStringChar *startChar, KoTextStringChar *lastChar, int align, int space );
79 KoTextParagLineStart *koBidiReorderLine(
80 KoTextZoomHandler *zh,
81 KoTextParag * , KoTextString *text, KoTextParagLineStart *line,
82 KoTextStringChar *startChar, KoTextStringChar *lastChar, int align, int space );
84 void moveChar( KoTextStringChar& chr, KoTextZoomHandler *zh,
85 int deltaX, int deltaPixelX );
90 int leftMargin( bool firstLine, bool includeFirstLineMargin = true ) const;
91 int rightMargin( bool firstLine ) const;
95 KoTextFormatter* settings;
106 TQPair<int,int> maxAvailableWidth;
The KoHyphenator class provides an interface to the libhnj hyphenation library.
We implement our own text formatter to implement WYSIWYG: It is heavily based on KoTextFormatterBaseB...
This class extends KoZoomHandler to add support for WYSIWYG text layouting.
|