basiclocationinfodisplay/blid/ui/inc/CBlidSavedWayptsContainer.h
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2005 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:  Blid application main view's container class definition.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef BLIDSAVEDWAYPTSCONTAINER_H
       
    21 #define BLIDSAVEDWAYPTSCONTAINER_H
       
    22 
       
    23 // INCLUDES
       
    24 #include "CBlidBaseContainer.h"
       
    25 #include "CBlidBaseView.h"
       
    26 #include "coecobs.h"
       
    27 
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class CAknSingleGraphicStyleListBox;
       
    31 class CEikColumnListBox;
       
    32 class MBlidLocation;
       
    33 class MBlidSettings;
       
    34 class MBlidRouter;
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38 *  CBlidMainContainer  container control class.
       
    39 *
       
    40 */
       
    41 class CBlidSavedWayptsContainer : public CBlidBaseContainer
       
    42     {
       
    43     public: // Constructors and destructor
       
    44         /**
       
    45          * Two-phased constructor
       
    46 		 * @param aKeyProcessor
       
    47 		 * @param aParent
       
    48 		 * @param aRect A rectangle for drawing.
       
    49          * @param aLocation A pointer to Location model
       
    50          * @param aSettings A pointer to Settings model
       
    51 		 * @return The newly created object.
       
    52 		 */
       
    53 		static CBlidSavedWayptsContainer* NewL( MKeyProcessor& aKeyProcessor,
       
    54                                         MObjectProvider* aParent,
       
    55 		                                const TRect& aRect,
       
    56                                         MBlidLocation* aLocation,
       
    57                                         MBlidSettings* aSettings,
       
    58                                         MBlidRouter* aRouter,
       
    59                                         CBlidBaseView& aView);
       
    60         /**
       
    61          * Destructor.
       
    62          */
       
    63         ~CBlidSavedWayptsContainer();
       
    64 
       
    65     private:
       
    66         /**
       
    67          * By default Symbian 2nd phase constructor is private.
       
    68          * @param aRect Frame rectangle for container.
       
    69          * @param aLocation A pointer to Location model
       
    70          * @param aSettings A pointer to Settings model
       
    71          */
       
    72         void ConstructL( const TRect& aRect, 
       
    73                         MBlidLocation* aLocation,
       
    74                         MBlidSettings* aSettings,MBlidRouter* aRouter );
       
    75 
       
    76         /**
       
    77          * C++ default constructor.
       
    78          * @param aKeyProcessor
       
    79          */
       
    80         CBlidSavedWayptsContainer( MKeyProcessor& aKeyProcessor, CBlidBaseView& aView );
       
    81 
       
    82     public: // New functions
       
    83         /**
       
    84          * Update listbox
       
    85          */ 
       
    86         void UpdateL();
       
    87         
       
    88         #ifdef RD_SCALABLE_UI_V2 
       
    89        /**
       
    90         * Sets listbox observer.
       
    91         * @param aObserver observer object.
       
    92         */
       
    93         void SetListBoxObserver( MEikListBoxObserver* aObserver );
       
    94         #endif // RD_SCALABLE_UI_V2         
       
    95 
       
    96     public: // from CCoeControl
       
    97         TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
       
    98                                      TEventCode aType);
       
    99         void HandleMarkCommandL(TInt aCommand);
       
   100         TInt SelectedRow() const;
       
   101         void FocusChanged(TDrawNow aDrawNow);
       
   102 
       
   103     private: // From CCoeControl
       
   104         void SizeChanged();
       
   105         TInt CountComponentControls() const;
       
   106         CCoeControl* ComponentControl(TInt aIndex) const;
       
   107         void HandleResourceChange(TInt aType);
       
   108         void UpdateIconsL();
       
   109         
       
   110         void SetSelectedRow(TInt aIndex) const;
       
   111         void MakeEmptyTextListBoxL( TInt aResourceText );
       
   112         
       
   113     private: // New functions
       
   114         /**
       
   115          * Creates owned list box.
       
   116          * @param aLocation A pointer to Location model
       
   117          * @param aSettings a pointer to Settings model
       
   118          */
       
   119         void CreateListboxL( MBlidLocation* aLocation, 
       
   120                              MBlidSettings* aSettings,MBlidRouter* aRouter );
       
   121         
       
   122         
       
   123     private: //data
       
   124     
       
   125         /// Own: Decorator class for navigation pane controls.
       
   126         CAknNavigationDecorator* iDecoratedTabGroup;
       
   127         
       
   128         CBlidBaseView& iView;
       
   129 
       
   130     public:
       
   131             /// Own: List box.
       
   132         CAknSingleGraphicStyleListBox* iListBox;
       
   133 
       
   134         
       
   135     };
       
   136 
       
   137 #endif
       
   138 
       
   139 // End of File