44 * Creates new response field. Response field is responsible |
44 * Creates new response field. Response field is responsible |
45 * of creating all the items needed in the area. |
45 * of creating all the items needed in the area. |
46 * @return New response field object. |
46 * @return New response field object. |
47 */ |
47 */ |
48 static CESMRResponseField* NewL(MESMRResponseObserver* aResponseObserver); |
48 static CESMRResponseField* NewL(MESMRResponseObserver* aResponseObserver); |
49 |
49 |
50 /** |
50 /** |
51 * C++ Destructor. |
51 * C++ Destructor. |
52 */ |
52 */ |
53 ~CESMRResponseField(); |
53 ~CESMRResponseField(); |
54 |
54 |
55 public: // From CCoeControl |
55 public: // From CCoeControl |
56 TInt CountComponentControls() const; |
56 TInt CountComponentControls() const; |
57 CCoeControl* ComponentControl( TInt aInd ) const; |
57 CCoeControl* ComponentControl( TInt aInd ) const; |
58 void SizeChanged(); |
58 void SizeChanged(); |
59 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
59 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
60 void FocusChanged( TDrawNow aDrawNow ); |
60 void FocusChanged( TDrawNow aDrawNow ); |
61 TSize MinimumSize(); |
61 TSize MinimumSize(); |
62 |
62 |
63 public: // From CESMRField |
63 public: // From CESMRField |
64 void InitializeL(); |
64 void InitializeL(); |
65 void InternalizeL( MESMRCalEntry& aEntry ); |
65 void InternalizeL( MESMRCalEntry& aEntry ); |
66 TBool ExecuteGenericCommandL( TInt aCommand ); |
66 TBool ExecuteGenericCommandL( TInt aCommand ); |
67 void SetOutlineFocusL( TBool aFocus ); |
67 void SetOutlineFocusL( TBool aFocus ); |
68 TBool HandleSingletapEventL( const TPoint& aPosition ); |
68 TBool HandleSingletapEventL( const TPoint& aPosition ); |
69 void HandleLongtapEventL( const TPoint& aPosition ); |
69 void HandleLongtapEventL( const TPoint& aPosition ); |
70 |
70 |
71 public: // New methods |
71 public: // New methods |
72 /** |
72 /** |
73 * Set the response observer for this class. |
73 * Set the response observer for this class. |
74 * |
74 * |
75 * @param aResponseObserver - Response observer |
75 * @param aResponseObserver - Response observer |
76 */ |
76 */ |
77 void AddObserver( MESMRResponseObserver* aResponseObserver ); |
77 void AddObserver( MESMRResponseObserver* aResponseObserver ); |
78 |
78 |
79 /** |
79 /** |
80 * Calls onwards the SetFont() method for all the items in the array |
80 * Calls onwards the SetFont() method for all the items in the array |
81 * |
81 * |
82 * @param aFont - Font to be set. |
82 * @param aFont - Font to be set. |
83 */ |
83 */ |
84 void SetFont( const CFont* aFont ); |
84 void SetFont( const CFont* aFont ); |
85 |
85 |
86 /** |
86 /** |
87 * Selects the current item. |
87 * Selects the current item. |
88 * @return ETrue if item is selectable |
88 * @return ETrue if item is selectable |
89 */ |
89 */ |
90 TBool ItemSelectedL(); |
90 TBool ItemSelectedL(); |
91 |
91 |
92 private: // Implementation |
92 private: // Implementation |
93 CESMRResponseField(MESMRResponseObserver* aResponseObserver); |
93 CESMRResponseField(MESMRResponseObserver* aResponseObserver); |
94 void ConstructL(); |
94 void ConstructL(); |
95 void HandleCancelledEventItemsL( MESMRCalEntry& aEntry ); |
95 void HandleCancelledEventItemsL( MESMRCalEntry& aEntry ); |
96 CCoeControl* ControlItem( TInt aIndex ); |
|
97 TBool HandleTapEventL( const TPoint& aPosition ); |
96 TBool HandleTapEventL( const TPoint& aPosition ); |
98 |
97 |
99 private: |
98 private: |
100 /// Own: Conflict popup |
99 /// Own: Conflict popup |
101 CESMRConflictPopup* iConfPopup ; |
100 CESMRConflictPopup* iConfPopup ; |
102 /// Array for the response items. Owns the items. |
101 /// Array for the response items. Owns the items. |
103 RPointerArray <CESMRResponseItem> iResponseItemArray; |
102 RPointerArray <CESMRResponseItem> iResponseItemArray; |
104 /// Observer for the response |
103 /// Observer for the response |
105 MESMRResponseObserver* iResponseObserver; |
104 MESMRResponseObserver* iResponseObserver; |
106 /// Currently selected index |
105 /// Currently selected index |
107 TInt iSelectionIndex; |
106 TInt iSelectionIndex; |
108 /// Font for the label text |
107 /// Font for the label text |
109 const CFont* iFont; |
108 const CFont* iFont; |
110 /// Own: Static TLS data handler |
109 /// Own: Static TLS data handler |
111 RESMRPluginExtensionStatic iESMRStatic; |
110 RESMRPluginExtensionStatic iESMRStatic; |
112 /// iESMRstatic accessed |
111 /// iESMRstatic accessed |
113 TBool iESMRStaticAccessed; |
112 TBool iESMRStaticAccessed; |
114 /// whether a normal response |
113 /// whether a normal response |
115 TBool iNormalResponse; |
114 TBool iNormalResponse; |
116 /// whether a remove response |
115 /// whether a remove response |
117 TBool iRemoveResponse; |
116 TBool iRemoveResponse; |
118 /// Judge if there is any event conflict with current event. |
117 /// Judge if there is any event conflict with current event. |
119 TBool iConflicted; |
118 TBool iConflicted; |
120 /// Judge whether it has implemented HandleSingletapEventL |
119 /// Judge whether it has implemented HandleSingletapEventL |
121 TBool iPointEvent; |
120 TBool iPointEvent; |
122 /// Judge whether the long tap have been consumed. |
121 /// Judge whether the long tap have been consumed. |
123 /// To avoid the same event be handled by |
122 /// To avoid the same event be handled by |
124 /// HandleSingletapEventL() when HandleLongtapEventL(). |
123 /// HandleSingletapEventL() when HandleLongtapEventL(). |
125 TBool iLongTapEventConsumed; |
124 TBool iLongTapEventConsumed; |
126 |
125 |
127 }; |
126 }; |
128 |
127 |
129 |
128 |
130 #endif // CESMRRESPONSEFIELD_H |
129 #endif // CESMRRESPONSEFIELD_H |