00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __AKNVIEWAPPUI_H__
00021 #define __AKNVIEWAPPUI_H__
00022
00023
00024 #include <aknappui.h>
00025
00026
00027 class CAknView;
00028 class CAknViewShutter;
00029 class CAknLocalScreenClearer;
00030 class CAknViewAppUiExtension;
00031 class CAknViewNavigator;
00032
00033
00034 #define iAvkonViewAppUi ((CAknViewAppUi*)CEikonEnv::Static()->EikAppUi())
00035
00036
00037
00043 class CAknViewAppUi : public CAknAppUi
00044 {
00045 public:
00046 NONSHARABLE_CLASS(CViewActivationItem) : public CBase
00047 {
00048 public:
00049
00058 static CViewActivationItem* NewLC(CAknView* aNewView,
00059 TUid aCustomMessageId,
00060 const TDesC8& aCustomMessage,
00061 const TVwsViewId& aPrevViewId);
00062
00066 ~CViewActivationItem();
00067 private:
00068 CViewActivationItem(CAknView* aNewView,
00069 TUid aCustomMessageId,
00070 const TVwsViewId& aPrevViewId);
00071
00072 void ConstructL(const TDesC8& aCustomMessage);
00073 public:
00074
00075
00076 CAknView* iNewView;
00077
00078
00079 TUid iCustomMessageId;
00080
00081
00082 HBufC8* iCustomMessage;
00083
00084
00085 TVwsViewId iPrevViewId;
00086 };
00087
00091 NONSHARABLE_CLASS(TAknSplitViewContainer)
00092 {
00093 public:
00099 TBool IsPartOf( const TUid aViewId );
00100
00101 public:
00102
00103 TUid iViewIds[2];
00104
00105 TBool iFailed[2];
00106
00107 TRect iViewRect[2];
00108
00109 TInt iLeftViewSize;
00110 };
00111
00112 typedef CArrayPtrFlat<CViewActivationItem> CAknViewActivationQueue;
00113 typedef CArrayPtrFlat<CAknView> CAknViews;
00114
00115 public:
00116
00121 IMPORT_C void BaseConstructL(TInt aAppUiFlags=EStandardApp);
00122
00126 IMPORT_C virtual ~CAknViewAppUi();
00127
00133 IMPORT_C void ActivateLocalViewL(TUid aViewId);
00134
00143 IMPORT_C void ActivateLocalViewL(TUid aViewId,
00144 TUid aCustomMessageId,
00145 const TDesC8& aCustomMessage);
00146
00153 IMPORT_C CAknView* View(TUid aView) const;
00154
00160 IMPORT_C void AddViewL(CAknView* aView);
00161
00167 IMPORT_C void RemoveView(TUid aViewId);
00168
00173 IMPORT_C void ProcessCommandL(TInt aCommand);
00174
00178 IMPORT_C void StopDisplayingMenuBar();
00179
00180
00181 void ViewActivatedL(CAknView* aView,
00182 const TVwsViewId& aPrevViewId,
00183 TUid aCustomMessageId,
00184 const TDesC8& aCustomMessage);
00185
00186 void ViewDeactivated(CAknView* aView);
00187
00196 IMPORT_C void SetSplitViewL( const TUid aView1Id, const TUid aView2Id, const TInt aLeftViewSize );
00197
00205 IMPORT_C void RemoveSplitViewL( const TUid aViewId );
00206
00212 IMPORT_C TBool SplitViewActive() const;
00213
00219 IMPORT_C TUid FocusedView() const;
00220
00227 IMPORT_C TBool ViewShown( const TUid aViewId ) const;
00228
00241 IMPORT_C void EnableLocalScreenClearer( TBool aEnable = ETrue );
00242
00249 TRect ViewRect( const TUid aViewId ) const;
00250
00257 TKeyResponse HandleViewNavigationL( const TKeyEvent& aKeyEvent );
00258
00259 protected:
00260
00265 IMPORT_C void HandleStatusPaneSizeChange();
00266
00273 IMPORT_C void HandleForegroundEventL(TBool aForeground);
00274
00282 IMPORT_C void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination );
00283
00284 private:
00285 static TInt ActivationCallBack(TAny* aThis);
00286 void ActivationTick();
00287 void QueueActivationTick();
00288
00293 CAknViewAppUiExtension* Extension() const;
00294
00300 void ActivateSplitViewL( CViewActivationItem* aItem );
00301
00308 TAknSplitViewContainer* SplitView( const TUid aViewId ) const;
00309
00310 protected:
00311
00312
00313 CAknView* iView;
00314
00315
00316 CAknViews* iViews;
00317
00318 private:
00319 CAknViewShutter* iShutter;
00320 CAknLocalScreenClearer* iClearer;
00321 CAknViewActivationQueue* iActivationQueue;
00322 CIdle* iActivationTick;
00323
00324 CAknViewAppUiExtension* iExtension;
00325 };
00326
00327
00328 #endif