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.17 %
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 
00229     IMPORT_C CAknNavigationDecorator* CreateVolumeIndicatorL(TInt aResourceId);
00230 
00238     IMPORT_C CAknNavigationDecorator* CreateEditorIndicatorContainerL();
00239 
00248     IMPORT_C void PushDefaultL( TBool aAllowDuplicates = EFalse );
00249 
00262     IMPORT_C void PushL( CAknNavigationDecorator& aNaviPaneControl );
00263 
00272     IMPORT_C void Pop();
00273 
00280     IMPORT_C void Pop( CAknNavigationDecorator* aControl );
00281 
00290     IMPORT_C CAknNavigationDecorator* Top();
00291 
00308     IMPORT_C CAknNavigationDecorator* Top(TBool aIgnoreFepEditorIndicator) const;
00309 
00310 
00324     IMPORT_C TInt ReplaceL( CAknNavigationDecorator& aToBeReplaced,
00325                             CAknNavigationDecorator& aReplacement );
00326 
00335     IMPORT_C CAknNavigationDecorator* ResourceDecorator();
00336 
00343     CFbsBitmap& NaviArrowBitmap( TInt aId );
00344 
00345 public:
00346 
00360     IMPORT_C void SetPreferredNaviDecoratorLayoutStyle( TInt aLayoutStyle );
00361 
00366     IMPORT_C static TInt ColorScheme();
00367 
00373     void NotifyNaviWipeStatusL();
00374 
00380     static TInt CurrentNaviWipeBitmap();
00381 
00389     IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00390 
00391 protected: // from CCoeControl
00392 
00398     IMPORT_C virtual void SizeChanged();
00399 
00408     IMPORT_C virtual void HandleResourceChange(TInt aType);
00409 
00417     IMPORT_C virtual TInt CountComponentControls() const;
00418 
00427     IMPORT_C virtual CCoeControl* ComponentControl(TInt aIndex) const;
00428 
00429 protected: // from MCoeControlObserver
00430 
00439     IMPORT_C void HandleControlEventL(CCoeControl* aControl,
00440                                       TCoeEvent aEventType);
00441 
00442 private: // from CCoeControl
00443 
00444     IMPORT_C virtual void Draw(const TRect& aRect) const;
00445 
00446 private:
00447 
00451     IMPORT_C void* ExtensionInterface( TUid aInterface );
00452 
00453 public:
00454 
00464     TBool NaviWipeUsed() const;
00465 
00471     CFbsBitmap* NaviColorBitmap() const;
00472 
00480     static void SetBackgroundContextAttributes( CCoeControl* aControl,
00481                                                 TBool aNaviWipeUsed );
00482 
00483 private:
00484     TBool IsFepOwnedEditorIndicatorControl(
00485         CAknNavigationDecorator* aDecorator ) const;
00486 
00487     void HandleVisibilityOfNonFepOwnedIndicatorControl(
00488         CAknNavigationDecorator* aDecorator, TBool aVisible);
00489 
00500     TBool DrawDefaultNaviWipe(CWindowGc& aGc, const TRect& aRect) const;
00501 
00512     TBool DrawDefaultNaviSolid(CWindowGc& aGc, const TRect& aRect) const;
00513 
00525     TBool DrawSkinnedNaviWipe( CWindowGc& aGc,
00526                                const TRect& aRect,
00527                                MAknsSkinInstance* aSkin,
00528                                MAknsControlContext* aCc ) const;
00529 
00541     TBool DrawSkinnedNaviSolid( CWindowGc& aGc,
00542                                 const TRect& aRect,
00543                                 MAknsSkinInstance* aSkin,
00544                                 MAknsControlContext* aCc ) const;
00545 
00550     void LoadNaviColorBitmapL();
00551 
00552     void SetContainerWindowNonFading( TBool aNonFading );
00553 
00554 protected: // from CCoeControl
00555 
00573     TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
00574 
00575 private:
00576 
00577     CEikStatusPaneBase* iStatusPane;
00578 
00579     CAknNavigationDecorator* iNaviDecoratorFromResource;
00580 
00581     typedef CArrayPtrFlat<CAknNavigationDecorator> CAknNaviPaneStack;
00582     CAknNaviPaneStack* iNaviPaneControls;
00583 
00584     CFbsBitmap* iNaviArrowBitmap[4];
00585 
00586     TInt  iSpare;
00587     CAknNavigationControlContainerExtension* iExtension;
00588     };
00589 
00590 // C_AKNNAVI_H
00591 #endif

Copyright © Nokia Corporation 2001-2008
Back to top