CFsTextStyleManager Class Reference

class CFsTextStyleManager : private CBase

CFsTextStyleManager

This class is designed to convert CRichText style definitions to THuiTextStyles. 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 = CHuiTextVisual::AddNewL( *iControl, iCurveLayout );
  visual->SetTextStyle( styleID );
Since
S60 v3.2

Inherits from

Constructor & Destructor Documentation

CFsTextStyleManager(CAlfTextStyleManager &)

CFsTextStyleManager(CAlfTextStyleManager &aAlfTextStyleManager)[private]

Parameters

CAlfTextStyleManager & aAlfTextStyleManager

~CFsTextStyleManager()

~CFsTextStyleManager()

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 & aCharFormatStyle 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 & aCharFormatStyle format from CRichText

FindPositionOfId(TInt)

TInt FindPositionOfId(TIntaId)[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 CFsTextStyleManager. 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 & aCharFormatStyle format from CRichText

GetStyleIDWithOpositeUnderlineL(TInt)

TInt GetStyleIDWithOpositeUnderlineL(TIntaId)

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 &)

CFsTextStyleManager *NewL(CAlfTextStyleManager &aAlfTextStyleManager)[static]

Two-phased constructor.

Parameters

CAlfTextStyleManager & aAlfTextStyleManager

Member Data Documentation

CAlfTextStyleManager & iAlfTextStyleManager

CAlfTextStyleManager &iAlfTextStyleManager[private]

Reference to the CHuiTextStyleManager

RArray< TFsTextStyleData > iStyles

RArray< TFsTextStyleData >iStyles[private]

Array of previously created styles