CEikCaptionedControl Class Reference

API published in: S60 1st Ed

Link against: eikdlg.lib eikcoctl.lib

Capability Information

Required Capabilities

None


#include <
eikcapc.h>

Inherits CAknControl.


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.


Public Types

enum  TSpaceSharingFlags {
  EIfTooSmallCtlGetsWidthLast = 0x0, EIfTooSmallCtlGetsWidthFirst = 0x1, EIfTooSmallCtlGetsEqualShareOfWidth = 0x2, EIfTooBigCtlStaysMinHeight = 0x4,
  EIfTooBigCtlStaysMinWidth = 0x8, EIfTooBigCtlStaysMinSize = 0xc, EIfTooSmallDontStrech = 0x10
}
enum  TCaptionExpandingState { EInitial = 0, EExtended = 1, ERetracted = 2 }

Public Member Functions

IMPORT_C CEikCaptionedControl ()
 Constructor.
IMPORT_C ~CEikCaptionedControl ()
 Destructor.
IMPORT_C void SetUsesEars ()
 SetUsesEars() sets a flag Uses Ears.
IMPORT_C void SetSpaceSharingFlags (TInt aFlags)
 SetSpaceSharingFlags() sets flags for space sharing.
IMPORT_C void SetExtraAscent ()
 SetExtraAscent() modifies layout to include extra ascent for fonts.
IMPORT_C void SetCaptionL (const TDesC &aText)
 SetCaptionL() Sets label of the DLG_LINE.
IMPORT_C void SetTrailerL (const TDesC &aText)
 SetTrailerL() Sets trailer Should not be used.
IMPORT_C void SetCurrent (TBool aSelected)
 Sets the captionedcontrol to be currently focused or not.
IMPORT_C void CheckDimmedDisplayState ()
 Updates captionedcontrol's dimmed state.
IMPORT_C void ResetMinimumSizes ()
 Sets minimumsizes to zero.
IMPORT_C TBool IsLatent () const
 Whether captionedcontrol is latent.
IMPORT_C void SetLatent (TBool aLatent)
 Sets captionedcontrol latent status.
IMPORT_C TBool LatentGroupLineFollows () const
 Whether captionedcontrol has latent group following it.
IMPORT_C void SetLatentGroupLineFollows (TBool aLglf)
 Sets latent group following flag.
IMPORT_C TBool DividerAfter () const
 Whether there is a divider after the captionedcontrol.
IMPORT_C void SetDividerAfter (TBool aDividerAfter)
 Sets divider after the captionedcontrol.
IMPORT_C TBool TakesEnterKey () const
 Whether captionedcontrol consumes enter key.
IMPORT_C void SetTakesEnterKey (TBool aTakesEnter)
 Sets captionedcontrol to take enter key.
IMPORT_C TBool OfferHotKeys () const
 Whether offers hot keys.
IMPORT_C void SetOfferHotKeys (TBool aOffer)
 Sets captionedcontrol to offer hotkeys.
virtual IMPORT_C void HandleControlEventL (CCoeControl *aControl, TCoeEvent aEventType)
 From MCoeControlObserver: Acts upon changes in the hosted control's state.
TInt MaximumNumberOfControlLinesOnVisiblePage () const
TInt NumberOfLines () const
TInt NumberOfLinesForScrollBar () const
TBool ControlIsAnEdwin (TInt aControlType) const
TBool ControlIsAMfne (TInt aControlType) const
TBool ControlIsAPopfield (TInt aControlType) const
TBool ControlIsASecretEditor (TInt aControlType) const
TBool ControlIsASlider (TInt aControlType) const
TBool ControlIsAColourSelGrid (TInt aControlType) const
TInt ControlType () const
IMPORT_C TSize MinimumSize ()
 MinimumSize() returns minimum size of the control.
IMPORT_C void ConstructFromResourceL (TResourceReader &aReader)
 ConstructFromResourceL() constructs the captionedcontrol from DLG_LINE resource.
IMPORT_C TKeyResponse OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)
 OfferKeyEventL() handles key events.
virtual IMPORT_C void GetColorUseListL (CArrayFix< TCoeColorUse > &aColorUseList) const
 GetColorUseListL() gets color use list.
virtual IMPORT_C void HandleResourceChange (TInt aType)
 HandleResourceChange handles several kinds of resource change event.
IMPORT_C TCoeInputCapabilities InputCapabilities () const
 Provides ability to get input capabilities needed for fep.
IMPORT_C void SetDimmed (TBool aDimmed)
 SetDimmed sets captionedcontrol to dimmed state.
IMPORT_C void HandlePointerEventL (const TPointerEvent &aPointerEvent)
 HandlePointerEventL handles touch pointer events.
void RegisterPageWithCaptionControl (const CEikDialogPage *aPage)
IMPORT_C void SetToolTipTextL (const TDesC &aText)
 SetToolTipTextL() sets tooltip text.
IMPORT_C const TDesC * ToolTipText () const
 Ability to query tooltip text string.
IMPORT_C void SetBitmapFromFileL (const TDesC &aFilename, TInt aMainId, TInt aMaskId=-1)
 SetBitmapFromFileL() sets icon contents for the captionedcontrol.
IMPORT_C void SetEditableL (TBool aEditable, TBool aShowEmptyFields=ETrue)
 SetEditable sets captionedcontrol to editable state.
IMPORT_C void SetFormFlags (TInt aFlags)
void GetAknLayoutValuesL ()
TBool HasSeparator () const
IMPORT_C const TPtrC GetFullCaptionText () const
 GetFullCaptionText() gets caption descriptor.
TBool IsDisplayable () const
void ClearCaptionControlNow () const
IMPORT_C void SetDrawNoWhiteBackground (TBool aEnabled)
 Allows clients of CEikCaptionedControl to turn off drawing of white background of captionedcontrol.
void SetPictographCallBack ()
 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.
IMPORT_C void SetIconL (CFbsBitmap *aBitmap, CFbsBitmap *aMask)
 Sets icon and sets its size.
IMPORT_C void SetIndicatorIconL (TInt aIcon, CFbsBitmap *aBitmap, CFbsBitmap *aMask)
 Sets one of the two small indicator icons.
IMPORT_C void SetPointerEventObserver (MPointerEventObserver *aObserver)
 SetPointerEventObserver Low level observer for touch related pointer events.
MPointerEventObserverPointerEventObserver () const
void PositionFormComponents ()
 Positions form components in accordance with dialog page flags.
void DrawClosingLine () const
const CEikDialogPageDialogPage () const

Data Fields

CCoeControl * iControl
CEikCapCLabeliCaption
HBufC * iCaptionText
CEikLabeliTrailer
TInt iId
TInt iControlType
TAny * iReturnValue
TBool iIsFormControl
CEikImageiBitmap
TBool iIsEditable

Protected Member Functions

IMPORT_C void Draw (const TRect &aRect) const
IMPORT_C void WriteInternalStateL (RWriteStream &aWriteStream) const
IMPORT_C TTypeUid::Ptr MopSupplyObject (TTypeUid aId)
TRect ViewRect () const
TRect EditRect () const

Friends

class CEikCapCExtension
class CEikCapCArray

Member Enumeration Documentation

enum CEikCaptionedControl::TCaptionExpandingState
 
Enumerator:
EInitial 
EExtended 
ERetracted 
enum CEikCaptionedControl::TSpaceSharingFlags
 
Enumerator:
EIfTooSmallCtlGetsWidthLast 
EIfTooSmallCtlGetsWidthFirst 
EIfTooSmallCtlGetsEqualShareOfWidth 
EIfTooBigCtlStaysMinHeight 
EIfTooBigCtlStaysMinWidth 
EIfTooBigCtlStaysMinSize 
EIfTooSmallDontStrech 

Constructor & Destructor Documentation

IMPORT_C CEikCaptionedControl::CEikCaptionedControl  ) 
 

Constructor.

IMPORT_C CEikCaptionedControl::~CEikCaptionedControl  ) 
 

Destructor.


Member Function Documentation

IMPORT_C void CEikCaptionedControl::CheckDimmedDisplayState  ) 
 

Updates captionedcontrol's dimmed state.

void CEikCaptionedControl::ClearCaptionControlNow  )  const
 
IMPORT_C void CEikCaptionedControl::ConstructFromResourceL TResourceReader &  aReader  ) 
 

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();

TBool CEikCaptionedControl::ControlIsAColourSelGrid TInt  aControlType  )  const
 
TBool CEikCaptionedControl::ControlIsAMfne TInt  aControlType  )  const
 
TBool CEikCaptionedControl::ControlIsAnEdwin TInt  aControlType  )  const
 
TBool CEikCaptionedControl::ControlIsAPopfield TInt  aControlType  )  const
 
TBool CEikCaptionedControl::ControlIsASecretEditor TInt  aControlType  )  const
 
TBool CEikCaptionedControl::ControlIsASlider TInt  aControlType  )  const
 
TInt CEikCaptionedControl::ControlType  )  const
 
const CEikDialogPage* CEikCaptionedControl::DialogPage  )  const [inline]
 
IMPORT_C TBool CEikCaptionedControl::DividerAfter  )  const
 

Whether there is a divider after the captionedcontrol.

IMPORT_C void CEikCaptionedControl::Draw const TRect &  aRect  )  const [protected]
 
void CEikCaptionedControl::DrawClosingLine  )  const
 
TRect CEikCaptionedControl::EditRect  )  const [protected]
 
void CEikCaptionedControl::GetAknLayoutValuesL  ) 
 
virtual IMPORT_C void CEikCaptionedControl::GetColorUseListL CArrayFix< TCoeColorUse > &  aColorUseList  )  const [virtual]
 

GetColorUseListL() gets color use list.

IMPORT_C const TPtrC CEikCaptionedControl::GetFullCaptionText  )  const
 

GetFullCaptionText() gets caption descriptor.

virtual IMPORT_C void CEikCaptionedControl::HandleControlEventL CCoeControl *  aControl,
TCoeEvent  aEventType
[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

Parameters:
aControl The control changing its state (not used)
aEventType The type of control event
IMPORT_C void CEikCaptionedControl::HandlePointerEventL const TPointerEvent &  aPointerEvent  ) 
 

HandlePointerEventL handles touch pointer events.

virtual IMPORT_C void CEikCaptionedControl::HandleResourceChange TInt  aType  )  [virtual]
 

HandleResourceChange handles several kinds of resource change event.

TBool CEikCaptionedControl::HasSeparator  )  const
 
IMPORT_C TCoeInputCapabilities CEikCaptionedControl::InputCapabilities  )  const
 

Provides ability to get input capabilities needed for fep.

TBool CEikCaptionedControl::IsDisplayable  )  const
 
IMPORT_C TBool CEikCaptionedControl::IsLatent  )  const
 

Whether captionedcontrol is latent.

Returns:
true if is latent
IMPORT_C TBool CEikCaptionedControl::LatentGroupLineFollows  )  const
 

Whether captionedcontrol has latent group following it.

Returns:
true if has latent group following
TInt CEikCaptionedControl::MaximumNumberOfControlLinesOnVisiblePage  )  const
 
IMPORT_C TSize CEikCaptionedControl::MinimumSize  ) 
 

MinimumSize() returns minimum size of the control.

IMPORT_C TTypeUid::Ptr CEikCaptionedControl::MopSupplyObject TTypeUid  aId  )  [protected]
 
TInt CEikCaptionedControl::NumberOfLines  )  const
 
TInt CEikCaptionedControl::NumberOfLinesForScrollBar  )  const
 
IMPORT_C TBool CEikCaptionedControl::OfferHotKeys  )  const
 

Whether offers hot keys.

Returns:
boolean true if offers hotkeys
IMPORT_C TKeyResponse CEikCaptionedControl::OfferKeyEventL const TKeyEvent &  aKeyEvent,
TEventCode  aType
 

OfferKeyEventL() handles key events.

MPointerEventObserver* CEikCaptionedControl::PointerEventObserver  )  const
 
void CEikCaptionedControl::PositionFormComponents  ) 
 

Positions form components in accordance with dialog page flags.

If the dialog instance is not registered, them flags set with SetFormFlags() are used.

void CEikCaptionedControl::RegisterPageWithCaptionControl const CEikDialogPage aPage  ) 
 
IMPORT_C void CEikCaptionedControl::ResetMinimumSizes  ) 
 

Sets minimumsizes to zero.

IMPORT_C void CEikCaptionedControl::SetBitmapFromFileL const TDesC &  aFilename,
TInt  aMainId,
TInt  aMaskId = -1
 

SetBitmapFromFileL() sets icon contents for the captionedcontrol.

IMPORT_C void CEikCaptionedControl::SetCaptionL const TDesC &  aText  ) 
 

SetCaptionL() Sets label of the DLG_LINE.

Parameters:
aText Descriptor
IMPORT_C void CEikCaptionedControl::SetCurrent TBool  aSelected  ) 
 

Sets the captionedcontrol to be currently focused or not.

Parameters:
aSelected whether captionedcontrol is focused
IMPORT_C void CEikCaptionedControl::SetDimmed TBool  aDimmed  ) 
 

SetDimmed sets captionedcontrol to dimmed state.

IMPORT_C void CEikCaptionedControl::SetDividerAfter TBool  aDividerAfter  ) 
 

Sets divider after the captionedcontrol.

IMPORT_C void CEikCaptionedControl::SetDrawNoWhiteBackground TBool  aEnabled  ) 
 

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

IMPORT_C void CEikCaptionedControl::SetEditableL TBool  aEditable,
TBool  aShowEmptyFields = ETrue
 

SetEditable sets captionedcontrol to editable state.

IMPORT_C void CEikCaptionedControl::SetExtraAscent  ) 
 

SetExtraAscent() modifies layout to include extra ascent for fonts.

IMPORT_C void CEikCaptionedControl::SetFormFlags TInt  aFlags  ) 
 
IMPORT_C void CEikCaptionedControl::SetIconL CFbsBitmap *  aBitmap,
CFbsBitmap *  aMask
 

Sets icon and sets its size.

Parameters:
aBitmap a bitmap which has already been loaded. Must not be NULL.
aMask a mask bitmap which has already been loaded. Can be NULL. Takes ownership of the bitmap objects.
IMPORT_C void CEikCaptionedControl::SetIndicatorIconL TInt  aIcon,
CFbsBitmap *  aBitmap,
CFbsBitmap *  aMask
 

Sets one of the two small indicator icons.

Parameters:
aIcon a index 0 or 1 depending on which icon to set
aBitmap a bitmap pointer or NULL
aMask a mask pointer or NULL
IMPORT_C void CEikCaptionedControl::SetLatent TBool  aLatent  ) 
 

Sets captionedcontrol latent status.

IMPORT_C void CEikCaptionedControl::SetLatentGroupLineFollows TBool  aLglf  ) 
 

Sets latent group following flag.

Parameters:
aLglf true if latent group following
IMPORT_C void CEikCaptionedControl::SetOfferHotKeys TBool  aOffer  ) 
 

Sets captionedcontrol to offer hotkeys.

void CEikCaptionedControl::SetPictographCallBack  ) 
 

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.

IMPORT_C void CEikCaptionedControl::SetPointerEventObserver MPointerEventObserver aObserver  ) 
 

SetPointerEventObserver Low level observer for touch related pointer events.

This can be used to receive low level pointer events.

IMPORT_C void CEikCaptionedControl::SetSpaceSharingFlags TInt  aFlags  ) 
 

SetSpaceSharingFlags() sets flags for space sharing.

IMPORT_C void CEikCaptionedControl::SetTakesEnterKey TBool  aTakesEnter  ) 
 

Sets captionedcontrol to take enter key.

Parameters:
aTakesEnter true if takes enter key, false if not
IMPORT_C void CEikCaptionedControl::SetToolTipTextL const TDesC &  aText  ) 
 

SetToolTipTextL() sets tooltip text.

Parameters:
aText descriptor for tooltip text
IMPORT_C void CEikCaptionedControl::SetTrailerL const TDesC &  aText  ) 
 

SetTrailerL() Sets trailer Should not be used.

Parameters:
aText Descriptor
IMPORT_C void CEikCaptionedControl::SetUsesEars  ) 
 

SetUsesEars() sets a flag Uses Ears.

IMPORT_C TBool CEikCaptionedControl::TakesEnterKey  )  const
 

Whether captionedcontrol consumes enter key.

IMPORT_C const TDesC* CEikCaptionedControl::ToolTipText  )  const
 

Ability to query tooltip text string.

TRect CEikCaptionedControl::ViewRect  )  const [protected]
 
IMPORT_C void CEikCaptionedControl::WriteInternalStateL RWriteStream &  aWriteStream  )  const [protected]
 

Friends And Related Function Documentation

friend class CEikCapCArray [friend]
 
friend class CEikCapCExtension [friend]
 

Field Documentation

CEikImage* CEikCaptionedControl::iBitmap
 
CEikCapCLabel* CEikCaptionedControl::iCaption
 
HBufC* CEikCaptionedControl::iCaptionText
 
CCoeControl* CEikCaptionedControl::iControl
 
TInt CEikCaptionedControl::iControlType
 
TInt CEikCaptionedControl::iId
 
TBool CEikCaptionedControl::iIsEditable
 
TBool CEikCaptionedControl::iIsFormControl
 
TAny* CEikCaptionedControl::iReturnValue
 
CEikLabel* CEikCaptionedControl::iTrailer
 

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top