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". |
19 #define CESMRVIEWERDESCRIPTIONFIELD_H |
19 #define CESMRVIEWERDESCRIPTIONFIELD_H |
20 |
20 |
21 #include <e32cmn.h> |
21 #include <e32cmn.h> |
22 #include <eikedwob.h> |
22 #include <eikedwob.h> |
23 #include "cesmrfield.h" |
23 #include "cesmrfield.h" |
|
24 #include "cesmrrichtextviewer.h" |
24 |
25 |
25 class CESMRRichTextViewer; |
|
26 class CESMRLocationPlugin; |
26 class CESMRLocationPlugin; |
27 class CESMRFeatureSettings; |
27 class CESMRFeatureSettings; |
|
28 class CESMRUrlParserPlugin; |
28 |
29 |
29 /** |
30 /** |
30 * Description field is a custom control |
31 * Description field is a custom control |
31 * that shows the description of a calendar event. |
32 * that shows the description of a calendar event. |
32 */ |
33 */ |
33 NONSHARABLE_CLASS( CESMRViewerDescriptionField ): public CESMRField, |
34 NONSHARABLE_CLASS( CESMRViewerDescriptionField ): public CESMRField, |
34 public MEikEdwinSizeObserver |
35 public MEikEdwinSizeObserver, |
|
36 public MESMRRichTextObserver |
35 { |
37 { |
36 |
38 |
37 public: |
39 public: |
38 /** |
40 /** |
39 * Constructor of the description field. |
41 * Constructor of the description field. |
46 ~CESMRViewerDescriptionField(); |
48 ~CESMRViewerDescriptionField(); |
47 |
49 |
48 public: // From CESMRField |
50 public: // From CESMRField |
49 void InternalizeL( MESMRCalEntry& aEntry ); |
51 void InternalizeL( MESMRCalEntry& aEntry ); |
50 void InitializeL(); |
52 void InitializeL(); |
51 void GetMinimumVisibleVerticalArea( TInt& aUpper, TInt& aLower ); |
53 void GetCursorLineVerticalPos( TInt& aUpper, TInt& aLower ); |
52 void ListObserverSet(); |
54 void ListObserverSet(); |
53 void ExecuteGenericCommandL( TInt aCommand ); |
55 TBool ExecuteGenericCommandL( TInt aCommand ); |
54 void SetOutlineFocusL( TBool aFocus ); |
56 void SetOutlineFocusL( TBool aFocus ); |
|
57 void HandleLongtapEventL( const TPoint& aPosition ); |
55 |
58 |
56 public: // From CCoeControl |
59 public: // From CCoeControl |
57 TKeyResponse OfferKeyEventL(const TKeyEvent& aEvent, TEventCode aType ); |
60 TKeyResponse OfferKeyEventL(const TKeyEvent& aEvent, TEventCode aType ); |
58 void SetContainerWindowL( const CCoeControl& aContainer ); |
61 void SetContainerWindowL( const CCoeControl& aContainer ); |
59 TSize MinimumSize(); |
62 TSize MinimumSize(); |
63 |
66 |
64 public: |
67 public: |
65 // From MEikEdwinSizeObserver |
68 // From MEikEdwinSizeObserver |
66 TBool HandleEdwinSizeEventL( CEikEdwin* aEdwin, TEdwinSizeEvent aType, |
69 TBool HandleEdwinSizeEventL( CEikEdwin* aEdwin, TEdwinSizeEvent aType, |
67 TSize aSize ); |
70 TSize aSize ); |
68 |
71 |
|
72 protected: |
|
73 TBool HandleRichTextLinkSelection( const CESMRRichTextLink* aLink ); |
|
74 |
69 private: // Implementation |
75 private: // Implementation |
70 CESMRViewerDescriptionField(); |
76 CESMRViewerDescriptionField(); |
71 void ConstructL(); |
77 void ConstructL(); |
72 void AddShowOnMapLinkL( MESMRCalEntry& aEntry ); |
78 void AddShowOnMapLinkL( MESMRCalEntry& aEntry ); |
73 void SetShowOnMapLinkMiddleSoftKeyL(); |
79 void SetShowOnMapLinkMiddleSoftKeyL(); |
74 CESMRFeatureSettings& FeaturesL(); |
80 CESMRFeatureSettings& FeaturesL(); |
75 CESMRLocationPlugin& LocationPluginL(); |
81 CESMRLocationPlugin& LocationPluginL(); |
|
82 void ShowLocationOnMapL( const CESMRRichTextLink& aLink ); |
|
83 void StoreGeoValueL( CCalEntry& aCalEntry, |
|
84 const TDesC& aLocationUrl ); |
|
85 CESMRUrlParserPlugin& UrlParserL(); |
76 |
86 |
77 private: |
87 private: |
78 |
88 |
79 /** |
89 /** |
80 * Field size. |
90 * Field size. |
81 */ |
91 */ |
82 TSize iSize; |
92 TSize iSize; |
83 |
93 |
84 /** |
94 /** |
85 * Rich text viewer. |
95 * Rich text viewer. |
86 * Own. |
96 * Own. |
87 */ |
97 */ |
88 CESMRRichTextViewer* iRichTextViewer; |
98 CESMRRichTextViewer* iRichTextViewer; |
89 |
99 |
90 /** |
100 /** |
91 * Location plugin. |
101 * Location plugin. |
92 * Own. |
102 * Own. |
93 */ |
103 */ |
94 CESMRLocationPlugin* iLocationPlugin; |
104 CESMRLocationPlugin* iLocationPlugin; |
95 |
105 |
96 /** |
106 /** |
97 * Feature settings. |
107 * Feature settings. |
98 * Own. |
108 * Own. |
99 */ |
109 */ |
100 CESMRFeatureSettings* iFeatures; |
110 CESMRFeatureSettings* iFeatures; |
101 |
111 |
102 /** |
112 /** |
103 * Location title. |
113 * Location URL parser. |
104 * Own. |
114 * Own. |
105 */ |
115 */ |
106 HBufC* iLocation; |
116 CESMRUrlParserPlugin* iUrlParser; |
107 }; |
117 }; |
108 |
118 |
109 #endif /* CESMRVIEWERDESCRIPTIONFIELD_H */ |
119 #endif /* CESMRVIEWERDESCRIPTIONFIELD_H */ |