aknnavi.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name        : aknnavi.h
00004 *  Part of     : UI Framework / AVKON
00005 *  Description : A default control in the status pane's navigation pane.
00006 *  Version     : %version: tr1s60#9.1.19 %
00007 *
00008 *  Copyright © 2002-2007 Nokia.  All rights reserved.
00009 *  This material, including documentation and any related computer
00010 *  programs, is protected by copyright controlled by Nokia.  All
00011 *  rights are reserved.  Copying, including reproducing, storing,
00012 *  adapting or translating, any or all of this material requires the
00013 *  prior written consent of Nokia.  This material also contains
00014 *  confidential information which may not be disclosed to others
00015 *  without the prior written consent of Nokia.
00016 * ============================================================================
00017 */
00018 
00019 #ifndef C_AKNNAVI_H
00020 #define C_AKNNAVI_H
00021 
00022 #include <akncontrol.h>
00023 #include <coeccntx.h>
00024 #include <aknvolumecontrol.h>
00025 
00026 // FORWARD DECLARATIONS
00027 class CAknNavigationDecorator;
00028 class CEikStatusPaneBase;
00029 class CFbsBitmap;
00030 class MAknTabObserver;
00031 class CAknNavigationControlContainerExtension;
00032 class MAknsControlContext;
00033 
00034 class MAknNavigationDecoratorInterface
00035     {
00036 public:
00037     virtual ~MAknNavigationDecoratorInterface() { }
00038     virtual CCoeControl* DecoratedControl() = 0;
00039     };
00040 
00041 class MAknNavigationContainerInterface
00042     {
00043 public:
00044     virtual ~MAknNavigationContainerInterface() { }
00045     virtual CAknNavigationDecorator* CreateMessageLabelL(const TDesC& aText) = 0;
00046     virtual CAknNavigationDecorator* CreateTabGroupL() = 0;
00047     virtual void PushL( CAknNavigationDecorator& ) = 0;
00048     virtual void Pop() = 0;
00049     };
00050 
00054 class CAknNavigationControlContainer : public CAknControl,
00055                                        public MCoeControlContext,
00056                                        public MCoeControlObserver,
00057                                        public MAknNavigationContainerInterface
00058     {
00059 
00060 public:
00061 
00062     DECLARE_TYPE_ID( 0x101F8740 )
00063 
00064 public:
00065 
00071     IMPORT_C CAknNavigationControlContainer();
00072 
00078     IMPORT_C ~CAknNavigationControlContainer();
00079 
00083     IMPORT_C void ConstructL();
00084 
00092     IMPORT_C void ConstructFromResourceL( TResourceReader& aReader );
00093 
00101     IMPORT_C CAknNavigationDecorator*
00102                     ConstructNavigationDecoratorFromResourceL(
00103                                                 TResourceReader& aReader);
00104 
00112     IMPORT_C CAknNavigationDecorator* CreateTabGroupL();
00113 
00121     IMPORT_C CAknNavigationDecorator* CreateTabGroupL(
00122                                             MAknTabObserver* aObserver);
00123 
00132     IMPORT_C CAknNavigationDecorator* CreateTabGroupL(
00133                                                 TResourceReader& aReader);
00134 
00144     IMPORT_C CAknNavigationDecorator* CreateTabGroupL(
00145                                             TResourceReader& aReader,
00146                                             MAknTabObserver* aObserver);
00147 
00156     IMPORT_C CAknNavigationDecorator* CreateNavigationLabelL(
00157                                             const TDesC& aText = KNullDesC);
00158 
00167     IMPORT_C CAknNavigationDecorator* CreateNavigationLabelL(
00168                                                     TResourceReader& aReader);
00169 
00182     IMPORT_C CAknNavigationDecorator* CreateNavigationImageL(
00183                                         const CFbsBitmap* aBitmap = NULL,
00184                                         const CFbsBitmap* aMaskBitmap = NULL);
00185 
00195     IMPORT_C CAknNavigationDecorator* CreateNavigationImageL(
00196                                             TResourceReader& aReader);
00197 
00207     IMPORT_C CAknNavigationDecorator* CreateMessageLabelL(
00208                                         const TDesC& aText = KNullDesC);
00209 
00219     IMPORT_C CAknNavigationDecorator* CreateMessageLabelL(
00220                                             TResourceReader& aReader);
00221 
00231     IMPORT_C CAknNavigationDecorator* CreateVolumeIndicatorL(TInt aResourceId);
00232 
00240     IMPORT_C CAknNavigationDecorator* CreateEditorIndicatorContainerL();
00241 
00250     IMPORT_C void PushDefaultL( TBool aAllowDuplicates = EFalse );
00251 
00264     IMPORT_C void PushL( CAknNavigationDecorator& aNaviPaneControl );
00265 
00274     IMPORT_C void Pop();
00275 
00282     IMPORT_C void Pop( CAknNavigationDecorator* aControl );
00283 
00292     IMPORT_C CAknNavigationDecorator* Top();
00293 
00310     IMPORT_C CAknNavigationDecorator* Top(TBool aIgnoreFepEditorIndicator) const;
00311 
00312 
00326     IMPORT_C TInt ReplaceL( CAknNavigationDecorator& aToBeReplaced,
00327                             CAknNavigationDecorator& aReplacement );
00328 
00337     IMPORT_C CAknNavigationDecorator* ResourceDecorator();
00338 
00345     CFbsBitmap& NaviArrowBitmap( TInt aId );
00346 
00347 public:
00348 
00362     IMPORT_C void SetPreferredNaviDecoratorLayoutStyle( TInt aLayoutStyle );
00363 
00368     IMPORT_C static TInt ColorScheme();
00369 
00374     void NotifyNaviWipeStatusL();
00375 
00381     static TInt CurrentNaviWipeBitmap();
00382 
00390     IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00391     
00396     void HandleLosingForeground();
00397     
00402     void HandleGainingForegroundL();
00403 
00404 protected: // from CCoeControl
00405 
00411     IMPORT_C virtual void SizeChanged();
00412 
00421     IMPORT_C virtual void HandleResourceChange(TInt aType);
00422 
00430     IMPORT_C virtual TInt CountComponentControls() const;
00431 
00440     IMPORT_C virtual CCoeControl* ComponentControl(TInt aIndex) const;
00441 
00442 protected: // from MCoeControlObserver
00443 
00452     IMPORT_C void HandleControlEventL(CCoeControl* aControl,
00453                                       TCoeEvent aEventType);
00454 
00455 private: // from CCoeControl
00456 
00457     IMPORT_C virtual void Draw(const TRect& aRect) const;
00458 
00459 private:
00460 
00464     IMPORT_C void* ExtensionInterface( TUid aInterface );
00465 
00466 public:
00467 
00477     TBool NaviWipeUsed() const;
00478 
00484     CFbsBitmap* NaviColorBitmap() const;
00485 
00493     static void SetBackgroundContextAttributes( CCoeControl* aControl,
00494                                                 TBool aNaviWipeUsed );
00495 
00496 private:
00497     TBool IsFepOwnedEditorIndicatorControl(
00498         CAknNavigationDecorator* aDecorator ) const;
00499 
00500     void HandleVisibilityOfNonFepOwnedIndicatorControl(
00501         CAknNavigationDecorator* aDecorator, TBool aVisible);
00502 
00513     TBool DrawDefaultNaviWipe(CWindowGc& aGc, const TRect& aRect) const;
00514 
00525     TBool DrawDefaultNaviSolid(CWindowGc& aGc, const TRect& aRect) const;
00526 
00538     TBool DrawSkinnedNaviWipe( CWindowGc& aGc,
00539                                const TRect& aRect,
00540                                MAknsSkinInstance* aSkin,
00541                                MAknsControlContext* aCc ) const;
00542 
00554     TBool DrawSkinnedNaviSolid( CWindowGc& aGc,
00555                                 const TRect& aRect,
00556                                 MAknsSkinInstance* aSkin,
00557                                 MAknsControlContext* aCc ) const;
00558 
00563     void LoadNaviColorBitmapL();
00564 
00565     void SetContainerWindowNonFading( TBool aNonFading );
00566     
00567     TRect VolumePopupRect();
00568 
00569 protected: // from CCoeControl
00570 
00588     TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
00589 
00590 private:
00591 
00592     CEikStatusPaneBase* iStatusPane;
00593 
00594     CAknNavigationDecorator* iNaviDecoratorFromResource;
00595 
00596     typedef CArrayPtrFlat<CAknNavigationDecorator> CAknNaviPaneStack;
00597     CAknNaviPaneStack* iNaviPaneControls;
00598 
00599     CFbsBitmap* iNaviArrowBitmap[4];
00600 
00601     TInt  iSpare;
00602     CAknNavigationControlContainerExtension* iExtension;
00603     };
00604 
00605 #endif // C_AKNNAVI_H

Copyright © Nokia Corporation 2001-2007
Back to top