browserui/browser/FavouritesInc/BrowserBookmarksContainer.h
changeset 0 84ad3b177aa3
child 1 57d5b8e231c4
equal deleted inserted replaced
-1:000000000000 0:84ad3b177aa3
       
     1 /*
       
     2 * Copyright (c) 2002-2007 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 the License "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 *      Declaration of class CBrowserBookmarksContainer.
       
    16 *      
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef BROWSER_BOOKMARKS_CONTAINER_H
       
    22 #define BROWSER_BOOKMARKS_CONTAINER_H
       
    23 
       
    24 // INCLUDE FILES
       
    25 
       
    26 #include "BrowserFavouritesContainer.h"
       
    27 #include <bldvariant.hrh>
       
    28 
       
    29 // FORWARD DECLARATION
       
    30 
       
    31 class CBrowserBookmarksGotoPane;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 * Top-level control, which contains all component controls in the bookmarks view.
       
    37 */
       
    38 class CBrowserBookmarksContainer : public CBrowserFavouritesContainer
       
    39 	{
       
    40 	public :	// construction, destruction
       
    41 
       
    42         /**
       
    43         * Two-phased constructor. Leaves on failure.
       
    44         * @param aRect Rectangle of the control (available client rect).
       
    45         * @param aView The view to which this container belongs.
       
    46         * @return The constructed container.
       
    47         */
       
    48 		static CBrowserBookmarksContainer* NewL(
       
    49             const TRect& aRect,
       
    50             CBrowserFavouritesView& aView);
       
    51 
       
    52         /**
       
    53         * Destructor.
       
    54         */
       
    55         virtual ~CBrowserBookmarksContainer();
       
    56 
       
    57     public:     // new methods
       
    58 
       
    59         /**
       
    60         * Activate Goto Mode
       
    61         */
       
    62         
       
    63         void SetGotoActiveL();
       
    64         
       
    65         /**
       
    66         * Deactivate Goto Mode
       
    67         */
       
    68 
       
    69 		void SetGotoInactiveL();
       
    70 
       
    71     public:     // access to components
       
    72 
       
    73          /**
       
    74         * Get the Goto Pane.
       
    75         * @return The Goto Pane.
       
    76         */
       
    77         inline CBrowserBookmarksGotoPane* GotoPane() const;
       
    78 
       
    79 
       
    80         /**
       
    81         * Check if we are in Goto Mode
       
    82         * @return ETrue if we are in Goto Mode; EFalse otherwise.
       
    83         */
       
    84         inline TBool GotoPaneActive() const;
       
    85         
       
    86     public:	    // from CBrowserFavouritesContainer
       
    87 
       
    88         /**
       
    89         * Count component controls.
       
    90         * @return Number of component controls.
       
    91         */
       
    92 		virtual TInt CountComponentControls() const;
       
    93 
       
    94         /**
       
    95         * Get a component control by index.
       
    96         * @param aIndex Index of component control to be returned.
       
    97         * @return Component control or NULL.
       
    98         */
       
    99 		virtual CCoeControl* ComponentControl( TInt aIndex ) const;
       
   100 
       
   101         /**
       
   102         * Handle size change, lay out and draw components.
       
   103         */
       
   104 		virtual void SizeChanged();
       
   105 
       
   106         /**
       
   107         * Handle key event.
       
   108         * @param aKeyEvent The key event.
       
   109         * @param aType Key event type.
       
   110         * @return Response (was the key event consumed?).
       
   111         */
       
   112 		virtual TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
       
   113 
       
   114         /**
       
   115         * Handle cursor change.
       
   116         * @param aListBox Listbox in which the cursor has changed.
       
   117         */
       
   118         void HandleCursorChangedL( CEikListBox* aListBox );
       
   119 
       
   120         /**
       
   121         * Check if some editing is in progress. 
       
   122         */
       
   123         TBool IsEditing();
       
   124 
       
   125         /**
       
   126         * Get tab index belonging to this view.
       
   127         * @return The tab index.
       
   128         */
       
   129         TInt TabIndex();
       
   130 
       
   131         /**
       
   132         * Get resource id for text to be displayed in the empty listbox.
       
   133         * @return Listbox empty text resource id.
       
   134         */
       
   135         TInt ListboxEmptyTextResourceId();
       
   136 
       
   137          /**
       
   138         * Get resource id for text to be displayed in the title.
       
   139         * @return Listbox empty text resource id.
       
   140         */
       
   141         TInt TitleResourceId();
       
   142         
       
   143         /**
       
   144         * Handles focus changing
       
   145         * @param aDrawNow 
       
   146         */
       
   147         void FocusChanged( TDrawNow aDrawNow );
       
   148 
       
   149 
       
   150         /**
       
   151         * HandlePointerEventL
       
   152         * From CCoeControl
       
   153         *
       
   154         */
       
   155         void HandlePointerEventL(const TPointerEvent& /*aPointerEvent*/);
       
   156 
       
   157     protected:  // Construct / destruct
       
   158 
       
   159         /**
       
   160         * Constructor.
       
   161         */
       
   162         CBrowserBookmarksContainer();
       
   163 
       
   164         /**
       
   165         * Called by ConstructL. Leaves on failure.
       
   166         * Derived classes can override this to add more controls.
       
   167         * @param aRect Rectangle of the control (available client rect).
       
   168         * @param aView The view to which this container belongs.
       
   169         * @return The constructed container.
       
   170         */
       
   171 		virtual void ConstructComponentControlsL(
       
   172             const TRect& aRect,
       
   173             CBrowserFavouritesView& aView );
       
   174         
       
   175 	protected:  // from CBrowserFavouritesContainer
       
   176 
       
   177         /**
       
   178         * Create icon handler for the listbox.
       
   179         * @return Icon handler for the listbox.
       
   180         */
       
   181         MBrowserFavouritesListboxIconHandler* CreateListboxIconHandlerL();
       
   182 #ifdef __SERIES60_HELP
       
   183 	private:
       
   184         /**
       
   185         * Get help context for the control.
       
   186         * @param aContext The context that is filled in.
       
   187         * @return None.
       
   188         */
       
   189         void GetHelpContext( TCoeHelpContext& aContext ) const;
       
   190 
       
   191 #endif //__SERIES60_HELP
       
   192 
       
   193     private:    // data
       
   194 
       
   195         /**
       
   196         * Goto Pane.
       
   197         */
       
   198         CBrowserBookmarksGotoPane* iGotoPane;
       
   199         
       
   200         
       
   201         /**
       
   202         * ETrue if Goto pane is active, EFalse by default
       
   203         */
       
   204         TBool iGotoPaneActive;
       
   205         
       
   206         TBool iSelectionKeyDownPressed;
       
   207         TBool iSelectionKeyLongPress;
       
   208 	};
       
   209 
       
   210 #include "BrowserBookmarksContainer.inl"
       
   211 
       
   212 #endif
       
   213 
       
   214 // End of file