1 /* |
1 /* |
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
17 |
17 |
18 #ifndef CESMRRESPONSEFIELD_H |
18 #ifndef CESMRRESPONSEFIELD_H |
19 #define CESMRRESPONSEFIELD_H |
19 #define CESMRRESPONSEFIELD_H |
20 |
20 |
21 // INCLUDES |
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 #include <fbs.h> |
|
24 |
22 #include "cesmrfield.h" |
25 #include "cesmrfield.h" |
23 #include "resmrstatic.h" |
26 #include "resmrpluginextensionstatic.h" |
24 |
27 |
25 // FORWARD DECLARATIONS |
28 // FORWARD DECLARATIONS |
26 class CLayoutManager; |
29 class CLayoutManager; |
27 class MESMRResponseObserver; |
30 class MESMRResponseObserver; |
28 class CESMRConflictPopup; |
31 class CESMRConflictPopup; |
54 CCoeControl* ComponentControl( TInt aInd ) const; |
57 CCoeControl* ComponentControl( TInt aInd ) const; |
55 void SizeChanged(); |
58 void SizeChanged(); |
56 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
59 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
57 void FocusChanged( TDrawNow aDrawNow ); |
60 void FocusChanged( TDrawNow aDrawNow ); |
58 TSize MinimumSize(); |
61 TSize MinimumSize(); |
59 |
62 |
60 public: // From CESMRField |
63 public: // From CESMRField |
61 void InitializeL(); |
64 void InitializeL(); |
62 void InternalizeL( MESMRCalEntry& aEntry ); |
65 void InternalizeL( MESMRCalEntry& aEntry ); |
63 void ExecuteGenericCommandL( TInt aCommand ); |
66 TBool ExecuteGenericCommandL( TInt aCommand ); |
64 void SetLayoutManager( CESMRLayoutManager* aLayout ); |
|
65 void SetOutlineFocusL( TBool aFocus ); |
67 void SetOutlineFocusL( TBool aFocus ); |
|
68 TBool HandleSingletapEventL( const TPoint& aPosition ); |
|
69 void HandleLongtapEventL( const TPoint& aPosition ); |
66 |
70 |
67 public: // New methods |
71 public: // New methods |
68 /** |
72 /** |
69 * Set the response observer for this class. |
73 * Set the response observer for this class. |
70 * |
74 * |
86 TBool ItemSelectedL(); |
90 TBool ItemSelectedL(); |
87 |
91 |
88 private: // Implementation |
92 private: // Implementation |
89 CESMRResponseField(MESMRResponseObserver* aResponseObserver); |
93 CESMRResponseField(MESMRResponseObserver* aResponseObserver); |
90 void ConstructL(); |
94 void ConstructL(); |
91 void Draw( const TRect& aRect ) const; |
|
92 void HandleCancelledEventItemsL( MESMRCalEntry& aEntry ); |
95 void HandleCancelledEventItemsL( MESMRCalEntry& aEntry ); |
93 CCoeControl* ControlItem( TInt aIndex ); |
96 CCoeControl* ControlItem( TInt aIndex ); |
|
97 TBool HandleTapEventL( const TPoint& aPosition ); |
94 |
98 |
95 private: |
99 private: |
96 /// Own: Conflict popup |
100 /// Own: Conflict popup |
97 CESMRConflictPopup* iConfPopup ; |
101 CESMRConflictPopup* iConfPopup ; |
98 /// Array for the response items. Owns the items. |
102 /// Array for the response items. Owns the items. |
99 RPointerArray <CESMRResponseItem> iResponseItemArray; |
103 RPointerArray <CESMRResponseItem> iResponseItemArray; |
100 /// Observer for the response |
104 /// Observer for the response |
101 MESMRResponseObserver* iResponseObserver; |
105 MESMRResponseObserver* iResponseObserver; |
102 /// Currently selected index |
106 /// Currently selected index |
103 TInt iSelectionIndex; |
107 TInt iSelectionIndex; |
104 /// Layout data |
|
105 CESMRLayoutManager* iLayout; |
|
106 /// Font for the label text |
108 /// Font for the label text |
107 const CFont* iFont; |
109 const CFont* iFont; |
108 /// Own: Static TLS data handler |
110 /// Own: Static TLS data handler |
109 RESMRStatic iESMRStatic; |
111 RESMRPluginExtensionStatic iESMRStatic; |
110 /// iESMRstatic accessed |
112 /// iESMRstatic accessed |
111 TBool iESMRStaticAccessed; |
113 TBool iESMRStaticAccessed; |
|
114 /// whether a normal response |
|
115 TBool iNormalResponse; |
|
116 /// whether a remove response |
|
117 TBool iRemoveResponse; |
|
118 /// Judge if there is any event conflict with current event. |
|
119 TBool iConflicted; |
|
120 /// Judge whether it has implemented HandleSingletapEventL |
|
121 TBool iPointEvent; |
|
122 /// Judge whether the long tap have been consumed. |
|
123 /// To avoid the same event be handled by |
|
124 /// HandleSingletapEventL() when HandleLongtapEventL(). |
|
125 TBool iLongTapEventConsumed; |
|
126 |
112 }; |
127 }; |
113 |
128 |
114 |
129 |
115 #endif // CESMRRESPONSEFIELD_H |
130 #endif // CESMRRESPONSEFIELD_H |