filebrowser/inc/FBToolbar.h
branchRCL_3
changeset 19 b3cee849fa46
parent 18 48060abbbeaf
child 20 fad26422216a
equal deleted inserted replaced
18:48060abbbeaf 19:b3cee849fa46
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef FILEBROWSERTOOLBAR_H
       
    20 #define FILEBROWSERTOOLBAR_H
       
    21 
       
    22 
       
    23 #include <aknappui.h>
       
    24 #include <akntoolbarobserver.h>
       
    25 #include <coecobs.h>    // MCoeControlObserver
       
    26 
       
    27 #ifdef RD_CALEN_ENHANCED_MSK
       
    28 #include <BADESCA.H> // for CDesCArrayFlat 
       
    29 #endif
       
    30 
       
    31 //Forward declarations 
       
    32 class CAknToolbar;
       
    33 class CAknButton;
       
    34 class CCoeControl;
       
    35 class CAknView;
       
    36 class CFileBrowserModel;
       
    37 class CAknInfoPopupNoteController;
       
    38 
       
    39 class CFileBrowserToolbar : public CBase, 
       
    40                             public MAknToolbarObserver,
       
    41                             public MCoeControlObserver
       
    42     {
       
    43     public:
       
    44         /**
       
    45          * 1st phase constructor
       
    46          */
       
    47         static CFileBrowserToolbar* NewL();
       
    48 
       
    49         /**
       
    50          * 1st phase constructor
       
    51          */
       
    52         static CFileBrowserToolbar* NewLC();
       
    53 
       
    54         /**
       
    55          * Destructor
       
    56          */
       
    57         ~CFileBrowserToolbar();
       
    58 
       
    59         /**
       
    60          * 2nd phase constructor
       
    61          */
       
    62         void ConstructL();
       
    63 
       
    64     public:
       
    65         // from MAknToolbarObserver
       
    66 
       
    67         /**
       
    68          * From MAknToolbarObserver
       
    69          */
       
    70         void DynInitToolbarL( TInt aResourceId, CAknToolbar* aToolbar );
       
    71 
       
    72         /**
       
    73          * Handling toolbar key events
       
    74          */
       
    75         void OfferToolbarEventL( TInt aCommand );
       
    76 
       
    77     public:
       
    78         // from MCoeControlObserver
       
    79 
       
    80         /**
       
    81          * Handles toolbar event
       
    82          */
       
    83         void HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType );
       
    84     
       
    85     public:
       
    86         // New functions
       
    87 
       
    88         /**
       
    89          * Updates the toolbar state to default state
       
    90          */
       
    91         void ResetState();
       
    92 
       
    93         /**
       
    94          * Enables the display of toolbar
       
    95          */
       
    96         void ShowToolbarL();
       
    97 
       
    98         /**
       
    99          * Disables the display of toolbar
       
   100          */
       
   101         void HideToolbarL();
       
   102 
       
   103         /**
       
   104          * Returns whether the toolbar is shown or not
       
   105          */
       
   106         TBool IsShown();
       
   107         
       
   108         const TRect Rect() const;
       
   109 
       
   110     private:
       
   111         // New functions
       
   112         CFileBrowserToolbar();
       
   113         
       
   114     // private:
       
   115     public:
       
   116         CFileBrowserModel* iModel;
       
   117         CAknToolbar* iViewerToolbar;
       
   118         TBool iShown;
       
   119         TInt iFirstSelectionIndex;
       
   120         TInt iLastSelectionIndex;
       
   121         CAknInfoPopupNoteController* iInfoPopup;
       
   122         CAknButton* iSelectbutton;
       
   123     };
       
   124 
       
   125 #endif // FILEBROWSERTOOLBAR_H
       
   126 
       
   127 // End of File