idlehomescreen/xmluirendering/uiengine/inc/xnwidgetextensionadapter.h
branchRCL_3
changeset 9 f966699dea19
parent 1 5315654608de
child 15 ff572dfe6d86
equal deleted inserted replaced
5:c743ef5928ba 9:f966699dea19
    16 */
    16 */
    17 
    17 
    18 #ifndef __XNWIDGETEXTENSIONADAPTER_H__
    18 #ifndef __XNWIDGETEXTENSIONADAPTER_H__
    19 #define __XNWIDGETEXTENSIONADAPTER_H__
    19 #define __XNWIDGETEXTENSIONADAPTER_H__
    20 
    20 
    21 //  INCLUDES
    21 // System includes
       
    22 #include <e32base.h>
       
    23 
       
    24 // User includes
    22 #include "xncontroladapter.h"
    25 #include "xncontroladapter.h"
    23 #include <e32base.h>
    26 #include "xnuistatelistener.h"
    24 
    27 
    25 // Forward declarations
    28 // Forward declarations
    26 class CXnAppUiAdapter;
    29 class CXnAppUiAdapter;
    27 class CXnNode;
    30 class CXnNode;
    28 class CXnUiEngine;
    31 class CXnUiEngine;
    33 *  @ingroup group_xnlayoutengine
    36 *  @ingroup group_xnlayoutengine
    34 *  Popup Control adapter interface class
    37 *  Popup Control adapter interface class
    35 *  @lib xnlayoutengine.lib
    38 *  @lib xnlayoutengine.lib
    36 *  @since Series 60 5.0
    39 *  @since Series 60 5.0
    37 */
    40 */
    38 NONSHARABLE_CLASS( CXnWidgetExtensionAdapter ) : public CXnControlAdapter/*, 
    41 NONSHARABLE_CLASS( CXnWidgetExtensionAdapter ) : public CXnControlAdapter, 
    39     public MCoeMessageMonitorObserver*/
    42     public MXnUiStateObserver
    40     {
    43     {
    41     public: // Constructors and destructor
    44 public: // Constructors and destructor
    42 
    45 
    43         enum TPositionHint
    46     enum TPositionHint
    44                {
    47            {
    45                ENone,
    48            ENone,
    46                EAboveLeft,
    49            EAboveLeft,
    47                EAboveRight,
    50            EAboveRight,
    48                EBelowLeft,
    51            EBelowLeft,
    49                EBelowRight,
    52            EBelowRight,
    50                ELeft,
    53            ELeft,
    51                ERight
    54            ERight
    52                };
    55            };
    53         /**
    56     /**
    54         * Two-phased constructor.
    57     * Two-phased constructor.
    55         */
    58     */
    56 		static CXnWidgetExtensionAdapter* NewL( CXnNodePluginIf& aNode );
    59     static CXnWidgetExtensionAdapter* NewL( CXnNodePluginIf& aNode );
    57 		
    60     
    58         /**
    61     /**
    59         * Destructor.
    62     * Destructor.
    60         */
    63     */
    61 		~CXnWidgetExtensionAdapter();
    64     ~CXnWidgetExtensionAdapter();
    62          
    65      
    63     private: // Functions from base classes    
    66 private: 
    64         /**
    67     // Functions from base classes    
    65         * @see CCoeControl documentation        
    68     /**
    66         */         
    69     * @see CCoeControl documentation        
    67         void MakeVisible( TBool aVisible );
    70     */         
       
    71     void MakeVisible( TBool aVisible );
    68 
    72 
    69         /**
    73     /**
    70         * see CCoeControl 
    74     * see CCoeControl 
    71         */
    75     */
    72         void HandlePointerEventL(const TPointerEvent& aPointerEvent);
    76     void HandlePointerEventL(const TPointerEvent& aPointerEvent);
    73 
    77 
    74         /**
    78     /**
    75         * see CCoeControl 
    79     * see CCoeControl 
    76         */
    80     */
    77         void Draw(const TRect& aRect) const;        
    81     void Draw(const TRect& aRect) const;        
    78 
    82 
    79     private: // Constructors
    83 private:
    80 		/**
    84     // from MXnUiStateObserver
    81         * C++ default constructor.
    85     
    82         */
    86     /**
    83 	    CXnWidgetExtensionAdapter( CXnNodePluginIf& aNode );
    87      * @see MXnUiStateObserver
       
    88      */
       
    89     void NotifyForegroundChanged( TForegroundStatus aStatus );         
    84 
    90 
    85 	   	/**
    91     /**
    86         * Two-phased constructor.        
    92      * @see MXnUiStateObserver
    87         */ 
    93      */    
    88 	    void ConstructL();	   
    94     void NotifyLightStatusChanged( TBool aLightsOn );
    89 	    
    95        
    90     private: // New functions
    96     /**
    91         /**
    97      * @see MXnUiStateObserver
    92         * Hides this control
    98      */    
    93         */ 
    99     void NotifyInCallStateChaged( TBool aInCall );    
    94         void HidePopupL();
   100     
    95             
   101 private: 
    96         void CalculatePosition();
   102     // Constructors
       
   103     /**
       
   104     * C++ default constructor.
       
   105     */
       
   106     CXnWidgetExtensionAdapter( CXnNodePluginIf& aNode );
       
   107 
       
   108     /**
       
   109     * Two-phased constructor.        
       
   110     */ 
       
   111     void ConstructL();	   
       
   112     
       
   113 private: 
       
   114     // New functions
       
   115     
       
   116     void HidePopupL();
    97         
   117         
    98     private:
   118     void CalculatePosition();
    99         
   119     
   100         // Data
   120 private:    
   101         // UiEngine, not owned
   121     // Data
   102         CXnUiEngine* iUiEngine; 	
   122     
   103         
   123     /** UiEngine, not owned */
   104         // Node 
   124     CXnUiEngine* iUiEngine; 	    
   105         CXnNodePluginIf& iNode;
   125     /** Node, not owned */ 
   106         
   126     CXnNodePluginIf& iNode;    
   107         // position hint
   127     /** Position hint */
   108         TPositionHint iPositionHint;
   128     TPositionHint iPositionHint;    
   109         
   129     /** AppUi, not owned */
   110         CXnAppUiAdapter* iAppUiAdapter;
   130     CXnAppUiAdapter* iAppUiAdapter;
   111 
   131     /** Flag to indicate whether <popup> is permanent */
   112 
   132     TBool iPermanent;    
   113 	};
   133 	};
   114 
   134 
   115 #endif // __XNWIDGETEXTENSIONADAPTER_H__
   135 #endif // __XNWIDGETEXTENSIONADAPTER_H__
   116 
   136 
   117 // End of File
   137 // End of File