2 * Copyright (c) 1997-1999 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #if !defined(__EIKMFNE_H__)
22 #if !defined(__EIKBCTRL_H__)
26 #if !defined(__COEDEF_H__)
30 #if !defined(__COEINPUT_H__)
34 // For MEikCalendarObserver
35 #if !defined(__EIKCAL_H__)
39 #if !defined(__EIKDEF_H__)
43 #if !defined(__BABITFLAGS_H__)
44 #include <babitflags.h>
47 // For MAknMfneCommandObserver
48 #if !defined(__AKNMFNECOMMANDOBSERVER)
49 #include <AknMfneCommandObserver.h>
50 #endif //!defined(__AKNMFNECOMMANDOBSERVER)
53 // Forward Declarations
59 // Skin-related API forward declarations
60 class MAknsControlContext;
62 // Extension object within CEikMfne
63 class CEikMfneExtension;
67 * Abstract base class for fields within a multi-field numeric editor.
69 class CEikMfneField : public CBase
73 * The type of highlight.
79 /** The cursor is visible in the field so that highlighting is not used. */
84 * Protected default constructor.
86 * Sets the minimum width of the field to zero pixels.
88 IMPORT_C CEikMfneField();
90 void Draw(CWindowGc& aGc, const CFont& aFont, const TPoint& aTopLeft) const;
91 TInt WidthInPixels(const CFont& aFont) const;
92 TInt DistanceFromStartOfFieldToEndOfTextInPixels(const CFont& aFont) const;
95 * An implementation of this pure virtual function should
96 * get the field's maximum width in pixels.
98 * @param aFont The font.
99 * @param aShrinkToMinimumSize ETrue to shrink the width to the minimum required.
100 * @return The field's maximum width in pixels.
102 virtual TInt MaximumWidthInPixels(const CFont& aFont, TBool aShrinkToMinimumSize)=0;
105 * An implementation of this pure virtual function should
106 * return the field's input capabilities.
108 * @return The field's input capabilities.
110 virtual TCoeInputCapabilities InputCapabilities() const=0;
113 * Derived classes' implementation of function should
114 * return whether the field is editable.
116 * This implementation returns EFalse.
120 IMPORT_C virtual TBool IsEditable() const;
123 * Derived classes' implementation of function should
124 * return whether the field is valid
126 * This implementation returns ETrue.
130 IMPORT_C virtual TBool IsValid() const;
133 * An implementation of this function should get the
134 * field's highlight type.
136 * May only be called if IsEditable() returns ETrue.
138 * This implementation panics in debug builds and returns
139 * a dummy value in release builds.
141 * @return EInverseVideo.
143 IMPORT_C virtual THighlightType HighlightType() const;
146 * An implementation of this function should handle a key event.
148 * May only be called if IsEditable() returns ETrue.
149 * This implementation panics in debug builds and is
150 * empty in release builds.
152 * @param aFont The control's font.
153 * @param aKeyEvent The key event passed on from the multi-field numeric editor.
154 * @param aInterpretLeftAndRightAsEarEvents Not used.
155 * @param aDataAltered On return, indicates whether or not the field
156 * contents changed. If EFalse, left and right arrow
157 * key presses indicate a movement to the preceding of
158 * following field, if ETrue they are ignored.
159 * @param aHighlightIncrement On return: -1 indicates the previous field is
160 * highlighted,0 indicates the highlight is
161 * unchanged and 1 indicates the following field
164 IMPORT_C virtual void HandleKey(const CFont& aFont, const TKeyEvent& aKeyEvent, TBool aInterpretLeftAndRightAsEarEvents, TBool& aDataAltered, TInt& aHighlightIncrement);
167 * An implementation of this function should
168 * handle de-highlighting the field.
170 * May only be called if IsEditable() returns ETrue.
172 * This implementation panics in debug builds and is empty
175 * @param aFont The control's font.
176 * @param aEikonEnv The control's environment.
177 * @param aDataAltered On return, set to ETrue if the function caused
178 * the field's contents to change, otherwise unchanged.
179 * @param aError On return, changed to ETrue if an error occurred e.g.
180 * the user entered an invalid value, otherwise unchanged.
182 IMPORT_C virtual void HandleDeHighlight(const CFont& aFont, CEikonEnv& aEikonEnv, TBool& aDataAltered, TBool& aError);
184 const TDesC& FieldText() const;
187 * Handles a left or right arrow key press.
189 * @param aKey Left or right arrow key: either EKeyLeftArrow or EKeyRightArrow.
190 * @param aDataAltered On return, ETrue if data is altered as a result of this function.
191 * @param aHighlightIncrement On return, the direction to move the cursor:
192 * either -1 if aKey is a left arrow key, or 1 if aKey is a right arrow key.
193 * @panic 3 In debug builds, if aKey is neither a left nor a right arrow key.
195 IMPORT_C void HandleLeftOrRightArrow(TChar aKey, TBool& aDataAltered, TInt& aHighlightIncrement);
197 TInt AdditionalWidthForHighlights(const CFont& aFont) const;
199 virtual const TDesC& Text() const=0;
202 * The field's minimum width in pixels.
204 TInt iMinimumWidthInPixels;
210 * A separator field for a multi-field numeric editor.
212 * For instance, the character that separates time or date components.
214 NONSHARABLE_CLASS(CEikMfneSeparator) : public CEikMfneField
217 CEikMfneSeparator(HBufC* aText);
222 * Deletes the separator text that is owned by the object.
224 IMPORT_C virtual ~CEikMfneSeparator();
227 * Allocates and constructs a CEikMfneSeparator from resource.
229 * Uses an MFNE_SEPARATOR resource.
231 * @param aResourceReader The resource reader to use.
232 * @return A newly constructed separator field.
234 IMPORT_C static CEikMfneSeparator* NewL(TResourceReader& aResourceReader);
237 * Allocates and constructs a separator.
239 * @param aText The separator's text. Ownership of aText is transferred.
240 * @return A newly constructed separator.
242 IMPORT_C static CEikMfneSeparator* NewL(HBufC* aText); // ownership of aText is transferred when everything that can leave has successfully been done
245 * Sets the separator's text.
247 * This function transfers ownership of the text and can only be called if the field's text was previously NULL.
249 * @param aText The separator's text.
250 * @panic 4 If the separator's text was not previously Null.
252 IMPORT_C void SetText(HBufC* aText); // allows later transfer of ownership of text - can only be called if aText was previously NULL
254 private: // framework
255 virtual TInt MaximumWidthInPixels(const CFont& aFont, TBool aShrinkToMinimumSize);
256 virtual TCoeInputCapabilities InputCapabilities() const;
257 virtual const TDesC& Text() const;
265 * A number field within a multi-field numeric editor.
267 NONSHARABLE_CLASS(CEikMfneNumber) : public CEikMfneField
271 * Flags for the number field.
273 * EFillWithLeadingZeros, EPreserveOldWidthBeforeEditing and ERepresentsYear can only be set if EPublicallySettableFlags is set.
277 /** Prepends the number field's value with leading zeros up to the maximum allowable width of the field. */
278 EFillWithLeadingZeros =0x1,
279 /** The field's minimum width in pixels is set to the current text's width in pixels. */
280 EPreserveOldWidthBeforeEditing =0x2,
281 /** The number is a year. */
282 ERepresentsYear =0x4,
283 /** Used internally to make sure only the previous three values are set. */
284 EPublicallySettableFlags =EFillWithLeadingZeros|EPreserveOldWidthBeforeEditing|ERepresentsYear
289 EIsBeingEditedWithCursor =0x8,
290 EIsUninitialised =0x10,
291 EFillWithTrailingZeros =0x20
294 CEikMfneNumber(TInt aMinimumValue, TInt aMaximumValue, TUint32 aFlags);
300 * Deletes the number field's text.
302 IMPORT_C virtual ~CEikMfneNumber();
305 * Allocates and constructs a CEikMfneNumber from resource.
307 * Obtains flags and the minimum and maximum values from an MFNE_NUMBER resource. Then calls the overloaded NewL() function.
309 * @param aFont The font to use.
310 * @param aResourceReader The resource reader to use.
311 * @return A newly constructed number field.
313 IMPORT_C static CEikMfneNumber* NewL(const CFont& aFont, TResourceReader& aResourceReader);
316 * Allocates and constructs a CEikMfneNumber with the specified parameters.
318 * @param aFont The font to use.
319 * @param aMinimumValue The minimum value.
320 * @param aMaximumValue The maximum value.
321 * @param aInitialValue The initial value. This must be greater than the minimum value and less than the maximum value.
322 * @param aFlags The number field's flags. See the Anonymous enum.
323 * @return A newly constructed number field.
324 * @panic 8 If the initial value is not greater than or equal to the minimum value and less than or equal to the maximum value.
326 IMPORT_C static CEikMfneNumber* NewL(const CFont& aFont, TInt aMinimumValue, TInt aMaximumValue, TInt aInitialValue, TUint32 aFlags);
329 * Sets the minimum and maximum allowable values.
331 * @param aMinimumValue The minimum value. Must be less than or equal to the maximum value.
332 * @param aMaximumValue The maximum value.
333 * @param aFont The font in use.
334 * @panic 9 If the minimum value is greater than the maximum value or if the minimum/maximum text length is greater than the maximum number of digits.
336 IMPORT_C void SetMinimumAndMaximum(TInt aMinimumValue, TInt aMaximumValue, const CFont& aFont); // only values inside the initial minimum and maximum are permitted
339 * Gets the minimum and maximum allowable values.
341 * @param aMinimumValue On return, the minimum allowable value.
342 * @param aMaximumValue On return, the maximum allowable value.
344 IMPORT_C void GetMinimumAndMaximum(TInt& aMinimumValue, TInt& aMaximumValue) const;
347 * Sets the field's current value.
348 * @param aValue The field's current value. This must be between the minimum value and the maximum value.
349 * @param aFont The font.
350 * @panic 11 In debug builds only, if the value is less than the minimum value or greater than the maximum value.
352 IMPORT_C void SetValue(TInt aValue, const CFont& aFont);
355 * Gets the number field's value. Note that this function will leave
356 * if the value is not valid, i.e. the number of digits is zero
357 * or the value is outside of the minimum and maximum range.
359 * @return The field's value.
361 IMPORT_C TInt Value() const;
364 * Returns ETrue if the field contains more than zero
367 * @return ETrue if the field contains more than zero digits.
369 IMPORT_C virtual TBool IsValid() const;
372 * Sets the uninitialized status of the field.
374 * @param aUninitialised If ETrue, sets the field as uninitialized,
375 * i.e. it doesn't display anything.
377 IMPORT_C void SetUninitialised(TBool aUninitialised);
380 * Gets the uninitialized status of the field.
382 * @return ETrue, if the field is set as uninitialized.
384 IMPORT_C TBool IsUninitialised() const;
388 * Sets the digit display type.
391 * @param aDigitType The digit display type to bet set for this number field
392 * @param aFont The font of the MFNE that owns this field, usually retrieved with CEikMfne::Font()
394 IMPORT_C void SetDigitType(TDigitType aDigitType, const CFont& aFont);
397 * Gets the digit display type.
400 * @return The digit display type of this number field
402 IMPORT_C TDigitType DigitType() const;
405 * Derive and set digit display type from locale information.
408 * @param aFont The font of the MFNE that owns this field, usually retrieved with CEikMfne::Font()
410 IMPORT_C void RefreshDigitType(const CFont& aFont);
412 void SetTrailingZeros();
415 TBool IsTextNull() const;
416 private: // framework
417 virtual TInt MaximumWidthInPixels(const CFont& aFont, TBool aShrinkToMinimumSize);
418 virtual TCoeInputCapabilities InputCapabilities() const;
419 virtual TBool IsEditable() const;
420 virtual THighlightType HighlightType() const;
421 virtual void HandleKey(const CFont& aFont, const TKeyEvent& aKeyEvent, TBool aInterpretLeftAndRightAsEarEvents, TBool& aDataAltered, TInt& aHighlightIncrement);
422 virtual void HandleDeHighlight(const CFont& aFont, CEikonEnv& aEikonEnv, TBool& aDataAltered, TBool& aError);
423 virtual const TDesC& Text() const;
425 TInt MaximumNumberOfDigits() const;
426 TInt NumberOfDigits() const;
427 void SetTextToValue(TInt aValue, const CFont& aFont);
428 TInt ValueFromText() const;
429 TBool ConvertsIntoValidValue(TInt& aValue) const;
431 private: // International digit support
432 TChar NormalizeDigit(TChar aChar);
433 TText ZeroCharacter() const;
434 TText NegativeCharacter() const;
442 TChar iNudgeCharMinus;
443 TChar iNudgeCharPlus;
444 TInt iMaxDigitsMinimumValue;
445 TInt iMaxDigitsMaximumValue;
446 TDigitType iDigitType;
452 * A symbol field for a multi-field numeric editor.
454 * For instance, the AM / PM text in a time editor. In this case, the field contains 2 symbolic items one each for the AM and PM text strings.
456 NONSHARABLE_CLASS(CEikMfneSymbol) : public CEikMfneField
460 * An item within a symbol field in an MFNE.
462 NONSHARABLE_CLASS(CItem) : public CBase
465 CItem(TInt aId, TChar aKeyToMatch, HBufC* aText);
470 * Deletes the item's text.
472 IMPORT_C virtual ~CItem();
475 * Allocates and constructs a symbolic item from resource.
477 * Uses a MFNE_SYMBOLIC_ITEM resource.
478 * @param aResourceReader The resource reader to use.
479 * @return A newly constructed symbolic item.
481 IMPORT_C static CItem* NewL(TResourceReader& aResourceReader);
484 * Allocates and constructs a symbolic item.
486 * @param aId The ID of the symbolic item that uniquely identifies the item in the field.
487 * @param aKeyToMatch The key that represents the item. This is for character matching, not for display.
488 * @param aText The text to be drawn. Ownership of aText is transferred when everything that can leave has successfully completed.
489 * @return A newly constructed symbolic item.
491 IMPORT_C static CItem* NewL(TInt aId, TChar aKeyToMatch, HBufC* aText); // ownership of aText is transferred when everything that can leave has successfully been done
494 * Sets the symbolic item's text.
496 * The item takes ownership of aText.
498 * @param aText The symbolic item's text.
499 * @panic 19 In debug builds if the symbolic item's text was not
502 IMPORT_C void SetText(HBufC* aText); // allows later transfer of ownership of text - can only be called if aText was previously NULL
504 friend class CEikMfneSymbol;
511 CEikMfneSymbol(TInt aNumSymbolicItems);
516 * Deletes the array of symbolic items owned by the object.
518 IMPORT_C virtual ~CEikMfneSymbol();
521 * Allocates and constructs a CEikMfneSymbol from resource.
523 * Uses a MFNE_SYMBOL resource. The first item is set as current.
525 * @param aResourceReader The resource reader to use.
526 * @return A newly constructed symbol.
527 * @panic 15 If there is not more than one symbol.
529 IMPORT_C static CEikMfneSymbol* NewL(TResourceReader& aResourceReader);
532 * Allocates and constructs a CEikMfneSymbol.
534 * The first item is set as current.
536 * @param aNumSymbolicItems The number of symbolic items. Must be
537 * greater than one. All items are set to NULL.
538 * @return A newly constructed symbol.
539 * @panic 15 If there is not more than one symbol.
541 IMPORT_C static CEikMfneSymbol* NewL(TInt aNumSymbolicItems);
544 * Adds the specified symbolic item at the first available position in
547 * This should be called by the container only if construction was not
548 * made from resource.
550 * @param aSymbolicItem The symbol to add. Ownership of aSymbolicItem
551 * is transferred to this.
552 * @param aMakeCurrent ETrue to make the added symbol current.
553 * @panic 16 In debug build if the symbolic item array has not yet been
555 * @panic 17 If the array is full.
557 IMPORT_C void AddSymbolicItem(CItem* aSymbolicItem, TBool aMakeCurrent); // to be called by container only if not constructed from resource - ownership of aSymbolicItem is transferred to "this"
560 * Sets the current item to the one specified.
563 * @param aId The id of the new current item.
564 * @panic 18 If the specified item does not exist.
566 IMPORT_C void SetCurrentSymbolicItemToId(TInt aId);
569 * Gets the current symbol's ID.
571 * @return The current symbol's ID.
573 IMPORT_C TInt IdOfCurrentSymbolicItem() const;
576 * Sets the uninitialized status of the field.
578 * @param aUninitialised If ETrue, sets the field as uninitialized,
579 * i.e. doesn't display anything.
581 IMPORT_C void SetUninitialised(TBool aUninitialised);
584 * Gets the uninitialized status of the field.
586 * @return ETrue, if the field is set as uninitialized.
588 IMPORT_C TBool IsUninitialised() const;
590 private: // framework
591 virtual TInt MaximumWidthInPixels(const CFont& aFont, TBool aShrinkToMinimumSize);
592 virtual TCoeInputCapabilities InputCapabilities() const;
593 virtual TBool IsEditable() const;
594 virtual THighlightType HighlightType() const;
595 virtual void HandleKey(const CFont& aFont, const TKeyEvent& aKeyEvent, TBool aInterpretLeftAndRightAsEarEvents, TBool& aDataAltered, TInt& aHighlightIncrement);
596 virtual void HandleDeHighlight(const CFont& aFont, CEikonEnv& aEikonEnv, TBool& aDataAltered, TBool& aError);
597 virtual const TDesC& Text() const;
599 TInt CurrentSymbolicItem() const;
600 void SetCurrentSymbolicItem(TInt aCurrentSymbolicItem);
602 TInt iNumSymbolicItems;
603 TInt iCurrentSymbolicItem;
604 CItem** iSymbolicItems;
610 * Multi-field numeric editor abstract base class.
612 * This is a set of fields, where a field can be a number, a symbol or
613 * a separator. Field classes are derived from CEikMfneField.
615 * Concrete multi-field numeric editors are derived from this class and
616 * should provide the following:
618 * * A virtual destructor if the class introduces new data members which
619 * are allocated on the heap.
621 * * A ConstructL() function; this is used to initialise a multi-field
624 * * A ConstructFromResourceL() function; this is used to initialise a
625 * multi-field numeric editor from a resource.
627 * * A data member to store the editor's value.
629 * * Functions to set and get the editor's value.
631 * * Functions to set the minimum and maximum allowable values.
633 class CEikMfne : public CEikBorderedControl, public MAknMfneCommandObserver
636 // miscellaneous functions
638 * Default constructor.
645 * This function is virtual which ensures that if delete is explicitly
646 * called on a CEikMfne pointer which points to a derived class
647 * instance, the derived class destructor is called.
649 IMPORT_C virtual ~CEikMfne();
652 * Allocates a field array containing aNumFields elements.
654 * This should be called by the container only if a derived control is
655 * not constructed from a resource.
657 * @param aNumFields The number of fields.
658 * @panic 20 In debug builds, if there is already a field in the editor.
660 IMPORT_C void CreateFieldArrayL(TInt aNumFields); // to be called by container only if not constructed from resource
665 * The field is added as the first empty element in the field array or,
666 * if there is no current field, aField becomes the current field.
668 * This should be called by the container only if a derived control is
669 * not constructed from a resource.
671 * Ownership of aField is transferred to this multi-field numeric
674 * @param aField A field.
675 * @panic 22 If the field array has not been allocated.
677 IMPORT_C void AddField(CEikMfneField* aField); // to be called by container only if not constructed from resource - ownership of aField is transferred to "this"
680 * Deletes the editor's field and the field array.
682 * After a call to this, CreateFieldArrayL() can be called again.
684 IMPORT_C void ResetFieldArray(); // after this CreateFieldArrayL() can be called again
687 * Gets the control's border margins.
689 * @return The control's margins.
691 IMPORT_C TMargins BorderMargins() const;
694 * Draws immediately, and then leaves with an info message containing a
695 * formatted time/date string.
697 * The time/date is passed to the function, as is the resource which
698 * contains the format string which defines how it is to be formatted.
700 * @param aResourceId The resource containing the time/date format. See
702 * @param aTimeDate The object containing the time/date to be displayed.
704 IMPORT_C void DrawNowAndLeaveWithTimeDateFormatInfoMsgL(TInt aResourceId, const TTime& aTimeDate) const;
707 * Gets the CEikMfneField at the specified index.
709 * @param aField The field index.
710 * @return The requested field, or NULL if the index is less than zero
711 * or greater than the number of fields.
713 IMPORT_C CEikMfneField* Field(TInt aField) const;
716 // some utility functions which other classes may find useful
719 * A utility function which reads seconds, minutes and hours from a
720 * resource and returns the corresponding TTime value.
722 * @param aResourceReader A resource reader.
723 * @return The time value read from the resource.
725 IMPORT_C static TTime ReadTime(TResourceReader& aResourceReader);
728 * A utility function which reads days, months and years from a resource
729 * and returns the corresponding TTime value.
731 * @param aResourceReader A resource reader.
732 * @return The date value read from the resource. The hours, minutes,
733 * seconds values are set to zero.
735 IMPORT_C static TTime ReadDate(TResourceReader& aResourceReader);
738 * A utility function which reads seconds, minutes, hours, days, months
739 * and years from a resource and returns the corresponding TTime value.
741 * @param aResourceReader A resource reader.
742 * @return The time/date value read from the resource.
744 IMPORT_C static TTime ReadTimeAndDate(TResourceReader& aResourceReader);
747 * Reads a duration value from a resource.
749 * @param aResourceReader A resource reader.
750 * @return The duration, in seconds.
752 IMPORT_C static TTimeIntervalSeconds ReadDuration(TResourceReader& aResourceReader);
755 * Reads a time offset from a resource.
757 * This is identical to ReadDuration(), except that negative offsets
760 * @param aResourceReader A resource reader.
761 * @return The duration, in seconds.
763 IMPORT_C static TTimeIntervalSeconds ReadTimeOffset(TResourceReader& aResourceReader);
766 * Converts a time duration to seconds.
768 * @param aTime The date and time to be converted.
769 * @return The time duration in seconds.
771 IMPORT_C static TTimeIntervalSeconds Convert(const TTime& aTime);
774 * Converts a time duration in seconds to hours, minutes and seconds.
776 * @param aTimeIntervalSeconds The number of seconds to be converted.
777 * @return The date/time duration.
779 IMPORT_C static TTime Convert(const TTimeIntervalSeconds& aTimeIntervalSeconds);
782 * Gets the index into the field array of the current field.
784 * @return The current field's index.
786 inline TInt CurrentField() const;
789 * Gets the number of fields.
791 * @return The number of fields in the editor.
793 inline TInt NumFields() const;
795 public: // AVKON addition
797 * Settable features for MFNE. See SetFeature().
803 /** Tries to prevent MFNE drawing outside its rect,
804 event if it smaller than MinimumSize().
805 0 (or EFalse) parameter disables this, non-zero
806 (or ETrue) enables the feature. */
809 /** Disables VKB. Non-zero (or ETrue) parameter disables VKB,
810 0 (or EFalse) enables VKB. When disabled,
811 editor doesn't request PenInputServer to start VKB */
814 /** Support finger input. Paramter is TFingerSupportParams.*/
817 /** Parameter for finger support feature:
818 * 0 means disable the suppor;
819 * 1 means enable the support;
820 * 2 means enable the support with highlight of whole text.
822 enum TFingerSupportParams
824 EDisaleFingerSupport,
826 EnableWithAllHighlight
830 * Sets the alignment of the editor. The editor alignments, defined in
831 * avkon.hrh, are EAknEditorAlignNone, EAknEditorAlignCenter,
832 * EAknEditorAlignLeft, EAknEditorAlignRight or EAknEditorAlignBidi.
834 * @param aAlignment The editor's alignment
836 IMPORT_C void SetMfneAlignment(TInt aAlignment);
839 * Sets whether the editor consumes up and down key events. If this is
840 * set to EFalse, the editor returns EKeyWasNotConsumed upon receiving
841 * EKeyDownArrow or EKeyUpArrow key event and doesn't send the key event to
844 * @param aConsume If EFalse, OfferKeyEventL() returns
845 * EKeyWasNotConsumed when up and down key events are received.
847 IMPORT_C void SetUpAndDownKeysConsumed(TBool aConsume);
850 * Used for suppressing all editor's background drawing. This is
851 * intended for internal use.
853 * Note that when this is set, the background is not drawn with skin
854 * nor cleared, so the background MUST be drawn by the parent control
855 * every time the editor changes.
857 * @param aSuppress If ETrue, suppress background drawing
859 IMPORT_C void SetSuppressBackgroundDrawing( TBool aSuppress );
862 * Used for setting various flag-like features to the editor.
864 * @param aFeatureId The feature id, see TFeatureId
865 * @param aFeatureParam The feature parameter. This is usually
866 * enabled or disabled. For more info, see
867 * the feature documentation in TFeatureId.
868 * @return KErrNone if the feature modification succeeded
871 IMPORT_C TInt SetFeature( TInt aFeatureId, TInt aFeatureParam );
874 * Used to getting feature statuses.
876 * @param aFeatureId The feature id, see TFeatureId
877 * @param aFeatureParam On return, the parameter for the feature
878 * (usually non-zero for an enabled feature
879 * and zero for disabled)
880 * @return KErrNone if the feature is supported and fetching its value
884 IMPORT_C TInt GetFeature( TInt aFeatureId, TInt& aFeatureParam ) const;
887 * Used for checking if the editor supports a feature.
888 * For features, see TFeatureId.
891 * @return ETrue if the feature is supported
894 IMPORT_C TBool SupportsFeature( TInt aFeatureId ) const;
896 // Highlights a field
897 void HighlightField( TInt aFieldPosition );
900 * Gets a pointer to the CFont object that is used to draw the fields in
903 * @return A pointer to the CFont object used to draw the fields in
906 IMPORT_C const CFont* Font() const;
909 * Sets the font that is used to draw the fields in this editor.
911 * @param aFont A pointer to a CFont object that is used to draw the
912 * fields in this editor.
914 IMPORT_C void SetFont(const CFont* aFont);
917 * Sets within in the editor an externally owned Skins background control context.
918 * This background control context will then be used by the editor to draw background.
920 * If this API is not called, then the editor IS skin enabled, (that is CEikMfnes are skin
921 * enabled by default) but it will try to find a control context with which to perform background
922 * drawing from the Control Environment, via the Object Provider.
924 * Setting this control context to NULL will have the effect of turning off background
927 * @param aBackgroundControlContext Control context to store. Not owned. Can be NULL
929 IMPORT_C void SetSkinBackgroundControlContextL( MAknsControlContext* aControlContext );
933 * From MAknMfneCommandObserver. Allows owning controls to give commands to
934 * MFNE editors. This is interface was added to enable modifying the current field
935 * value with touch buttons.
937 * @param aCommand Command ID defined in MAknMfneCommandObserver::TMfneCommand
939 IMPORT_C void HandleMfneCommandL(TInt aCommand);
942 * Sets the MFNE to use the CCoeControl::OverrideColorL() defined
943 * color in drawing. If this is set, no skinning will be used
946 * @param aUseOverrideColors ETrue to make the MFNE use overridden colors.
949 IMPORT_C void SetUseOverrideColors( TBool aUseOverrideColors );
952 public: // from CCoeControl
954 * Handles key events.
956 * Overrides CCoeControl::OfferKeyEventL(). The key event is passed
957 * onto the current field to handle.
959 * @param aKeyEvent The key event.
960 * @param aType The type of key event.
961 * @return Indicates whether or not the key event was used by this
964 IMPORT_C virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
967 * Prepares for focus loss.
969 * Overrides CCoeControl::PrepareForFocusLossL().
971 * This function should be called when an attempt is made to remove
972 * focus from a multi-field numeric editor. It redraws the control, removing
973 * highlighting from the current field.
975 * It may be overridden in derived classes to test the validity of
976 * information entered into the editor. Derived class versions should include
977 * a base function call.
979 IMPORT_C virtual void PrepareForFocusLossL();
982 * Gets the minimum size of the control.
984 * Overrides CCoeControl::MinimumSize().
986 * @return The minimum control size.
988 IMPORT_C virtual TSize MinimumSize();
991 * Gets the list of logical colours used to draw the control.
993 * The colours are appended to aColorUseList.
995 * Overrides CCoeControl::GetColorUseListL().
997 * @param aColorUseList On return, the colour list.
999 IMPORT_C virtual void GetColorUseListL(CArrayFix<TCoeColorUse>& aColorUseList) const; // not available before Release 005u
1002 * Handles a change to the control's resources.
1004 * The types of resources handled are those which are shared across the
1005 * environment, e.g. colours or fonts.
1007 * Overrides CCoeControl::HandleResourceChange().
1009 * @param aType A message UID value.
1011 IMPORT_C virtual void HandleResourceChange(TInt aType); // not available before Release 005u
1014 * Gets the total of the input capabilities of all the editor's fields.
1016 * Overrides CCoeControl::InputCapabilities().
1018 * If this function is overrided in a subclass, the subclass should
1019 * obtain this class' InputCapabilities' object provider through
1020 * TCoeInputCapabilities::ObjectProvider() and set that as a part of
1021 * the subclass' InputCapabilities object provider chain to ensure
1022 * maximum functionality.
1024 * @return The control's input capabilities.
1026 IMPORT_C virtual TCoeInputCapabilities InputCapabilities() const;
1029 * From @c CCoeControl.
1031 * Handles pointer events.
1033 * @param aPointerEvent The pointer event.
1035 IMPORT_C virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent);
1038 * Retrieves an object of the same type as that encapsulated in aId.
1040 * Overrides CCoeControl::MopSupplyObject().
1042 * @param aId An encapsulated object type ID.
1043 * @return Encapsulates the pointer to the object provided. Note that
1044 * the encapsulated pointer may be NULL.
1046 IMPORT_C virtual TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
1050 * Sets the colors for text and background as skin IDs. Please note that
1051 * bgcolor overrides skinned draw if set
1054 * @param aAknSkinIDForTextColor ID for text color.
1055 * @param aAknSkinIDForBgColor ID for background color.
1057 IMPORT_C void SetSkinTextColorL(TInt aAknSkinIDForTextColor, TInt aAknSkinIDForBgColor=KErrNotFound);
1062 * Redraws the current field, so removing or displaying the cursor.
1064 * If the editor has lost focus, the current field is reset to the
1065 * first editable field.
1067 * @param aDrawNow Whether to draw the control immediately.
1069 IMPORT_C virtual void FocusChanged(TDrawNow aDrawNow);
1072 * Writes the internal state of the control and its components to
1075 * This function is empty in release builds.
1077 IMPORT_C void WriteInternalStateL(RWriteStream& aWriteStream) const;
1079 // miscellaneous functions
1082 * Handles the redrawing associated with a change to the current field.
1084 * Called by OfferKeyEventL(), HandlePointerEventL() and
1085 * PrepareForFocusLossL().
1087 * @param aHandleDeHighlight ETrue if the current field has changed so
1088 * requires de-highlighting.
1089 * @param aNewCurrentField The index of the field to which the user has
1091 * @param aOldWidthInPixelsOfOldCurrentField The width in pixels of the
1092 * previous current field.
1093 * @param aOldHighlightTypeOfOldCurrentField The highlight type of the
1094 * previously current field.
1095 * @param aDataAltered ETrue if the data has been changed.
1096 * @param aError On return, ETrue if successful, EFalse if not
1099 IMPORT_C void HandleInteraction(TBool aHandleDeHighlight, TInt aNewCurrentField, TInt aOldWidthInPixelsOfOldCurrentField,
1100 CEikMfneField::THighlightType aOldHighlightTypeOfOldCurrentField, TBool& aDataAltered, TBool& aError);
1103 * Empty virtual function.
1105 * Called by HandleInteraction() when switching from the current field.
1106 * Can be implemented by derived classes to maintain consistency between
1107 * fields, e.g. in a range editor.
1109 * @param aField The current field.
1110 * @param aDrawAllFields On return, whether all fields have changed and
1111 * need to be redrawn.
1113 IMPORT_C virtual void FieldIsAboutToBeDeHighlighted(CEikMfneField* aField, TBool& aDrawAllFields); // first occurrence of this virtual function - does nothing by default
1116 * Gets the size of the multi-field numeric editor.
1118 * The width is the sum of the maximum widths of every field.
1120 * @return The size of the multi-field numeric editor.
1122 IMPORT_C TSize MfneSize() const;
1125 * Gets the size of the multi-field numeric editor.
1127 * The width is the sum of the maximum widths of every field.
1129 * @param aShrinkToMinimumSize ETrue to shrink the width to the minimum
1130 * required for each field.
1131 * @return The size of the multi-field numeric editor.
1133 IMPORT_C TSize MfneSize(TBool aShrinkToMinimumSize);
1135 IMPORT_C virtual void SizeChanged();
1138 static void InvalidFieldAlert();
1139 static void LeaveWithAlert(TInt aResourceId);
1140 void GetCursorInfo( TPoint& aPos, TInt& aHeight, TInt& aWidth, TInt& aAscent );
1141 void ReportUpdate();
1142 IMPORT_C virtual void MakeVisible(TBool aVisible);
1143 void SetCurrentField( TInt aCurrentField );
1144 void SetValidateCallBack( TCallBack aCallBack );
1145 void ReportStateChangeEventL();
1149 IMPORT_C virtual void Draw(const TRect& aRect) const;
1151 // new virtual functions
1152 IMPORT_C virtual void CreatePopoutIfRequiredL();
1153 // miscellaneous functions
1154 void DrawRange(CWindowGc& aGc, TInt aFirstField, TInt aLastField) const;
1155 CWindowGc& PreparedGc() const;
1156 void SetGcToNormalVideo(CWindowGc& aGc) const;
1157 void SetGcToInverseVideo(CWindowGc& aGc) const;
1158 void SetGcToDimmedVideo(CWindowGc& aGc) const;
1161 IMPORT_C void Reserved_2();
1162 IMPORT_C virtual void CEikMfne_Reserved();
1168 IMPORT_C void* ExtensionInterface( TUid aInterface );
1171 enum {ENullIndex=KMaxTInt};
1174 * Access to state of whether up/down keys are eaten and used to increment/decrement. If
1175 * these keys are not consumed, then the events are passed on.
1177 * @return EFalse iff Up and Down keys are not consumed (and acted upon)
1179 TBool ConsumesUpAndDownKeys() const;
1182 * This state of enabling means that skinning will actually be drawn
1183 * It is a combination of
1184 * - application is skin enabled
1185 * - current skin has a background or frame bitmap
1186 * It is set during construction and does not change its value after except if the Skin is
1187 * changed, whereupon the control context is re-accessed and checked for bitmaps present
1189 * @return EFalse iff background skin will not be drawn.
1191 TBool SkinningBackground() const;
1194 * Checks if app is skin enabled and that the current control context has bitmap.
1195 * If so, then state is set true.
1196 * This should be called at constuction and when HandleResourceChange is called
1199 void EvaluateSkinningBackground();
1202 * Access to Skins background control context that is potentially being used by the Editor.
1204 * This API will first check to see if an control context has been set by API, and if so,
1205 * return that. If the background control context has been set to NULL by API, then it will
1206 * return NULL. If the background control context has never been set by API, then this returns
1207 * the control context (if one exists) that the object obtains from Object Provider.
1209 * @return Pointer to control context potentially in use, or NULL.
1211 MAknsControlContext* SkinBackgroundControlContext() const;
1214 * Check for the existence of the extension and create if required.
1216 void CreateExtensionIfRequiredL();
1221 CEikMfneField** iFields;
1222 CEikMfneExtension* iExtension;
1228 inline TInt CEikMfne::CurrentField() const
1230 return(iCurrentField);
1233 inline TInt CEikMfne::NumFields() const
1243 * This control supports editing a single integer value. If a number is
1244 * entered which is not within the range specified by the maximum and
1245 * minimum control values it is automatically reset to the nearest
1248 * The editor has an associated resource struct NUMBER_EDITOR and
1249 * control factory identifier EEikCtNumberEditor.
1251 class CEikNumberEditor : public CEikMfne
1254 // miscellaneous functions
1259 * This function should be used as the first stage in two stage
1260 * construction, followed by a call to either ConstructFromResourceL() to
1261 * initialise the editor's field values from a resource file, or ConstructL()
1262 * if no resource file is used.
1264 IMPORT_C CEikNumberEditor();
1267 * Second-phase constructor.
1269 * Completes the construction of an integer editor. It should be called
1270 * by container only if the editor is not constructed from a resource.
1272 * Sets the minimum and maximum values that can be entered into the
1273 * editor, and the initial value.
1275 * @param aMinimumValue The minimum allowable value.
1276 * @param aMaximumValue The maximum allowable value.
1277 * @param aInitialValue The initial value.
1279 IMPORT_C void ConstructL(TInt aMinimumValue, TInt aMaximumValue, TInt aInitialValue); // to be called by container only if not constructed from resource
1282 * Sets the minimum and maximum editor values.
1284 * Only values inside the initial minimum and maximum are permitted.
1286 * If the editor's value is outside the new bounds when the function is
1287 * called, it is reset to the nearest allowable value.
1289 * @param aMinimumValue The minimum allowable value.
1290 * @param aMaximumValue The maximum allowable value.
1291 * @panic 9 If the minimum is greater than the maximum allowable value.
1293 IMPORT_C void SetMinimumAndMaximum(TInt aMinimumValue, TInt aMaximumValue); // only values inside the initial minimum and maximum are permitted
1296 * Gets the integer editor's minimum and maximum values.
1298 * @param aMinimumValue On return, contains the integer editor's
1299 * minimum allowable value.
1300 * @param aMaximumValue On return, contains the integer editor's
1301 * maximum allowable value.
1303 IMPORT_C void GetMinimumAndMaximum(TInt& aMinimumValue, TInt& aMaximumValue) const;
1306 * Sets the integer editor's value.
1308 * The control is not redrawn.
1310 * @param aNumber The editor's new value.
1311 * @panic 11 In debug builds, if aNumber is outside the valid range.
1313 IMPORT_C void SetNumber(TInt aNumber);
1316 * Gets the integer editor's value.
1318 * @return The integer editor's value.
1319 * @panic 12 In debug builds, if the editor has no content.
1321 IMPORT_C TInt Number() const; // can only be called if PrepareForFocusLossL() succeeded
1326 * Second-phase construction from a resource file.
1328 * The function reads the maximum and minimum editor values from a
1329 * NUMBER_EDITOR resource, and sets the initial number to be the same as the
1332 * @param aResourceReader A resource file reader.
1334 IMPORT_C virtual void ConstructFromResourceL(TResourceReader& aResourceReader);
1339 * From @c CCoeControl.
1341 * Handles pointer events.
1343 * @param aPointerEvent The pointer event.
1345 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
1347 IMPORT_C virtual void CEikMfne_Reserved();
1349 void RefreshFromLocale();
1354 IMPORT_C void* ExtensionInterface( TUid aInterface );
1356 // none of these pointers owns anything
1357 CEikMfneNumber* iNumber;
1364 * Range struct for CEikRangeEditor.
1382 * Numeric range editor.
1384 * This editor supports editing an integer range. It has two fields;
1385 * the first represents the lower value and the second the upper value. The
1386 * second value must be greater than, or equal to, the first.
1388 * Minimum and maximum values for the editor are specified during
1389 * construction. If a number is entered which is not within the editor's
1390 * minimum and maximum values, it is automatically reset to the nearest
1393 * The editor has an associated resource struct RANGE_EDITOR and
1394 * control factory identifier EEikCtRangeEditor.
1396 class CEikRangeEditor : public CEikMfne
1399 // miscellaneous functions
1402 * Default constructor.
1404 * This function should be used as the first stage in two stage
1405 * construction, followed by a call to either ConstructFromResourceL() to
1406 * initialise the editor's field values from a resource file, or ConstructL()
1407 * if no resource file is used.
1409 IMPORT_C CEikRangeEditor();
1411 // ConstructL to be called by container only if not constructed from resource, also ownership of aSeparatorText is transferred when everything that can leave has successfully been done
1413 * Second phase constructor.
1415 * This function completes construction of a range editor. It sets the
1416 * minimum and maximum values, initial range and separator text. It
1417 * should be called by the container only if the control is not constructed
1418 * from a resource file.
1420 * @param aMinimumValue The minimum value for the range editor.
1421 * @param aMaximumValue The maximum value for the range editor.
1422 * @param aInitialRange Struct containing upper and lower range limits.
1423 * Must be within the minimum and maximum values.
1424 * @param aSeparatorText The text to be used to separate the numeric
1426 * @panic 8 If the initial lower or upper limit is outside the minimum
1427 * or maximum bounds.
1429 IMPORT_C void ConstructL(TInt aMinimumValue, TInt aMaximumValue, const SEikRange& aInitialRange, HBufC* aSeparatorText);
1432 * Sets the range editor's minimum and maximum values.
1434 * Any values are permitted. If the range values are outside the new
1435 * minimum / maximum they are changed to be within the new minimum /
1438 * @param aMinimumValue The minimum value for the range editor.
1439 * @param aMaximumValue The maximum value for the range editor.
1441 IMPORT_C void SetMinimumAndMaximum(TInt aMinimumValue, TInt aMaximumValue); // only values inside the initial minimum and maximum are permitted
1444 * Gets the range editor's minimum and maximum values.
1446 * @param aMinimumValue On return, the minimum value for the range
1448 * @param aMaximumValue On return, the maximum value for the range
1451 IMPORT_C void GetMinimumAndMaximum(TInt& aMinimumValue, TInt& aMaximumValue) const;
1454 * Sets the range editor's current values.
1456 * @param aRange Struct containing new range values.
1458 IMPORT_C void SetRange(const SEikRange& aRange);
1461 * Gets the range editor's current values.
1463 * Can only be called if CEikMfne::PrepareForFocusLossL() succeeded
1465 * @return Struct containing current range values.
1467 IMPORT_C SEikRange Range() const; // can only be called if PrepareForFocusLossL() succeeded
1472 * Second phase constructor from resource.
1474 * This function completes construction of a newly-allocated range
1475 * editor. It sets the minimum and maximum values, initial range and
1476 * separator text as specified by the resource.
1478 * @param aResourceReader A resource reader.
1480 IMPORT_C virtual void ConstructFromResourceL(TResourceReader& aResourceReader);
1485 * From @c CCoeControl.
1487 * Handles pointer events.
1489 * @param aPointerEvent The pointer event.
1491 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
1493 virtual void FieldIsAboutToBeDeHighlighted(CEikMfneField* aField, TBool& aDrawAllFields);
1494 IMPORT_C virtual void CEikMfne_Reserved();
1495 void RefreshFromLocale();
1500 IMPORT_C void* ExtensionInterface( TUid aInterface );
1502 // none of these pointers owns anything
1503 CEikMfneNumber* iLowerLimit;
1504 CEikMfneNumber* iUpperLimit;
1512 * Specifies an abstract interface for time and date editors where the
1513 * time and date are set and retrieved using the TTime class.
1515 class CEikTTimeEditor : public CEikMfne
1519 * An implementation (of this pure virtual function) should set the
1520 * range of allowable time values.
1522 * This defines the maximum and minimum values that may be entered by
1525 * @param aMinimumTime The minimum allowable value.
1526 * @param aMaximumTime The maximum allowable value.
1528 virtual void SetMinimumAndMaximum(const TTime& aMinimumTime, const TTime& aMaximumTime)=0;
1531 * An implementation (of this pure virtual function) should get the
1532 * range of allowable time values.
1534 * @param aMinimumTime The minimum allowable value.
1535 * @param aMaximum The maximum allowable value.
1537 virtual void GetMinimumAndMaximum(TTime& aMinimumTime, TTime& aMaximum) const=0;
1540 * An implementation (of this pure virtual function) should set the time
1543 * @param aTime The time.
1545 virtual void SetTTime(const TTime& aTime)=0;
1548 * An implementation (of this pure virtual function) should get the time
1551 * Can only be called if CEikMfne::PrepareForFocusLossL() succeeded.
1555 virtual TTime GetTTime() const=0; // can only be called if PrepareForFocusLossL() succeeded
1561 * This control allows a time value to be displayed and edited. By
1562 * default the editor has hours, minutes and seconds fields, although the
1563 * seconds and hours fields may be omitted. 12 and 24-hour format are
1564 * supported. When 12-hour format is used, am or pm text will be included as
1565 * another field, either before or after the time. Locale information is
1566 * used to determine the time separator characters. Locale information is
1567 * set and retrieved using class TLocale.
1569 * The upper and lower field bounds are set depending on the format,
1570 * and times outside these bounds are invalid.
1572 * The editor has an associated resource struct TIME_EDITOR and control
1573 * factory identifier EEikCtTimeEditor.
1575 class CEikTimeEditor : public CEikTTimeEditor
1578 // miscellaneous functions
1580 * Default constructor.
1582 * This function should be used as the first stage in two stage
1583 * construction, followed by a call to either: ConstructFromResourceL() to
1584 * initialise the editor's field values from a resource file, or ConstructL()
1585 * if no resource file is used.
1587 IMPORT_C CEikTimeEditor();
1592 * This frees the resources owned by the time editor, prior to its
1595 IMPORT_C virtual ~CEikTimeEditor();
1598 * Second phase construction.
1600 * This function completes the construction of a newly-allocated time
1601 * editor, by setting its minimum, maximum and initial values, and the
1602 * AM/PM text settings - the AM/PM settings and time separator characters
1603 * specified in class TLocale are honoured. It should be called by the
1604 * container only if the control is not constructed from a resource file.
1606 * If the initial time is outside the bounds specified, it is reset to
1607 * the nearest available setting.
1609 * The aFlags parameter is used to determine whether the seconds or
1610 * hours fields are required. The minutes field is always present. It may
1611 * also be used to specify whether or not to force 24 hour time format,
1612 * overriding the locale's setting.
1614 * A panic will occur if the minimum time is later than the maximum
1617 * @param aMinimumTime The minimum allowable time.
1618 * @param aMaximumTime The maximum allowable time.
1619 * @param aInitialTime The initial time.
1620 * @param aFlags Determines which fields are required and whether or
1621 * not to force 24 hour formatting. See eikon.hrh EEiktime etc.
1623 IMPORT_C void ConstructL(const TTime& aMinimumTime, const TTime& aMaximumTime, const TTime& aInitialTime, TUint32 aFlags); // to be called by container only if not constructed from resource
1626 * Sets the time editor's value.
1628 * @param aTime The new value to which to set the editor's fields.
1630 IMPORT_C void SetTime(const TTime& aTime);
1633 * Gets the time editor's value.
1635 * @return The editor's value. (Date values are all zero.)
1637 IMPORT_C TTime Time() const;
1640 * Sets the uninitialized status of the editor.
1642 * @param aUninitialised If ETrue, sets the editor as uninitialized,
1643 * i.e. it doesn't display anything.
1645 IMPORT_C void SetUninitialised(TBool aUninitialised);
1648 * Gets the uninitialized status of the editor.
1650 * @return ETrue, if the editor is set as uninitialized.
1652 IMPORT_C TBool IsUninitialised() const;
1653 // from CEikTTimeEditor
1656 * Sets the range of allowable time values.
1658 * These define the maximum and minimum values that may be entered by
1661 * If the existing time value is outside the bounds set by this
1662 * function, it is reset to the nearest boundary value.
1664 * @param aMinimumTime The minimum allowable value.
1665 * @param aMaximumTime The maximum allowable value.
1666 * @panic 38 If the minimum value exceeds the maximum.
1668 IMPORT_C virtual void SetMinimumAndMaximum(const TTime& aMinimumTime, const TTime& aMaximumTime); // only values inside the initial minimum and maximum are permitted
1671 * Gets the range of allowable values that may be entered by the user.
1673 * @param aMinimumTime On return, contains the time editor's minimum
1675 * @param aMaximumTime On return, contains the time editor's maximum
1678 IMPORT_C virtual void GetMinimumAndMaximum(TTime& aMinimumTime, TTime& aMaximumTime) const;
1683 * Second phase construction from a resource.
1685 * This function completes the construction of a newly-allocated time
1686 * editor from a TIME_EDITOR resource. The minimum and maximum times, and
1687 * the flags settings are read from the resource, and ConstructL() is
1688 * called with these settings. The initial time is set to the maximum time
1689 * value. Honours the locale's AM/PM text setting and time separators.
1691 * @param aResourceReader A resource file reader.
1694 IMPORT_C virtual void ConstructFromResourceL(TResourceReader& aResourceReader);
1697 * Prepares the editor for focus loss.
1699 * This function should be called to validate the editor's contents
1700 * when an attempt is made to remove focus from the control. If the control
1701 * value is not within the bounds specified by the minimum and maximum
1702 * time values, it is reset to the nearest allowable value, the function
1703 * will leave and will display an appropriate message.
1705 IMPORT_C virtual void PrepareForFocusLossL();
1708 * From @c CCoeControl.
1710 * Handles pointer events.
1712 * @param aPointerEvent The pointer event.
1714 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
1716 // from CEikTTimeEditor
1717 virtual void SetTTime(const TTime& aTime);
1718 virtual TTime GetTTime() const; // can only be called if PrepareForFocusLossL() succeeded
1720 // miscellaneous functions
1721 void DoSetMinimumAndMaximum(const TTime& aMinimumTime, const TTime& aMaximumTime);
1722 IMPORT_C virtual void CEikMfne_Reserved();
1727 IMPORT_C void* ExtensionInterface( TUid aInterface );
1729 CTimeEditor* iTimeEditor;
1738 // note: TDateTime uses zero based day numbers, so -1 on the day field
1739 #define KAknMinimumDate (TTime(TDateTime(0001, EJanuary, 1-1, 0, 0, 0, 0)))
1740 #define KAknMaximumDate (TTime(TDateTime(9999, EDecember, 31-1, 23, 59, 59, 999999)))
1745 * A date editor has five fields: day, month and year, and two separator
1746 * characters. The order of the fields varies depending on the locale's
1747 * date format setting. Locale information, which is set and retrieved using
1748 * class @c TLocale, is used to determine field order and the characters used
1749 * to separate the date components. The upper and lower field bounds are set,
1750 * and dates outside these bounds are invalid.
1752 * The editor can be configured to launch a pop-out calendar dialog,
1753 * @c CEikCalendar. This may be used to directly set the day, month and year
1756 * The editor has an associated resource struct @c DATE_EDITOR and control
1757 * factory identifier @c EEikCtDateEditor.
1760 class CEikDateEditor : public CEikTTimeEditor, private MEikCalendarObserver
1765 // miscellaneous functions
1767 * C++ default constructor.
1769 IMPORT_C CEikDateEditor();
1774 IMPORT_C virtual ~CEikDateEditor();
1776 // to be called by container only if not constructed from resource
1778 * Handles 2nd phase construction.
1780 * This function completes the construction of a newly-allocated date
1781 * editor. This function should be used instead of
1782 * @c ConstructFromResourceL() when not initialising from a resource file.
1783 * The editor's minimum, maximum and initial date values are set and the
1784 * date format and date separator characters specified in class @c TLocale
1787 * @param aMinimumDate The minimum allowable date.
1788 * @param aMaximumDate The maximum allowable date.
1789 * @param aInitialDate The initial value.
1790 * @param aWithoutPopoutCalendar If @c ETrue the editor will not have a
1791 * pop-out calendar dialog / icon. If @c EFalse the editor will have
1792 * a pop-out calendar dialog / icon.
1794 IMPORT_C void ConstructL(const TTime& aMinimumDate,
1795 const TTime& aMaximumDate,
1796 const TTime& aInitialDate,
1797 TBool aWithoutPopoutCalendar);
1800 * Sets the date editor's value.
1802 * @param aDate The editor's value. Time components are ignored.
1804 IMPORT_C void SetDate(const TTime& aDate);
1807 * Gets the date editor's value.
1809 * @return The editor's date value.
1811 IMPORT_C TTime Date() const;
1814 * Sets date editor to initialised or uninitialised.
1816 * @param aUninitialised If @c ETrue then the date editor is set
1817 * to be uninitialised.
1819 IMPORT_C void SetUninitialised(TBool aUninitialised);
1822 * Tests whether the editor is uninitialised.
1824 * @return @c ETrue if uninitialised.
1826 IMPORT_C TBool IsUninitialised() const;
1828 // from CEikTTimeEditor
1829 // only values inside the initial minimum and maximum are permitted
1831 * From @c CEikTTimeEditor.
1833 * Sets the minimum and maximum allowable dates.
1835 * If the current date is outside the new bounds it is changed to be within
1838 * @param aMinimumDate The minimum allowable value.
1839 * @param aMaximumDate The maximum allowable value.
1841 IMPORT_C virtual void SetMinimumAndMaximum(const TTime& aMinimumDate,
1842 const TTime& aMaximumDate);
1845 * From @c CEikTTimeEditor.
1847 * Gets the date editor's minimum and maximum values.
1849 * @param aMinimumDate On return, the minimum allowable value.
1850 * @param aMaximumDate On return, the maximum allowable value.
1852 IMPORT_C virtual void GetMinimumAndMaximum(TTime& aMinimumDate,
1853 TTime& aMaximumDate) const;
1857 * From @c CCoeControl.
1859 * Handles key events.
1861 * @param aKeyEvent The key event.
1862 * @param aType The type of key event.
1863 * @return @c EKeyConsumed if the key has beend handled.
1865 IMPORT_C virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
1869 * From @c CCoeControl.
1871 * Second-phase construction from a resource file.
1873 * The function reads the maximum and minimum date values and whether
1874 * or not the editor should support a pop-out calendar and/or date icon
1875 * from a @c DATE_EDITOR resource. It sets the initial date to be the same
1876 * as the maximum date and honours the locale's date format and separators.
1878 * @param aResourceReader A resource file reader.
1880 IMPORT_C virtual void ConstructFromResourceL(TResourceReader&
1884 * From @c CCoeControl.
1886 * Editor validation.
1888 * This function should be called before an attempt is made to remove focus
1889 * from a date editor. If the control value is not within the bounds
1890 * specified by the minimum and maximum date values, it is reset to the
1891 * nearest allowable value, the function then leaves.
1893 IMPORT_C virtual void PrepareForFocusLossL();
1896 * From @c CCoeControl.
1898 * Handles pointer events.
1900 * @param aPointerEvent The pointer event.
1902 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
1907 virtual void CreatePopoutIfRequiredL();
1908 // from CEikTTimeEditor
1909 virtual void SetTTime(const TTime& aDate);
1910 virtual TTime GetTTime() const; // can only be called if PrepareForFocusLossL() succeeded
1914 // from MEikCalendarDialogObserver
1915 virtual void GetMinimumAndMaximumAndInitialDatesForCalendarL(TTime& aMinimumDate,
1916 TTime& aMaximumDate,
1917 TTime& aInitialDate) const;
1918 virtual void SetDateFromCalendarAndDrawNow(const TTime& aDate);
1919 // miscellaneous functions
1920 void DoSetMinimumAndMaximum(const TTime& aMinimumDate, const TTime& aMaximumDate);
1921 IMPORT_C virtual void CEikMfne_Reserved();
1928 IMPORT_C void* ExtensionInterface( TUid aInterface );
1932 CDateEditor* iDateEditor;
1942 * Time and date editor.
1944 * This control allows both a time and date to be displayed and edited.
1945 * It contains the following time fields: hours, minutes and seconds,
1946 * two time separator characters and am/pm text, and the following date
1947 * fields: year, month and day, with two date separator characters. The
1948 * seconds and hours fields are optional and the order of the date fields and
1949 * the separator characters are locale-dependent. The upper and lower
1950 * field bounds are set, and dates and times outside these bounds are
1953 * Date field values may be edited directly or via a pop-out calendar
1956 * The editor has an associated resource struct TIME_AND_DATE_EDITOR
1957 * and control factory identifier EEikCtTimeAndDateEditor.
1959 class CEikTimeAndDateEditor : public CEikTTimeEditor, private MEikCalendarObserver
1962 // miscellaneous functions
1965 * Default constructor.
1967 * This function should be used as the first stage in two stage
1968 * construction, followed by a call to either ConstructFromResourceL() to
1969 * initialise the editor's field values from a resource file, or ConstructL()
1970 * (if no resource file is used).
1972 IMPORT_C CEikTimeAndDateEditor();
1977 * This frees the resources owned by the time and date editor, prior to
1980 IMPORT_C virtual ~CEikTimeAndDateEditor();
1982 // ConstructL to be called by container only if not constructed from resource, also ownership of aInterveningText is transferred when everything that can leave has successfully been done
1985 * Second phase construction.
1987 * This function completes construction of a newly-allocated date and
1988 * time editor, by setting the minimum, maximum and initial date and time
1989 * values. It should be called by the container only if the control is
1990 * not constructed from a resource file.
1992 * The aFlags parameter is used to set whether the seconds or hours
1993 * fields are not required. The minutes field is always present. It may also
1994 * be used to specify whether or not to force 24 hour time format,
1995 * overriding the locale's setting, and whether the editor should have a
1996 * pop-out calendar dialog.
1998 * The locale-dependant date and time settings specified in class
1999 * TLocale are honoured.
2001 * If the initial date/time is outside the bounds specified by the
2002 * minimum and maximum, it is set to the nearest valid setting.
2004 * A panic will occur if the minimum date/time is later than the
2005 * maximum date/time.
2007 * @param aMinimumTimeAndDate The minimum date and time value.
2008 * @param aMaximumTimeAndDate The maximum date and time value.
2009 * @param aInitialTimeAndDate The initial date and time value.
2010 * @param aFlags A bitmask of flags. See eikon.hrh file, EEikTime,
2012 * @param aInterveningText Descriptor containing the text to use to
2013 * separate the time and date portions of the editor.
2015 IMPORT_C void ConstructL(const TTime& aMinimumTimeAndDate, const TTime& aMaximumTimeAndDate, const TTime& aInitialTimeAndDate, TUint32 aFlags, HBufC* aInterveningText=NULL);
2018 * Sets the values of the time and date editor's fields.
2020 * @param aTimeAndDate The new value for the date and time editor's
2023 IMPORT_C void SetTimeAndDate(const TTime& aTimeAndDate);
2026 * Gets the time and date editor's value.
2028 * @return The editor's value.
2030 IMPORT_C TTime TimeAndDate() const;
2033 * Sets the uninitialized status of the editor.
2035 * @param aUninitialised If ETrue, sets the editor as uninitialized,
2036 * i.e. it doesn't display anything.
2038 IMPORT_C void SetUninitialised(TBool aUninitialised);
2041 * Gets the uninitialized status of the editor.
2043 * @return ETrue, if the editor is set as uninitialized.
2045 IMPORT_C TBool IsUninitialised() const;
2047 // from CEikTTimeEditor
2050 * Sets the range of allowable values.
2052 * These define the maximum and minimum time/date values that may be
2053 * entered by the user.
2055 * If the existing date/time value is outside the new bounds, it is
2056 * reset to the nearest allowable value.
2058 * @param aMinimumTimeAndDate The minimum allowable value.
2059 * @param aMaximumTimeAndDate The maximum allowable value.
2061 IMPORT_C virtual void SetMinimumAndMaximum(const TTime& aMinimumTimeAndDate, const TTime& aMaximumTimeAndDate); // only values inside the initial minimum and maximum are permitted
2064 * Gets the range of allowable values that may be entered by the user.
2066 * @param aMinimumTimeAndDate On return, contains the time and date
2067 * editor's minimum allowable value.
2068 * @param aMaximumTimeAndDate On return, contains the time and date
2069 * editor's maximum allowable value.
2071 IMPORT_C virtual void GetMinimumAndMaximum(TTime& aMinimumTimeAndDate, TTime& aMaximumTimeAndDate) const;
2076 * Handles key events.
2078 * For example, the Tab key validates and launches a calendar popout.
2080 * Calls CEikMfne::OfferKeyEventL() if the control does not consume the
2083 * @param aKeyEvent The key event.
2084 * @param aType The type of key event.
2085 * @return Returns EKeyWasConsumed if the control consumes the key.
2087 IMPORT_C virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
2090 * Second phase construction from a resource.
2092 * This function completes the construction of a newly-allocated
2093 * date/time editor from a TIME_AND_DATE_EDITOR resource. The minimum and
2094 * maximum date/times, the date and time flag settings, and the intervening
2095 * text are read from the resource, and ConstructL() is called with these
2096 * settings. The initial date/time is set to the maximum date/time value.
2098 * @param aResourceReader A resource file reader.
2100 IMPORT_C virtual void ConstructFromResourceL(TResourceReader& aResourceReader);
2103 * Prepares the editor for focus loss.
2105 * This function should be called to validate the editor's contents
2106 * when an attempt is made to remove focus from the control. If the control
2107 * value is not within the bounds specified by the minimum and maximum
2108 * date/time values, it is reset to the nearest allowable value, the
2109 * function will leave and display an appropriate message.
2111 IMPORT_C virtual void PrepareForFocusLossL();
2114 * From @c CCoeControl.
2116 * Handles pointer events.
2118 * @param aPointerEvent The pointer event.
2120 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
2124 virtual void CreatePopoutIfRequiredL();
2125 IMPORT_C virtual void CEikMfne_Reserved();
2126 // from CEikTTimeEditor
2127 virtual void SetTTime(const TTime& aTimeAndDate);
2128 virtual TTime GetTTime() const; // can only be called if PrepareForFocusLossL() succeeded
2130 // from MEikCalendarDialogObserver
2131 virtual void GetMinimumAndMaximumAndInitialDatesForCalendarL(TTime& aMinimumDate, TTime& aMaximumDate, TTime& aInitialDate) const;
2132 virtual void SetDateFromCalendarAndDrawNow(const TTime& aDate);
2133 // miscellaneous functions
2134 void DoSetMinimumAndMaximum(const TTime& aMinimumTimeAndDate, const TTime& aMaximumTimeAndDate);
2139 IMPORT_C void* ExtensionInterface( TUid aInterface );
2141 CTimeEditor* iTimeEditor;
2142 CDateEditor* iDateEditor;
2143 TTime iMinimumTimeAndDate;
2144 TTime iMaximumTimeAndDate;
2154 * The duration editor allows a time duration to be displayed and
2155 * edited. The editor has a clock icon and an edit field with separators for
2156 * hours, minutes, and seconds. These fields can all be suppressed using
2157 * the appropriate flags in the resource declaration.
2159 * Unlike the time editor control, the duration editor has no am or pm
2160 * text. This is because the duration is a length of time (from 0 to 24
2161 * hours), rather than a point in time.
2163 * The minimum and maximum values are set, and values outside these
2164 * limits are invalid.
2166 * The editor has an associated resource struct DURATION_EDITOR and
2167 * control factory identifier EEikCtDurationEditor.
2169 class CEikDurationEditor : public CEikMfne
2172 // miscellaneous functions
2175 * Default constructor.
2177 * This function should be used as the first stage in two stage
2178 * construction, followed by a call to either ConstructFromResourceL() to
2179 * initialise the editor's field values from a resource file, or ConstructL()
2180 * if no resource file is used.
2182 IMPORT_C CEikDurationEditor();
2187 * The destructor frees the resources owned by the duration editor,
2188 * prior to its destruction.
2190 IMPORT_C virtual ~CEikDurationEditor();
2193 * Second phase construction.
2195 * This function completes the construction of a newly-allocated
2196 * duration editor. This function should be used instead of
2197 * ConstructFromResourceL() when not initialising from a resource file.
2199 * The function sets the editor's minimum, maximum and initial values.
2200 * The time separator characters specified in class TLocale are honoured.
2201 * If the initial duration is less than the minimum value the minimum
2202 * value is used as the initial setting. If the initial duration is greater
2203 * than the maximum value the maximum value is used as the initial
2206 * The aFlags parameter is used to determine whether the seconds or
2207 * hours fields are not required. The minutes field is always present.
2208 * Regardless of the value specified in aFlags, 24 hour time format is set,
2209 * overriding the locale's setting.
2211 * @param aMinimumDuration The minimum interval in seconds.
2212 * @param aMaximumDuration The maximum interval in seconds.
2213 * @param aInitialDuration The initial interval in seconds.
2214 * @param aFlags Duration editor flags.
2216 IMPORT_C void ConstructL(const TTimeIntervalSeconds& aMinimumDuration, const TTimeIntervalSeconds& aMaximumDuration, const TTimeIntervalSeconds& aInitialDuration, TUint32 aFlags);
2219 * Sets the minimum and maximum duration values.
2221 * The user can only enter values between these bounds.
2223 * @param aMinimumDuration The minimum duration.
2224 * @param aMaximumDuration The maximum duration.
2225 * @panic 48 If the minimum duration exceeds the maximum.
2227 IMPORT_C void SetMinimumAndMaximum(const TTimeIntervalSeconds& aMinimumDuration, const TTimeIntervalSeconds& aMaximumDuration); // only values inside the initial minimum and maximum are permitted
2230 * Gets the duration editor's minimum and maximum values.
2232 * @param aMinimumDuration On return, the minimum value.
2233 * @param aMaximumDuration On return, the maximum value.
2235 IMPORT_C void GetMinimumAndMaximum(TTimeIntervalSeconds& aMinimumDuration, TTimeIntervalSeconds& aMaximumDuration) const;
2238 * Sets the duration editor's value.
2240 * @param aDuration The new value to convert into hours, minutes and
2241 * seconds and to which the duration editor's fields will be set.
2243 IMPORT_C void SetDuration(const TTimeIntervalSeconds& aDuration);
2246 * Gets the duration editor's value and returns it as a period of
2249 * @return The editor's value in seconds.
2251 IMPORT_C TTimeIntervalSeconds Duration() const; // can only be called if PrepareForFocusLossL() succeeded
2256 * Second-phase construction from a resource.
2258 * The function reads the maximum and minimum duration values, and the
2259 * flags settings, from a DURATION_EDITOR resource. It sets the initial
2260 * duration to be the same as the maximum value and honours the locale's
2263 * @param aResourceReader A resource file reader.
2265 IMPORT_C void ConstructFromResourceL(TResourceReader& aResourceReader);
2268 * Editor validation.
2270 * This function should be called when an attempt is made to remove
2271 * focus from a duration editor. If the editor value is not within the
2272 * bounds specified by the minimum and maximum duration values, it is reset to
2273 * the nearest allowable value - the function will leave.
2275 IMPORT_C void PrepareForFocusLossL();
2279 * From @c CCoeControl.
2281 * Handles pointer events.
2283 * @param aPointerEvent The pointer event.
2285 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
2287 // miscellaneous functions
2288 void DoSetMinimumAndMaximum(const TTimeIntervalSeconds& aMinimumDuration, const TTimeIntervalSeconds& aMaximumDuration);
2289 IMPORT_C virtual void CEikMfne_Reserved();
2294 IMPORT_C void* ExtensionInterface( TUid aInterface );
2296 CTimeEditor* iTimeEditor;
2297 TTimeIntervalSeconds iMinimumDuration;
2298 TTimeIntervalSeconds iMaximumDuration;
2303 * Time offset editor.
2305 * This control allows a signed time offset to be displayed and edited.
2306 * It has the same fields as the time editor control CEikTimeEditor,
2307 * except there is no AM or PM text because the value is a time offset,
2308 * positive or negative, from 0 to 24 hours rather than a point in time.
2310 * The editor has an associated resource struct TIME_OFFSET_EDITOR and
2311 * control factory identifier EEikCtTimeOffsetEditor.
2313 class CEikTimeOffsetEditor : public CEikMfne
2316 // miscellaneous functions
2319 * Default constructor.
2321 * This function should be used as the first stage in two stage
2322 * construction, followed by a call to either ConstructFromResourceL() to
2323 * initialise the editor's field values from a resource file, or ConstructL()
2324 * if no resource file is used.
2326 IMPORT_C CEikTimeOffsetEditor();
2329 * Destructor. This frees the resources owned by the time offset editor,
2330 * prior to its destruction.
2332 IMPORT_C virtual ~CEikTimeOffsetEditor();
2335 * Second phase constructor.
2337 * This function completes the construction of a time offset editor, by
2338 * setting its minimum, maximum and initial values. The time separator
2339 * characters specified in the system's locale are honoured. It should be
2340 * called by the container only if the control is not constructed from a
2343 * The aFlags parameter is used to determine whether the seconds or
2344 * hours fields are displayed by the editor. The minutes field is always
2345 * displayed. This function forces 24 hour time format for the time offset
2346 * editor, overriding the locale's setting.
2348 * If the initial time offset is outside the bounds specified, it is
2349 * invalid and will be reset to the upper or lower bound.
2351 * The minimum value for a time offset editor is -23:59:59, and the
2352 * maximum value is 23:59:59.
2354 * @param aMinimumTimeOffset The minimum allowable value, in seconds.
2355 * @param aMaximumTimeOffset The maximum allowable value, in seconds.
2356 * @param aInitialTimeOffset The initial value, in seconds.
2357 * @param aFlags Determines which fields are required. Specify
2358 * CTimeEditor::EWithoutSecondsField for no seconds field,
2359 * CTimeEditor::EWithoutHoursField for no hours field. 24 hour clock format is set, regardless
2360 * of the flag setting specified in this parameter.
2362 IMPORT_C void ConstructL(const TTimeIntervalSeconds& aMinimumTimeOffset, const TTimeIntervalSeconds& aMaximumTimeOffset, const TTimeIntervalSeconds& aInitialTimeOffset, TUint32 aFlags);
2365 * Sets the range of allowable offset values.
2367 * These define the maximum and minimum values that may be entered by
2370 * If the existing offset value is outside the bounds set by this
2371 * function, it is reset to the nearest boundary value.
2373 * @param aMinimumTimeOffset The minimum allowable value.
2374 * @param aMaximumTimeOffset The maximum allowable value.
2375 * @panic 49 If the minimum exceeds the maximum.
2377 IMPORT_C void SetMinimumAndMaximum(const TTimeIntervalSeconds& aMinimumTimeOffset, const TTimeIntervalSeconds& aMaximumTimeOffset); // only values inside the initial minimum and maximum are permitted
2380 * Gets the range of allowable values that may be entered by the user.
2382 * @param aMinimumTimeOffset On return, contains the time offset
2383 * editor’s minimum allowable value.
2384 * @param aMaximumTimeOffset On return, contains the time offset
2385 * editor’s maximum allowable value.
2387 IMPORT_C void GetMinimumAndMaximum(TTimeIntervalSeconds& aMinimumTimeOffset, TTimeIntervalSeconds& aMaximumTimeOffset) const;
2390 * Sets the time offset editor's value.
2392 * The sign is set according to whether the value specified is positive
2395 * @param aTimeOffset The new offset value to which to assign to the
2398 IMPORT_C void SetTimeOffset(const TTimeIntervalSeconds& aTimeOffset);
2401 * Gets the time offset editor's value converted into seconds.
2403 * @return The editor's value in seconds.
2405 IMPORT_C TTimeIntervalSeconds TimeOffset() const; // can only be called if PrepareForFocusLossL() succeeded
2410 * Second phase construction from a resource.
2412 * This function completes the construction of a time offset editor
2413 * from a TIME_OFFSET_EDITOR resource.
2415 * The minimum and maximum time offsets, and the flags settings are
2416 * read from the resource, and ConstructL() is called with these settings.
2417 * The initial time offset is set to the maximum time offset value.
2419 * @param aResourceReader A resource file reader.
2421 IMPORT_C void ConstructFromResourceL(TResourceReader& aResourceReader);
2424 * Prepares editor for focus loss.
2426 * This function should be called to validate the editor’s contents
2427 * when an attempt is made to remove focus from the control.
2429 * If the control value is not within the bounds specified by the
2430 * minimum and maximum time offset values, it is reset to the nearest
2431 * allowable value. The function then leaves.
2433 IMPORT_C void PrepareForFocusLossL();
2438 * From @c CCoeControl.
2440 * Handles pointer events.
2442 * @param aPointerEvent The pointer event.
2444 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
2447 // miscellaneous functions
2448 void DoSetMinimumAndMaximum(const TTimeIntervalSeconds& aMinimumTimeOffset, const TTimeIntervalSeconds& aMaximumTimeOffset);
2449 IMPORT_C virtual void CEikMfne_Reserved();
2454 IMPORT_C void* ExtensionInterface( TUid aInterface );
2456 CTimeEditor* iTimeEditor;
2457 TTimeIntervalSeconds iMinimumTimeOffset;
2458 TTimeIntervalSeconds iMaximumTimeOffset;
2459 // none of these pointers owns anything
2460 CEikMfneSymbol* iSign;
2466 // Longitude and Latitude editors removed 2.4.2002:
2470 EEikOrientationNorthSouth =0x1000,
2471 EEikOrientationWestEast =0x2000,
2472 EEikOrientationMask=EEikOrientationNorthSouth|EEikOrientationWestEast
2478 EEikDirectionNegative,
2479 EEikDirectionPositive,
2480 EEikDirectionMask=EEikDirectionNegative|EEikDirectionPositive
2486 EEikCompassNorth=EEikOrientationNorthSouth|EEikDirectionNegative,
2487 EEikCompassSouth=EEikOrientationNorthSouth|EEikDirectionPositive,
2488 EEikCompassEast=EEikOrientationWestEast|EEikDirectionNegative,
2489 EEikCompassWest=EEikOrientationWestEast|EEikDirectionPositive
2493 struct SEikDegreesMinutesDirection
2498 TEikCompass iDirection;
2501 #endif // __EIKMFNE_H__