1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __TXTFRMAT_H__
17 #define __TXTFRMAT_H__
24 // Classes declared in this file:
28 class TParaBorderArray;
30 class TParaFormatMask;
31 class TFontPresentation;
33 class TCharFormatMask;
36 Provides support for system colours, in addition to literal colours, in
39 The base class TRgb stores the 24-bit literal colour value using a TUint32.
40 TLogicalRgb uses the MSB from iValue2 data member as an 8-bit index. The
41 purpose of the index is to allow applications to use logical colours. If the
42 index is zero, the value is not a logical colour; it is treated as an ordinary
43 TRgb value. If the index is non zero (1-255), the colour should be translated by the
44 application into a system colour. Indices 254 and 255 are reserved for the
45 system foreground and background colours, respectively and should be translated
46 into them. Translation from index to RGB colour occurs in the implementation of
47 MFormParam::SystemColor().
49 All colours in the Text and Text Attributes API are stored using TLogicalRgb
50 values and are initialised to either TLogicalRgb::ESystemForegroundColor or
51 TLogicalRgb::ESystemBackgroundColor.
53 This system allows an application to set its text colours once, perhaps using
54 the system-wide colour scheme, rather than having to set the colours each
55 time a text object is created. It is also compatible with legacy code which
56 expects TRgb rather than TLogicalRgb values: for example, the logical
57 foreground and background colours have their bottom three bytes filled with
58 black and white respectively so that code which expects TRgb values can still
63 class TLogicalRgb : public TRgb
68 Reserved colour indices for default foreground and background colours,
69 and colours for the selection highlight. The top 128 indices (128-255)
70 are reserved for future expansion, but the first 126 non-zero indices
71 (1-127) can be used by the GUI as convenient.
75 ESystemSelectionForegroundIndex = 252,
76 ESystemSelectionBackgroundIndex = 253,
77 /** Index reserved for the system foreground colour (=254). */
78 ESystemForegroundIndex = 254,
79 /** Index reserved for the system background colour (=255). */
80 ESystemBackgroundIndex = 255
85 /** Used to construct TLogicalRgb objects which should use either the
86 system foreground or background colour. */
89 ESystemSelectionForegroundColor = ESystemSelectionForegroundIndex << 24,
90 ESystemSelectionBackgroundColor = ESystemSelectionBackgroundIndex << 24,
91 /** The system foreground colour. */
92 ESystemForegroundColor = ESystemForegroundIndex << 24,
93 /** The system background colour. */
94 ESystemBackgroundColor = (ESystemBackgroundIndex << 24) | 0xFFFFFF
97 /** Constructs a new TLogicalRgb object. */
103 /** Constructs the object with a 32-bit integer. The index is stored in the
104 MSB of iValue2 data member. A TRgb value may be stored in the base TRgb class.
105 @param aValue Integer holding the logical colour index. */
106 TLogicalRgb(TUint32 aValue):
107 iValue2(aValue & 0xFF000000)
109 SetInternal((TUint32)aValue | 0xFF000000);
112 /** Constructs the object with a TSystemColor value.
113 @param aValue Identifies whether the colour is the system foreground or
114 system background colour. */
115 TLogicalRgb(TSystemColor aValue) :
116 iValue2((TUint32)aValue & 0xFF000000)
118 SetInternal((TUint32)aValue | 0xFF000000);
121 /** Constructs a new TLogicalRgb object from an existing one. */
122 TLogicalRgb(const TRgb& aRgb) :
128 /** Returns the logical colour's index value. Zero indicates that the value
129 is not a logical colour; it is an ordinary TRgb value. 254 and 255 indicate
130 the system foreground and background colours, respectively.
131 @return The index: between zero and 255 inclusive. */
132 TUint SystemColorIndex() const
134 return iValue2 >> 24;
137 /** Sets the logical colour's index value.
138 @param aIndex The new index value (between 1 and 253 inclusive). */
139 void SetSystemColorIndex(TUint aIndex)
141 iValue2 = aIndex << 24;
150 Indicates which format attributes are relevant when setting or sensing text
155 enum TTextFormatAttribute
157 // Paragraph format attributes.
158 /** Language of the paragraph for proofing. */
160 /** Background colour of the paragraph. */
162 /** Leading text margin. */
164 /** Trailing text margin. */
166 /** First line leading indent. */
168 /** Horizontal alignment of paragraph. */
170 /** Vertical paragraph alignment. */
171 EAttVerticalAlignment,
172 /** Inter-line spacing. */
174 /** Control for EAttLineSpacing. */
175 EAttLineSpacingControl,
176 /** Space above paragraph. */
178 /** Space below paragraph. */
180 /** Whether a page break can occur within the paragraph. */
182 /** Whether a page break can occur between this and the next paragraph. */
184 /** Whether a page break should be inserted before this paragraph. */
186 /** Whether the last line of a paragraph can appear by itself at the top of a new
187 page, (widow), or the first line of a paragraph can appear by itself at the
188 bottom of the page, (orphan). */
190 /** Whether the paragraph should line wrap at the right margin. */
192 /** Distance between paragraph border and enclosed text. */
194 /** Top of paragraph border. */
196 /** Bottom of paragraph border. */
198 /** Left-hand side of paragraph border. */
200 /** Right-hand side of paragraph border. */
202 /** Bullet point associated with paragraph. */
204 /** Spacing between default tab stops. */
209 // Character format attributes.
210 /** Language of individual characters within a paragraph for proofing. */
214 /** Text highlight colour. */
215 EAttFontHighlightColor,
216 /** Text highlight style. */
217 EAttFontHighlightStyle,
220 /** Font posture (i.e. italics). */
222 /** Font stroke weight (i.e. bold). */
223 EAttFontStrokeWeight,
224 /** Subscript, superscript or normal print position. */
228 /** Strikethrough. */
229 EAttFontStrikethrough,
230 /** The typeface name. */
232 /** Vertical picture alignment. */
233 EAttFontPictureAlignment,
237 /** Used internally to indicate the count of all attributes. */
238 ETextFormatAttributeCount
243 enum {EVariableLengthValue = 0};
248 const TInt KMaxStyleName = 0x20;
249 const TInt KMaxParaAttributes = EAttTabStop;
250 const TInt KMaxCharAttributes = EAttFontHiddenText - KMaxParaAttributes;
251 const TInt KTabNotFound = -1;
256 This is a position on a page used to align columns of text. It has a twips
257 position and an alignment. The twips position is the width in twips (1/1440th
258 of an inch) of the tab stop, i.e. the number of twips from the start of the
259 line at which text can be inserted. It uniquely identifies the tab stop. The
260 alignment (left, right, or centre) indicates how text inserted at the tab
261 stop should be aligned.
263 Tab stops are paragraph format attributes. They are owned by the CParaFormat
264 class, through which tab stops can be added and removed.
271 /** Text alignment at the tab stop. */
276 /** Text is aligned to the tab stop's leading edge (left for
277 left-to-right paragraphs, right for right-to-left paragraphs). */
279 /** Text is aligned to the tab stop's trailing edge (right for
280 left-to-right paragraphs, left for right-to-left paragraphs). */
282 /** Text is right aligned at the tab stop. */
287 IMPORT_C TTabStop(const TTabStop& aTabStop);
288 IMPORT_C TTabStop& operator=(const TTabStop& aTabStop);
289 IMPORT_C TBool operator==(const TTabStop& aTabStop) const;
290 inline TBool operator!=(const TTabStop& aTabStop) const;
292 /** The twips position. This is the width in twips of the tab stop, i.e.
293 the number of twips from the start of the line at which text can be
295 TUint32 iTwipsPosition;
296 /** Text alignment at the tab stop. */
301 Defines the characteristics of one of the four sides of a paragraph border.
303 These are the line style, thickness and colour. Paragraph borders are paragraph
304 format attributes. They are owned by the CParaFormat class which allows
305 paragraph borders to be added and removed. The CParaFormat::TParaBorderSide
306 enumeration identifies which side of the paragraph the object applies to.
317 /** No line style. */
321 /** Double solid line. */
327 /** Alternating dots and dashes. */
329 /** Alternating sequence of two dots and a dash. */
333 IMPORT_C TParaBorder();
334 IMPORT_C TBool operator==(const TParaBorder& aParaBorder) const;
335 inline TBool operator!=(const TParaBorder& aParaBorder) const;
337 /** The line style. By default, ENullLineStyle. */
338 TLineStyle iLineStyle;
339 /** The line thickness in twips. By default, zero. */
341 /** The line colour. By default, the system's default foreground colour. */
343 /** ETrue indicates that the line colour is set to the default or current
344 text colour, overriding iColor. EFalse indicates that the iColor value is
345 used. By default, ETrue. */
350 Stores the four sides of a paragraph border.
352 Paragraph borders sides are set individually using functions provided by class
357 class TParaBorderArray
360 TParaBorder iBorder[4];
366 This is a paragraph format attribute, stored as the iBullet member of class
369 Bullet points have a typeface, height, colour and a character code (defines
370 the symbol displayed). Single level bullets only are supported. Bullets may
371 also have a hanging indent. If set, this means that the rest of the paragraph
372 following the line containing the bullet point is indented.
380 IMPORT_C TBool operator ==(const TBullet& aBullet) const;
381 inline TBool operator !=(const TBullet& aBullet) const;
384 Identifies the bullet style.
386 Note: Styles other than ENullStyle and EBulletStyle are not currently supported.
387 They have the same effect as the EBulletStyle.
392 No bullet. Used for style layers that override a bullet with the absence of a bullet.
396 A bullet point. Character with code 0x2022 is used by default.
400 ESmallRomanNumberStyle,
401 ECapitalRomanNumberStyle,
406 /** Paragraph alignment */
409 /** Paragraph left aligned. */
411 /** Paragraph centre aligned. */
413 /** Paragraph right aligned. */
417 /** The Unicode character used to represent the bullet point. By default
419 TChar iCharacterCode; // the bullet or other symbol used if iStyle is EBulletStyle
420 /** The height in twips of the font used for the bullet point character.
422 TUint iHeightInTwips;
423 /** The typeface used for the bullet point character. */
425 /** ETrue to indent the rest of the paragraph from the bullet point.
426 EFalse to align the bullet point character with the rest of the paragraph. */
427 TBool iHangingIndent;
428 /** The colour of the bullet point character. By default, the system's
429 default foreground colour. */
431 TStyle iStyle; // is this a bullet or a number or a letter?
432 TInt iStartNumber; // the number of the first paragraph in a run of paragraphs in this style
433 TAlignment iAlignment; // alignment of the bullet or number within the margin
437 A transient container of paragraph format attributes, including tab stops,
438 bullet points and paragraph borders.
440 Rich and global text objects store paragraph formatting using paragraph format
441 layers (see class CParaFormatLayer). The CParaFormat class is used to store
442 the relevant attribute values when setting or sensing a CParaFormatLayer.
443 It is normally used in combination with a TParaFormatMask, to specify which
444 attributes are relevant to the function concerned.
446 On construction, all CParaFormat member data is initialised. The attributes
447 which are not explicitly set are assigned default values.
451 class CParaFormat: public CBase
454 /** Miscellaneous constants. */
457 /** The maximum number of paragraph borders (= 4). */
461 /** Paragraph border sides */
464 /** The border at the top of the paragraph. */
466 /** The border at the bottom of the paragraph. */
468 /** The border on the left hand side. */
470 /** The border on the right hand side. */
474 /** Line spacing control */
475 enum TLineSpacingControl
477 /** Twips line spacing must be at least as wide as the
478 iLineSpacingInTwips value. */
479 ELineSpacingAtLeastInTwips,
480 /** Twips line spacing must be exactly the iLineSpacingInTwips value. */
481 ELineSpacingExactlyInTwips,
482 /** Pixels line spacing must be at least as wide as the line spacing
484 ELineSpacingAtLeastInPixels,
485 /** Pixels line spacing must be exactly the same as the line spacing
487 ELineSpacingExactlyInPixels
490 /** Paragraph alignment */
493 /** Paragraph aligned to the leading margin (left for left-to-right
494 paragraphs, right for right-to-left paragraphs). */
496 /** Paragraph top aligned. */
497 ETopAlign = ELeftAlign,
498 /** Paragraph centre aligned. */
500 /** Paragraph aligned to the trailing margin (right for left-to-right
501 paragraphs, left for right-to-left paragraphs). */
503 /** Paragraph bottom aligned. */
504 EBottomAlign = ERightAlign,
505 /** Paragraph justified. */
507 /** Used by the spreadsheet application. Unlike ETopAlign and
508 EBottomAlign, provides no default implementation. */
510 /** User-defined paragraph alignment. */
512 /** Absolute left alignment */
514 /** Absolute right alignment */
518 /** Attribute sense mode */
519 enum TParaFormatGetMode
521 /** Indicates that all paragraph format attributes are written to the
522 result when sensing paragraph format attributes. */
524 /** Indicates that tabs, bullets and borders are not sensed. */
528 IMPORT_C static CParaFormat* NewL();
529 IMPORT_C static CParaFormat* NewLC();
530 IMPORT_C static CParaFormat* NewL(const CParaFormat& aFormat);
531 IMPORT_C CParaFormat();
532 IMPORT_C ~CParaFormat();
533 IMPORT_C void ResetNonDestructive(); // preserves any allocated tabs, bullets or borders.
534 IMPORT_C void Reset(); // full reset, deletes and nulls any allocated tabs, bullets or borders.
535 IMPORT_C void CopyL(const CParaFormat& aFormat, const TParaFormatMask& aMask);
536 IMPORT_C void CopyL(const CParaFormat& aFormat);
537 IMPORT_C void Strip(); // Cleans up this paragraph format.
538 IMPORT_C TBool IsEqual(const CParaFormat& aFormat, const TParaFormatMask& aMask) const;
539 IMPORT_C TBool IsEqual(const CParaFormat& aFormat) const;
540 IMPORT_C void StoreTabL(const TTabStop& aTabStop);
541 IMPORT_C void RemoveTab(TInt aTabTwipsPosition);
542 inline void RemoveAllTabs();
543 IMPORT_C const TTabStop TabStop(TInt aTabIndex) const;
544 inline TInt TabCount() const;
545 IMPORT_C TInt LocateTab(TInt aTabTwipsPosition) const;
546 IMPORT_C void SetParaBorderL(TParaBorderSide aSide, const TParaBorder& aBorder); // Overwrites any existing border for that side
547 IMPORT_C void RemoveAllBorders();
548 IMPORT_C const TParaBorder ParaBorder(TParaBorderSide aSide) const;
550 /** Tests whether any paragraph borders have been set.
552 @return ETrue if any paragraph borders have been set, EFalse if not. */
553 inline TBool BordersPresent() const { return iParaBorderArray != NULL;}
555 inline TParaBorder* ParaBorderPtr(TParaBorderSide aSide)
557 /** Gets a pointer to the paragraph border on the side specified. If no
558 paragraph border array has been allocated, returns NULL.
560 @param aSide The side for the paragraph border.
561 @return Pointer to the paragraph border on the specified side. */
562 { return iParaBorderArray ? &iParaBorderArray->iBorder[aSide] : NULL; }
563 IMPORT_C TBool AllBordersEqual(const CParaFormat& aFormat) const;
564 IMPORT_C TBool IsBorderEqual(TParaBorderSide aSide, const CParaFormat& aFormat) const;
566 CParaFormat(const CParaFormat& aFormat);
567 void CreateTabListL();
570 ETabStoreGranularity = 2
573 CParaFormat& operator=(const CParaFormat& aParaFormat); // intentionally unimplemented
575 CArrayFixFlat<TTabStop>* iTabList; // ordered list of tab stops; null if none
576 TParaBorderArray* iParaBorderArray; // array of paragraph borders; null if none
578 /** The background colour of the paragraph. By default the default system
579 background colour. This colour applies to the area bounded by the paragraph
580 border, if one exists. */
581 TLogicalRgb iFillColor;
582 /** The language of the paragraph for proofing. By default
583 KParaDefaultLanguage. Used for example when spell checking a document
584 which contains text in more than one language, so that the program
585 recognises the text as being in another language. */
587 /** The width in twips of the leading margin (left for left-to-right
588 paragraphs, right for right-to-left paragraphs). By default
589 KParaDefaultLeftMargin (zero). */
590 TInt32 iLeftMarginInTwips;
591 /** The width in twips of the trailing margin (right for left-to-right
592 paragraphs, left for right-to-left paragraphs). By default
593 KParaDefaultRightMargin (zero). */
594 TInt32 iRightMarginInTwips;
595 /** An indent for the first line in the paragraph, relative to the leading
596 margin (left for left-to-right paragraphs, right for right-to-left
597 paragraphs). By default KParaDefaultIndent (zero). */
598 TInt32 iIndentInTwips;
599 /** Horizontal alignment of paragraph. By default KParaDefaultHorizAlign
601 TAlignment iHorizontalAlignment;
602 /** Vertical alignment of paragraph, (intended for use by spreadsheet
603 applications). By default KParaDefaultVertAlign (unspecified). */
604 TAlignment iVerticalAlignment;
605 /** Inter-line spacing within the paragraph, in twips. By default
606 KParaDefaultLineSpacing (200 twips). */
607 TInt32 iLineSpacingInTwips; // distance between successive baselines
608 /** Control for the iLineSpacingInTwips value. By default,
609 KParaDefaultLineSpacingControl (ELineSpacingAtLeastInTwips). */
610 TLineSpacingControl iLineSpacingControl; // whether iLineSpacingInTwips means 'at least' or 'exactly'
611 /** Space above paragraph. By default KParaDefaultSpaceBefore (zero). */
612 TInt32 iSpaceBeforeInTwips;
613 /** Space below paragraph. By default KParaDefaultSpaceAfter (zero). */
614 TInt32 iSpaceAfterInTwips;
615 /** Prevents a page break within paragraph if ETrue. By default
616 KParaDefaultKeepTogether (EFalse). */
618 /** Prevents a page break between this paragraph and the following
619 paragraph if ETrue. By default, KParaDefaultKeepWithNext (EFalse). */
621 /** Inserts a page break immediately before this paragraph if ETrue.
622 By default, KParaDefaultStartNewPage (EFalse). */
624 /** Prevents the printing of the last line of a paragraph at the top
625 of the page (referred to as a widow), or the first line of a paragraph
626 at the bottom of the page, (referred to as an orphan). By default,
627 KParaDefaultWidowOrphan (EFalse). */
629 /** Specifies whether the paragraph should line wrap at the right margin.
630 By default KParaDefaultWrap (ETrue). */
632 /** Distance in twips between the paragraph border and the enclosed text.
633 By default KParaDefaultBorderMargin (zero). */
634 TInt32 iBorderMarginInTwips;
635 /** The bullet point associated with the paragraph. A NULL value indicates
636 no bullet point. By default NULL. */
638 /** Specifies the default tab stop width. By default KParaDefaultTabWidth
640 TUint32 iDefaultTabWidthInTwips;
644 Masks the paragraph format attributes which are involved when setting and
645 sensing paragraph formatting.
647 Used in conjunction with an object of class CParaFormat. When setting formatting,
648 only the attributes which are set in the mask will participate in the relevant
649 function. When sensing formatting, on return, the mask indicates which attributes
650 were sensed from the format layer, and were not taken from the default values.
654 class TParaFormatMask
657 inline TParaFormatMask();
658 inline void SetAttrib(TTextFormatAttribute aAttribute);
659 inline void ClearAttrib(TTextFormatAttribute aAttribute);
660 IMPORT_C void SetAll();
661 IMPORT_C void ClearAll();
662 inline TBool AttribIsSet(TTextFormatAttribute aAttribute) const;
663 inline TBool IsNull() const;
664 IMPORT_C TBool operator==(const TParaFormatMask& aMask) const;
665 inline TBool operator!=(const TParaFormatMask& aMask) const;
672 Specifies the font-independent character format attributes, including bold,
673 italics and underlining.
675 An instance of this class is owned by the character formatting container (class
680 class TFontPresentation
684 /** Highlight style */
685 enum TFontHighlightStyle
687 /** No highlighting used. */
689 /** Normal (square cornered) highlighting used. */
690 EFontHighlightNormal,
691 /** Rounded corner highlighting used. */
692 EFontHighlightRounded,
693 /** Text is drawn offset towards the bottom-right in the highlight
694 colour, (iHighlightColor) before being drawn again in the text colour,
695 (iTextColor) creating a shadow effect. */
696 EFontHighlightShadow,
697 /** Placeholder for "unrecognised word" highlighting style for FEPs */
698 EFontHighlightNoMatchesIndicator,
699 /** First custom highlighting style is used.
700 @see MFormCustomDraw::DrawText(). */
701 EFontHighlightFirstCustomStyle = 128,
702 /** Second custom highlighting style is used.
703 @see MFormCustomDraw::DrawText(). */
704 EFontHighlightLastCustomStyle = 255
708 /** Vertical picture alignment */
711 /** The top of the picture is aligned flush with the top of the font's
712 ascent, so that the picture may descend below the line. */
714 /** The bottom of the picture is aligned flush with the bottom of the
715 font's descent so that the picture may extend above the line. */
717 /** The picture is aligned so that its centre is positioned at the
718 baseline of the line. */
720 /** The bottom of the picture is aligned with the baseline of the font.
721 This is the default. */
725 IMPORT_C TFontPresentation();
728 IMPORT_C TBool IsEqual(const TFontPresentation& aFontPresentation, const TCharFormatMask& aMask) const;
730 /** The text colour. By default, the default system foreground colour. */
731 TLogicalRgb iTextColor;
732 /** The highlight colour for selected text. Only takes effect if
733 iHighlightStyle is not EFontHighlightNone. By default, the default system
734 foreground colour. */
735 TLogicalRgb iHighlightColor; // Background color
736 /** Style for character highlighting. By default EFontHighlightNone. */
737 TFontHighlightStyle iHighlightStyle;
738 /** The value of the strikethrough attribute. By default EStrikethroughOff. */
739 TFontStrikethrough iStrikethrough;
740 /** The value of the underline attribute. By default EUnderlineOff. */
741 TFontUnderline iUnderline;
742 /** Specifies whether or not text is hidden. Note that hidden text is not
743 currently supported by the text layout engine. This attribute is provided
744 to preserve information when copying from and to devices which support
745 hidden text. By default EFalse. */
747 /** The vertical alignment of a picture character. By default
749 TAlignment iPictureAlignment;
753 A transient container of character format attributes, including
754 font-dependent and font-independent attributes.
756 The font-independent attributes are stored in a TFontPresentation object.
757 Rich and global text objects store character formatting using character format
758 layers (see class CCharFormatLayer). The TCharFormat class is used to store
759 the relevant attribute values when setting or sensing a CCharFormatLayer.
760 It is normally used in combination with a TCharFormatMask, to specify which
761 attributes are relevant to the function concerned.
768 IMPORT_C TCharFormat();
769 IMPORT_C TCharFormat(const TDesC &aTypefaceName, TInt aHeight);
772 IMPORT_C TBool IsEqual(const TCharFormat& aFormat, const TCharFormatMask& aMask) const;
773 IMPORT_C TBool IsEqual(const TCharFormat& aFormat) const;
775 /** Specifies the language of individual characters for proofing. Used for
776 example when spell checking a document which contains text in more than one
777 language, so that the program recognises the text as being in another
778 language. Language is also a paragraph format attribute. If the language
779 setting of a character is different from the language setting of the
780 containing paragraph, the character's setting takes precedence. */
782 /** Font independent character format attributes. */
783 TFontPresentation iFontPresentation;
784 /** Device independent font specification. */
789 Masks the character format attributes which are involved when setting and
790 sensing character formatting.
792 Used in conjunction with an object of class TCharFormat.
794 When setting formatting, only the attributes which are set in the mask should
795 participate in the relevant function. When sensing formatting, on return,
796 the mask indicates which attributes were sensed from the format layer, and
797 were not taken from the default values.
801 class TCharFormatMask
804 inline TCharFormatMask();
805 inline void SetAttrib(TTextFormatAttribute aAttribute);
806 inline void ClearAttrib(TTextFormatAttribute aAttribute);
807 inline TBool AttribIsSet(TTextFormatAttribute aAttribute) const;
808 IMPORT_C void SetAll();
809 IMPORT_C void ClearAll();
810 inline TBool IsNull()const;
811 IMPORT_C TBool operator==(const TCharFormatMask& aMask) const;
812 inline TBool operator!=(const TCharFormatMask& aMask) const;
818 #include <txtfrmat.inl>