17 |
17 |
18 |
18 |
19 #ifndef CESMRVIEWERLOCATIONFIELD_H_ |
19 #ifndef CESMRVIEWERLOCATIONFIELD_H_ |
20 #define CESMRVIEWERLOCATIONFIELD_H_ |
20 #define CESMRVIEWERLOCATIONFIELD_H_ |
21 |
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
22 #include <eikedwob.h> |
24 #include <eikedwob.h> |
|
25 #include <eikmobs.h> |
|
26 #include <coecobs.h> |
23 |
27 |
24 #include "cesmrfield.h" |
28 #include "cesmrfield.h" |
25 |
29 |
|
30 // FORWARD DECLARATIONS |
26 class CMRImage; |
31 class CMRImage; |
27 class CESMRRichTextViewer; |
32 class CESMRRichTextViewer; |
|
33 class CAknButton; |
28 class CESMRFeatureSettings; |
34 class CESMRFeatureSettings; |
29 |
35 |
30 /** |
36 /** |
31 * Shows the location of the meeting/event |
37 * Shows the location of the meeting/event |
32 */ |
38 */ |
33 NONSHARABLE_CLASS( CESMRViewerLocationField ): public CESMRField, |
39 NONSHARABLE_CLASS( CESMRViewerLocationField ): public CESMRField, |
34 MEikEdwinSizeObserver |
40 public MEikEdwinSizeObserver, |
|
41 public MCoeControlObserver |
35 { |
42 { |
36 public: |
43 public: |
37 /** |
44 /** |
38 * Creates new CESMRViewerLocationField object. Ownership |
45 * Creates new CESMRViewerLocationField object. Ownership |
39 * is transferred to caller. |
46 * is transferred to caller. |
40 * @return Pointer to created object, |
47 * @return Pointer to created object, |
41 */ |
48 */ |
42 static CESMRViewerLocationField* NewL( ); |
49 static CESMRViewerLocationField* NewL( ); |
43 |
|
44 /** |
|
45 * C++ Destructor. |
|
46 */ |
|
47 ~CESMRViewerLocationField( ); |
|
48 |
50 |
49 public:// From CESMRField |
|
50 void InternalizeL( MESMRCalEntry& aEntry ); |
|
51 TSize MinimumSize(); |
|
52 void InitializeL(); |
|
53 void ListObserverSet(); |
|
54 void ExecuteGenericCommandL( TInt aCommand ); |
|
55 void SetOutlineFocusL( TBool aFocus ); |
|
56 |
51 |
57 public: // From CCoeControl |
52 /** |
58 TKeyResponse OfferKeyEventL(const TKeyEvent& aEvent, TEventCode aType ); |
53 * C++ Destructor. |
59 TInt CountComponentControls() const; |
54 */ |
60 CCoeControl* ComponentControl( TInt aInd ) const; |
55 ~CESMRViewerLocationField( ); |
61 void SizeChanged(); |
|
62 void SetContainerWindowL( const CCoeControl& aContainer ); |
|
63 |
56 |
64 public: // From MEikEdwinSizeObserver |
57 public:// From CESMRField |
65 TBool HandleEdwinSizeEventL( CEikEdwin* aEdwin, TEdwinSizeEvent aType, |
58 void InternalizeL( MESMRCalEntry& aEntry ); |
66 TSize aSize ); |
59 TSize MinimumSize(); |
|
60 void InitializeL(); |
|
61 void ListObserverSet(); |
|
62 TBool ExecuteGenericCommandL( TInt aCommand ); |
|
63 void SetOutlineFocusL( TBool aFocus ); |
|
64 void HandleLongtapEventL( const TPoint& aPosition ); |
|
65 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
66 void LockL(); |
|
67 protected: |
|
68 TBool HandleSingletapEventL( const TPoint& aPosition ); |
67 |
69 |
68 private: // Implementation |
70 public: // From CCoeControl |
69 CESMRViewerLocationField( ); |
71 TKeyResponse OfferKeyEventL(const TKeyEvent& aEvent, TEventCode aType ); |
70 void ConstructL( ); |
72 TInt CountComponentControls() const; |
71 CESMRFeatureSettings& FeaturesL(); |
73 CCoeControl* ComponentControl( TInt aInd ) const; |
72 void SetWaypointIconL( TBool aEnabled ); |
74 void SizeChanged(); |
73 TRect RichTextViewerRect(); |
75 void SetContainerWindowL( const CCoeControl& aContainer ); |
|
76 void GetCursorLineVerticalPos(TInt& aUpper, TInt& aLower); |
74 |
77 |
75 private: // data |
78 public: // From MEikEdwinSizeObserver |
76 |
79 TBool HandleEdwinSizeEventL( CEikEdwin* aEdwin, TEdwinSizeEvent aType, |
77 TSize iSize; |
80 TSize aSize ); |
78 // Owned: Field icon |
81 |
79 CMRImage* iFieldIcon; |
82 public: // From MCoeControlObserver |
80 // Owned: Field text label |
83 void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType); |
81 CESMRRichTextViewer* iRichTextViewer; |
84 |
82 // Owned: Waypoint icon |
85 private: // Implementation |
83 // Feature settings. Own |
86 CESMRViewerLocationField( ); |
84 CESMRFeatureSettings* iFeatures; |
87 void ConstructL( ); |
85 // RichTextViewer line count. Own |
88 void SetWaypointIconL( TBool aEnabled ); |
86 TInt iLineCount; |
89 TBool HandleTapEventL( const TPoint& aPosition ); |
87 // Middle softkey command id |
90 |
88 TInt iMskCommandId; |
91 private: // data |
|
92 // Own: Edwin size |
|
93 TSize iSize; |
|
94 /// Own: Field button |
|
95 CAknButton* iFieldButton; |
|
96 /// Ref: Field text label |
|
97 CESMRRichTextViewer* iRichTextViewer; |
|
98 /// Own: Waypoint icon |
|
99 CMRImage* iWaypointIcon; |
|
100 /// Own: RichTextViewer line count. |
|
101 TInt iLineCount; |
|
102 /// Own: Middle softkey command id |
|
103 TInt iMskCommandId; |
|
104 /// Own: Feature settings |
|
105 CESMRFeatureSettings* iFeatures; |
89 }; |
106 }; |
90 |
107 |
91 #endif /*CESMRVIEWERLOCATIONFIELD_H_*/ |
108 #endif /*CESMRVIEWERLOCATIONFIELD_H_*/ |