akntextsettingpage.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : AknTextSettingPage.h
00004 *  Part of  : Avkon
00005 *
00006 *  Description:
00007 *     Interface for Setting page carrying CEikEdwin editors
00008 *               - CAknTextSettingPage: 6 line text editor
00009 *               - CAknIntegerSettingPage: 1 line integer editor
00010 *
00011 *  Version:
00012 *
00013 *  Copyright © 2002 Nokia Corporation.
00014 *  This material, including documentation and any related 
00015 *  computer programs, is protected by copyright controlled by 
00016 *  Nokia Corporation. All rights are reserved. Copying, 
00017 *  including reproducing, storing,  adapting or translating, any 
00018 *  or all of this material requires the prior written consent of 
00019 *  Nokia Corporation. This material also contains confidential 
00020 *  information which may not be disclosed to others without the 
00021 *  prior written consent of Nokia Corporation.
00022 * ============================================================================
00023 */
00024 
00025 #ifndef __AKNTEXTSETTINGPAGE_H__
00026 #define __AKNTEXTSETTINGPAGE_H__ 
00027 
00028 // For coecontrol and its observer
00029 #include <coecntrl.h>
00030 #include <coecobs.h>
00031 
00032 #include <eikdef.h>
00033 #include <eikedwin.h>
00034 #include "aknsettingpage.h"
00035 #include "aknnumedwin.h"
00036 
00043 class CAknEdwinSettingPage : public CAknSettingPage
00044 {
00045 
00046 public:
00047 
00053         IMPORT_C CEikEdwin* TextControl();
00054 
00059     IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00060 
00061 protected:
00067         IMPORT_C CAknEdwinSettingPage( TInt ResourceId );
00100         IMPORT_C CAknEdwinSettingPage(
00101                                                                 const TDesC* aSettingTitleText, 
00102                                                                 TInt aSettingNumber, 
00103                                                                 TInt aControlType,
00104                                                                 TInt aEditorResourceId, 
00105                                                                 TInt aSettingPageResourceId );
00106 
00107 //
00108 // From CCoeControl
00109 //
00110 protected:
00115         virtual void SizeChanged() = 0;
00116 
00124         IMPORT_C void Draw(const TRect& aRect) const;
00125 
00126 private:
00130     IMPORT_C void* ExtensionInterface( TUid aInterface );
00131 
00132 private:
00137         IMPORT_C virtual void CAknEdwinSettingPage_Reserved_1();
00138 
00139 protected:
00143         TAknLayoutRect iEdwinLayoutRect;
00144 
00148         TAknLayoutRect iHorizontalShadow;
00149         
00153         TAknLayoutRect iVerticalShadow;
00154 
00158         TAknLayoutRect iOutlineFrame;
00159 
00160 private:
00161     TInt iSpare;
00162 };
00163 
00169 class CAknTextSettingPageExtension;
00170 
00171 class CAknTextSettingPage : public CAknEdwinSettingPage
00172 {
00173 public:
00174 
00175 // Flags to modify the behaviour of the editor
00176         enum TAknTextSettingPageFlags
00177         {
00178         EZeroLengthNotOffered = 0x0,    // DEPRECATED. This enum preserved but with value 0
00179         EPutCursorAtEnd = 0x0,                  // DEPRECATED. This is already default so putting flag at beginning is more useful
00180         EZeroLengthAllowed = 0x0000001,
00181         ENoInitialSelection = 0x0000004,        // DEPRECATED and no longer used
00182         EPutCursorAtBeginning = 0x0000008,      // DEPRECATED and no longer used
00183         // Instructs the TextSettingPage not to override any of the Edwin's cursor and selection flags
00184         EUseEdwinCursorAndSelectionFlags = 0x0000010, // DEPRECATED
00185         EPredictiveTextEntryPermitted = 0x0020
00186         };
00187 
00188 public:
00197         IMPORT_C CAknTextSettingPage(TInt aResourceID, TDes& aText, TInt aTextSettingPageFlags = 0 );
00231         IMPORT_C CAknTextSettingPage(   const TDesC* aSettingTitleText, 
00232                                                                 TInt aSettingNumber, 
00233                                                                 TInt aControlType,
00234                                                                 TInt aEditorResourceId, 
00235                                                                 TInt aSettingPageResourceId,
00236                                                                 TDes& aText, 
00237                                                                 TInt aTextSettingPageFlags = 0);
00238 
00251         IMPORT_C virtual void ConstructL();
00252 
00257     IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00258 
00259 
00260 protected:
00265         IMPORT_C virtual ~CAknTextSettingPage();
00266 
00267 //
00268 // CAknSettingPage Framework implementations
00269 //
00270 protected:
00271 
00277         IMPORT_C virtual void DynamicInitL();
00278 
00283         IMPORT_C virtual void UpdateSettingL();
00284 
00289         IMPORT_C virtual void AcceptSettingL();
00290 
00296         IMPORT_C virtual void RestoreOriginalSettingL();
00297 
00306         IMPORT_C virtual void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType );        
00307 
00308 
00314         IMPORT_C virtual void CheckAndSetDataValidity();
00315 
00320         IMPORT_C virtual void UpdateTextL();
00321         
00327         IMPORT_C virtual void UpdateCbaL();
00328 
00339     IMPORT_C virtual TBool OkToExitL(TBool aAccept);
00340 
00349         IMPORT_C TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType);
00350 
00351 
00355 private: 
00356         IMPORT_C virtual void CAknSettingPage_Reserved_1();
00357         IMPORT_C virtual void CAknSettingPage_Reserved_2();
00358 
00359 // 
00360 // From CCoeControl
00361 //
00362 
00363 protected:
00364 
00371         IMPORT_C virtual void SizeChanged();
00372 
00380         IMPORT_C virtual void WriteInternalStateL(RWriteStream& aWriteStream) const;
00381 
00382 private:
00386         IMPORT_C virtual void Reserved_2();
00387 
00388 private:
00392     IMPORT_C void* ExtensionInterface( TUid aInterface );
00393 
00398         IMPORT_C virtual void CAknEdwinSettingPage_Reserved_1();
00399 
00400 private: 
00401     // restarts timer that blocks Ok button for the period FEP may reject the edit
00402     void RestartMultitapWaitTimer();
00403 
00404 private:
00405         HBufC* iBackupText;
00406         TDes& iText;
00407         TInt iTextSettingPageFlags;
00408         CAknTextSettingPageExtension* iExtension; 
00409         };
00410 
00411 
00416 class CAknIntegerSettingPage : public CAknEdwinSettingPage
00417 {
00418 public:
00419 
00420 // Flags to modify the behaviour of the editor
00421         enum TAknIntegerSettingPageFlags
00422         {
00423         EInvalidValueNotOffered = 0x0,
00424         EEmptyValueAllowed = 0x0000001,
00425         EInvalidValueAllowed = 0x0000002,
00426         ENoInitialSelection = 0x0000004,
00427         EPutCursorAtBeginning = 0x0000008
00428         };
00429 
00430 public:
00431         IMPORT_C CAknIntegerSettingPage(TInt aResourceID, TInt& aValue, TInt aTextSettingPageFlags = 0 );
00464         IMPORT_C CAknIntegerSettingPage(        const TDesC* aSettingTitleText, 
00465                                                                 TInt aSettingNumber, 
00466                                                                 TInt aControlType,
00467                                                                 TInt aEditorResourceId, 
00468                                                                 TInt aSettingPageResourceId,
00469                                                                 TInt& aValue, 
00470                                                                 TInt aIntegerSettingPageFlags = 0);
00471 
00476         IMPORT_C virtual void ConstructL();
00477 
00483         IMPORT_C CAknIntegerEdwin* IntegerEditorControl();
00484 
00489     IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00490 
00491 //
00492 // Framework methods from CAknSettingPage
00493 //
00494 protected:
00495 
00501         IMPORT_C virtual void DynamicInitL();
00502 
00507         IMPORT_C virtual void UpdateSettingL();
00508 
00509 
00514         IMPORT_C virtual void RestoreOriginalSettingL();
00515 
00522         IMPORT_C virtual void CheckAndSetDataValidity();
00523 
00530         IMPORT_C virtual void UpdateCbaL();
00531 
00535 private: 
00536         IMPORT_C virtual void CAknSettingPage_Reserved_1();
00537         IMPORT_C virtual void CAknSettingPage_Reserved_2();
00538 
00539 
00540 
00541 //
00542 // From MEikControlObserver
00543 //
00544 
00545 protected:
00546 
00558         IMPORT_C virtual void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType );        
00559 
00560 //
00561 // From CCoeControl
00562 //
00563 protected:
00564 
00571         IMPORT_C virtual void SizeChanged();
00572 
00573 
00581         IMPORT_C virtual void WriteInternalStateL(RWriteStream& aWriteStream) const;
00582 
00583 private: 
00587         IMPORT_C virtual void Reserved_2();
00588 
00589 private:
00593     IMPORT_C void* ExtensionInterface( TUid aInterface );
00594 
00595 private:
00596 
00601         IMPORT_C virtual void CAknEdwinSettingPage_Reserved_1();
00602 
00603 private:
00604         TInt iBackupValue;
00605         TInt& iValue;
00606         TInt iIntegerSettingPageFlags;
00607         TInt iSpare_1; 
00608 };
00609 
00610 
00611 #endif

Copyright © Nokia Corporation 2001-2008
Back to top