CEikMfneField Class Reference

#include <mw/eikmfne.h>

Link against: eikctl.lib

class CEikMfneField : public CBase

Inherits from

  • CEikMfneField

    Detailed Description

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

    Member Attribute Documentation

    iMinimumWidthInPixels

    TInt iMinimumWidthInPixels[protected]

    The field's minimum width in pixels.

    Member Enumeration Documentation

    Enum THighlightType

    The type of highlight.

    EnumeratorValueDescription
    EInverseVideo

    Inverse video.

    ECursor

    The cursor is visible in the field so that highlighting is not used.

    Constructor & Destructor Documentation

    CEikMfneField ( )

    IMPORT_CCEikMfneField()[protected]

    Protected default constructor.

    Sets the minimum width of the field to zero pixels.

    Member Function Documentation

    AdditionalWidthForHighlights ( const CFont & )

    TInt AdditionalWidthForHighlights(const CFont &aFont)const [protected]

    DistanceFromStartOfFieldToEndOfTextInPixels ( const CFont & )

    TInt DistanceFromStartOfFieldToEndOfTextInPixels(const CFont &aFont)const

    Draw ( CWindowGc &, const CFont &, const TPoint & )

    voidDraw(CWindowGc &aGc,
    const CFont &aFont,
    const TPoint &aTopLeft
    )const

    FieldText ( )

    const TDesC &FieldText()const

    HandleDeHighlight ( const CFont &, CEikonEnv &, TBool &, TBool & )

    IMPORT_C voidHandleDeHighlight(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.

    ParameterDescription
    aFontThe control's font.
    aEikonEnvThe control's environment.
    aDataAlteredOn return, set to ETrue if the function caused the field's contents to change, otherwise unchanged.
    aErrorOn return, changed to ETrue if an error occurred e.g. the user entered an invalid value, otherwise unchanged.

    HandleKey ( const CFont &, const TKeyEvent &, TBool, TBool &, TInt & )

    IMPORT_C voidHandleKey(const CFont &aFont,
    const TKeyEvent &aKeyEvent,
    TBoolaInterpretLeftAndRightAsEarEvents,
    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.

    ParameterDescription
    aFontThe control's font.
    aKeyEventThe key event passed on from the multi-field numeric editor.
    aInterpretLeftAndRightAsEarEventsNot used.
    aDataAlteredOn 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.
    aHighlightIncrementOn return: -1 indicates the previous field is highlighted,0 indicates the highlight is unchanged and 1 indicates the following field is highlighted.

    HandleLeftOrRightArrow ( TChar, TBool &, TInt & )

    IMPORT_C voidHandleLeftOrRightArrow(TCharaKey,
    TBool &aDataAltered,
    TInt &aHighlightIncrement
    )[protected]

    Handles a left or right arrow key press.

    panic
    3 In debug builds, if aKey is neither a left nor a right arrow key.
    ParameterDescription
    aKeyLeft or right arrow key: either EKeyLeftArrow or EKeyRightArrow.
    aDataAlteredOn return, ETrue if data is altered as a result of this function.
    aHighlightIncrementOn 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.

    HighlightType ( )

    IMPORT_C THighlightTypeHighlightType()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.

    InputCapabilities ( )

    TCoeInputCapabilities InputCapabilities()const [pure virtual]

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

    Returns: The field's input capabilities.

    IsEditable ( )

    IMPORT_C TBoolIsEditable()const [virtual]

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

    This implementation returns EFalse.

    Returns: EFalse.

    IsValid ( )

    IMPORT_C TBoolIsValid()const [virtual]

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

    This implementation returns ETrue.

    Returns: ETrue.

    MaximumWidthInPixels ( const CFont &, TBool )

    TInt MaximumWidthInPixels(const CFont &aFont,
    TBoolaShrinkToMinimumSize
    )[pure virtual]

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

    ParameterDescription
    aFontThe font.
    aShrinkToMinimumSizeETrue to shrink the width to the minimum required.

    Returns: The field's maximum width in pixels.

    WidthInPixels ( const CFont & )

    TInt WidthInPixels(const CFont &aFont)const