vpnui/vpnmanagementui/inc/vpnmanagementuicontainer.h
branchRCL_3
changeset 41 e06095241a65
parent 0 33413c0669b9
equal deleted inserted replaced
40:473321461bba 41:e06095241a65
       
     1 /*
       
     2 * Copyright (c) 2003-2006 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:   Declaration of the CVpnManagementUiContainer class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __VPNMANAGEMENTUICONTAINER_H__
       
    21 #define __VPNMANAGEMENTUICONTAINER_H__
       
    22 
       
    23 // INCLUDES
       
    24 #include <coecntrl.h>
       
    25 #include "vpnmanagementuiview.h"
       
    26  
       
    27 // FORWARD DECLARATIONS
       
    28 class CEikTextListBox;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  CVpnManagementUiContainer  container control class.
       
    34 *  
       
    35 */
       
    36 class CVpnManagementUiContainer : public CCoeControl, public MCoeControlObserver
       
    37     {
       
    38     /**
       
    39     * Container needs to get access to CVpnManagementUiView's DoActivateL
       
    40     */
       
    41     friend void CVpnManagementUiView::DoActivateL(const TVwsViewId&, TUid, const TDesC8&);
       
    42 
       
    43     public: // Constructors and destructor
       
    44         
       
    45         /**
       
    46         * Overrided Default constructor
       
    47         */
       
    48         CVpnManagementUiContainer(CVpnManagementUiView& aParent, CVpnUiLoader& aLoader);
       
    49 
       
    50         /**
       
    51         * Destructor.
       
    52         */
       
    53         ~CVpnManagementUiContainer();
       
    54 
       
    55         /**
       
    56         * Draws listbox
       
    57         */
       
    58         void DrawListBoxL(TInt aCurrentPosition, TInt aTopItem);
       
    59  
       
    60  		/**
       
    61 		* From CCoeControl
       
    62 		*/
       
    63 		void HandleResourceChange( TInt aType );
       
    64            
       
    65 
       
    66     public: // New functions
       
    67 
       
    68     public: // Functions from base classes
       
    69 
       
    70     private: // Functions from base classes
       
    71 
       
    72         /**
       
    73         * Symbian OS default constructor.
       
    74         * @param aRect Frame rectangle for container.
       
    75         */
       
    76         void ConstructL(const TRect& aRect);
       
    77 
       
    78         /**
       
    79         * From CoeControl,SizeChanged.
       
    80         */
       
    81         void SizeChanged();
       
    82 
       
    83         /**
       
    84         * From CoeControl,CountComponentControls.
       
    85         */
       
    86         TInt CountComponentControls() const;
       
    87 
       
    88         /**
       
    89         * From CCoeControl,ComponentControl.
       
    90         */
       
    91         CCoeControl* ComponentControl(TInt aIndex) const;
       
    92 
       
    93         /**
       
    94         * Handles control events
       
    95         *
       
    96         * event handling section
       
    97         * e.g Listbox events
       
    98         */
       
    99         void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
       
   100         
       
   101         /**
       
   102         * Handles the key events OK button, arrow keys, delete key.
       
   103         */
       
   104         TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
       
   105 
       
   106         void TitlePaneTextsL();
       
   107 
       
   108         /**
       
   109         * Creates listbox, sets empty listbox text
       
   110         */
       
   111         void CreateListBoxL();
       
   112 
       
   113         void ShowItemsL(); 
       
   114 
       
   115         #ifdef __SERIES60_HELP
       
   116         /**
       
   117         * This function is called when Help application is launched.  
       
   118         * (other items were commented in a header).
       
   119         */
       
   120         void GetHelpContext(TCoeHelpContext& aContext) const;
       
   121         #endif //__SERIES60_HELP
       
   122 
       
   123     public: //data
       
   124         
       
   125         CEikTextListBox* iListBox;  
       
   126 
       
   127         /**
       
   128         * To get hold of View
       
   129         */
       
   130         CVpnManagementUiView& iParent;
       
   131 
       
   132         /**
       
   133         * To get hold of CVpnUiLoader
       
   134         */
       
   135         CVpnUiLoader& iLoader;
       
   136 
       
   137         /**
       
   138         * To store the list item count
       
   139         */
       
   140         TInt iListItemCount;
       
   141 
       
   142     };
       
   143 
       
   144 #endif // __VPNUIMANAGEMENTCONTAINER_H__
       
   145 
       
   146 // End of File