#include <mw/eikmfne.h>
class CEikMfneField : public CBase |
Protected Attributes | |
---|---|
TInt | iMinimumWidthInPixels |
Public Member Enumerations | |
---|---|
enum | THighlightType { EInverseVideo, ECursor } |
Public Member Functions | |
---|---|
TInt | DistanceFromStartOfFieldToEndOfTextInPixels(const CFont &) |
void | Draw(CWindowGc &, const CFont &, const TPoint &) |
const TDesC & | FieldText() |
virtual IMPORT_C void | HandleDeHighlight(const CFont &, CEikonEnv &, TBool &, TBool &) |
virtual IMPORT_C void | HandleKey(const CFont &, const TKeyEvent &, TBool, TBool &, TInt &) |
virtual IMPORT_C THighlightType | HighlightType() |
pure virtual TCoeInputCapabilities | InputCapabilities() |
virtual IMPORT_C TBool | IsEditable() |
virtual IMPORT_C TBool | IsValid() |
pure virtual TInt | MaximumWidthInPixels(const CFont &, TBool) |
TInt | WidthInPixels(const CFont &) |
Protected Member Functions | |
---|---|
CEikMfneField() | |
TInt | AdditionalWidthForHighlights(const CFont &) |
IMPORT_C void | HandleLeftOrRightArrow(TChar, TBool &, TInt &) |
Abstract base class for fields within a multi-field numeric editor.
IMPORT_C | CEikMfneField | ( | ) | [protected] |
Protected default constructor.
Sets the minimum width of the field to zero pixels.
IMPORT_C void | 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.
Parameter | Description |
---|---|
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. |
IMPORT_C void | 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.
Parameter | Description |
---|---|
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 | HandleLeftOrRightArrow | ( | TChar | aKey, |
TBool & | aDataAltered, | |||
TInt & | aHighlightIncrement | |||
) | [protected] |
Handles a left or right arrow key press.
Parameter | Description |
---|---|
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. |
IMPORT_C THighlightType | 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.
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.
IMPORT_C TBool | IsEditable | ( | ) | const [virtual] |
Derived classes' implementation of function should return whether the field is editable.
This implementation returns EFalse.
Returns: EFalse.
IMPORT_C TBool | IsValid | ( | ) | const [virtual] |
Derived classes' implementation of function should return whether the field is valid
This implementation returns ETrue.
Returns: ETrue.