class CEikLabel : public CEikAlignedControl |
Enables one or more lines of text to be displayed.
Protected Member Functions | |
---|---|
IMPORT_C void | WriteInternalStateL(RWriteStream &) |
Private Member Functions | |
---|---|
TBool | CheckAndCreateExtension() |
void | ConvertColorsForOutlineEffect(TRgb &, TRgb &) |
IMPORT_C void * | ExtensionInterface(TUid) |
TInt | HeightInPixels() |
TInt | HeightInPixels(const TDesC &) |
IMPORT_C void | Reserved_2() |
void | SetupGcForEmphasis(CGraphicsContext &) |
TInt | WidthInPixels(TPtrC &) |
Public Member Enumerations | |
---|---|
enum | TTextEmphasis { ENoEmphasis = 0x00, EPartialEmphasis = 0x10, EFullEmphasis = 0x20 } |
Protected Member Enumerations | |
---|---|
enum | TLabelFlags { EUnderlining = 0x02, EStrikethrough = 0x04, EUseLogicalToVisualConversion = 0x08 } |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType |
Protected Attributes | |
---|---|
const CFont * | iFont |
TInt | iGapBetweenLines |
TUint8 | iLabFlags |
TUint8 | iNumberOfLines |
HBufC * | iText |
Private Attributes | |
---|---|
CEikLabelExtension * | iExtension |
TInt | iReserveLength |
TInt | iSpare |
Inherited Attributes | |
---|---|
CCoeControl::iCoeEnv | |
CCoeControl::iContext | |
CCoeControl::iPosition | |
CCoeControl::iSize | |
CEikAlignedControl::iAlignment | |
CEikAlignedControl::iMargin |
IMPORT_C TInt | BufferReserveLength | ( | ) | const |
Gets the buffer reserve length.
The buffer reserve length.
IMPORT_C TSize | CalcMinimumSize | ( | TPtrC & | aText | ) | const |
Gets the minimum size required to draw the specified text.
The minimum size required to draw the text.
TPtrC & aText | The text to be drawn. |
IMPORT_C void | ConstructFromResourceL | ( | TResourceReader & | aReader | ) | [virtual] |
From CCoeControl.
Constructs the control from a resource file.
TResourceReader & aReader | Interprets resource data read from a resource file. |
void | ConvertColorsForOutlineEffect | ( | TRgb & | aFillColor, |
TRgb & | aOutlineColor | |||
) | const [private] |
IMPORT_C void | CropText | ( | ) |
Sets a flag to indicate that the text needs to be truncated with 3 dots.
IMPORT_C void | DisablePictographs | ( | ) |
Disables pictograph drawing in the label text. Only effective in Japanese variant. By default, it is disabled.
S60 2.6
IMPORT_C void | Draw | ( | const TRect & | aRect | ) | const [virtual] |
From CCoeControl.
Draw a control - called by window server. All controls, except blank controls, should implement this function. The default implementation draws a blank control.
This function is used for window server-initiated redrawing of controls, and for some application-initiated drawing. It should be implemented by each control, but is only called from within CCoeControl's member functions, and not from the derived class. For this reason it is a private member function of CCoeControl.
panic
EEikPanicLabelNullText Panics if label text has not been defined.
const TRect & aRect | The region of the control to be redrawn. Co-ordinates are relative to the control's origin (top left corner). |
void | DrawToContext | ( | CBitmapContext & | aContext, |
const TRgb * | aOverrideColor | |||
) | const |
CBitmapContext & aContext | |
const TRgb * aOverrideColor |
IMPORT_C void | EnablePictographsL | ( | CAknPictographInterface & | aInterface | ) |
Enables pictograph drawing in the label text. Only effective in Japanese variant. By default, it is disabled.
S60 2.6
CAknPictographInterface & aInterface | Used pictograph interface owned by the caller. |
IMPORT_C void * | ExtensionInterface | ( | TUid | aInterface | ) | [private, virtual] |
From CAknControl.
TUid aInterface |
IMPORT_C void | GetColorUseListL | ( | CArrayFix< TCoeColorUse > & | aColorUseList | ) | const [virtual] |
From CCoeControl.
Gets the list of logical colours used to draw the control.
CArrayFix< TCoeColorUse > & aColorUseList | The colour list. |
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
From CCoeControl.
Handles pointer events. This function gets called whenever a pointer event occurs in the control, i.e. when the pointer is within the control's extent, or when the control has grabbed the pointer. The control should implement this function to handle pointer events.
Note: events of type EButton1Down are processed before HandlePointerEventL() is called, in order to transfer keyboard focus to the control in which the EButton1Down event occurred.
If overriding HandlePointerEventL(), the implementation must include a base call to CCoeControl's HandlePointerEventL().
const TPointerEvent & aPointerEvent | The pointer event. |
IMPORT_C void | HandleResourceChange | ( | TInt | aType | ) | [virtual] |
From CCoeControl.
Handles a change to the control's resources.
TInt aType | A message UID value. |
TInt | HeightInPixels | ( | const TDesC & | aText | ) | const [private] |
const TDesC & aText |
TBool | IsStrikethrough | ( | ) | const [inline] |
Tests label strike-through.
ETrue if the label is set to be drawn with a line through it.
EFalse if the label is not set to be drawn with a line through it.
TBool | IsUnderlined | ( | ) | const [inline] |
Tests whether the label is underlined.
ETrue if the label is set as underlined.
EFalse if the label is not set as underlined.
IMPORT_C TBool | LogicalToVisualConversionUsed | ( | ) | const |
Gets information whether label is performing logical to visual conversion or not.
ETrue if label does logical to visual conversion.
EFalse if not.
TUint8 | NumberOfLines | ( | ) | [inline] |
Gets the number of lines of text in the label.
The number of lines of text.
IMPORT_C TInt | PixelGapBetweenLines | ( | ) | const |
Gets the number of pixels between two lines of text.
The number of pixels between two lines of text.
IMPORT_C void | SetBrushStyle | ( | CWindowGc::TBrushStyle | aBrushStyle | ) |
Sets the brush style to be used from aBrushStyle, this overwrites the brush style set via the Control Context.
CWindowGc::TBrushStyle aBrushStyle | A brush style. |
IMPORT_C void | SetBrushStyleFromContext | ( | ) |
Sets the brush style to be used from the Control Context, this overwrites the brush style set via the CEikLabel::SetBrushStyle().
IMPORT_C void | SetBufferReserveLengthL | ( | TInt | aLength | ) |
Sets the buffer reserve length.
TInt aLength | The buffer reserve length. |
IMPORT_C void | SetEmphasis | ( | TTextEmphasis | aEmphasis | ) |
Sets the label's text emphasis.
TTextEmphasis aEmphasis | The label's text emphasis. |
IMPORT_C void | SetFont | ( | const CFont * | aFont | ) |
Sets the label s font.
const CFont * aFont | The label's font. |
IMPORT_C void | SetLabelAlignment | ( | TInt | aAlignment | ) |
Sets the labels alignment. Overwrites alignment set via CEikAlignedControl.
TInt aAlignment | Should be one of { ELayoutAlignNone, ELayoutAlignCenter, ELayoutAlignLeft, ELayoutAlignRight, ELayoutAlignBidi } defined in Avkon.hrh. |
IMPORT_C void | SetPixelGapBetweenLines | ( | TInt | aGap | ) |
Sets the gap between lines. Gap has a particular definition here. It is defined to be: "baselines separation" - CFont::HeightInPixels()
TInt aGap | Pixels gap to set between lines. |
IMPORT_C void | SetStrikethrough | ( | TBool | aStrikethrough | ) |
Sets the label strike-through.
TBool aStrikethrough | ETrue to set the label to be drawn with a line through it. EFalse to set the label to not be drawn with a line through it. |
IMPORT_C void | SetTextL | ( | const TDesC & | aText | ) |
Sets the label s text.
panic
EEikPanicLabelNullText Panics if label text has not been defined.
const TDesC & aText | The label s text. |
IMPORT_C void | SetUnderlining | ( | TBool | aUnderLining | ) |
Sets the label underlining.
TBool aUnderLining | ETrue to set the label as underlined. EFalse to set the label as not underlined. |
void | SetupGcForEmphasis | ( | CGraphicsContext & | aGc | ) | const [private] |
CGraphicsContext & aGc |
IMPORT_C void | UseLogicalToVisualConversion | ( | TBool | aUseConversion | ) |
Enables or disables logical to visual conversion when label text is drawn. By default, it is enabled. If you perform the conversion yourself and give visual text (in scrictly left-to-right order) to label, you should disable the conversion in label. Note that label does not perform cropping if logical to visual conversion is disabled.
TBool aUseConversion | Whether label should perform logical to visual conversion or not. |
IMPORT_C void | WriteInternalStateL | ( | RWriteStream & | aWriteStream | ) | const [protected, virtual] |
From CCoeControl.
Writes the internal state of the control and its components to a stream. Does nothing in release mode. Designed to be overidden and base called by subclasses.
RWriteStream & aWriteStream | The write stream. |
Determines whether text is drawn with underlining or strike-through.
EUnderlining = 0x02 |
Text is drawn with underlining. |
EStrikethrough = 0x04 |
Text is drawn with strike-through. |
EUseLogicalToVisualConversion = 0x08 |
Determines that bi-directional algorithm still needs to be run against the set text string. This flag allows app to do logical-to-visual conversion in the application side -- since the bi-directional algorithm can only be run once for every text string, we need flagging like this to control whether the algorithm is run inside label or whether the application has already run it and we should not return the algorithm. |
Determines text emphasis.
ENoEmphasis = 0x00 |
No emphasis. |
EPartialEmphasis = 0x10 |
Partial emphasis. |
EFullEmphasis = 0x20 |
Full emphasis. |
TUint8 | iLabFlags | [protected] |
The label s flags. These are used to set text emphasis and characteristics, such as underlining, and strikethrough.