class CParaFormat : public CBase |
A transient container of paragraph format attributes, including tab stops, bullet points and paragraph borders.
Rich and global text objects store paragraph formatting using paragraph format layers (see class CParaFormatLayer). The CParaFormat class is used to store the relevant attribute values when setting or sensing a CParaFormatLayer. It is normally used in combination with a TParaFormatMask, to specify which attributes are relevant to the function concerned.
On construction, all CParaFormat member data is initialised. The attributes which are not explicitly set are assigned default values.
Public Member Functions | |
---|---|
CParaFormat() | |
~CParaFormat() | |
IMPORT_C TBool | AllBordersEqual(const CParaFormat &) |
TBool | BordersPresent() |
IMPORT_C void | CopyL(const CParaFormat &, const TParaFormatMask &) |
IMPORT_C void | CopyL(const CParaFormat &) |
IMPORT_C TBool | IsBorderEqual(TParaBorderSide, const CParaFormat &) |
IMPORT_C TBool | IsEqual(const CParaFormat &, const TParaFormatMask &) |
IMPORT_C TBool | IsEqual(const CParaFormat &) |
IMPORT_C TInt | LocateTab(TInt) |
IMPORT_C CParaFormat * | NewL() |
IMPORT_C CParaFormat * | NewL(const CParaFormat &) |
IMPORT_C CParaFormat * | NewLC() |
IMPORT_C const TParaBorder | ParaBorder(TParaBorderSide) |
TParaBorder * | ParaBorderPtr(TParaBorderSide) |
IMPORT_C void | RemoveAllBorders() |
void | RemoveAllTabs() |
IMPORT_C void | RemoveTab(TInt) |
IMPORT_C void | Reset() |
IMPORT_C void | ResetNonDestructive() |
IMPORT_C void | SetParaBorderL(TParaBorderSide, const TParaBorder &) |
IMPORT_C void | StoreTabL(const TTabStop &) |
IMPORT_C void | Strip() |
TInt | TabCount() |
IMPORT_C const TTabStop | TabStop(TInt) |
Private Member Functions | |
---|---|
CParaFormat(const CParaFormat &) | |
void | CreateTabListL() |
CParaFormat & | operator=(const CParaFormat &) |
Public Member Enumerations | |
---|---|
enum | anonymous { EMaxParaBorder = 4 } |
enum | TAlignment { ELeftAlign, ETopAlign = ELeftAlign, ECenterAlign, ERightAlign, EBottomAlign = ERightAlign, EJustifiedAlign, EUnspecifiedAlign, ECustomAlign, EAbsoluteLeftAlign, EAbsoluteRightAlign } |
enum | TLineSpacingControl { ELineSpacingAtLeastInTwips, ELineSpacingExactlyInTwips, ELineSpacingAtLeastInPixels, ELineSpacingExactlyInPixels } |
enum | TParaBorderSide { EParaBorderTop, EParaBorderBottom, EParaBorderLeft, EParaBorderRight } |
enum | TParaFormatGetMode { EAllAttributes, EFixedAttributes } |
Private Member Enumerations | |
---|---|
enum | anonymous { ETabStoreGranularity = 2 } |
Private Attributes | |
---|---|
TParaBorderArray * | iParaBorderArray |
CArrayFixFlat< TTabStop > * | iTabList |
CParaFormat | ( | const CParaFormat & | aFormat | ) | [private] |
const CParaFormat & aFormat |
IMPORT_C TBool | AllBordersEqual | ( | const CParaFormat & | aFormat | ) | const |
const CParaFormat & aFormat |
TBool | BordersPresent | ( | ) | const [inline] |
Tests whether any paragraph borders have been set.
ETrue if any paragraph borders have been set, EFalse if not.
IMPORT_C void | CopyL | ( | const CParaFormat & | aFormat, |
const TParaFormatMask & | aMask | |||
) |
const CParaFormat & aFormat | |
const TParaFormatMask & aMask |
IMPORT_C void | CopyL | ( | const CParaFormat & | aFormat | ) |
const CParaFormat & aFormat |
IMPORT_C TBool | IsBorderEqual | ( | TParaBorderSide | aSide, |
const CParaFormat & | aFormat | |||
) | const |
TParaBorderSide aSide | |
const CParaFormat & aFormat |
IMPORT_C TBool | IsEqual | ( | const CParaFormat & | aFormat, |
const TParaFormatMask & | aMask | |||
) | const |
const CParaFormat & aFormat | |
const TParaFormatMask & aMask |
IMPORT_C TBool | IsEqual | ( | const CParaFormat & | aFormat | ) | const |
const CParaFormat & aFormat |
IMPORT_C CParaFormat * | NewL | ( | const CParaFormat & | aFormat | ) | [static] |
const CParaFormat & aFormat |
IMPORT_C const TParaBorder | ParaBorder | ( | TParaBorderSide | aSide | ) | const |
TParaBorderSide aSide |
TParaBorder * | ParaBorderPtr | ( | TParaBorderSide | aSide | ) | [inline] |
Gets a pointer to the paragraph border on the side specified. If no paragraph border array has been allocated, returns NULL.
Pointer to the paragraph border on the specified side.
TParaBorderSide aSide | The side for the paragraph border. |
IMPORT_C void | SetParaBorderL | ( | TParaBorderSide | aSide, |
const TParaBorder & | aBorder | |||
) |
TParaBorderSide aSide | |
const TParaBorder & aBorder |
IMPORT_C void | StoreTabL | ( | const TTabStop & | aTabStop | ) |
const TTabStop & aTabStop |
TInt | TabCount | ( | ) | const [inline] |
Gets a count of the total number of tab stops in the object's tab list. If the object has no tab list, returns zero.
The number of tab stops.
CParaFormat & | operator= | ( | const CParaFormat & | aParaFormat | ) | [private] |
const CParaFormat & aParaFormat |
Miscellaneous constants.
EMaxParaBorder = 4 |
The maximum number of paragraph borders (= 4). |
Paragraph alignment
ELeftAlign |
Paragraph aligned to the leading margin (left for left-to-right paragraphs, right for right-to-left paragraphs). |
ETopAlign = ELeftAlign |
Paragraph top aligned. |
ECenterAlign |
Paragraph centre aligned. |
ERightAlign |
Paragraph aligned to the trailing margin (right for left-to-right paragraphs, left for right-to-left paragraphs). |
EBottomAlign = ERightAlign |
Paragraph bottom aligned. |
EJustifiedAlign |
Paragraph justified. |
EUnspecifiedAlign |
Used by the spreadsheet application. Unlike ETopAlign and EBottomAlign, provides no default implementation. |
ECustomAlign |
User-defined paragraph alignment. |
EAbsoluteLeftAlign |
Absolute left alignment |
EAbsoluteRightAlign |
Absolute right alignment |
Line spacing control
ELineSpacingAtLeastInTwips |
Twips line spacing must be at least as wide as the iLineSpacingInTwips value. |
ELineSpacingExactlyInTwips |
Twips line spacing must be exactly the iLineSpacingInTwips value. |
ELineSpacingAtLeastInPixels |
Pixels line spacing must be at least as wide as the line spacing value in pixels. |
ELineSpacingExactlyInPixels |
Pixels line spacing must be exactly the same as the line spacing value in pixels. |
Paragraph border sides
EParaBorderTop |
The border at the top of the paragraph. |
EParaBorderBottom |
The border at the bottom of the paragraph. |
EParaBorderLeft |
The border on the left hand side. |
EParaBorderRight |
The border on the right hand side. |
Attribute sense mode
EAllAttributes |
Indicates that all paragraph format attributes are written to the result when sensing paragraph format attributes. |
EFixedAttributes |
Indicates that tabs, bullets and borders are not sensed. |
TInt32 | iBorderMarginInTwips |
Distance in twips between the paragraph border and the enclosed text. By default KParaDefaultBorderMargin (zero).
TBullet * | iBullet |
The bullet point associated with the paragraph. A NULL value indicates no bullet point. By default NULL.
TUint32 | iDefaultTabWidthInTwips |
Specifies the default tab stop width. By default KParaDefaultTabWidth (360 twips).
TLogicalRgb | iFillColor |
The background colour of the paragraph. By default the default system background colour. This colour applies to the area bounded by the paragraph border, if one exists.
TAlignment | iHorizontalAlignment |
Horizontal alignment of paragraph. By default KParaDefaultHorizAlign (left).
TInt32 | iIndentInTwips |
An indent for the first line in the paragraph, relative to the leading margin (left for left-to-right paragraphs, right for right-to-left paragraphs). By default KParaDefaultIndent (zero).
TBool | iKeepTogether |
Prevents a page break within paragraph if ETrue. By default KParaDefaultKeepTogether (EFalse).
TBool | iKeepWithNext |
Prevents a page break between this paragraph and the following paragraph if ETrue. By default, KParaDefaultKeepWithNext (EFalse).
TInt32 | iLanguage |
The language of the paragraph for proofing. By default KParaDefaultLanguage. Used for example when spell checking a document which contains text in more than one language, so that the program recognises the text as being in another language.
TInt32 | iLeftMarginInTwips |
The width in twips of the leading margin (left for left-to-right paragraphs, right for right-to-left paragraphs). By default KParaDefaultLeftMargin (zero).
TLineSpacingControl | iLineSpacingControl |
Control for the iLineSpacingInTwips value. By default, KParaDefaultLineSpacingControl (ELineSpacingAtLeastInTwips).
TInt32 | iLineSpacingInTwips |
Inter-line spacing within the paragraph, in twips. By default KParaDefaultLineSpacing (200 twips).
TInt32 | iRightMarginInTwips |
The width in twips of the trailing margin (right for left-to-right paragraphs, left for right-to-left paragraphs). By default KParaDefaultRightMargin (zero).
TInt32 | iSpaceAfterInTwips |
Space below paragraph. By default KParaDefaultSpaceAfter (zero).
TInt32 | iSpaceBeforeInTwips |
Space above paragraph. By default KParaDefaultSpaceBefore (zero).
TBool | iStartNewPage |
Inserts a page break immediately before this paragraph if ETrue. By default, KParaDefaultStartNewPage (EFalse).
TAlignment | iVerticalAlignment |
Vertical alignment of paragraph, (intended for use by spreadsheet applications). By default KParaDefaultVertAlign (unspecified).
TBool | iWidowOrphan |
Prevents the printing of the last line of a paragraph at the top of the page (referred to as a widow), or the first line of a paragraph at the bottom of the page, (referred to as an orphan). By default, KParaDefaultWidowOrphan (EFalse).
TBool | iWrap |
Specifies whether the paragraph should line wrap at the right margin. By default KParaDefaultWrap (ETrue).