idlehomescreen/xmluirendering/uiengine/inc/xnviewcontroladapter.h
branchRCL_3
changeset 12 9674c1a575e9
child 25 137ebc85284b
equal deleted inserted replaced
11:ff572dfe6d86 12:9674c1a575e9
       
     1 /*
       
     2 * Copyright (c) 2002-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:  View control adater.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef _XNVIEWCONTROLADAPTER_H
       
    19 #define _XNVIEWCONTROLADAPTER_H
       
    20 
       
    21 //  System includes
       
    22 #include <e32base.h>
       
    23 
       
    24 // User includes
       
    25 #include "xncontroladapter.h"
       
    26 #include "xnuistatelistener.h"
       
    27 
       
    28 // Forward declarations
       
    29 class CXnNodePluginIf;
       
    30 class CXnBackgroundManager;
       
    31 class CXnAppUiAdapter;
       
    32 class CXnViewFlicker;
       
    33 
       
    34 // Class declaration
       
    35 /**
       
    36 *  @ingroup group_xnlayoutengine
       
    37 *  @lib xn3layoutengine.lib
       
    38 *  @since S60 5.2
       
    39 */   
       
    40 NONSHARABLE_CLASS( CXnViewControlAdapter ) : public CXnControlAdapter,
       
    41     public MXnUiStateObserver
       
    42    {
       
    43 public: 
       
    44     // Constructors and destructor
       
    45     
       
    46     /**
       
    47      * 2 phase construction.
       
    48      */
       
    49     static CXnViewControlAdapter* NewL( CXnNodePluginIf& aNode );
       
    50 
       
    51     /**
       
    52      * Destructor.
       
    53      */
       
    54     ~CXnViewControlAdapter();
       
    55 
       
    56 public: 
       
    57     // From base classes
       
    58 
       
    59     /**
       
    60     * @see CCoeControl documentation        
       
    61     */         
       
    62     void MakeVisible( TBool aVisible );
       
    63     
       
    64     /**
       
    65      * @see CCoeControl
       
    66      */
       
    67     void Draw( const TRect& aRect ) const;
       
    68             
       
    69     /**
       
    70      * @see CCoeControl
       
    71      */
       
    72     void HandlePointerEventL( const TPointerEvent& aPointerEvent );
       
    73 
       
    74 public:
       
    75     // new functions
       
    76     
       
    77     /**
       
    78      * Resets grabbing
       
    79      * 
       
    80      * @since S60 5.2
       
    81      */
       
    82     void ResetGrabbing();
       
    83 
       
    84 private:    
       
    85     // new functions
       
    86     
       
    87     void RemoveGrabbingControL( 
       
    88         const CCoeControl* aControl, const TPointerEvent& aEvent ) const;
       
    89     
       
    90 private:
       
    91     // from MXnUiStateObserver
       
    92     
       
    93     /**
       
    94      * @see MXnUiStateObserver
       
    95      */
       
    96     void NotifyForegroundChanged( TForegroundStatus aStatus );
       
    97     
       
    98     /**
       
    99      * @see MXnUiStateObserver
       
   100      */
       
   101     void NotifyLightStatusChanged( TBool aLightsOn );
       
   102     
       
   103     /**
       
   104      * @see MXnUiStateObserver
       
   105      */
       
   106     void NotifyInCallStateChaged( TBool aInCall );   
       
   107     
       
   108 private: 
       
   109     // constructors
       
   110     
       
   111     /**
       
   112      * C++ default constructor
       
   113      */    
       
   114     CXnViewControlAdapter( CXnNodePluginIf& aNode );
       
   115     
       
   116     /**
       
   117      * 2nd phase constructor
       
   118      */
       
   119     void ConstructL( CXnNodePluginIf& aNode );
       
   120     
       
   121 private: 
       
   122     // data
       
   123 
       
   124     /** Node */
       
   125     CXnNodePluginIf& iNode;
       
   126     /** AppUi */
       
   127     CXnAppUiAdapter& iAppUi;
       
   128     /** stored point of EButton1Down */
       
   129     TPoint iHitpoint;   
       
   130     };
       
   131     
       
   132 #endif      // _XNVIEWCONTROLADAPTER_H
       
   133             
       
   134 // End of File