00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef AKNVIEW_H
00026 #define AKNVIEW_H
00027
00028
00029 #include <babitflags.h>
00030 #include <coecntrl.h>
00031 #include <eikmobs.h>
00032 #include <coeaui.h>
00033 #include <coeview.h>
00034 #include <eikdef.h>
00035 #include <coemop.h>
00036
00037
00038 class CAknViewAppUi;
00039 class CEikStatusPane;
00040 class CEikButtonGroupContainer;
00041 class CAknControlStack;
00042 class CAknViewExtension;
00043 class CAknToolbar;
00044
00045
00046
00052 class CAknView : public CBase, public MCoeView, public MEikMenuObserver,
00053 public MObjectProvider
00054 {
00055 public:
00056
00060 IMPORT_C CAknView();
00061
00065 IMPORT_C ~CAknView();
00066
00074 IMPORT_C void BaseConstructL(TInt aResId=0);
00075
00082 IMPORT_C void ConstructMenuAndCbaEarlyL();
00083
00089 IMPORT_C void ActivateViewL(const TVwsViewId& aViewId);
00090
00099 IMPORT_C void ActivateViewL(const TVwsViewId& aViewId,
00100 TUid aCustomMessageId,
00101 const TDesC8& aCustomMessage);
00102
00107 IMPORT_C virtual TUid Id() const =0;
00108
00114 IMPORT_C virtual void HandleStatusPaneSizeChange();
00115
00120 IMPORT_C TVwsViewId ViewId() const;
00121
00129 IMPORT_C virtual void ProcessCommandL(TInt aCommand);
00130
00136 IMPORT_C virtual void HandleCommandL(TInt aCommand);
00137
00143 IMPORT_C virtual CEikMenuBar* MenuBar() const;
00144
00152 IMPORT_C TRect ClientRect() const;
00153
00159 IMPORT_C void StopDisplayingMenuBar();
00160
00165 IMPORT_C TBool IsForeground() const;
00166
00172 IMPORT_C virtual void HandleViewRectChange();
00173
00180 IMPORT_C virtual void Redraw() const;
00181
00182
00187 IMPORT_C virtual void AknViewActivatedL(const TVwsViewId& aPrevViewId,
00188 TUid aCustomMessageId,
00189 const TDesC8& aCustomMessage);
00190
00196 void AknViewDeactivated();
00197
00201 void ProcessForegroundEventL(TBool aForeground);
00202
00203 private:
00204 IMPORT_C virtual void Reserved_MtsmPosition();
00205 IMPORT_C virtual void Reserved_MtsmObject();
00206
00207 protected:
00208
00213 IMPORT_C CAknViewAppUi* AppUi() const;
00214
00219 IMPORT_C CEikStatusPane* StatusPane() const;
00220
00227 IMPORT_C CEikButtonGroupContainer* Cba() const;
00228
00239 IMPORT_C virtual void DoActivateL(const TVwsViewId& aPrevViewId,
00240 TUid aCustomMessageId,
00241 const TDesC8& aCustomMessage) = 0;
00242
00247 virtual void DoDeactivate() = 0;
00248
00249 protected:
00250
00259 IMPORT_C void ViewActivatedL(const TVwsViewId& aPrevViewId,
00260 TUid aCustomMessageId,
00261 const TDesC8& aCustomMessage);
00262
00268 IMPORT_C void ViewDeactivated();
00269
00274 IMPORT_C TVwsViewIdAndMessage ViewScreenDeviceChangedL();
00275
00276 protected:
00277
00288 IMPORT_C TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
00289
00295 IMPORT_C MObjectProvider* MopNext();
00296
00297 protected:
00298
00307 IMPORT_C virtual void SetEmphasis(CCoeControl* aMenuControl,
00308 TBool aEmphasis);
00309
00315 IMPORT_C virtual void HandleForegroundEventL(TBool aForeground);
00316
00317 private:
00318 void ConstructMenuAndCbaL(TBool aVisible);
00319
00324 CAknViewExtension* Extension() const;
00325
00326 public:
00327
00332 IMPORT_C CAknToolbar* Toolbar() const;
00333
00338 IMPORT_C void StopDisplayingToolbar();
00339
00346 IMPORT_C TBool ToolbarShownOnViewActivation() const;
00347
00354 IMPORT_C void ShowToolbarOnViewActivation( TBool aVisible );
00355
00363 void SaveToolbarStatus( TBool aVisible, TBool aFocused );
00364
00365 protected:
00366
00367
00368 CCoeEnv* iCoeEnv;
00369
00370 private:
00371 CAknViewAppUi* iAppUi;
00372
00373
00374 struct SAknViewInfo
00375 {
00376 public:
00377 TUint8 iVersion;
00378 TInt iHotKeys;
00379 TInt iMenu;
00380 TInt iCba;
00381 TInt iToolbar;
00382 TInt iExtension;
00383 };
00384
00385
00386 SAknViewInfo iViewInfo;
00387 CEikMenuBar* iMenu;
00388 CEikButtonGroupContainer* iCba;
00389 TBitFlags iFlags;
00390 CAknViewExtension* iExtension;
00391 };
00392
00393
00394 #endif