idlehomescreen/xmluirendering/uiengine/inc/xnkeyeventdispatcher.h
branchRCL_3
changeset 35 3321d3e205b6
parent 34 5456b4e8b3a8
equal deleted inserted replaced
34:5456b4e8b3a8 35:3321d3e205b6
    24 #include <coecntrl.h>
    24 #include <coecntrl.h>
    25 #include <eikmobs.h>
    25 #include <eikmobs.h>
    26 
    26 
    27 // Uder includes
    27 // Uder includes
    28 #include "xnviewmanager.h"
    28 #include "xnviewmanager.h"
       
    29 #include "xnuistatelistener.h"
    29 
    30 
    30 // Forward declarations
    31 // Forward declarations
    31 class CXnNode;
    32 class CXnNode;
    32 class CXnUiEngine;
    33 class CXnUiEngine;
    33 class CEikButtonGroupContainer;
    34 class CEikButtonGroupContainer;
    43  *  @lib xn3layoutengine.lib
    44  *  @lib xn3layoutengine.lib
    44  *  @since Series 60 3.1
    45  *  @since Series 60 3.1
    45  */
    46  */
    46 NONSHARABLE_CLASS( CXnKeyEventDispatcher ) : public CCoeControl,   
    47 NONSHARABLE_CLASS( CXnKeyEventDispatcher ) : public CCoeControl,   
    47     public MCoeMessageMonitorObserver,
    48     public MCoeMessageMonitorObserver,
       
    49     public MXnUiResourceChangeObserver,
    48     public MXnViewObserver
    50     public MXnViewObserver
    49     {
    51     {
    50 public:
    52 public:
    51     // Constructors and destructor
    53     // Constructors and destructor
    52     
    54     
    75     /**
    77     /**
    76     * @see MCoeMessageMonitorObserver 
    78     * @see MCoeMessageMonitorObserver 
    77     */
    79     */
    78     void MonitorWsMessage( const TWsEvent& aEvent );
    80     void MonitorWsMessage( const TWsEvent& aEvent );
    79         
    81         
       
    82 private:
       
    83     // from MXnUiResourceChangeObserver
       
    84     
       
    85     /**
       
    86      * @see MXnUiResourceChangeObserver
       
    87      */
       
    88     void NotifyStatusPaneSizeChanged();
       
    89 
       
    90     /**
       
    91      * @see MXnUiResourceChangeObserver
       
    92      */
       
    93     void NotifyResourceChanged( TInt aType );    
       
    94     
    80 public:
    95 public:
    81     // New functions
    96     // New functions
    82    
    97    
    83     /**
    98     /**
    84      * Set the node to which key events are given
    99      * Set the node to which key events are given
   172      * 
   187      * 
   173      * @since S60 5.2
   188      * @since S60 5.2
   174      * @return Last pointer event
   189      * @return Last pointer event
   175      */
   190      */
   176     const TPointerEvent& PointerEvent() const;
   191     const TPointerEvent& PointerEvent() const;
   177             
   192        
       
   193     /**
       
   194      * Sets activate text editor
       
   195      * 
       
   196      * @since S60 5.2
       
   197      * @param aNode Editor Node
       
   198      * @param TBool True if text editor should be activated
       
   199      */          
       
   200     void SetTextEditorActive( CXnNode* aNode, TBool aActivate );
       
   201     
       
   202     /**
       
   203      * Queries whether a text editor is active
       
   204      * 
       
   205      * @since S60 5.2
       
   206      * @return ETrue if text editor is active, EFalse otherwise
       
   207      */
       
   208     TBool IsTextEditorActive() const;
       
   209     
   178 private:
   210 private:
   179     // new functions
   211     // new functions
   180     
   212     
   181     void SetNodeL( CXnNode* aToLose, CXnNode* aToGain, TBool aNotify,
   213     void SetNodeL( CXnNode* aToLose, CXnNode* aToGain, TBool aNotify,
   182         TInt aSource = 0 );
   214         TInt aSource = 0 );
   198 
   230 
   199 private:
   231 private:
   200     // from MXnViewObserver
   232     // from MXnViewObserver
   201     
   233     
   202     void NotifyViewActivatedL( const CXnViewData& aViewData );
   234     void NotifyViewActivatedL( const CXnViewData& aViewData );
       
   235     void NotifyViewLoadedL( const CXnViewData& /*aViewData*/ ) {};
   203 
   236 
   204     void NotifyViewDeactivatedL( const CXnViewData& aViewData );
   237     void NotifyViewDeactivatedL( const CXnViewData& aViewData );
   205 
   238 
   206     void NotifyConfigureWidgetL( const CHsContentInfo& aContentInfo,
   239     void NotifyConfigureWidgetL( const CHsContentInfo& aContentInfo,
   207         CXnPluginData& aPluginData );
   240         CXnPluginData& aPluginData );
   208 
   241 
   209     void NotifyWidgetAdditionL( const CXnPluginData& aPluginData );
   242     void NotifyWidgetAdditionL( const CXnPluginData& aPluginData );
   210     void NotifyWidgetRemovalL( const CXnPluginData& aPluginData );
   243     void NotifyWidgetRemovalL( const CXnPluginData& aPluginData );
   211     void NotifyViewAdditionL( const CXnPluginData& /*aPluginData*/ ){};
   244     void NotifyViewAdditionL( const CXnViewData& /*aViewData*/ ){};
   212     void NotifyViewRemovalL( const CXnPluginData& /*aPluginData*/ ){};
   245     void NotifyViewRemovalL( const CXnViewData& /*aViewData*/ ){};
   213     void NotifyAllViewsLoadedL(){};
   246     void NotifyAllViewsLoadedL(){};
   214     void NotifyContainerActivatedL( const CXnViewData& /*aViewData*/ ){};
   247     void NotifyContainerActivatedL( const CXnViewData& /*aViewData*/ ){};
   215 
   248 
   216 private:
   249 private:
   217     // Data
   250     // Data
   238     CEikButtonGroupContainer* iCbaContainer;
   271     CEikButtonGroupContainer* iCbaContainer;
   239     /** For storing the nodes that have passive focus. */
   272     /** For storing the nodes that have passive focus. */
   240     RPointerArray< CXnNode > iPassiveFocusedNodes;
   273     RPointerArray< CXnNode > iPassiveFocusedNodes;
   241     /** Last pointer event */
   274     /** Last pointer event */
   242     TPointerEvent iPointerEvent;
   275     TPointerEvent iPointerEvent;
       
   276     /** Active text editor node, not owned */
       
   277     CXnNode* iActiveTextEditor;
   243     };
   278     };
   244 
   279 
   245 #endif //__XNKEYEVENTDISPATCHER_H__
   280 #endif //__XNKEYEVENTDISPATCHER_H__