CCharFormatLayer Class Reference
class CCharFormatLayer : public CFormatLayer |
Inherited Functions |
---|
| CBase::CBase() |
| CBase::Delete(CBase *) |
| CBase::Extension_(TUint,TAny *&,TAny *) |
| CBase::operator new(TUint) |
| CBase::operator new(TUint,TAny *) |
| CBase::operator new(TUint,TLeave) |
| CBase::operator new(TUint,TLeave,TUint) |
| CBase::operator new(TUint,TUint) |
| CBase::~CBase() |
| CFormatLayer::CFormatLayer() |
| CFormatLayer::ChainCount()const |
| CFormatLayer::CloneLayerL(CFormatLayer *)const |
| CFormatLayer::ExternalizeChainL(RWriteStream &,TInt)const |
| CFormatLayer::ExternalizeLayersRecurseL(RWriteStream &,TInt)const |
| CFormatLayer::InternalizeChainL(RReadStream &,const CFormatLayer *) |
| CFormatLayer::IsEmpty()const |
| CFormatLayer::IsIdentical(const TUint8 *,TInt)const |
| CFormatLayer::Reset() |
| CFormatLayer::SenseBase()const |
| CFormatLayer::SetBase(const CFormatLayer *) |
| CFormatLayer::Swap(CFormatLayer &) |
| CFormatLayer::~CFormatLayer() |
Detailed Description
Character format layer.
Uses a pointer (stored in its base class CFormatLayer) to another character format layer which may be NULL. This pointer is referred to as the based-on link. A character format layer is owned by an instance of the CGlobalText class and stores the object's global character formatting. Implements persistence and allows attributes to be set and sensed.
Member Function Documentation
CloneL ( )
Constructs and returns a new CCharFormatLayer with identical formatting to the current layer. Note that the function does not copy the original layer's based-on link - the new layer's based-on link is set to NULL, so that the two layers may not have the same effective formatting.
Returns: A new character format layer cloned from the current layer.
ExternalizeL ( RWriteStream & )
IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream | ) | const [virtual] |
Externalises the character format layer but not its based-on link to a write stream. The presence of this function means that the standard templated operator<<() (defined in s32strm.h) is available to externalise objects of this class.
Parameter | Description | aStream | Stream to which the format layer should be externalised. |
InternalizeL ( RReadStream &, const CFormatLayer * )
Internalises the character format layer but not its based-on link from a read stream. The presence of this function means that the standard templated operator>>() (defined in s32strm.h) is available to internalise objects of this class. The internalised layer is set to be based on the layer specified.
Parameter | Description | aStream | Stream from which the format layer should be internalised. |
aBase | The based-on link to assign to the layer. By default NULL. |
IsIdentical ( CFormatLayer *, TBool )
Compares another character format layer with the current layer. For the two layers to be equal, they must have the same contents and (if the second parameter is ETrue), their based-on links must point to the same format layer.
Parameter | Description | aLayer | The character format layer to compare to this format layer. |
aCheckBasedOnLink | If ETrue, both layers' based-on links must point to the same format layer. If EFalse, the based-on links are not used in the comparison. By default, ETrue. |
Returns: ETrue if the two layers are identical, otherwise EFalse.
IsIdentical ( const TCharFormat &, const TCharFormatMask & )
Compares a format attribute container with the current layer. For the two objects to be identical, the current layer must contain only the attributes specified in the argument aMask, and these attributes must have the same values as those in aCharFormat. None of the current layer's based-on links are searched.
Parameter | Description | aCharFormat | Contains the attribute values used in the comparison. |
aMask | A bitmask specifying which attributes are relevant to the function. |
Returns: ETrue if the formatting of the current layer exactly matches that contained in aCharFormat, otherwise EFalse.
NewCopyBaseL ( const CCharFormatLayer * )
Copying construction copies based-on link
NewL ( )
Allocates and constructs an empty CCharFormatLayer. Its based-on link is NULL.
Note: Use SetL() to set format attributes in the layer. Use SetBase(), defined in the base class CFormatLayer, to set the layers based on link.
Returns: Pointer to the new character format layer.
NewL ( const TCharFormat &, const TCharFormatMask & )
Returns a handle to a new charFormatLayer, after constructing it and setting it with the specified format and format mask.
NewL ( RReadStream & )
Allocates and constructs a CCharFormatLayer, restoring its format attributes from a stream. The layer's based-on link is set to NULL.
Parameter | Description | aStream | Stream from which the layer is restored. |
Returns: Pointer to the new character format layer.
NewL ( const CCharFormatLayer * )
Copying construction does not copy based-on link.
NewL ( const TCharFormatX &, const TCharFormatXMask & )
Ptr ( TInt & )
Gets a pointer to the start of the buffer containing the layer's format attribute values.
Parameter | Description | aSize | On return, set to the size of the buffer. |
Returns: Pointer to the buffer which contains the layer's format attribute values.
Sense ( TCharFormat &, TCharFormatMask & )
Senses the formatting which has been applied to the current layer only. No based-on links are searched. This function does not get the layer's effective formatting, but the resulting aCharFormat is fully populated, even if not all attributes are flagged for sensing in aMask because any attribute values not sensed from the current layer are set to default values.
Parameter | Description | aCharFormat | On return, contains the formatting which has been applied to the current layer only. Any attributes not explicitly set in the current layer are set to the default values for a TCharFormat. Any attributes specified in aMask are not sensed from this layer. The values for these attributes are also initialised to the default settings. |
aMask | A bitmask. Any attributes which are set in the mask as passed into the function are not sensed from the current layer. On return, indicates the attributes which were sensed from this layer. So, normally, when passed to the function, all attributes in the mask should be unset. |
Sense ( TCharFormatX &, TCharFormatXMask & )
Senses the formatting which has been applied to the current layer only. No based-on links are searched. This function does not get the layer's effective formatting, but the resulting aCharFormat is fully populated, even if not all attributes are flagged for sensing in aMask because any attribute values not sensed from the current layer are set to default values.
Parameter | Description | aCharFormat | On return, contains the formatting which has been applied to the current layer only. Any attributes not explicitly set in the current layer are set to the default values for a TCharFormat. Any attributes specified in aMask are not sensed from this layer. The values for these attributes are also initialised to the default settings. |
aMask | A bitmask. Any attributes which are set in the mask as passed into the function are not sensed from the current layer. On return, indicates the attributes which were sensed from this layer. So, normally, when passed to the function, all attributes in the mask should be unset. |
SenseEffective ( TCharFormat & )
IMPORT_C void | SenseEffective | ( | TCharFormat & | aCharFormat | ) | const |
Senses the layer's effective format, searching all based-on links. The resulting aCharFormat is fully populated.
Parameter | Description | aCharFormat | On return, contains the layer's effective formatting. |
SenseEffective ( TCharFormatX & )
Senses the layer's effective format, searching all based-on links. The resulting aCharFormat is fully populated.
Parameter | Description | aCharFormat | On return, contains the layer's effective formatting. |
SetL ( const TCharFormat &, const TCharFormatMask & )
Sets the layer's format attributes. The attributes which are set in the mask are set in the layer to the values specified in the format container aCharFormat. The attributes which are not set in the mask are not changed.
Parameter | Description | aCharFormat | Contains the attribute values to assign to the format layer. |
aMask | Mask specifying which attributes should be set from aCharFormat. |
SetL ( const TCharFormatX &, const TCharFormatXMask & )
Sets the layer's format attributes. The attributes which are set in the mask are set in the layer to the values specified in the format container aCharFormat. The attributes which are not set in the mask are not changed.
Parameter | Description | aCharFormat | Contains the attribute values to assign to the format layer. |
aMask | Mask specifying which attributes should be set from aCharFormat. |