CAlfTextVisual Class Reference
class CAlfTextVisual : public CAlfVisual |
Text visual for text drawing. Text visual shows one or more lines of text.
CAlfTextVisual* textVisual = CAlfTextVisual::AddNewL( control );
textVisual->SetTextL( _L( "Hello" ) ); *
alfclient.lib
- Since
- S60 v3.2
Nested Classes and Structures
Public Member Functions |
---|
| CAlfTextVisual() |
| ~CAlfTextVisual() |
IMPORT_C CAlfTextVisual * | AddNewL(CAlfControl &, CAlfLayout *) |
IMPORT_C TAlfBackgroundType | BackgroundType() |
IMPORT_C void | ConstructL(CAlfControl &) |
IMPORT_C void | EnableShadow(TBool) |
IMPORT_C CAlfVisual * | FindTag(const TDesC8 &) |
IMPORT_C TInt | MaxLineCount() |
IMPORT_C TAlfTimedPoint | Offset() |
void | PrepareForUpdateMesh() |
void | ReleaseMesh() |
IMPORT_C void | RemoveAndDestroyAllD() |
IMPORT_C void | SetAlign(TAlfAlignHorizontal, TAlfAlignVertical) |
IMPORT_C void | SetColor(TRgb) |
IMPORT_C void | SetColor(const TAknsItemID &, const TInt) |
IMPORT_C void | SetColor(const TDesC &, const TDesC &) |
IMPORT_C void | SetHighlightRange(TInt, TInt, TRgb &, TRgb &) |
IMPORT_C void | SetLineSpacing(TInt, TLineSpacingUnits) |
IMPORT_C void | SetMaxLineCount(TInt) |
IMPORT_C void | SetOffset(const TAlfTimedPoint &) |
IMPORT_C void | SetShadowOpacity(const TAlfTimedValue &) |
IMPORT_C void | SetStyle(TAlfPreconfiguredTextStyle, TAlfBackgroundType) |
IMPORT_C void | SetTextL(const TDesC &) |
IMPORT_C void | SetTextStyle(TInt) |
IMPORT_C void | SetWrapping(TLineWrap) |
IMPORT_C TAlfTimedValue | ShadowOpacity() |
IMPORT_C TAlfPreconfiguredTextStyle | Style() |
IMPORT_C TRect | SubstringExtents(TUint, TUint) |
IMPORT_C const TDesC & | Text() |
IMPORT_C TSize | TextExtents() |
IMPORT_C TInt | TextStyle() |
IMPORT_C void | UpdateChildrenLayout(TInt) |
void | UpdateMesh(TBool) |
IMPORT_C TLineWrap | Wrapping() |
Inherited Functions |
---|
| CAlfPropertyOwner::CAlfPropertyOwner() |
| CAlfPropertyOwner::CopyProperty(const CAlfPropertyOwner &,const TDesC8 &) |
| CAlfPropertyOwner::PropertyClear() |
| CAlfPropertyOwner::PropertyFindInteger(const TDesC8 &,TInt *)const |
| CAlfPropertyOwner::PropertyFindString(const TDesC8 &,TDesC **)const |
| CAlfPropertyOwner::PropertyRemove(const TDesC8 &) |
| CAlfPropertyOwner::PropertySetIntegerL(const TDesC8 &,TInt,TInt,TInt) |
| CAlfPropertyOwner::PropertySetStringL(const TDesC8 &,const TDesC &) |
| CAlfPropertyOwner::~CAlfPropertyOwner() |
| CAlfVisual::AlignByOrigin(TAlfRealRect &)const |
| CAlfVisual::Brushes() |
| CAlfVisual::CAlfVisual() |
| CAlfVisual::ClearFlag(TAlfVisualFlags) |
| CAlfVisual::ClearFlags(TUint) |
| CAlfVisual::Clipping()const |
| CAlfVisual::Comms()const |
| CAlfVisual::ConstructL(CAlfControl &,TInt,TInt,const TDesC8 &) |
| CAlfVisual::CopyValues(const CAlfVisual &,TInt,TInt) |
| CAlfVisual::DepthOffset()const |
| CAlfVisual::Display()const |
| CAlfVisual::DisplayRect()const |
| CAlfVisual::DisplayRectTarget()const |
| CAlfVisual::DisplayToLocal(const TAlfRealPoint &)const |
| CAlfVisual::DisplayToLocal(const TPoint &)const |
| CAlfVisual::DropShadowHandler()const |
| CAlfVisual::EffectiveOpacity()const |
| CAlfVisual::EnableBrushesL(TBool) |
| CAlfVisual::EnableDropShadowL(TBool) |
| CAlfVisual::EnableTransformationL(TBool) |
| CAlfVisual::Env()const |
| CAlfVisual::Flags()const |
| CAlfVisual::HasTactileFeedback(TInt)const |
| CAlfVisual::HorizontalOrigin()const |
| CAlfVisual::HorizontalPadding()const |
| CAlfVisual::Identifier()const |
| CAlfVisual::IsTagged()const |
| CAlfVisual::Layout()const |
| CAlfVisual::LocalToDisplay(const TAlfRealPoint &)const |
| CAlfVisual::LocalToDisplay(const TPoint &)const |
| CAlfVisual::MaxSize()const |
| CAlfVisual::MaxSizeInBaseUnits()const |
| CAlfVisual::Mimic(CAlfVisual &,TInt) |
| CAlfVisual::MinSize()const |
| CAlfVisual::MinSizeInBaseUnits()const |
| CAlfVisual::Move(const TAlfRealPoint &,TInt) |
| CAlfVisual::Move(const TPoint &,TInt) |
| CAlfVisual::MoveToFront(TInt) |
| CAlfVisual::Opacity()const |
| CAlfVisual::Owner()const |
| CAlfVisual::Padding()const |
| CAlfVisual::PaddingAsMetric()const |
| CAlfVisual::PaddingInPixels()const |
| CAlfVisual::Pause(TInt) |
| CAlfVisual::Pos()const |
| CAlfVisual::RemoveTactileFeedback(TInt) |
| CAlfVisual::Resume(TInt) |
| CAlfVisual::SetCenteredPosAndSize(const TAlfRealPoint &,const TAlfRealSize &,TInt) |
| CAlfVisual::SetCenteredPosAndSize(const TPoint &,const TSize &,TInt) |
| CAlfVisual::SetClipping(TBool) |
| CAlfVisual::SetDepthOffset(const TAlfTimedValue &) |
| CAlfVisual::SetDisplay(CAlfDisplay *) |
| CAlfVisual::SetEffectL(const TDesC &) |
| CAlfVisual::SetFlag(TAlfVisualFlags) |
| CAlfVisual::SetFlags(TUint) |
| CAlfVisual::SetGroupEffectL(const TDesC &,TInt) |
| CAlfVisual::SetLayout(CAlfLayout *) |
| CAlfVisual::SetMaxSize(const TAlfRealSize &) |
| CAlfVisual::SetMaxSize(const TSize &) |
| CAlfVisual::SetMinSize(const TAlfRealSize &) |
| CAlfVisual::SetMinSize(const TSize &) |
| CAlfVisual::SetOpacity(const TAlfTimedValue &) |
| CAlfVisual::SetOrigin(TAlfVisualHOrigin,TAlfVisualVOrigin) |
| CAlfVisual::SetOwner(CAlfControl &) |
| CAlfVisual::SetPadding(TInt) |
| CAlfVisual::SetPadding(const TAlfBoxMetric &) |
| CAlfVisual::SetPadding(const TPoint &) |
| CAlfVisual::SetPos(const TAlfRealPoint &,TInt) |
| CAlfVisual::SetPos(const TAlfTimedPoint &) |
| CAlfVisual::SetRect(const TAlfRealRect &,TInt) |
| CAlfVisual::SetSize(const TAlfRealSize &,TInt) |
| CAlfVisual::SetSize(const TAlfTimedPoint &) |
| CAlfVisual::SetTactileFeedbackL(TInt,TInt) |
| CAlfVisual::SetTagL(const TDesC8 &) |
| CAlfVisual::Size()const |
| CAlfVisual::Tag()const |
| CAlfVisual::TagMatches(const TDesC8 &)const |
| CAlfVisual::Transformation() |
| CAlfVisual::VerticalOrigin()const |
| CAlfVisual::VerticalPadding()const |
| CAlfVisual::~CAlfVisual() |
| 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() |
Constructor & Destructor Documentation
~CAlfTextVisual()
IMPORT_C | ~CAlfTextVisual | ( | ) | [virtual] |
Member Functions Documentation
AddNewL(CAlfControl &, CAlfLayout *)
Constructor, which gives ownership to the control.
BackgroundType()
Determines the background type of the text visual. This was set with a call to SetStyle().
ConstructL(CAlfControl &)
Second-phase constructor.
DoRemoveAndDestroyAllD()
IMPORT_C void | DoRemoveAndDestroyAllD | ( | ) | [protected, virtual] |
EnableShadow(TBool)
IMPORT_C void | EnableShadow | ( | TBool | aDoEnable | ) | |
Use CAlfDropShadow
Enables or disables the text shadow. The rasterized text shadow is a special implementation of shadow that looks good with text. If this value is false, then the text will not have a rasterized shadow.
SetShadowOpacity ShadowOpacity
Parameters
TBool aDoEnable | True enables rasterized shadows, false disables. |
FindTag(const TDesC8 &)
Parameters
const TDesC8 & aTag | Tag to look for. If this tag is found as a part of a visual's colon-separated tag descriptor, it is treated as a match and the visual is returned. The tag to look for cannot contain separator characters (:). |
MaxLineCount()
IMPORT_C TInt | MaxLineCount | ( | ) | const |
Determines the maximum number of line displayed by the text visual.
Offset()
Gets offset for the text.
PrepareForUpdateMesh()
void | PrepareForUpdateMesh | ( | ) | |
PropertyOwnerExtension(const TUid &, TAny **)
IMPORT_C void | PropertyOwnerExtension | ( | const TUid & | aExtensionUid, |
| TAny ** | aExtensionParams |
| ) | [protected, virtual] |
Parameters
const TUid & aExtensionUid | |
TAny ** aExtensionParams | |
RemoveAndDestroyAllD()
IMPORT_C void | RemoveAndDestroyAllD | ( | ) | [virtual] |
SetAlign(TAlfAlignHorizontal, TAlfAlignVertical)
Sets the alignment of the text visual.
SetColor(TRgb)
IMPORT_C void | SetColor | ( | TRgb | aColor | ) | |
Sets the color of the text.
SetColor(const TAknsItemID &, const TInt)
Sets the color of the text via skin id.
SetColor(const TDesC &, const TDesC &)
IMPORT_C void | SetColor | ( | const TDesC & | aTextColorTable, |
| const TDesC & | aColorIndex |
| ) | |
Sets the color of the text via skin id.
Parameters
const TDesC & aTextColorTable | Skin-id name of the color group to use |
const TDesC & aColorIndex | Index within the color group |
SetHighlightRange(TInt, TInt, TRgb &, TRgb &)
IMPORT_C void | SetHighlightRange | ( | TInt | aStart, |
| TInt | aEnd, |
| TRgb & | aHighlightColor, |
| TRgb & | aHighlightTextColor |
| ) | |
Sets highlighting for a part of Text Start and end index of text to be highlighted, are ordinal indices. In case of multiple language, bidirectional text (e.g. English + Arabic), mixed text selection for highlight, might give strange results. e.g.TextVisual text : "E n g l i s h c i b a r A" ( Arabic script is read/written from right to left. Assume 'c i b a r A' is Arabic script ) and highlight range : 5-9. Expected result : "i s h" and "r A" should get highlighted Actual Result: "i s h c i" Hence, it is recommended to use different text visuals in case of selection of bidirectional text.
Parameters
TInt aStart | Startng index of Highlighted text. |
TInt aEnd | Ending index of Highlighted text. |
TRgb & aHighlightColor | Background color of highlighted text. |
TRgb & aHighlightTextColor | |
SetLineSpacing(TInt, TLineSpacingUnits)
Sets the line spacing for multiline text visual when the text wraps around.
TLineSpacingUnits.
Parameters
TInt aLineSpacing | Line spacing between lines in multiline text visual. aUnits Defines the units of the line spacing. |
TLineSpacingUnits aUnits = EPixels | |
SetMaxLineCount(TInt)
IMPORT_C void | SetMaxLineCount | ( | TInt | aMaxLineCount | ) | |
Sets the maximum number of lines displayed by the text visual. The default is KMaxTInt.
SetOffset(const TAlfTimedPoint &)
Sets offset for the text.
SetShadowOpacity(const TAlfTimedValue &)
Use CAlfDropShadow
Sets shadow opacity. Changes the opacity of the text soft shadow. Currently SetShadowStrength is only implemented in the OpenGL renderer, and will have no effect in BitGDI.
EnableShadow
SetStyle(TAlfPreconfiguredTextStyle, TAlfBackgroundType)
Sets the default text style of the text visual. This style describbes the size and colour of the rendered text. Parameters passed here can be overridden by call to SetFontSpec(). SetFontSpec()
Parameters
TAlfPreconfiguredTextStyle aStyle | Text style. |
TAlfBackgroundType aBackgroundType = EAlfBackgroundTypeLight | Text background type. Affects the color of the text. Defaults to EAlfBackgroundTypeLight (ie, black text will be used). |
SetTextL(const TDesC &)
IMPORT_C void | SetTextL | ( | const TDesC & | aText | ) | |
Set the text shown in the visual. The text may contain formatting codes to change the size, color, and alignment of the text.
Parameters
const TDesC & aText | Descriptor containing the text. |
SetTextStyle(TInt)
IMPORT_C void | SetTextStyle | ( | TInt | aTextStyleId | ) | |
Sets the default text style of the text visual. This style describes the style the text is rendered with. The text style has to be created with the text style manager. If the given text style does not exist, the text style is reverted back to default text style. CAlfTextStyleManager
Parameters
TInt aTextStyleId | Text style ID provided by the text style manager. |
SetWrapping(TLineWrap)
Sets the line wrapping mode.
ShadowOpacity()
Use CAlfDropShadow
Returns shadow opacity.
Style()
Accesses the text style of the text visual.
SubstringExtents(TUint, TUint)
Determines the size of the text in the visual. Text must have been updated / or drawn to be able to use these extents.
UpdateMeshL()
Text()
IMPORT_C const TDesC & | Text | ( | ) | const |
Returns the text of the visual.
TextExtents()
IMPORT_C TSize | TextExtents | ( | ) | const |
Determines the size of the text in the visual. Text must have been updated / or drawn to be able to use these extents.
UpdateMeshL()
TextStyle()
IMPORT_C TInt | TextStyle | ( | ) | const |
Accesses the text style id of the text visual.
Note:
This API should be used in preference to Style
UpdateChildrenLayout(TInt)
IMPORT_C void | UpdateChildrenLayout | ( | TInt | aTransitionTime = 0 | ) | [virtual] |
Update the layout of all children. Subclasses can call this to recalculate the layout of all children.
Parameters
TInt aTransitionTime = 0 | Time for layout transition in milliseconds. Any negative value uses value given in CAlfEnv::StaticSetLayoutTransitionTime() |
UpdateMesh(TBool)
void | UpdateMesh | ( | TBool | aSynchronousUpdate = EFalse | ) | |
Parameters
TBool aSynchronousUpdate = EFalse | |
Wrapping()
Determines the visual's line wrapping mode.
Member Enumerations Documentation
Enum TLineSpacingUnits
Enumerators
EPixels |
Line spacing is given in pixels
|
ETwips |
Line spacing is given in twips
|
Enum TLineWrap
Enumerators
ELineWrapManual |
Lines must be broken manually with line break characters. If the visual does not use clipping, long text lines will go outside the visual.
|
ELineWrapTruncate |
Lines that do not fit in the visual's content area are truncated with an ellipsis (...).
|
ELineWrapBreak |
Lines are broken to the visual's content area.
|
Member Data Documentation
TTextVisualPrivateData * iTextVisualData
TTextVisualPrivateData * | iTextVisualData | [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.