CTmText Class Reference
class CTmText : public CBase |
A self-contained text object. It owns both layout and content. It is intended for labels and the general display of small-to-medium-sized amounts of text.
Public Member Functions |
---|
| ~CTmText() |
IMPORT_C void | ChangeFormatL(const TTmFormatParamBase &) |
IMPORT_C void | Clear() |
IMPORT_C void | CustomizeL(const MTmCustom *) |
void | Draw(CGraphicsContext &, const TPoint &, const TRect &, const TLogicalRgb *, TBool) |
IMPORT_C void | GetFormat(TTmFormatParamBase &) |
IMPORT_C void | InsertL(TInt, const TDesC &, const TTmCharFormat *, const RTmParFormat *, TRect *, TInt *) |
IMPORT_C TInt | MemoryUsed() |
IMPORT_C CTmText * | NewL(MGraphicsDeviceMap *, const TTmFormatParamBase *) |
IMPORT_C CTmText * | NewL(MGraphicsDeviceMap &, const TTmFormatParamBase &) |
IMPORT_C CTmText * | NewL(MGraphicsDeviceMap &, TInt, TInt) |
IMPORT_C void | SetWrapWidthL(TInt) |
Private Attributes |
---|
CTmTextImp * | iImp |
Constructor & Destructor Documentation
Member Functions Documentation
ChangeFormatL(const TTmFormatParamBase &)
Set the formatting parameters and reformat the text.
CustomizeL(const MTmCustom *)
IMPORT_C void | CustomizeL | ( | const MTmCustom * | aCustom | ) | |
Specifies custom drawing or layout for the object, or if aCustom is NULL, removes any customization. Reformats the object according to the new customized layout. See the MTmCustom class for details. Custom drawing allows background graphics to be drawn, and custom layout allows, among other things, control over the way line height is calculated and special characters are displayed.
Draw(CGraphicsContext &, const TPoint &, const TRect &, const TLogicalRgb *, TBool)
Draws the formatted text. This inline function just calls CTmText::DrawLayout and is identical to it. It is provided for coding convenience because of the expectation that a drawing function called Draw exists.
GetFormat(TTmFormatParamBase &)
Retrieves the current formatting parameters.
InsertL(TInt, const TDesC &, const TTmCharFormat *, const RTmParFormat *, TRect *, TInt *)
Inserts the text aText at the document position aPos. The other arguments are all pointers which have default values of null. The first two, aCharFormat and aParFormat, specify the format for the inserted text. If either is null the format immediately before the insertion point is used.
Put the coordinates of the area that has been reformatted and needs to be redrawn, relative to the origin of the CText object, in aRedrawRect. Put the amount by which the text after the redrawn text needs to be scrolled up or down in aScroll: this is the amount by which the reformatted text has changed in height, and thus is positive if the text after the redrawn text has increased in height, which is usually, but not always, the case.
MemoryUsed()
IMPORT_C TInt | MemoryUsed | ( | ) | const |
Returns the number of bytes of memory used by a CTmText object, allowing 8 bytes overhead per heap allocation.
NewL(MGraphicsDeviceMap *, const TTmFormatParamBase *)
NewL(MGraphicsDeviceMap &, const TTmFormatParamBase &)
Creates a CTmText object using the specified device map and formatting parameters.
NewL(MGraphicsDeviceMap &, TInt, TInt)
Creates a CTmText object using the specified device map and formatting parameters that have default values (as in the default constructor for TTmFormatParamBase) apart from the wrap width and flags. The values of the flags are those used in for TTmFormatParamBase::iFlags.
SetWrapWidthL(TInt)
IMPORT_C void | SetWrapWidthL | ( | TInt | aWrapWidth | ) | |
Sets the wrap width and reformat the text.
Spare1()
IMPORT_C void | Spare1 | ( | ) | [private] |
Member Data Documentation
CTmTextImp * iImp
CTmTextImp * | iImp | [private] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.