CEikCaptionedControl Class Reference

#include <mw/eikcapc.h>

Link against: eikdlg.lib

class CEikCaptionedControl : public CAknControl

Inherits from

Public Attributes
CEikImage *iBitmap
CEikCapCLabel *iCaption
HBufC *iCaptionText
CCoeControl *iControl
TInt iControlType
TInt iId
TBool iIsEditable
TBool iIsFormControl
TAny *iReturnValue
CEikLabel *iTrailer
Public Member Enumerations
enumTCaptionExpandingState { EInitial, EExtended, ERetracted }
enumTSpaceSharingFlags { EIfTooSmallCtlGetsWidthLast, EIfTooSmallCtlGetsWidthFirst, EIfTooSmallCtlGetsEqualShareOfWidth, EIfTooBigCtlStaysMinHeight, ..., EIfTooSmallDontStrech }
Public Member Functions
CEikCaptionedControl()
~CEikCaptionedControl()
IMPORT_C voidCheckDimmedDisplayState()
virtual IMPORT_C voidConstructFromResourceL(TResourceReader &)
TBool ControlIsAColourSelGrid(TInt)
TBool ControlIsAMfne(TInt)
TBool ControlIsAPopfield(TInt)
TBool ControlIsASecretEditor(TInt)
TBool ControlIsASlider(TInt)
TBool ControlIsAnEdwin(TInt)
TInt ControlType()
const CEikDialogPage *DialogPage()
IMPORT_C TBoolDividerAfter()
voidDrawClosingLine()
virtual IMPORT_C voidGetColorUseListL(CArrayFix< TCoeColorUse > &)
IMPORT_C const TPtrCGetFullCaptionText()
virtual IMPORT_C voidHandleControlEventL(CCoeControl *, TCoeEvent)
virtual IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
virtual IMPORT_C voidHandleResourceChange(TInt)
TBool HasSeparator()
virtual IMPORT_C TCoeInputCapabilitiesInputCapabilities()
TBool IsDisplayable()
IMPORT_C TBoolIsLatent()
IMPORT_C TBoolLatentGroupLineFollows()
TInt MaximumNumberOfControlLinesOnVisiblePage()
virtual IMPORT_C TSizeMinimumSize()
TInt NumberOfLines()
IMPORT_C TBoolOfferHotKeys()
virtual IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &, TEventCode)
MPointerEventObserver *PointerEventObserver()
voidPositionFormComponents()
TBool PressedDownState()
voidRegisterPageWithCaptionControl(CEikDialogPage *)
IMPORT_C voidResetMinimumSizes()
voidScrollBackEditorL()
IMPORT_C voidSetBitmapFromFileL(const TDesC &, TInt, TInt)
IMPORT_C voidSetCaptionL(const TDesC &)
IMPORT_C voidSetCurrent(TBool)
voidSetCurrent(TBool, TBool)
virtual IMPORT_C voidSetDimmed(TBool)
IMPORT_C voidSetDividerAfter(TBool)
IMPORT_C voidSetDrawNoWhiteBackground(TBool)
IMPORT_C voidSetEditableL(TBool, TBool)
IMPORT_C voidSetExtraAscent()
IMPORT_C voidSetFormFlags(TInt)
IMPORT_C voidSetIconL(CFbsBitmap *, CFbsBitmap *)
IMPORT_C voidSetIndicatorIconL(TInt, CFbsBitmap *, CFbsBitmap *)
IMPORT_C voidSetLatent(TBool)
IMPORT_C voidSetLatentGroupLineFollows(TBool)
IMPORT_C voidSetOfferHotKeys(TBool)
voidSetPictographCallBack()
IMPORT_C voidSetPointerEventObserver(MPointerEventObserver *)
voidSetPressedDownState(TBool)
IMPORT_C voidSetSpaceSharingFlags(TInt)
IMPORT_C voidSetTakesEnterKey(TBool)
IMPORT_C voidSetToolTipTextL(const TDesC &)
IMPORT_C voidSetTrailerL(const TDesC &)
IMPORT_C voidSetUsesEars()
IMPORT_C TBoolTakesEnterKey()
IMPORT_C const TDesC *ToolTipText()
Protected Member Functions
virtual IMPORT_C voidDraw(const TRect &)
IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUid)
virtual IMPORT_C voidWriteInternalStateL(RWriteStream &)
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
Inherited Enumerations
CCoeControl:TZoomType
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::CCoeControlArray
CCoeControl::CapturesPointer()const
CCoeControl::ClaimPointerGrab(TBool)
CCoeControl::ClaimPointerGrab(TInt,TBool)
CCoeControl::CloseWindow()
CCoeControl::ComponentArrayExists()const
CCoeControl::Components()
CCoeControl::Components()const
CCoeControl::ControlContext()const
CCoeControl::ControlEnv()const
CCoeControl::CopyControlContextFrom(const CCoeControl *)
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::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::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::NotifyFontChange(const CCoeFontProvider *)
CCoeControl::Observer()const
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::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::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()

Detailed Description

CaptionedControl

CaptionedControl is part of the dialogs. All dialogs and forms use captionedcontrol as a control for one DLG_LINE. Each DLG_LINE has one captionedcontrol in it.

Rectangle of the captionedcontrol is single form field / form line or DLG_LINE's rectangle dependent on the dialog type.

Member Attribute Documentation

iBitmap

CEikImage *iBitmap

iCaption

CEikCapCLabel *iCaption

iCaptionText

HBufC *iCaptionText

iControl

CCoeControl *iControl

iControlType

TInt iControlType

iId

TInt iId

iIsEditable

TBool iIsEditable

iIsFormControl

TBool iIsFormControl

iReturnValue

TAny *iReturnValue

iTrailer

CEikLabel *iTrailer

Member Enumeration Documentation

Enum TCaptionExpandingState

EnumeratorValueDescription
EInitial0
EExtended1
ERetracted2

Enum TSpaceSharingFlags

Constructor & Destructor Documentation

CEikCaptionedControl ( )

IMPORT_CCEikCaptionedControl()

Constructor

~CEikCaptionedControl ( )

IMPORT_C~CEikCaptionedControl()

Destructor

Member Function Documentation

CheckDimmedDisplayState ( )

IMPORT_C voidCheckDimmedDisplayState()

Updates captionedcontrol's dimmed state

ConstructFromResourceL ( TResourceReader & )

IMPORT_C voidConstructFromResourceL(TResourceReader &aReader)[virtual]

ConstructFromResourceL() constructs the captionedcontrol from DLG_LINE resource

usually called with the following code: TResourceReader reader; iCoeEnv->CreateResourceReaderLC(reader, resId); control->ConstructFromResourceL(reader); CleanupStack::PopAndDestroy();

ControlIsAColourSelGrid ( TInt )

TBool ControlIsAColourSelGrid(TIntaControlType)const

ControlIsAMfne ( TInt )

TBool ControlIsAMfne(TIntaControlType)const

ControlIsAPopfield ( TInt )

TBool ControlIsAPopfield(TIntaControlType)const

ControlIsASecretEditor ( TInt )

TBool ControlIsASecretEditor(TIntaControlType)const

ControlIsASlider ( TInt )

TBool ControlIsASlider(TIntaControlType)const

ControlIsAnEdwin ( TInt )

TBool ControlIsAnEdwin(TIntaControlType)const

ControlType ( )

TInt ControlType()const

DialogPage ( )

const CEikDialogPage *DialogPage()const [inline]

DividerAfter ( )

IMPORT_C TBoolDividerAfter()const

Whether there is a divider after the captionedcontrol

Draw ( const TRect & )

IMPORT_C voidDraw(const TRect &aRect)const [protected, virtual]

DrawClosingLine ( )

voidDrawClosingLine()const

GetColorUseListL ( CArrayFix< TCoeColorUse > & )

IMPORT_C voidGetColorUseListL(CArrayFix< TCoeColorUse > &aColorUseList)const [virtual]

GetColorUseListL() gets color use list

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.

Since
ER5U

GetFullCaptionText ( )

IMPORT_C const TPtrCGetFullCaptionText()const

GetFullCaptionText() gets caption descriptor

HandleControlEventL ( CCoeControl *, TCoeEvent )

IMPORT_C voidHandleControlEventL(CCoeControl *aControl,
TCoeEventaEventType
)[virtual]

From MCoeControlObserver: Acts upon changes in the hosted control's state.

This class's implementation handles events from MFNE editor editing buttons in touch enabled builds

ParameterDescription
aControlThe control changing its state (not used)
aEventTypeThe type of control event

HandlePointerEventL ( const TPointerEvent & )

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

HandlePointerEventL handles touch pointer events

HandleResourceChange ( TInt )

IMPORT_C voidHandleResourceChange(TIntaType)[virtual]

HandleResourceChange handles several kinds of resource change event

Handles a change to the control's resources of type aType which are shared across the environment, e.g. colors or fonts.

Since
ER5U

HasSeparator ( )

TBool HasSeparator()const

InputCapabilities ( )

IMPORT_C TCoeInputCapabilitiesInputCapabilities()const [virtual]

Provides ability to get input capabilities needed for fep

IsDisplayable ( )

TBool IsDisplayable()const

IsLatent ( )

IMPORT_C TBoolIsLatent()const

Whether captionedcontrol is latent

Returns: true if is latent

LatentGroupLineFollows ( )

IMPORT_C TBoolLatentGroupLineFollows()const

Whether captionedcontrol has latent group following it

Returns: true if has latent group following

MaximumNumberOfControlLinesOnVisiblePage ( )

TInt MaximumNumberOfControlLinesOnVisiblePage()const

MinimumSize ( )

IMPORT_C TSizeMinimumSize()[virtual]

Reimplemented from CCoeControl::MinimumSize()

MinimumSize() returns minimum size of the control

MopSupplyObject ( TTypeUid )

IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUidaId)[protected]

NumberOfLines ( )

TInt NumberOfLines()const

OfferHotKeys ( )

IMPORT_C TBoolOfferHotKeys()const

Whether offers hot keys

Returns: boolean true if offers hotkeys

OfferKeyEventL ( const TKeyEvent &, TEventCode )

IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &aKeyEvent,
TEventCodeaType
)[virtual]

OfferKeyEventL() handles key events

PointerEventObserver ( )

MPointerEventObserver *PointerEventObserver()const

PositionFormComponents ( )

voidPositionFormComponents()

Positions form components in accordance with dialog page flags. If the dialog instance is not registered, them flags set with SetFormFlags() are used.

Avkon component positioning for Forms

PressedDownState ( )

TBool PressedDownState()const

RegisterPageWithCaptionControl ( CEikDialogPage * )

voidRegisterPageWithCaptionControl(CEikDialogPage *aPage)

ResetMinimumSizes ( )

IMPORT_C voidResetMinimumSizes()

Sets minimumsizes to zero

ScrollBackEditorL ( )

voidScrollBackEditorL()

SetBitmapFromFileL ( const TDesC &, TInt, TInt )

IMPORT_C voidSetBitmapFromFileL(const TDesC &aFilename,
TIntaMainId,
TIntaMaskId = -1
)

SetBitmapFromFileL() sets icon contents for the captionedcontrol

SetCaptionL ( const TDesC & )

IMPORT_C voidSetCaptionL(const TDesC &aText)

SetCaptionL() Sets label of the DLG_LINE

ParameterDescription
aTextDescriptor

SetCurrent ( TBool )

IMPORT_C voidSetCurrent(TBoolaSelected)

Sets the captionedcontrol to be currently focused or not

ParameterDescription
aSelectedwhether captionedcontrol is focused

SetCurrent ( TBool, TBool )

voidSetCurrent(TBoolaSelected,
TBoolaRedraw
)

Sets the captionedcontrol to be currently focused or not.

ParameterDescription
aSelectedwhether captionedcontrol is focused
aRedrawwhether redraw is needed or not

SetDimmed ( TBool )

IMPORT_C voidSetDimmed(TBoolaDimmed)[virtual]

SetDimmed sets captionedcontrol to dimmed state

SetDividerAfter ( TBool )

IMPORT_C voidSetDividerAfter(TBoolaDividerAfter)

Sets divider after the captionedcontrol

SetDrawNoWhiteBackground ( TBool )

IMPORT_C voidSetDrawNoWhiteBackground(TBoolaEnabled)

Allows clients of CEikCaptionedControl to turn off drawing of white background of captionedcontrol.

Since
2.1

SetEditableL ( TBool, TBool )

IMPORT_C voidSetEditableL(TBoolaEditable,
TBoolaShowEmptyFields = ETrue
)

SetEditable sets captionedcontrol to editable state

SetExtraAscent ( )

IMPORT_C voidSetExtraAscent()

SetExtraAscent() modifies layout to include extra ascent for fonts

SetFormFlags ( TInt )

IMPORT_C voidSetFormFlags(TIntaFlags)

SetIconL ( CFbsBitmap *, CFbsBitmap * )

IMPORT_C voidSetIconL(CFbsBitmap *aBitmap,
CFbsBitmap *aMask
)
Sets icon and sets its size.
Since
2.8
ParameterDescription
aBitmapa bitmap which has already been loaded. Must not be NULL.
aMaska mask bitmap which has already been loaded. Can be NULL. Takes ownership of the bitmap objects.

SetIndicatorIconL ( TInt, CFbsBitmap *, CFbsBitmap * )

IMPORT_C voidSetIndicatorIconL(TIntaIcon,
CFbsBitmap *aBitmap,
CFbsBitmap *aMask
)

Sets one of the two small indicator icons

ParameterDescription
aIcona index 0 or 1 depending on which icon to set
aBitmapa bitmap pointer or NULL
aMaska mask pointer or NULL

SetLatent ( TBool )

IMPORT_C voidSetLatent(TBoolaLatent)

Sets captionedcontrol latent status

SetLatentGroupLineFollows ( TBool )

IMPORT_C voidSetLatentGroupLineFollows(TBoolaLglf)

Sets latent group following flag

ParameterDescription
aLglftrue if latent group following

SetOfferHotKeys ( TBool )

IMPORT_C voidSetOfferHotKeys(TBoolaOffer)

Sets captionedcontrol to offer hotkeys

SetPictographCallBack ( )

voidSetPictographCallBack()

In case of an editor control residing in a form, sets up a pictograph animation callback to redraw the form highlight control when pictograph animations are updated.

SetPointerEventObserver ( MPointerEventObserver * )

IMPORT_C voidSetPointerEventObserver(MPointerEventObserver *aObserver)

SetPointerEventObserver Low level observer for touch related pointer events. This can be used to receive low level pointer events.

SetPressedDownState ( TBool )

voidSetPressedDownState(TBoolaPressed)

SetSpaceSharingFlags ( TInt )

IMPORT_C voidSetSpaceSharingFlags(TIntaFlags)

SetSpaceSharingFlags() sets flags for space sharing

Sets the flags, aFlags, (see TSpaceSharingFlags), which determine the way space is distributed if the captioned control is given too much or too little space, relative to its minimum size.

SetTakesEnterKey ( TBool )

IMPORT_C voidSetTakesEnterKey(TBoolaTakesEnter)

Sets captionedcontrol to take enter key

ParameterDescription
aTakesEntertrue if takes enter key, false if not

SetToolTipTextL ( const TDesC & )

IMPORT_C voidSetToolTipTextL(const TDesC &aText)

SetToolTipTextL() sets tooltip text

ParameterDescription
aTextdescriptor for tooltip text

SetTrailerL ( const TDesC & )

IMPORT_C voidSetTrailerL(const TDesC &aText)

SetTrailerL() Sets trailer Should not be used

ParameterDescription
aTextDescriptor

SetUsesEars ( )

IMPORT_C voidSetUsesEars()

SetUsesEars() sets a flag Uses Ears.

TakesEnterKey ( )

IMPORT_C TBoolTakesEnterKey()const

Whether captionedcontrol consumes enter key

ToolTipText ( )

IMPORT_C const TDesC *ToolTipText()const

Ability to query tooltip text string

WriteInternalStateL ( RWriteStream & )

IMPORT_C voidWriteInternalStateL(RWriteStream &aWriteStream)const [protected, virtual]

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.