CEikLabel Class Reference
class CEikLabel : public CEikAlignedControl
|
Enables one or more lines of text to be displayed.
Inherited Functions
|
|
CAknControl::CAknControl()
|
|
CAknControl::~CAknControl()
|
|
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()
|
|
CCoeControl::AccumulatedZoom()const
|
|
CCoeControl::ActivateGc()const
|
|
CCoeControl::ActivateL()
|
|
CCoeControl::BackedUpWindow()const
|
|
CCoeControl::Background()const
|
|
CCoeControl::CCoeControl()
|
|
CCoeControl::CCoeControl(CCoeEnv *)
|
|
CCoeControl::CCoeControl(const CCoeControl &)
|
|
CCoeControl::CapturesPointer()const
|
|
CCoeControl::ClaimPointerGrab(TBool)
|
|
CCoeControl::ClaimPointerGrab(TInt,TBool)
|
|
CCoeControl::CloseWindow()
|
|
CCoeControl::ComponentArrayExists()const
|
|
CCoeControl::ComponentControl(TInt)const
|
|
CCoeControl::Components()
|
|
CCoeControl::Components()const
|
|
CCoeControl::ControlContext()const
|
|
CCoeControl::ControlEnv()const
|
|
CCoeControl::CopyControlContextFrom(const CCoeControl *)
|
|
CCoeControl::CountComponentControls()const
|
|
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &)
|
|
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &,TDisplayMode)
|
|
CCoeControl::CreateWindowL()
|
|
CCoeControl::CreateWindowL(RWindowGroup *)
|
|
CCoeControl::CreateWindowL(RWindowTreeNode &)
|
|
CCoeControl::CreateWindowL(const CCoeControl *)
|
|
CCoeControl::CustomGc()const
|
|
CCoeControl::DeactivateGc()const
|
|
CCoeControl::DrawBackground(const TRect &)const
|
|
CCoeControl::DrawDeferred()const
|
|
CCoeControl::DrawForeground(const TRect &)const
|
|
CCoeControl::DrawNow()const
|
|
CCoeControl::DrawNow(const TRect &)const
|
|
CCoeControl::DrawableWindow()const
|
|
CCoeControl::EnableDragEvents()
|
|
CCoeControl::EnableReportControlStateChange(TBool)
|
|
CCoeControl::EnableWindowTransparency()
|
|
CCoeControl::FindBackground()const
|
|
CCoeControl::FindFontProvider()const
|
|
CCoeControl::FocusChanged(TDrawNow)
|
|
CCoeControl::GetColor(TInt,TRgb &)const
|
|
CCoeControl::GetGc()const
|
|
CCoeControl::GetHelpContext(TCoeHelpContext &)const
|
|
CCoeControl::GrabbingComponent()const
|
|
CCoeControl::GrabbingComponent(TInt)const
|
|
CCoeControl::HandleComponentControlsResourceChange(TInt)
|
|
CCoeControl::HandleControlArrayEventL(CCoeControlArray::TEvent,const CCoeControlArray *,CCoeControl *,TInt)
|
|
CCoeControl::HandlePointerBufferReadyL()
|
|
CCoeControl::HandleRedrawEvent(const TRect &)const
|
|
CCoeControl::HasBorder()const
|
|
CCoeControl::HitTest()const
|
|
CCoeControl::IgnoreEventsUntilNextPointerUp()
|
|
CCoeControl::Index(const CCoeControl *)const
|
|
CCoeControl::InitComponentArrayL()
|
|
CCoeControl::InputCapabilities()const
|
|
CCoeControl::IsActivated()const
|
|
CCoeControl::IsBackedUp()const
|
|
CCoeControl::IsBeingDestroyed()const
|
|
CCoeControl::IsBlank()const
|
|
CCoeControl::IsDimmed()const
|
|
CCoeControl::IsFocused()const
|
|
CCoeControl::IsNonFocusing()const
|
|
CCoeControl::IsReadyToDraw()const
|
|
CCoeControl::IsVisible()const
|
|
CCoeControl::LayoutManager()const
|
|
CCoeControl::MakeVisible(TBool)
|
|
CCoeControl::MaximumWidth()const
|
|
CCoeControl::MopSupplyObject(TTypeUid)
|
|
CCoeControl::NotifyFontChange(const CCoeFontProvider *)
|
|
CCoeControl::Observer()const
|
|
CCoeControl::OfferKeyEventL(const TKeyEvent &,TEventCode)
|
|
CCoeControl::OverrideColorL(TInt,TRgb)
|
|
CCoeControl::OwnsWindow()const
|
|
CCoeControl::Parent()
|
|
CCoeControl::Parent()const
|
|
CCoeControl::Position()const
|
|
CCoeControl::PositionChanged()
|
|
CCoeControl::PositionRelativeToScreen()const
|
|
CCoeControl::PrepareForFocusGainL()
|
|
CCoeControl::PrepareForFocusLossL()
|
|
CCoeControl::ProcessPointerBufferReadyL()
|
|
CCoeControl::ProcessPointerEventL(const TPointerEvent &)
|
|
CCoeControl::Rect()const
|
|
CCoeControl::RecursivelyMergeInputCapabilities(TCoeInputCapabilities &)const
|
|
CCoeControl::RecursivelyMergedInputCapabilities()const
|
|
CCoeControl::RefetchPixelMappingL()
|
|
CCoeControl::RemoveFromParent()
|
|
CCoeControl::ReportEventL(MCoeControlObserver::TCoeEvent)
|
|
CCoeControl::RequestRelayout(const CCoeControl *)
|
|
CCoeControl::ResetGc()const
|
|
CCoeControl::ScreenFont(const TCoeFont &)const
|
|
CCoeControl::SetAdjacent(TInt)
|
|
CCoeControl::SetAllowStrayPointers()
|
|
CCoeControl::SetBackground(const MCoeControlBackground *)
|
|
CCoeControl::SetBlank()
|
|
CCoeControl::SetCanDrawOutsideRect()
|
|
CCoeControl::SetComponentsToInheritVisibility(TBool)
|
|
CCoeControl::SetContainerWindowL(RBackedUpWindow &)
|
|
CCoeControl::SetContainerWindowL(RWindow &)
|
|
CCoeControl::SetContainerWindowL(const CCoeControl &)
|
|
CCoeControl::SetControlContext(MCoeControlContext *)
|
|
CCoeControl::SetCornerAndSize(TGulAlignment,const TSize &)
|
|
CCoeControl::SetCustomGc(CWindowGc *)
|
|
CCoeControl::SetDimmed(TBool)
|
|
CCoeControl::SetExtent(const TPoint &,const TSize &)
|
|
CCoeControl::SetExtentToWholeScreen()
|
|
CCoeControl::SetFocus(TBool,TDrawNow)
|
|
CCoeControl::SetFocusing(TBool)
|
|
CCoeControl::SetFontProviderL(const CCoeFontProvider &)
|
|
CCoeControl::SetGc(CWindowGc *)const
|
|
CCoeControl::SetGloballyCapturing(TBool)
|
|
CCoeControl::SetHitTest(const MCoeControlHitTest *)
|
|
CCoeControl::SetLayoutManagerL(MCoeLayoutManager *)
|
|
CCoeControl::SetMaximumWidth(TInt)
|
|
CCoeControl::SetMopParent(MObjectProvider *)
|
|
CCoeControl::SetNeighbor(CCoeControl *)
|
|
CCoeControl::SetNonFocusing()
|
|
CCoeControl::SetObserver(MCoeControlObserver *)
|
|
CCoeControl::SetParent(CCoeControl *)
|
|
CCoeControl::SetPointerCapture(TBool)
|
|
CCoeControl::SetPosition(const TPoint &)
|
|
CCoeControl::SetRect(const TRect &)
|
|
CCoeControl::SetSize(const TSize &)
|
|
CCoeControl::SetSizeWithoutNotification(const TSize &)
|
|
CCoeControl::SetTextBaselineSpacing(TInt)
|
|
CCoeControl::SetUniqueHandle(TInt)
|
|
CCoeControl::SetZoomFactorL(TInt,TZoomType)
|
|
CCoeControl::Size()const
|
|
CCoeControl::SizeChanged()
|
|
CCoeControl::SystemGc()const
|
|
CCoeControl::TextBaselineOffset(const TSize &)const
|
|
CCoeControl::TextDrawer(TInt)const
|
|
CCoeControl::UniqueHandle()const
|
|
CCoeControl::Window()const
|
|
CCoeControl::WriteInternalStateNowL(RWriteStream &)const
|
|
CCoeControl::ZoomWithType()const
|
|
CCoeControl::operator=(const CCoeControl &)
|
|
CCoeControl::~CCoeControl()
|
|
CEikAlignedControl::CEikAlignedControl()
|
|
CEikAlignedControl::SetAlignment(TGulAlignmentValue)
|
|
CEikAlignedControl::SetAllMarginsTo(TInt)
|
|
CEikAlignedControl::~CEikAlignedControl()
|
Constructor & Destructor Documentation
Member Functions Documentation
BufferReserveLength()
IMPORT_C
TInt
|
BufferReserveLength
|
(
|
)
|
const
|
Gets the buffer reserve length.
CalcMinimumSize(TPtrC &)
IMPORT_C
TSize
|
CalcMinimumSize
|
(
|
TPtrC
&
|
aText
|
)
|
const
|
Gets the minimum size required to draw the specified text.
Parameters
TPtrC
& aText
|
The text to be drawn.
|
CheckAndCreateExtension()
TBool
|
CheckAndCreateExtension
|
(
|
)
|
[private]
|
ConstructFromResourceL(TResourceReader &)
IMPORT_C void
|
ConstructFromResourceL
|
(
|
TResourceReader
&
|
aReader
|
)
|
[virtual]
|
From
CCoeControl
.
Constructs the control from a resource file.
Parameters
TResourceReader
& aReader
|
Interprets resource data read from a resource file.
|
ConvertColorsForOutlineEffect(TRgb &, TRgb &)
void
|
ConvertColorsForOutlineEffect
|
(
|
TRgb
&
|
aFillColor,
|
|
TRgb
&
|
aOutlineColor
|
|
)
|
const [private]
|
CropText()
IMPORT_C void
|
CropText
|
(
|
)
|
|
Sets a flag to indicate that the text needs to be truncated with 3 dots.
DisablePictographs()
IMPORT_C void
|
DisablePictographs
|
(
|
)
|
|
Disables pictograph drawing in the label text. Only effective in Japanese variant. By default, it is disabled.
Draw(const TRect &)
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.
Parameters
const
TRect
& aRect
|
The region of the control to be redrawn. Co-ordinates are relative to the control's origin (top left corner).
|
DrawToContext(CBitmapContext &, const TRgb *)
EnablePictographsL(CAknPictographInterface &)
IMPORT_C void
|
EnablePictographsL
|
(
|
CAknPictographInterface &
|
aInterface
|
)
|
|
Enables pictograph drawing in the label text. Only effective in Japanese variant. By default, it is disabled.
Parameters
CAknPictographInterface & aInterface
|
Used pictograph interface owned by the caller.
|
ExtensionInterface(TUid)
IMPORT_C void *
|
ExtensionInterface
|
(
|
TUid
|
aInterface
|
)
|
[private, virtual]
|
Font()
const
CFont
*
|
Font
|
(
|
)
|
const [inline]
|
GetColorUseListL(CArrayFix< TCoeColorUse > &)
From
CCoeControl
.
Gets the list of logical colours used to draw the control.
Gets the list of logical colors employed in the drawing of the control, paired with an explanation of how they are used. Appends the list to aColorUseList.
HandlePointerEventL(const TPointerEvent &)
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()
.
Parameters
const TPointerEvent & aPointerEvent
|
The pointer event.
|
HandleResourceChange(TInt)
IMPORT_C void
|
HandleResourceChange
|
(
|
TInt
|
aType
|
)
|
[virtual]
|
From
CCoeControl
.
Handles a change to the control's resources.
Handles a change to the control's resources of type aType which are shared across the environment, e.g. colors or fonts.
Parameters
TInt
aType
|
A message UID value.
|
HeightInPixels()
TInt
|
HeightInPixels
|
(
|
)
|
const [private]
|
HeightInPixels(const TDesC &)
TInt
|
HeightInPixels
|
(
|
const
TDesC
&
|
aText
|
)
|
const [private]
|
IsStrikethrough()
TBool
|
IsStrikethrough
|
(
|
)
|
const [inline]
|
Tests label strike-through.
IsUnderlined()
TBool
|
IsUnderlined
|
(
|
)
|
const [inline]
|
Tests whether the label is underlined.
LogicalToVisualConversionUsed()
IMPORT_C
TBool
|
LogicalToVisualConversionUsed
|
(
|
)
|
const
|
Gets information whether label is performing logical to visual conversion or not.
MinimumSize()
IMPORT_C
TSize
|
MinimumSize
|
(
|
)
|
[virtual]
|
From
CCoeControl
.
Sets the control's minimum required size.
NumberOfLines()
TUint8
|
NumberOfLines
|
(
|
)
|
[inline]
|
Gets the number of lines of text in the label.
PixelGapBetweenLines()
IMPORT_C
TInt
|
PixelGapBetweenLines
|
(
|
)
|
const
|
Gets the number of pixels between two lines of text.
Reserved_2()
IMPORT_C void
|
Reserved_2
|
(
|
)
|
[private, virtual]
|
SetBrushStyle(CWindowGc::TBrushStyle)
Sets the brush style to be used from
aBrushStyle
, this overwrites the brush style set via the Control Context.
SetBrushStyleFromContext()
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()
.
SetBufferReserveLengthL(TInt)
IMPORT_C void
|
SetBufferReserveLengthL
|
(
|
TInt
|
aLength
|
)
|
|
Sets the buffer reserve length.
Parameters
TInt
aLength
|
The buffer reserve length.
|
SetEmphasis(TTextEmphasis)
Sets the label's text emphasis.
SetFont(const CFont *)
IMPORT_C void
|
SetFont
|
(
|
const
CFont
*
|
aFont
|
)
|
|
Parameters
const
CFont
* aFont
|
The label's font.
|
SetLabelAlignment(TInt)
IMPORT_C void
|
SetLabelAlignment
|
(
|
TInt
|
aAlignment
|
)
|
|
Parameters
TInt
aAlignment
|
Should be one of { ELayoutAlignNone, ELayoutAlignCenter, ELayoutAlignLeft, ELayoutAlignRight, ELayoutAlignBidi } defined in Avkon.hrh.
|
SetPixelGapBetweenLines(TInt)
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()
Parameters
TInt
aGap
|
Pixels gap to set between lines.
|
SetStrikethrough(TBool)
IMPORT_C void
|
SetStrikethrough
|
(
|
TBool
|
aStrikethrough
|
)
|
|
Sets the label strike-through.
Parameters
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.
|
SetTextL(const TDesC &)
IMPORT_C void
|
SetTextL
|
(
|
const
TDesC
&
|
aText
|
)
|
|
Sets the label s text.
-
panic
-
EEikPanicLabelNullText Panics if label text has not been defined.
Parameters
const
TDesC
& aText
|
The label s text.
|
SetUnderlining(TBool)
IMPORT_C void
|
SetUnderlining
|
(
|
TBool
|
aUnderLining
|
)
|
|
Sets the label underlining.
Parameters
TBool
aUnderLining
|
ETrue to set the label as underlined. EFalse to set the label as not underlined.
|
SetupGcForEmphasis(CGraphicsContext &)
Text()
const
TDesC
*
|
Text
|
(
|
)
|
const [inline]
|
UseLogicalToVisualConversion(TBool)
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.
Parameters
TBool
aUseConversion
|
Whether label should perform logical to visual conversion or not.
|
WidthInPixels(TPtrC &)
TInt
|
WidthInPixels
|
(
|
TPtrC
&
|
aText
|
)
|
const [private]
|
WriteInternalStateL(RWriteStream &)
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.
Writes the internal state of the control and its components to aStream. Does nothing in release mode. Designed to be overidden and base called by subclasses.
Member Enumerations Documentation
Enum TLabelFlags
Determines whether text is drawn with underlining or strike-through.
Enumerators
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.
|
Enum TTextEmphasis
Determines text emphasis.
Enumerators
ENoEmphasis = 0x00
|
No emphasis.
|
EPartialEmphasis = 0x10
|
Partial emphasis.
|
EFullEmphasis = 0x20
|
Full emphasis.
|
Member Data Documentation
CEikLabelExtension * iExtension
CEikLabelExtension *
|
iExtension
|
[private]
|
const CFont * iFont
const
CFont
*
|
iFont
|
[protected]
|
TInt
iGapBetweenLines
TInt
|
iGapBetweenLines
|
[protected]
|
The number of pixels between lines of text.
TUint8
iLabFlags
The label s flags. These are used to set text emphasis and characteristics, such as underlining, and strikethrough.
TUint8
iNumberOfLines
TUint8
|
iNumberOfLines
|
[protected]
|
The label s number of lines of text.
TInt
iReserveLength
TInt
|
iReserveLength
|
[private]
|
HBufC * iText
HBufC
*
|
iText
|
[protected]
|
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.