Location:
TXTFMLYR.H
Link against: etext.lib
class CParaFormatLayer : public CFormatLayer;
A paragraph format layer.
Has a pointer (stored in its base class CFormatLayer
) to another paragraph format layer which may be NULL. This pointer is referred to as the based-on link. A paragraph format
layer is owned by an instance of the CGlobalText
class and stores the object's global paragraph formatting. Implements persistence and allows attributes to be set and sensed.
CBase
- Base class for all classes to be instantiated on the heap
CFormatLayer
- Abstract base class for the paragraph and character format layers
CParaFormatLayer
- A paragraph format layer
Defined in CParaFormatLayer
:
CloneL()
, DoCloneL()
, ExternalizeL()
, InternalizeL()
, IsIdentical()
, IsIdenticalL()
, NewL()
, NewL()
, NewL()
, Ptr()
, RestoreNewL()
, SenseEffectiveL()
, SenseL()
, SetL()
, Type()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
Inherited from CFormatLayer
:
ChainCount()
,
ExternalizeChainL()
,
InternalizeChainL()
,
IsEmpty()
,
Reset()
,
SenseBase()
,
SetBase()
,
iBasedOn
,
iStore
static IMPORT_C CParaFormatLayer *NewL();
Allocates and constructs an empty CParaFormatLayer. 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 layer's based on link.
|
static IMPORT_C CParaFormatLayer *NewL(const CParaFormat *aParaFormat, const TParaFormatMask &aMask);
Allocates and constructs a CParaFormatLayer. The attributes which are set in the mask are initialised to the values specified
in the format container aParaFormat. The attributes which are not set in the mask are initialised to the default values for
class CParaFormat
. The new layer's based-on link is set to NULL.
|
|
static IMPORT_C CParaFormatLayer *NewL(RReadStream &aStream);
Allocates and constructs a CParaFormatLayer, restoring its format attributes from a stream. The layer's based-on link is set to NULL.
|
|
virtual IMPORT_C void InternalizeL(RReadStream &aStream, const CFormatLayer *aBase=0);
Internalises the paragraph 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.
|
virtual IMPORT_C void ExternalizeL(RWriteStream &aStream) const;
Externalises the paragraph 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.
|
IMPORT_C void SetL(const CParaFormat *aDesiredEffectiveFormat, const TParaFormatMask &aMask);
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 aDesiredEffectiveFormat. The attributes which are not set in the mask are not changed.
Note: Any tab stops in aDesiredEffectiveFormat are merged with the tab stops in the current layer.
|
IMPORT_C void SenseEffectiveL(CParaFormat *aParaFormat, CParaFormat::TParaFormatGetMode aMode=CParaFormat::EAllAttributes)
const;
Senses the layer's effective format, searching all based-on links. The resulting aParaFormat is fully populated, except that if aMode is EFixedAttributes, then only the fixed attributes (not tabs, paragraph borders or bullets) are written to it.
Notes:
The function also "tidies up" the layer's effective paragraph formatting, so that any zero height bullets, paragraph borders with a NULL line style or NULL tab stops are removed.
The function can only leave if aMode has a value of EAllAttributes.
|
IMPORT_C void SenseL(CParaFormat *aParaFormat, TParaFormatMask &aMask, CParaFormat::TParaFormatGetMode aMode=CParaFormat::EAllAttributes)
const;
Senses the formatting which has been applied to the current layer only. No based-on links are searched. This function does not get the effective formatting, but the resulting aParaFormat is useable 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.
The function can only leave if aMode has a value of EAllAttributes.
|
inline CParaFormatLayer *CloneL() const;
Constructs and returns a new CParaFormatLayer 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.
|
IMPORT_C TBool IsIdenticalL(const CParaFormat *aParaFormat, const TParaFormatMask &aMask) const;
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 aParaFormat. None of the current layer's based-on links are searched.
|
|
virtual IMPORT_C TBool IsIdentical(CFormatLayer *aLayer, TBool aCheckBasedOnLink=ETrue) const;
Compares another paragraph 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.
|
|
virtual IMPORT_C TUid Type() const;
Returns the paragraph format layer UID. This can be used to distinguish between an ordinary paragraph format layer and paragraph styles, which have a different UID.
|
IMPORT_C const TUint8 *Ptr(TInt &aSize) const;
Gets a pointer to the start of the buffer containing the layer's format attribute values.
|
|
protected: virtual CFormatLayer *RestoreNewL(RReadStream &aStream);
Return a new CParaFormatLayer, having restored it from aStream. Overrides the base class method, to provide a new format layer of the correct type.
|
|