class CStyleList : public CBase |
A container of paragraph styles.
It is implemented as a fixed length array of pointers to RParagraphStyleInfos. The array's granularity is specified on construction. The list takes ownership of all paragraph styles appended to it. When the list is deleted, all styles it owns are also deleted.
After the style list has been set up, it should normally be passed to a CRichText object, either in the rich text object's constructor, or by calling CRichText::SetStyleListExternallyOwned(). The rich text object takes ownership of the style list (unless SetStyleListExternallyOwned() is used). Styles can be modified, added to and removed from the style list after ownership of the list has been passed to the rich text object.
If CRichText::SetStyleListExternallyOwned() is used, the style list is not owned by the rich text object, and it must be stored and restored separately from the rich text object.
Public Member Functions | |
---|---|
~CStyleList() | |
IMPORT_C TInt | AppendL(RParagraphStyleInfo *) |
IMPORT_C const RParagraphStyleInfo & | At(TInt) |
IMPORT_C RParagraphStyleInfo & | At(TInt) |
TInt | Count() |
IMPORT_C CStyleList * | DeepCloneL() |
IMPORT_C void | ExternalizeL(RWriteStream &) |
IMPORT_C TInt | IndexByName(const TDesC &) |
IMPORT_C TInt | IndexByPtr(const CParaFormatLayer *) |
IMPORT_C void | InternalizeL(RReadStream &, const CParaFormatLayer *, const CCharFormatLayer *) |
IMPORT_C CStyleList * | NewL(TInt) |
IMPORT_C CStyleList * | NewL(RReadStream &, const CParaFormatLayer *, const CCharFormatLayer *) |
IMPORT_C RParagraphStyleInfo * | PtrByName(const TParagraphStyleName &) |
IMPORT_C RParagraphStyleInfo * | PtrByType(const TUid) |
IMPORT_C void | Remove(CParagraphStyle *) |
IMPORT_C void | Reset() |
IMPORT_C TInt | SetStyleToFollow(const RParagraphStyleInfo &) |
IMPORT_C TStreamId | StoreL(CStreamStore &) |
const RParagraphStyleInfo & | operator[](TInt) |
RParagraphStyleInfo & | operator[](TInt) |
Protected Member Functions | |
---|---|
CStyleList() | |
IMPORT_C void | ConstructL(TInt) |
Private Member Functions | |
---|---|
void | KillStyleList() |
Private Attributes | |
---|---|
__DECLARE_TEST | |
CArrayFixFlat< RParagraphStyleInfo > * | iList |
IMPORT_C TInt | AppendL | ( | RParagraphStyleInfo * | aStyleSet | ) |
RParagraphStyleInfo * aStyleSet |
TInt | Count | ( | ) | const [inline] |
Gets the number of styles in the style list.
The number of styles in the style list
IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream | ) | const |
RWriteStream & aStream |
IMPORT_C TInt | IndexByName | ( | const TDesC & | aName | ) | const |
const TDesC & aName |
IMPORT_C TInt | IndexByPtr | ( | const CParaFormatLayer * | aPtr | ) | const |
const CParaFormatLayer * aPtr |
IMPORT_C void | InternalizeL | ( | RReadStream & | aStream, |
const CParaFormatLayer * | aGlobalParaFormatLayer, | |||
const CCharFormatLayer * | aGlobalCharFormatLayer | |||
) |
RReadStream & aStream | |
const CParaFormatLayer * aGlobalParaFormatLayer | |
const CCharFormatLayer * aGlobalCharFormatLayer |
IMPORT_C CStyleList * | NewL | ( | TInt | aCapacity = KMaxStyleListGranularity | ) | [static] |
TInt aCapacity = KMaxStyleListGranularity |
IMPORT_C CStyleList * | NewL | ( | RReadStream & | aStream, |
const CParaFormatLayer * | aGlobalParaFormatLayer, | |||
const CCharFormatLayer * | aGlobalCharFormatLayer | |||
) | [static] |
RReadStream & aStream | |
const CParaFormatLayer * aGlobalParaFormatLayer | |
const CCharFormatLayer * aGlobalCharFormatLayer |
IMPORT_C RParagraphStyleInfo * | PtrByName | ( | const TParagraphStyleName & | aName | ) | const |
const TParagraphStyleName & aName |
IMPORT_C RParagraphStyleInfo * | PtrByType | ( | const TUid | aType | ) | const |
const TUid aType |
IMPORT_C void | Remove | ( | CParagraphStyle * | aStyle | ) |
CParagraphStyle * aStyle |
IMPORT_C TInt | SetStyleToFollow | ( | const RParagraphStyleInfo & | aStyleSet | ) |
const RParagraphStyleInfo & aStyleSet |
IMPORT_C TStreamId | StoreL | ( | CStreamStore & | aStore | ) | const |
CStreamStore & aStore |
const RParagraphStyleInfo & | operator[] | ( | TInt | aIndex | ) | const [inline] |
Gets a style from the style list, from its index into the array. Two versions are supplied. The compiler chooses the appropriate version based on the use made of the returned reference. If it is used in an expression where the reference can be modified, then the non-const version is chosen.
A const reference to the style at position aIndex in the array.
A non-const reference to the style at position aIndex in the array. Gets a style from the style list, from its index into the array. Two versions are supplied. The compiler chooses the appropriate version based on the use made of the returned reference. If it is used in an expression where the reference can be modified, then the non-const version is chosen.
A const reference to the style at position aIndex in the array.
A non-const reference to the style at position aIndex in the array.
TInt aIndex | The index of the style into the list. The first style is at position zero. Must be within the bounds of the array or a panic occurs. |