aknedsts.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : Aknedsts.h
00004 *  Part of     : Avkon
00005 *  Description : Data structures to store current state of case
00006 *                        modes.
00007 *  Version     :
00008 *
00009 *  Copyright © 2002-2005 Nokia. All rights reserved.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia. All rights are reserved. Copying, including 
00013 *  reproducing, storing, adapting or translating, any 
00014 *  or all of this material requires the prior written consent of 
00015 *  Nokia. This material also contains confidential 
00016 *  information which may not be disclosed to others without the 
00017 *  prior written consent of Nokia.
00018 * ==============================================================================
00019 */
00020 
00021 // INCLUDES 
00022 #if !defined(__EIKEDSTS_H__)
00023 #define __EIKEDSTS_H__
00024 
00025 #if !defined(__FEPBASE_H__)
00026 #include <FEPBASE.H>
00027 #endif
00028 
00029 #if !defined(__AKNEDSTSOBS_H__)
00030 #include <AKNEDSTSOBS.H>
00031 #endif
00032 
00033 #if !defined(__UIKON_HRH__)
00034 #include <UIKON.HRH>
00035 #endif
00036 
00037 #include <Eikon.hrh>
00038 
00039 #include <frmtlay.h>
00040 
00041 // CLASS DECLARATION
00042 
00052 class TAknEditorCaseState
00053         {
00054 public:
00058         enum TCaseStateFlags
00059                 {
00061                 EFlagTextEnteredInCurrentCase   =0x00000001,    
00062                 
00064                 EFlagInitialiseRequired                 =0x00000002,    
00065                 
00067                 EFlagSupressAutoUpdateCase              =0x00000004     
00068                 
00069                 };
00070 public:
00071                 
00075         IMPORT_C TAknEditorCaseState();
00076                 
00081         IMPORT_C void SetCurrentCase(TUint aCase);
00082                 
00087         IMPORT_C void SetPreviousCase(TUint aCase);
00088                 
00093         IMPORT_C void SetPreviousCaseUsedToEnterText(TUint aCase);
00094         
00095                         
00100         IMPORT_C TUint CurrentCase() const;
00101                         
00106         IMPORT_C TUint PreviousCase() const;
00107                         
00112         IMPORT_C TUint PreviousCaseUsedToEnterText() const;
00113 
00114         // flags
00115                 
00120         IMPORT_C void SetFlag(TCaseStateFlags aFlag);
00121                 
00126         IMPORT_C void ClearFlag(TCaseStateFlags aFlag);
00127                 
00133         IMPORT_C TBool IsFlagSet(TCaseStateFlags aFlag) const;
00134 
00135 private:
00136         TUint8 iCurrentCase;
00137         TUint8 iPreviousCase;
00138         TUint8 iPreviousCaseUsedToEnterText;
00139         TUint8 iFlags;
00140 
00141     TInt iSpare;
00142         };
00143 
00144 
00145 // FORWARD DECLERATIONS
00146 class MEikCcpuEditor;
00147 class CEikButtonGroupContainer;
00148 class CEikMenuBar;
00149 class MObjectProvider;
00150 class CAknEdwinFormAccessor;
00151 
00152 // CLASS DECLARATION
00153 
00158 class CAknEdwinState : public MCoeFepAwareTextEditor_Extension1::CState
00159         {
00160 public:
00164         struct SEditorCbaState
00165                 {
00168                 CEikButtonGroupContainer* iCurrentCba;
00170                 TInt iLeftSoftkeyCommandId;
00172                 TInt iRightSoftkeyCommandId;
00173                 };
00174 public:
00178         virtual ~CAknEdwinState();
00179         
00186         CAknEdwinState(MEikCcpuEditor* aCcpuState);
00187         
00191         IMPORT_C CAknEdwinState();
00192         
00193 public:
00198         IMPORT_C void SetObserver(MAknEdStateObserver* aObserver);
00199 
00204         IMPORT_C void ReportAknEdStateEventL(
00205                 MAknEdStateObserver::EAknEdwinStateEvent aEventType);
00206 
00207 public:
00208         // Accessors
00209         
00214         IMPORT_C TInt Flags() const;
00215 
00221         IMPORT_C TInt DefaultInputMode() const;
00222 
00227         IMPORT_C TInt CurrentInputMode() const;
00228 
00233         IMPORT_C TInt PermittedInputModes() const;
00234 
00240         IMPORT_C TInt DefaultCase() const;
00241 
00246         IMPORT_C TInt CurrentCase() const;
00247 
00252         IMPORT_C TInt PermittedCases() const;
00253 
00259         IMPORT_C TInt DefaultLanguage() const;
00260 
00265         IMPORT_C TInt SpecialCharacterTableResourceId() const;
00266 
00274         IMPORT_C TAknEditorNumericKeymap NumericKeymap() const;
00275 
00280         IMPORT_C TCursorSelection CurrentInlineEditSpan() const;
00281 
00286         IMPORT_C SEditorCbaState& CbaState();
00287 
00292         IMPORT_C CEikMenuBar* MenuBar() const;
00293 
00299         IMPORT_C MEikCcpuEditor* CcpuState() const;
00300 
00305         IMPORT_C MObjectProvider* ObjectProvider() const;
00306 
00311         IMPORT_C TLanguage LocalLanguage() const;
00312 
00318         IMPORT_C CAknEdwinFormAccessor* FormAccessor() const;
00319 
00320 
00321         // Setters
00322 
00327         IMPORT_C void SetFlags(TInt aFlags);
00328 
00336         IMPORT_C void SetDefaultInputMode(TInt aInputMode);
00337 
00347         IMPORT_C void SetCurrentInputMode(TInt aInputMode);
00348 
00355         IMPORT_C void SetPermittedInputModes(TInt aInputModes);
00356 
00365         IMPORT_C void SetDefaultCase(TInt aCase);
00366 
00376         IMPORT_C void SetCurrentCase(TInt aCase);
00377 
00386         IMPORT_C void SetPermittedCases(TInt aCases);
00387 
00392         IMPORT_C void SetDefaultLanguage(TInt aLanguage);
00393 
00398         IMPORT_C void SetSpecialCharacterTableResourceId(TInt aResourceId);
00399 
00411         IMPORT_C void SetNumericKeymap(TAknEditorNumericKeymap aKeymap);
00412 
00418         IMPORT_C void SetInlineEditSpan(TCursorSelection aCurrentInlineEditSpan);
00419 
00424         IMPORT_C void SetCba();
00425 
00429         IMPORT_C void SetMenu();
00430 
00436         IMPORT_C void SetObjectProvider(MObjectProvider* aObjectProvider);
00437 
00444         IMPORT_C void SetLocalLanguage(TLanguage aLanguage);
00445 
00451         IMPORT_C void SetFormAccessor(CAknEdwinFormAccessor* aFormAccessor);
00452 
00453         // non exported setters
00454 
00460         IMPORT_C void SetCcpuState(MEikCcpuEditor* aCcpuEditor);
00461         
00467         IMPORT_C void SetMiddleSoftkeyCommandId(TInt aCommandId);
00468 
00474         IMPORT_C TInt MiddleSoftkeyCommandId() const;
00475 
00476 private:
00477         IMPORT_C void SetCurrentCaseWithNoInitialisation(TInt aCase);
00478         IMPORT_C TAknEditorCaseState& CaseState();
00479 
00480 private:
00481         void CheckLRCursorAndT9Consistency();
00482 
00483 private:
00484         friend class CT9FepControl;  // dependency to be removed?
00485         friend class CT9FepCaseManager;  // dependency to be removed?
00486         friend class CAknFepCaseManager;  // dependency to be removed?
00487         friend class CAknFepManager;  // dependency to be removed?
00488 
00489 private:
00490         TInt iFlags;
00491         TInt iDefaultInputMode;
00492         TInt iCurrentInputMode;
00493         TInt iPermittedInputModes;
00494         
00495         TInt iDefaultCase;
00496         TAknEditorCaseState iCaseState;
00497         TInt iPermittedCases;
00498 
00499         TLanguage iLocalLanguage;
00500         TInt iSpecialCharacterTableResourceId;
00501         TAknEditorNumericKeymap iNumericKeymap;
00502         TCursorSelection iCurrentInlineEditSpan;
00503 
00504         SEditorCbaState iCbaState;
00505         CEikMenuBar* iMenu;
00506 
00507         // to hold c/c/p/u info about an editor
00508         MEikCcpuEditor* iCcpuState;
00509         MObjectProvider* iObjectProvider;
00510 
00511         MAknEdStateObserver* iObserver;
00512         CAknEdwinFormAccessor* iFormAccessor;
00513         
00514         TInt iMiddleSoftkeyCommandId;
00515 
00516     TInt iSpare[3];
00517         };
00518 
00519 
00520 #endif
00521 
00522 
00523 
00524 
00525 

Copyright © Nokia Corporation 2001-2008
Back to top