CEikMfneField Class Reference

API published in: S60 1st Ed

Link against: avkon.lib eikctl.lib eikcoctl.lib uiklaf.lib form.lib

Capability Information

Required Capabilities

None


#include <eikmfne.h>

Inherited by CEikMfneNumber, CEikMfneSeparator, and CEikMfneSymbol.


Detailed Description

Abstract base class for fields within a multi-field numeric editor.

Public Types

enum   THighlightType { EInverseVideo, ECursor }
  The type of highlight. More...

Public Member Functions

void  Draw (CWindowGc &aGc, const CFont &aFont, const TPoint &aTopLeft) const
TInt  WidthInPixels (const CFont &aFont) const
TInt  DistanceFromStartOfFieldToEndOfTextInPixels (const CFont &aFont) const
virtual TInt  MaximumWidthInPixels (const CFont &aFont, TBool aShrinkToMinimumSize)=0
  An implementation of this pure virtual function should get the field's maximum width in pixels.
virtual TCoeInputCapabilities  InputCapabilities () const =0
  An implementation of this pure virtual function should return the field's input capabilities.
virtual IMPORT_C TBool  IsEditable () const
  Derived classes' implementation of function should return whether the field is editable.
virtual IMPORT_C TBool  IsValid () const
  Derived classes' implementation of function should return whether the field is valid.
virtual IMPORT_C THighlightType  HighlightType () const
  An implementation of this function should get the field's highlight type.
virtual IMPORT_C void  HandleKey (const CFont &aFont, const TKeyEvent &aKeyEvent, TBool aInterpretLeftAndRightAsEarEvents, TBool &aDataAltered, TInt &aHighlightIncrement)
  An implementation of this function should handle a key event.
virtual IMPORT_C void  HandleDeHighlight (const CFont &aFont, CEikonEnv &aEikonEnv, TBool &aDataAltered, TBool &aError)
  An implementation of this function should handle de-highlighting the field.
const TDesC &  FieldText () const

Protected Member Functions

IMPORT_C  CEikMfneField ()
  Protected default constructor.
IMPORT_C void  HandleLeftOrRightArrow (TChar aKey, TBool &aDataAltered, TInt &aHighlightIncrement)
  Handles a left or right arrow key press.
TInt  AdditionalWidthForHighlights (const CFont &aFont) const

Protected Attributes

TInt  iMinimumWidthInPixels
  The field's minimum width in pixels.

Member Enumeration Documentation

enum CEikMfneField::THighlightType
 

The type of highlight.

Enumerator:
EInverseVideo  Inverse video.
ECursor  The cursor is visible in the field so that highlighting is not used.

Constructor & Destructor Documentation

IMPORT_C CEikMfneField::CEikMfneField  )  [protected]
 

Protected default constructor.

Sets the minimum width of the field to zero pixels.


Member Function Documentation

TInt CEikMfneField::AdditionalWidthForHighlights const CFont &  aFont  )  const [protected]
 
TInt CEikMfneField::DistanceFromStartOfFieldToEndOfTextInPixels const CFont &  aFont  )  const
 
void CEikMfneField::Draw CWindowGc &  aGc,
const CFont &  aFont,
const TPoint &  aTopLeft
const
 
const TDesC& CEikMfneField::FieldText  )  const
 
virtual IMPORT_C void CEikMfneField::HandleDeHighlight const CFont &  aFont,
CEikonEnv &  aEikonEnv,
TBool &  aDataAltered,
TBool &  aError
[virtual]
 

An implementation of this function should handle de-highlighting the field.

May only be called if IsEditable() returns ETrue.

This implementation panics in debug builds and is empty in release builds.

Parameters:
aFont  The control's font.
aEikonEnv  The control's environment.
aDataAltered  On return, set to ETrue if the function caused the field's contents to change, otherwise unchanged.
aError  On return, changed to ETrue if an error occurred e.g. the user entered an invalid value, otherwise unchanged.
virtual IMPORT_C void CEikMfneField::HandleKey const CFont &  aFont,
const TKeyEvent &  aKeyEvent,
TBool  aInterpretLeftAndRightAsEarEvents,
TBool &  aDataAltered,
TInt &  aHighlightIncrement
[virtual]
 

An implementation of this function should handle a key event.

May only be called if IsEditable() returns ETrue. This implementation panics in debug builds and is empty in release builds.

Parameters:
aFont  The control's font.
aKeyEvent  The key event passed on from the multi-field numeric editor.
aInterpretLeftAndRightAsEarEvents  Not used.
aDataAltered  On return, indicates whether or not the field contents changed. If EFalse, left and right arrow key presses indicate a movement to the preceding of following field, if ETrue they are ignored.
aHighlightIncrement  On return: -1 indicates the previous field is highlighted,0 indicates the highlight is unchanged and 1 indicates the following field is highlighted.
IMPORT_C void CEikMfneField::HandleLeftOrRightArrow TChar  aKey,
TBool &  aDataAltered,
TInt &  aHighlightIncrement
[protected]
 

Handles a left or right arrow key press.

Parameters:
aKey  Left or right arrow key: either EKeyLeftArrow or EKeyRightArrow.
aDataAltered  On return, ETrue if data is altered as a result of this function.
aHighlightIncrement  On return, the direction to move the cursor: either -1 if aKey is a left arrow key, or 1 if aKey is a right arrow key.
Panic:
3 In debug builds, if aKey is neither a left nor a right arrow key.
virtual IMPORT_C THighlightType CEikMfneField::HighlightType  )  const [virtual]
 

An implementation of this function should get the field's highlight type.

May only be called if IsEditable() returns ETrue.

This implementation panics in debug builds and returns a dummy value in release builds.

Returns:
EInverseVideo.
virtual TCoeInputCapabilities CEikMfneField::InputCapabilities  )  const [pure virtual]
 

An implementation of this pure virtual function should return the field's input capabilities.

Returns:
The field's input capabilities.
virtual IMPORT_C TBool CEikMfneField::IsEditable  )  const [virtual]
 

Derived classes' implementation of function should return whether the field is editable.

This implementation returns EFalse.

Returns:
EFalse.
virtual IMPORT_C TBool CEikMfneField::IsValid  )  const [virtual]
 

Derived classes' implementation of function should return whether the field is valid.

This implementation returns ETrue.

Returns:
ETrue.

Reimplemented in CEikMfneNumber.

virtual TInt CEikMfneField::MaximumWidthInPixels const CFont &  aFont,
TBool  aShrinkToMinimumSize
[pure virtual]
 

An implementation of this pure virtual function should get the field's maximum width in pixels.

Parameters:
aFont  The font.
aShrinkToMinimumSize  ETrue to shrink the width to the minimum required.
Returns:
The field's maximum width in pixels.
TInt CEikMfneField::WidthInPixels const CFont &  aFont  )  const
 

Field Documentation

TInt CEikMfneField::iMinimumWidthInPixels [protected]
 

The field's minimum width in pixels.


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

Copyright © Nokia Corporation 2001-2008
Back to top