S60 3rd Edition API Reference: aknnavide.h Source File

aknnavide.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : aknnavide.h
00004 *  Part of  : AVKON
00005 *
00006 *  Description:
00007 *     Decorator class for navigation pane controls. 
00008 *     The class, for example, decorates navigation pane controls with 
00009 *     navi arrows.
00010 *     
00011 *  Version:
00012 *
00013 *  Copyright © 2002 Nokia Corporation.
00014 *  This material, including documentation and any related 
00015 *  computer programs, is protected by copyright controlled by 
00016 *  Nokia Corporation. All rights are reserved. Copying, 
00017 *  including reproducing, storing,  adapting or translating, any 
00018 *  or all of this material requires the prior written consent of 
00019 *  Nokia Corporation. This material also contains confidential 
00020 *  information which may not be disclosed to others without the 
00021 *  prior written consent of Nokia Corporation.
00022 * ============================================================================
00023 */
00024 
00025 #ifndef AKNNAVIDE_H
00026 #define AKNNAVIDE_H
00027 
00028 #include <AknControl.h>
00029 #include <coeccntx.h>
00030 #include <e32std.h>
00031 #include <coecntrl.h>
00032 
00033 #include <aknnaviobserver.h>
00034 #include <aknnavi.h>
00035 
00036 class CEikScrollButton;
00037 class CAknTabGroup;
00038 class MAknNaviDecoratorObserver;
00039 #start_since SINCE_3_1_SDK
00040 class CAknNavigationDecoratorExtension;
00041 #end_since SINCE_3_1_SDK
00042 
00047 class CAknNavigationDecorator :  public CAknControl, 
00048                                  public MCoeControlObserver,
00049                                  public MAknNavigationDecoratorInterface
00050         {
00051         
00052 friend class CAknNavigationControlContainer;
00053 
00054 public:
00055 
00059     enum TScrollButton 
00060         {
00062         ELeftButton =  0x0001,
00063 
00065         ERightButton = 0x0002
00066         };
00067 
00071     enum TControlType
00072         {
00074         ENotSpecified,
00075 
00077         ETabGroup,
00078         
00080         ENaviLabel,
00081         
00083         ENaviImage,
00084         
00086         EHintText,
00087         
00089         EEditorIndicator,
00090         
00092         ENaviVolume
00093         };
00094 
00095 public:
00096 
00108     IMPORT_C static CAknNavigationDecorator* NewL(
00109         CAknNavigationControlContainer* aNavigationControlContainer, 
00110         CCoeControl* aDecoratedControl, 
00111         TControlType aType = ENotSpecified);
00112     
00116         IMPORT_C ~CAknNavigationDecorator();
00117 
00124     IMPORT_C CCoeControl* DecoratedControl();
00125 
00133         IMPORT_C void MakeScrollButtonVisible(TBool aVisible);
00134     
00140         IMPORT_C TBool ScrollButtonVisible() const;
00141     
00151     IMPORT_C void SetScrollButtonDimmed(TScrollButton aButton, TBool aDimmed);
00152     
00160     IMPORT_C TBool IsScrollButtonDimmed(TScrollButton aButton) const;
00161     
00167     IMPORT_C void SetControlType(TControlType aType);
00168     
00174     IMPORT_C TControlType ControlType() const;
00175  
00181     IMPORT_C virtual void SetNaviDecoratorObserver(
00182                         MAknNaviDecoratorObserver* aObserver);
00183 
00189     void SetNaviStack(CAknNavigationControlContainer* aContainer);
00190 
00198     IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00199     
00203     enum TAknNaviControlLayoutStyle
00204         {
00206         ENaviControlLayoutNormal = 0x1,
00207 
00209         ENaviControlLayoutNarrow = 0x2        
00210         };
00211 
00215     enum TAknNaviControlLayoutMode
00216         {
00222         ENaviControlLayoutModeAutomatic = 0x400,
00223 
00228         ENaviControlLayoutModeForced = 0x800        
00229         };
00230 
00231         
00250     IMPORT_C void SetNaviControlLayoutStyle(TAknNaviControlLayoutStyle aStyle);
00251 
00259     IMPORT_C TAknNaviControlLayoutStyle NaviControlLayoutStyle();
00260 
00272     IMPORT_C TBool NaviControlLayoutStyleSupported(TAknNaviControlLayoutStyle 
00273                                                    aStyle);
00274 
00284     IMPORT_C void SetNaviControlLayoutMode(TAknNaviControlLayoutMode aMode);
00285     
00296     IMPORT_C TAknNaviControlLayoutMode NaviControlLayoutMode();
00297         
00298 
00299 protected: // from CCoeControl
00300 
00306     IMPORT_C virtual void SizeChanged();
00307 
00315     IMPORT_C virtual TInt CountComponentControls() const;
00316 
00325     IMPORT_C virtual CCoeControl* ComponentControl(TInt aIndex) const;
00326 
00327 public: // from CCoeControl
00328 #start_since SINCE_3_1_SDK
00329 
00335     IMPORT_C virtual void HandleResourceChange(TInt aType);
00336 #end_since SINCE_3_1_SDK
00337 protected: // from MCoeControlObserver
00338 
00347     IMPORT_C void HandleControlEventL(CCoeControl* aControl, 
00348                                       TCoeEvent aEventType);
00349 
00350 private:
00351 
00355     IMPORT_C void* ExtensionInterface( TUid aInterface );
00356 
00357 private:
00358 
00362     IMPORT_C void ConstructL();
00363 
00364 private:
00365 
00369     IMPORT_C virtual void Draw(const TRect& aRect) const;
00370 
00374     TRect ParentRect();
00375 
00376 public:
00377 
00386     static TRect DecoratedControlRect(TInt aControlType);
00387 
00394     static TRect DecoratedControlNarrowRect(TInt aControlType);
00395 
00396 private:
00397 
00406     static TRect DecoratedDefaultControlRect();
00407 
00416     static TRect DecoratedTabControlRect();
00417 
00426     static TRect DecoratedVolumeControlRect();
00427 
00431     void SizeChangedInNormalLayout();
00432 
00436     void SizeChangedInNarrowLayout();
00437     
00442     void InitLayoutStyleTimer();
00443 
00447     void CancelLayoutStyleTimer();    
00448 
00453     static TInt LayoutStyleEvent(TAny * aPtr);
00454 
00459     void DoLayoutStyleEvent();
00460     
00461     void StartTimerL();
00462     
00463     void SmallDirectionIndicationL();
00464     
00465     static TInt IndicationDrawCallbackL( TAny* aThis );
00466     
00467     
00468 protected:
00469 
00474     CCoeControl* iDecoratedControl;
00475 
00479     CAknNavigationControlContainer* iContainer;
00480 
00484     MAknNaviDecoratorObserver* iNaviDecoratorObserver;
00485 
00486 private:
00487         TBool iNaviArrowsVisible;
00488         TBool iNaviArrowLeftDimmed;
00489         TBool iNaviArrowRightDimmed;
00490     TControlType iControlType;        
00491     TPoint iArrowLeftPos;
00492     TSize iArrowLeftSize;
00493     TPoint iArrowRightPos;
00494     TSize iArrowRightSize;
00495     
00496     TInt iLayoutFlags;
00497     CPeriodic* iLayoutStyleTimer;     
00498 
00499     CAknNavigationDecoratorExtension* iExtension;
00500     
00501     TInt iSpare;
00502         };
00503 
00504 // AKNNAVIDE_H
00505 #endif

Copyright © Nokia Corporation 2001-2007
Back to top