CFsAlfTextStyleManager Class Reference

class CFsAlfTextStyleManager : private CBase

CFsAlfTextStyleManager

This class is designed to convert CRichText style definitions to TAlfTextStyles. To avoid overlapping style definitions, all previously created styles are stored in a list.

Example:
        manager = CFsTextStyleManager::NewL( Env().TextStyleManager() );
  rText.GetChars( someText, charFormat, position ); //CRichText
  TInt styleID = manager->GetStyleIDL( charFormat );
  visual = CAlfTextVisual::AddNewL( *iControl, iCurveLayout );
  visual->SetTextStyle( styleID );
       
Since
S60 v3.2

Inherits from

Constructor & Destructor Documentation

CFsAlfTextStyleManager(CAlfTextStyleManager &)

CFsAlfTextStyleManager ( CAlfTextStyleManager & aAlfTextStyleManager ) [private]

Parameters

CAlfTextStyleManager & aAlfTextStyleManager

~CFsAlfTextStyleManager()

~CFsAlfTextStyleManager ( )

Destructor.

Member Functions Documentation

CreateNewTextStyleL(const TCharFormat &)

TInt CreateNewTextStyleL ( const TCharFormat & aCharFormat ) [private]

CreateNewTextStyleL

Creates a new text style using TCharFormat .

Since
S60 3.2

Parameters

const TCharFormat & aCharFormat Style format from CRichText

FindId(const TCharFormat &)

TInt FindId ( const TCharFormat & aCharFormat ) [private]

FindId

The array of previously created styles is searched for matching TCharFormat . If not found KErrNotFound is returned.

Since
S60 3.2

Parameters

const TCharFormat & aCharFormat Style format from CRichText

FindPositionOfId(TInt)

TInt FindPositionOfId ( TInt aId ) [private]

FindPositionOfId

The array of previously created styles is searched for matching ID. If not found KErrNotFound is returned.

Since
S60 3.2

Parameters

TInt aId

GetStyleIDL(const TCharFormat &)

TInt GetStyleIDL ( const TCharFormat & aCharFormat )

GetStyleIDL

This is the only public method in CFsAlfTextStyleManager . If there already a style that matches the given TCharFormat , the ID of this style is returned. If not, a new style is created.

Since
S60 3.2

Parameters

const TCharFormat & aCharFormat Style format from CRichText

GetStyleIDWithOpositeUnderlineL(TInt)

TInt GetStyleIDWithOpositeUnderlineL ( TInt aId )

FindId

The array of previously created styles is searched for matching TCharFormat . If not found KErrNotFound is returned.

Since
S60 3.2

Parameters

TInt aId

NewL(CAlfTextStyleManager &)

CFsAlfTextStyleManager * NewL ( CAlfTextStyleManager & aAlfTextStyleManager ) [static]

Two-phased constructor.

Parameters

CAlfTextStyleManager & aAlfTextStyleManager Reference to the CAlfTextStyleManager

Member Data Documentation

CAlfTextStyleManager & iAlfTextStyleManager

CAlfTextStyleManager & iAlfTextStyleManager [private]

Reference to the CAlfTextStyleManager

RArray< TFsTextStyleData > iStyles

RArray < TFsTextStyleData > iStyles [private]

Array of previously created styles