multimediacommsengine/tsrc/MCETestUI/inc/CMCETestUIMainViewContainer.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     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 #ifndef MAINVIEWCONTAINER_H
       
    19 #define MAINVIEWCONTAINER_H
       
    20 
       
    21 // INCLUDES
       
    22 
       
    23 #include <aknlists.h>
       
    24 #include <eiklbo.h>  // MListBoxObserver
       
    25 #include <coecntrl.h>
       
    26 
       
    27 //#include "UINotify.h"
       
    28 
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CMCETestUIAppView;
       
    32 class CMCETestUIEngine;
       
    33 class CMCETestUIMainViewModel;
       
    34 
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39 *  CMCETestUIMainViewContainer  container control class.
       
    40 *  
       
    41 */
       
    42 class CMCETestUIMainViewContainer : public CCoeControl, 
       
    43                                     public MEikListBoxObserver
       
    44 {
       
    45 public: // Constructors and destructor
       
    46     
       
    47     static CMCETestUIMainViewContainer* NewL( 
       
    48         const TRect& aRect, 
       
    49         CMCETestUIAppView& aOwningView,
       
    50         CMCETestUIEngine& aEngine );
       
    51     
       
    52     /**
       
    53     * Destructor.
       
    54     */
       
    55     ~CMCETestUIMainViewContainer();
       
    56     
       
    57 public: // New functions
       
    58 
       
    59     void ConstructModelL();
       
    60         
       
    61 private: // Constructors 
       
    62 
       
    63     CMCETestUIMainViewContainer( CMCETestUIAppView& aOwningView, 
       
    64                                  CMCETestUIEngine& aEngine  );
       
    65 
       
    66     /**
       
    67     * @param aRect Frame rectangle for container.
       
    68     */
       
    69     void ConstructL(const TRect& aRect);
       
    70         
       
    71 private: // Functions from base classes
       
    72     
       
    73     /**
       
    74     * From CoeControl. Calls SizeChangedL with TRAP.
       
    75     */
       
    76     void SizeChanged();  
       
    77     
       
    78     /**
       
    79     * Handle change of control size
       
    80     */
       
    81     void SizeChangedL();
       
    82     
       
    83     /**
       
    84     * From CoeControl.
       
    85     */
       
    86     TInt CountComponentControls() const;
       
    87     
       
    88     /**
       
    89     * From CCoeControl.
       
    90     */
       
    91     CCoeControl* ComponentControl(TInt aIndex) const;
       
    92     
       
    93     /**
       
    94     * Listbox event handler.
       
    95     */
       
    96     void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
       
    97 
       
    98     /**
       
    99     * From CCoeControl,Draw.
       
   100     */
       
   101     void Draw(const TRect& aRect) const;
       
   102     
       
   103     /**
       
   104     * Key event handler. Handles up and down arrow keys, so that
       
   105     * output window can be scrolled.
       
   106     */
       
   107     TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
       
   108     
       
   109 public: // convenience functions
       
   110 
       
   111     void DoShowMenuL();
       
   112 
       
   113     
       
   114 private: //data
       
   115 
       
   116 	CAknDoubleStyleListBox* iListBox; // owned
       
   117 	CMCETestUIMainViewModel* iListBoxModel; // ownership is given to iListBox
       
   118 
       
   119     CMCETestUIAppView& iOwningView; 
       
   120     CMCETestUIEngine& iEngine;
       
   121 
       
   122     TBool iContextMenuAlreadyShown;
       
   123 
       
   124     };
       
   125     
       
   126 #endif
       
   127     
       
   128     // End of File