S60 3rd Edition API Reference: akntextsettingpage.h Source File

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 
00329 #start_since SINCE_3_1_SDK
00330 
00341     IMPORT_C virtual TBool OkToExitL(TBool aAccept);
00342 #end_since SINCE_3_1_SDK
00343 
00344 #start_since SINCE_3_1_SDK
00345 
00354         IMPORT_C TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType);
00355 #end_since SINCE_3_1_SDK
00356 
00357 
00361 private: 
00362         IMPORT_C virtual void CAknSettingPage_Reserved_1();
00363         IMPORT_C virtual void CAknSettingPage_Reserved_2();
00364 
00365 // 
00366 // From CCoeControl
00367 //
00368 
00369 protected:
00370 
00377         IMPORT_C virtual void SizeChanged();
00378 
00386         IMPORT_C virtual void WriteInternalStateL(RWriteStream& aWriteStream) const;
00387 
00388 private:
00392         IMPORT_C virtual void Reserved_2();
00393 
00394 private:
00398     IMPORT_C void* ExtensionInterface( TUid aInterface );
00399 
00404         IMPORT_C virtual void CAknEdwinSettingPage_Reserved_1();
00405 
00406 private: 
00407     // restarts timer that blocks Ok button for the period FEP may reject the edit
00408     void RestartMultitapWaitTimer();
00409 
00410 private:
00411         HBufC* iBackupText;
00412         TDes& iText;
00413         TInt iTextSettingPageFlags;
00414         CAknTextSettingPageExtension* iExtension; 
00415         };
00416 
00417 
00422 class CAknIntegerSettingPage : public CAknEdwinSettingPage
00423 {
00424 public:
00425 
00426 // Flags to modify the behaviour of the editor
00427         enum TAknIntegerSettingPageFlags
00428         {
00429         EInvalidValueNotOffered = 0x0,
00430         EEmptyValueAllowed = 0x0000001,
00431         EInvalidValueAllowed = 0x0000002,
00432         ENoInitialSelection = 0x0000004,
00433         EPutCursorAtBeginning = 0x0000008
00434         };
00435 
00436 public:
00437         IMPORT_C CAknIntegerSettingPage(TInt aResourceID, TInt& aValue, TInt aTextSettingPageFlags = 0 );
00470         IMPORT_C CAknIntegerSettingPage(        const TDesC* aSettingTitleText, 
00471                                                                 TInt aSettingNumber, 
00472                                                                 TInt aControlType,
00473                                                                 TInt aEditorResourceId, 
00474                                                                 TInt aSettingPageResourceId,
00475                                                                 TInt& aValue, 
00476                                                                 TInt aIntegerSettingPageFlags = 0);
00477 
00482         IMPORT_C virtual void ConstructL();
00483 
00489         IMPORT_C CAknIntegerEdwin* IntegerEditorControl();
00490 
00495     IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00496 
00497 //
00498 // Framework methods from CAknSettingPage
00499 //
00500 protected:
00501 
00507         IMPORT_C virtual void DynamicInitL();
00508 
00513         IMPORT_C virtual void UpdateSettingL();
00514 
00515 
00520         IMPORT_C virtual void RestoreOriginalSettingL();
00521 
00528         IMPORT_C virtual void CheckAndSetDataValidity();
00529 
00536         IMPORT_C virtual void UpdateCbaL();
00537 
00541 private: 
00542         IMPORT_C virtual void CAknSettingPage_Reserved_1();
00543         IMPORT_C virtual void CAknSettingPage_Reserved_2();
00544 
00545 
00546 
00547 //
00548 // From MEikControlObserver
00549 //
00550 
00551 protected:
00552 
00564         IMPORT_C virtual void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType );        
00565 
00566 //
00567 // From CCoeControl
00568 //
00569 protected:
00570 
00577         IMPORT_C virtual void SizeChanged();
00578 
00579 
00587         IMPORT_C virtual void WriteInternalStateL(RWriteStream& aWriteStream) const;
00588 
00589 private: 
00593         IMPORT_C virtual void Reserved_2();
00594 
00595 private:
00599     IMPORT_C void* ExtensionInterface( TUid aInterface );
00600 
00601 private:
00602 
00607         IMPORT_C virtual void CAknEdwinSettingPage_Reserved_1();
00608 
00609 private:
00610         TInt iBackupValue;
00611         TInt& iValue;
00612         TInt iIntegerSettingPageFlags;
00613         TInt iSpare_1; 
00614 };
00615 
00616 
00617 #endif

Copyright © Nokia Corporation 2001-2007
Back to top