#include <mw/eiklabel.h>
class CEikLabel : public CEikAlignedControl |
Protected Attributes | |
---|---|
const CFont * | iFont |
TInt | iGapBetweenLines |
TUint8 | iLabFlags |
TUint8 | iNumberOfLines |
HBufC * | iText |
Public Member Enumerations | |
---|---|
enum | TTextEmphasis { ENoEmphasis, EPartialEmphasis, EFullEmphasis } |
Protected Member Enumerations | |
---|---|
enum | TLabelFlags { EUnderlining, EStrikethrough, EUseLogicalToVisualConversion } |
Protected Member Functions | |
---|---|
virtual IMPORT_C void | WriteInternalStateL(RWriteStream &) |
Inherited Attributes | |
---|---|
CCoeControl::iCoeEnv | |
CCoeControl::iContext | |
CCoeControl::iPosition | |
CCoeControl::iSize | |
CEikAlignedControl::iAlignment | |
CEikAlignedControl::iMargin |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType |
Enables one or more lines of text to be displayed.
TUint8 | iLabFlags | [protected] |
The label s flags. These are used to set text emphasis and characteristics, such as underlining, and strikethrough.
Determines whether text is drawn with underlining or strike-through.
IMPORT_C TInt | BufferReserveLength | ( | ) | const |
Gets the buffer reserve length.
Returns: The buffer reserve length.
IMPORT_C void | ConstructFromResourceL | ( | TResourceReader & | aReader | ) | [virtual] |
Reimplemented from CCoeControl::ConstructFromResourceL(TResourceReader &)
From CCoeControl.
Constructs the control from a resource file.
Parameter | Description |
---|---|
aReader | Interprets resource data read from a resource file. |
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.
IMPORT_C void | Draw | ( | const TRect & | aRect | ) | const [virtual] |
Reimplemented from CCoeControl::Draw(const TRect &)const
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.
Parameter | Description |
---|---|
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 |
IMPORT_C void | EnablePictographsL | ( | CAknPictographInterface & | aInterface | ) |
Enables pictograph drawing in the label text. Only effective in Japanese variant. By default, it is disabled.
Parameter | Description |
---|---|
aInterface | Used pictograph interface owned by the caller. |
IMPORT_C void | GetColorUseListL | ( | CArrayFix< TCoeColorUse > & | aColorUseList | ) | const [virtual] |
Reimplemented from CCoeControl::GetColorUseListL(CArrayFix< TCoeColorUse > &)const
From CCoeControl.
Gets the list of logical colours used to draw the control.
Parameter | Description |
---|---|
aColorUseList | The colour list. |
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
Reimplemented from CEikAlignedControl::HandlePointerEventL(const TPointerEvent &)
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().
Parameter | Description |
---|---|
aPointerEvent | The pointer event. |
IMPORT_C void | HandleResourceChange | ( | TInt | aType | ) | [virtual] |
Reimplemented from CCoeControl::HandleResourceChange(TInt)
From CCoeControl.
Handles a change to the control's resources.
Parameter | Description |
---|---|
aType | A message UID value. |
TBool | IsStrikethrough | ( | ) | const [inline] |
Tests label strike-through.
Returns: 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.
Returns: 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.
Returns: ETrue if label does logical to visual conversion. EFalse if not.
IMPORT_C TSize | MinimumSize | ( | ) | [virtual] |
Reimplemented from CCoeControl::MinimumSize()
From CCoeControl.
Sets the control's minimum required size.
Returns: Minimum size required by the control.
TUint8 | NumberOfLines | ( | ) | [inline] |
Gets the number of lines of text in the label.
Returns: The number of lines of text.
IMPORT_C TInt | PixelGapBetweenLines | ( | ) | const |
Gets the number of pixels between two lines of text.
Returns: 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.
Parameter | Description |
---|---|
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.
Parameter | Description |
---|---|
aLength | The buffer reserve length. |
IMPORT_C void | SetEmphasis | ( | TTextEmphasis | aEmphasis | ) |
Sets the label's text emphasis.
Parameter | Description |
---|---|
aEmphasis | The label's text emphasis. |
IMPORT_C void | SetFont | ( | const CFont * | aFont | ) |
Sets the label s font.
Parameter | Description |
---|---|
aFont | The label's font. |
IMPORT_C void | SetLabelAlignment | ( | TInt | aAlignment | ) |
Sets the labels alignment. Overwrites alignment set via CEikAlignedControl.
Parameter | Description |
---|---|
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()
Parameter | Description |
---|---|
aGap | Pixels gap to set between lines. |
IMPORT_C void | SetStrikethrough | ( | TBool | aStrikethrough | ) |
Sets the label strike-through.
Parameter | Description |
---|---|
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.
Parameter | Description |
---|---|
aText | The label s text. |
IMPORT_C void | SetUnderlining | ( | TBool | aUnderLining | ) |
Sets the label underlining.
Parameter | Description |
---|---|
aUnderLining | ETrue to set the label as underlined. EFalse to set the label as not underlined. |
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.
Parameter | Description |
---|---|
aUseConversion | Whether label should perform logical to visual conversion or not. |
IMPORT_C void | WriteInternalStateL | ( | RWriteStream & | aWriteStream | ) | const [protected, virtual] |
Reimplemented from CEikAlignedControl::WriteInternalStateL(RWriteStream &)const
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.
Parameter | Description |
---|---|
aWriteStream | The write stream. |