KoTextFormat.h
127 enum VerticalAlignment { AlignNormal, AlignSubScript, AlignSuperScript, AlignCustom }; // TQRT now has it in another order, but it's too late, we use this order in KWord's file format now !
165 //KoTextFormat makeTextFormat( const TQStyleSheetItem *style, const TQMap<TQString,TQString>& attr ) const;
204 static TQString getKey( const TQFont &f, const TQColor &c, bool misspelled, VerticalAlignment vAlign );
261 static TQString shadowAsCss( double shadowDistanceX, double shadowDistanceY, const TQColor& shadowColor );
424// /*virtual*/ KoTextFormat *format( const TQFont &f, const TQColor &c , const TQString &_language, bool hyphen );
426 /*virtual*/ KoTextFormat *createFormat( const KoTextFormat &f ) { return new KoTextFormat( f ); }
428// /*virtual*/ KoTextFormat *createFormat( const TQFont &f, const TQColor &c, const TQString & _language, bool hyphen ) { return new KoTextFormat( f, c, _language, hyphen, this ); }
A KoCharStyle is a set of formatting attributes (font, color, etc.) to be applied to a run of text.
Definition KoParagStyle.h:33
Used during loading of Oasis format (and discarded at the end of the loading).
Definition KoOasisContext.h:46
Used during saving to Oasis format (and discarded at the end of the saving).
Definition KoOasisContext.h:112
Each character (KoTextStringChar) points to a KoTextFormat that defines the formatting of that charac...
Definition KoTextFormat.h:53
void save(KoGenStyle &gs, KoSavingContext &context, KoTextFormat *refFormat=0) const
Save a text format to OASIS XML Only saves what differs from @refFormat, if set.
Definition KoTextFormat.cpp:541
const TQFontMetrics & screenFontMetrics(const KoTextZoomHandler *zh) const
Returns the font metrics for the font used at the zoom & resolution given by 'zh'.
Definition KoTextFormat.cpp:1144
void parseShadowFromCss(const TQString &css)
Load shadow attributes from a css string, used when loading.
Definition KoTextFormat.cpp:1413
int shadowY(KoTextZoomHandler *zh) const
Return the amount of pixels for the vertical shadow distance at a given zoom level.
Definition KoTextFormat.cpp:1468
int charWidth(const KoTextZoomHandler *zh, bool applyZoom, const KoTextStringChar *c, const KoTextParag *parag, int i) const
Return the width of one char in one paragraph.
Definition KoTextFormat.cpp:1179
const TQFontMetrics & refFontMetrics() const
Definition KoTextFormat.cpp:1157
int width(const TQChar &c) const
Return the width of one char (from a string, not necessarily from a paragraph) in LU pixels.
Definition KoTextFormat.cpp:1377
float screenPointSize(const KoTextZoomHandler *zh) const
Definition KoTextFormat.cpp:1091
TQString shadowAsCss() const
Return css string for the shadow, used when saving.
Definition KoTextFormat.cpp:1408
int shadowX(KoTextZoomHandler *zh) const
Return the amount of pixels for the horizontal shadow distance at a given zoom level.
Definition KoTextFormat.cpp:1463
TQFont screenFont(const KoTextZoomHandler *zh) const
Returns the font to be used at the zoom & resolution given by 'zh'.
Definition KoTextFormat.cpp:1123
static TQColor defaultTextColor(TQPainter *painter)
Call this when a text color is set to 'invalid', meaning 'whatever the default for the color scheme i...
Definition KoTextFormat.cpp:1084
int charWidthLU(const KoTextStringChar *c, const KoTextParag *parag, int i) const
Return the width of one char in LU pixels.
Definition KoTextFormat.cpp:1370
int compare(const KoTextFormat &format) const
Return a set of flags showing the differences between this and 'format'.
Definition KoTextFormat.cpp:1040
This class extends KoZoomHandler to add support for WYSIWYG text layouting.
Definition KoTextZoomHandler.h:29
