1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: CCSXHHtmlTopicView class declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef INC_CCSXHHTMLTOPICVIEW_H__ |
|
20 #define INC_CCSXHHTMLTOPICVIEW_H__ |
|
21 |
|
22 // INCLUDES |
|
23 #include <aknview.h> |
|
24 #include <aknlists.h> |
|
25 |
|
26 class CCSXHHtmlTopicContainer; |
|
27 class TCoeHelpContext; |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * @class CCSXHHtmlTopicView |
|
32 * This class handles BrowserView of the Csxhelp Application |
|
33 */ |
|
34 class CCSXHHtmlTopicView : public CAknView |
|
35 { |
|
36 public: |
|
37 |
|
38 enum THtmlViewType |
|
39 { |
|
40 EHtmlView = 0, |
|
41 EContextHtmlView |
|
42 }; |
|
43 /** |
|
44 * @function NewL |
|
45 * @since S60 3.2 |
|
46 * Construct a CCSXHHtmlTopicView |
|
47 * and return a pointer to the created object |
|
48 * @param aUid - View Id |
|
49 * aFlags - Resource Id |
|
50 * aRect - TRect Object |
|
51 * @return a CCSXHHtmlTopicView Pointer |
|
52 */ |
|
53 static CCSXHHtmlTopicView* NewL(const TUid&, const TInt&,const TRect& aRect); |
|
54 |
|
55 /** |
|
56 * @function ~CCSXHHtmlTopicView |
|
57 * @since S60 3.2 |
|
58 * Destroy the object and release all memory objects |
|
59 */ |
|
60 virtual ~CCSXHHtmlTopicView(); |
|
61 |
|
62 /** |
|
63 * @function SetViewType |
|
64 * @since S60 3.2 |
|
65 * Sets the view type as either normal or context view |
|
66 */ |
|
67 void SetViewTypeL(TInt viewType); |
|
68 |
|
69 /** |
|
70 * @function GetViewType |
|
71 * @since S60 3.2 |
|
72 * Gets the view type as either normal or context view |
|
73 */ |
|
74 TInt GetViewType(); |
|
75 |
|
76 protected: |
|
77 /** |
|
78 * @function CCSXHHtmlTopicView |
|
79 * @since S60 3.2 |
|
80 * Perform the first phase of two phase construction |
|
81 */ |
|
82 CCSXHHtmlTopicView(const TUid&,const TInt&); |
|
83 |
|
84 /** |
|
85 * @function ConstructL |
|
86 * @since S60 3.2 |
|
87 * Perform the second phase construction of a htmltopicview object |
|
88 */ |
|
89 void ConstructL(const TRect& aRect); |
|
90 |
|
91 /** |
|
92 * From MEikMenuObserver |
|
93 * @function DynInitMenuPaneL |
|
94 * used to manage the menu when |
|
95 * no item are in the list box. |
|
96 * We need to delete the "Open" |
|
97 * menu item in this case. |
|
98 * |
|
99 * @since 3.2 |
|
100 * @param aResource resource ID of menu pane |
|
101 * @param aMenuPane instance of menupane |
|
102 */ |
|
103 void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); |
|
104 |
|
105 |
|
106 public: // Functions from base classes |
|
107 /** |
|
108 * From CAknView, return view id of this view |
|
109 * |
|
110 * @function Id |
|
111 * @since 3.2 |
|
112 * @return view id |
|
113 */ |
|
114 TUid Id() const; |
|
115 |
|
116 /** |
|
117 * @function HandleCommandL |
|
118 * @since S60 3.2 |
|
119 * takes care of command handling. |
|
120 * @param aCommand command to be handled |
|
121 */ |
|
122 void HandleCommandL(TInt aCommand); |
|
123 |
|
124 /** |
|
125 * @function ResourceChangeHdl |
|
126 * @since S60 3.2 |
|
127 * Handler for resource change |
|
128 * @param aType - Type of resource change event |
|
129 */ |
|
130 void ResourceChangeHdl(TInt aType); |
|
131 |
|
132 /** |
|
133 * @function ViewActivatedL |
|
134 * @since S60 3.2 |
|
135 * Takes any action required when this view is activated. |
|
136 * Handles this view activation event from view server |
|
137 * @param aPrevViewId - Specifies the view previously active. |
|
138 * aCustomMessageId - Specifies the message type. |
|
139 * aCustomMessage - Activation message |
|
140 */ |
|
141 void ViewActivatedL(const TVwsViewId& aPrevViewId, |
|
142 TUid aCustomMessageId, |
|
143 const TDesC8& aCustomMessage); |
|
144 |
|
145 |
|
146 /** |
|
147 * @function SetSoftKeysL |
|
148 * @since S60 3.2 |
|
149 * Sets SoftKeys |
|
150 * @param aSoftKeys Resource Id |
|
151 */ |
|
152 void SetSoftKeysL(TInt aSoftKeys); |
|
153 |
|
154 /** |
|
155 * @function GetCurrentFontSize |
|
156 * @since S60 3.2 |
|
157 * SetSoftKeysL |
|
158 * @return Current FontSize |
|
159 */ |
|
160 TInt GetCurrentFontSize(); |
|
161 /** |
|
162 * @function SetMiddleSoftKey |
|
163 * @since S60 3.2 |
|
164 * This will set the Label for MSK |
|
165 */ |
|
166 void SetMiddleSoftKey(TBool aValue); |
|
167 |
|
168 /** |
|
169 * From CAknView |
|
170 * @function DoDeactivate |
|
171 * de-activation handler |
|
172 * |
|
173 * @since 3.2 |
|
174 * @param aPrevViewId ID of previious view. |
|
175 */ |
|
176 void DoDeactivate(); |
|
177 #ifdef FF_HELP_TUTORIAL_MERGE |
|
178 /** |
|
179 * Lauch tutorial if exist, else popup a error message |
|
180 * @since S60 3.2 |
|
181 * @param None |
|
182 * @return None |
|
183 */ |
|
184 void LaunchTutorialL(); |
|
185 #endif // FF_HELP_TUTORIAL_MERGE |
|
186 |
|
187 protected: // functions from base classes |
|
188 /** |
|
189 * From CAknView |
|
190 * @function DoActivateL |
|
191 * activation handler |
|
192 * |
|
193 * @since 3.2 |
|
194 * @param aPrevViewId ID of previious view. |
|
195 */ |
|
196 void DoActivateL(const TVwsViewId& aPrevViewId, |
|
197 TUid /* aCustomMessageId */, |
|
198 const TDesC8& /* aCustomMessage */); |
|
199 |
|
200 |
|
201 |
|
202 private: |
|
203 // previous view |
|
204 TVwsViewId iPrevious; |
|
205 CCSXHHtmlTopicContainer* iBCContainer; |
|
206 |
|
207 const TUid& iUid; |
|
208 const TInt& iAppFlags; |
|
209 |
|
210 static TInt iFontSize; |
|
211 |
|
212 TBool iContextTopicView; |
|
213 }; |
|
214 |
|
215 #endif // INC_CCSXHHTMLTOPICVIEW_H__ |
|
216 |
|
217 // End of File |
|