stifui/avkon/stifui/inc/TestCaseMenuContainer.h
branchRCL_3
changeset 20 48060abbbeaf
parent 19 d40e813b23c0
child 21 b3cee849fa46
equal deleted inserted replaced
19:d40e813b23c0 20:48060abbbeaf
     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: This file contains CTestCaseMenuContainer class 
       
    15 * declaration.
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef CTESTCASEMENUCONTAINER_H
       
    20 #define CTESTCASEMENUCONTAINER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <coecntrl.h>
       
    24 #include <eiklbo.h>
       
    25 
       
    26    
       
    27 // FORWARD DECLARATIONS
       
    28 class CEikTextListBox;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  CTestCaseMenuContainer  container control class.
       
    34 *  
       
    35 */
       
    36 class CTestCaseMenuContainer : public CCoeControl, public MEikListBoxObserver  /* MCoeControlObserver */
       
    37     {
       
    38     public: // Constructors and destructor
       
    39         
       
    40         /**
       
    41         * Symbian OS default constructor.
       
    42         * @param aRect Frame rectangle for container.
       
    43         */
       
    44         void ConstructL(const TRect& aRect);
       
    45 
       
    46         /**
       
    47         * Destructor.
       
    48         */
       
    49         ~CTestCaseMenuContainer();
       
    50 
       
    51     public: // New functions
       
    52 
       
    53         /**
       
    54         * Get currently selected items index.
       
    55         * @return Current item index.
       
    56         */	
       
    57 		TInt GetActiveLine();
       
    58 		
       
    59         /**
       
    60          * Stores current position of focus of iListBox to the CAppUiAppUi object
       
    61          */
       
    62 		void SaveActiveLine();
       
    63     
       
    64     public: // Functions from base classes
       
    65      
       
    66         /**
       
    67         * Method HandleSelectedListItemL handles valix index.
       
    68         * @param        TInt aIndex
       
    69         * @return       nothing
       
    70         */
       
    71         void HandleSelectedListItemL( TInt aIndex );      
       
    72 
       
    73     private: // Functions from base classes
       
    74 
       
    75         /**
       
    76         * From CoeControl,SizeChanged.
       
    77         * Called by framework when the view size is changed.
       
    78         */
       
    79         void SizeChanged();
       
    80 
       
    81         /**
       
    82         * From CoeControl,CountComponentControls.
       
    83         * Gets a count of the component controls of this list box control.
       
    84         * This information is used for DrawNow().
       
    85         */
       
    86         TInt CountComponentControls() const;
       
    87 
       
    88         /**
       
    89         * From CCoeControl,ComponentControl.
       
    90         * Gets a pointer to the specified component control.
       
    91         * @param aIndex Index of the component control to look up.
       
    92         * @return The control at aIndex.
       
    93         */
       
    94         CCoeControl* ComponentControl(TInt aIndex) const;
       
    95 
       
    96         /**
       
    97         * From CCoeControl,Draw.
       
    98         * Draw a control, called by window server.
       
    99         * @param aRect The region of the control to be redrawn. Co-ordinates
       
   100         *              are relative to the control's origin (top left corner).
       
   101         */
       
   102         void Draw(const TRect& aRect) const;
       
   103        
       
   104         /**
       
   105         * Handles list box events.
       
   106         * @param aListBox The originating list box. 
       
   107         * @param aEventType A code for the event. Further information may be
       
   108         *                   obtained by accessing the list box itself.
       
   109         */
       
   110         void HandleListBoxEventL(CEikListBox* aListBox,TListBoxEvent aEventType);
       
   111 
       
   112         /**
       
   113         * From CCoeControl,OfferKeyEventL
       
   114         * Handles key events.
       
   115         * @param aKeyEvent The key event.
       
   116         * @param aType The type of key event.
       
   117         * @return Indicates whether or not the key event was used 
       
   118         *         by this control.
       
   119         */
       
   120 		TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
       
   121 		        
       
   122     private: //data
       
   123         
       
   124 		CEikTextListBox*    iListBox;
       
   125     };
       
   126 
       
   127 #endif // CTESTCASEMENUCONTAINER_H
       
   128 
       
   129 // End of File