author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 15 Sep 2010 11:52:37 +0300 | |
branch | RCL_3 |
changeset 73 | c8382f7b54ef |
parent 64 | 3533d4323edc |
child 80 | 726fba06891a |
permissions | -rw-r--r-- |
64 | 1 |
/* |
2 |
* Copyright (c) 2007 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: Container class for compose view |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#ifndef CNCSCOMPOSEVIEWCONTAINER_H |
|
20 |
#define CNCSCOMPOSEVIEWCONTAINER_H |
|
21 |
||
22 |
||
23 |
#include <AknDef.h> |
|
24 |
#include <AknsControlContext.h> |
|
25 |
#include <eikedwob.h> |
|
26 |
#include <aknphysicsobserveriface.h> // MAknPhysicsObserver |
|
27 |
||
28 |
#include "ncsfieldsizeobserver.h" |
|
29 |
#include "ncsconstants.h" |
|
30 |
#include "FreestyleEmailUiContactHandlerObserver.h" |
|
31 |
#include "FreestyleEmailUi.hrh" |
|
32 |
#include <aknlongtapdetector.h> |
|
33 |
#include "FSAsyncTextFormatter.h" |
|
34 |
||
35 |
class CAknPhysics; |
|
36 |
class CNcsEditor; |
|
37 |
class CNcsComposeView; |
|
38 |
class CNcsHeaderContainer; |
|
39 |
class CAknLongTapDetector; |
|
40 |
class CAknDoubleSpanScrollBar; |
|
41 |
class CFSMailBox; |
|
42 |
class CAknsLayeredBackgroundControlContext; |
|
43 |
class CFsAutoSaver; |
|
44 |
class CNcsEmailAddressObject; |
|
45 |
||
46 |
enum TAppendAddresses |
|
47 |
{ |
|
48 |
EAppendTo, |
|
49 |
EAppendCc, |
|
50 |
EAppendBcc |
|
51 |
}; |
|
52 |
||
53 |
||
54 |
/** |
|
55 |
* CNcsComposeViewContainer container control class. |
|
56 |
*/ |
|
57 |
class CNcsComposeViewContainer: public CCoeControl, public MNcsFieldSizeObserver, |
|
58 |
public MEikScrollBarObserver, |
|
59 |
public MFSEmailUiContactHandlerObserver, |
|
60 |
public MAknLongTapDetectorCallBack, |
|
61 |
public MEikEdwinObserver, |
|
62 |
public MEikEdwinSizeObserver, |
|
63 |
public MAknPhysicsObserver, |
|
64 |
public MAsyncTextFormatterObserver |
|
65 |
{ |
|
66 |
||
67 |
public: |
|
68 |
||
69 |
/** Initialisation flags. */ |
|
70 |
enum TInitFlags |
|
71 |
{ |
|
72 |
ECcFieldVisible = 0x1, |
|
73 |
EBccFieldVisible = 0x2 |
|
74 |
}; |
|
75 |
||
76 |
/** |
|
77 |
* Two-phased constructor. |
|
78 |
* Create a CNcsComposeViewContainer object, that draws itself to aRect |
|
79 |
* @param aView The parent view of this container. |
|
80 |
* @param aRect The rectangle this view will be drawn to. |
|
81 |
* @param aMailBox reference to current mailbox item. |
|
82 |
* @param aFlags Initilisation flags defined in @c TInitFlag enumeration. |
|
83 |
* @return a pointer to the created instance of CNcsComposeViewContainer. |
|
84 |
*/ |
|
85 |
static CNcsComposeViewContainer* NewL( CNcsComposeView& aView, |
|
86 |
const TRect& aRect, CFSMailBox& aMailBox, CFsAutoSaver& aAutoSaver, |
|
87 |
TInt aFlags = NULL ); |
|
88 |
||
89 |
/** |
|
90 |
* Destructor. |
|
91 |
*/ |
|
92 |
virtual ~CNcsComposeViewContainer(); |
|
93 |
||
94 |
public: // new functions |
|
95 |
||
96 |
/** |
|
97 |
* UpdateScrollBar |
|
98 |
* Updates scroll bar data. |
|
99 |
*/ |
|
100 |
void UpdateScrollBar(); |
|
101 |
||
102 |
/** |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
103 |
* Updates scroll visibility. |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
104 |
* @param aVisible Whether or not to set scroll bar visible. |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
105 |
*/ |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
106 |
void UpdateScrollBarVisibility( TBool aVisible ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
107 |
|
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
108 |
/** |
64 | 109 |
* GetToFieldAddressesL |
110 |
* Get addresses in TO-field. |
|
111 |
* @return Array of address objects. |
|
112 |
*/ |
|
113 |
const RPointerArray<CNcsEmailAddressObject>& |
|
114 |
GetToFieldAddressesL( TBool aParseNow=ETrue ); |
|
115 |
||
116 |
/** |
|
117 |
* GetCcFieldAddressesL |
|
118 |
* Get addresses in CC-field. |
|
119 |
* @return Array of address objects. |
|
120 |
*/ |
|
121 |
const RPointerArray<CNcsEmailAddressObject>& |
|
122 |
GetCcFieldAddressesL( TBool aParseNow=ETrue ); |
|
123 |
||
124 |
/** |
|
125 |
* GetBccFieldAddressesL |
|
126 |
* Get addresses in BCC-field. |
|
127 |
* @return Array of address objects. |
|
128 |
*/ |
|
129 |
const RPointerArray<CNcsEmailAddressObject>& |
|
130 |
GetBccFieldAddressesL( TBool aParseNow=ETrue ); |
|
131 |
||
132 |
/** |
|
133 |
* GetSubjectLC |
|
134 |
* Get text in subject field. |
|
135 |
* @return Descriptor containing subject field text. |
|
136 |
*/ |
|
137 |
HBufC* GetSubjectLC() const; |
|
138 |
||
139 |
/** |
|
140 |
* GetToFieldSelectionLength |
|
141 |
* Get the length of selected text in TO-field. |
|
142 |
* @return Selection length. |
|
143 |
*/ |
|
144 |
TInt GetToFieldSelectionLength() const; |
|
145 |
||
146 |
/** |
|
147 |
* GetCcFieldSelectionLength |
|
148 |
* Get the length of selected text in CC-field. |
|
149 |
* @return Selection length. |
|
150 |
*/ |
|
151 |
TInt GetCcFieldSelectionLength() const; |
|
152 |
||
153 |
/** |
|
154 |
* GetBccFieldSelectionLength |
|
155 |
* Get the length of selected text in BCC-field. |
|
156 |
* @return Selection length. |
|
157 |
*/ |
|
158 |
TInt GetBccFieldSelectionLength() const; |
|
159 |
||
160 |
/** |
|
161 |
* GetToFieldLength |
|
162 |
* Get TO-field text length. |
|
163 |
* @return Text length. |
|
164 |
*/ |
|
165 |
TInt GetToFieldLength() const; |
|
166 |
||
167 |
/** |
|
168 |
* GetCcFieldLength |
|
169 |
* Get CC-field text length. |
|
170 |
* @return Text length. |
|
171 |
*/ |
|
172 |
TInt GetCcFieldLength() const; |
|
173 |
||
174 |
/** |
|
175 |
* GetBccFieldLength |
|
176 |
* Get BCC-field text length. |
|
177 |
* @return Text length. |
|
178 |
*/ |
|
179 |
TInt GetBccFieldLength() const; |
|
180 |
||
181 |
/** |
|
182 |
* GetSubjectFieldLength |
|
183 |
* Get SUBJECT-field text length. |
|
184 |
* @return Text length. |
|
185 |
*/ |
|
186 |
TInt GetSubjectFieldLength() const; |
|
187 |
||
188 |
/** |
|
189 |
* GetMessageFieldLength |
|
190 |
* Get MESSAGE-field text length. |
|
191 |
* @return Text length. |
|
192 |
*/ |
|
193 |
TInt GetMessageFieldLength() const; |
|
194 |
||
195 |
/** |
|
196 |
* GetAttachmentCount |
|
197 |
* Get number of attachments. |
|
198 |
* @return Attachment count. |
|
199 |
*/ |
|
200 |
TInt GetAttachmentCount() const; |
|
201 |
||
202 |
/** |
|
203 |
* HasRemoteAttachments |
|
204 |
* Tells if the message has one or more remote attachments |
|
205 |
* @return ETrue if the message has at least one remote attachment. |
|
206 |
*/ |
|
207 |
TBool HasRemoteAttachments() const; |
|
208 |
||
209 |
/** |
|
210 |
* GetLookupTextLC |
|
211 |
* Get the text to match for fast addressing or remote lookup. |
|
212 |
* @return Match text. |
|
213 |
*/ |
|
214 |
HBufC* GetLookupTextLC() const; |
|
215 |
||
216 |
/** |
|
217 |
* SetToFieldAddressesL |
|
218 |
* Set TO-field addresses. |
|
219 |
* @param aAddress Array of address objects. |
|
220 |
*/ |
|
221 |
void SetToFieldAddressesL( |
|
222 |
RPointerArray<CNcsEmailAddressObject>& aAddress ); |
|
223 |
||
224 |
/** |
|
225 |
* SetCcFieldAddressesL |
|
226 |
* Set CC-field addresses. |
|
227 |
* @param aAddress Array of address objects. |
|
228 |
*/ |
|
229 |
void SetCcFieldAddressesL( |
|
230 |
RPointerArray<CNcsEmailAddressObject>& aAddress ); |
|
231 |
||
232 |
/** |
|
233 |
* SetBccFieldAddressesL |
|
234 |
* Set BCC-field addresses. |
|
235 |
* @param aAddress Array of address objects. |
|
236 |
*/ |
|
237 |
void SetBccFieldAddressesL( |
|
238 |
RPointerArray<CNcsEmailAddressObject>& aAddress ); |
|
239 |
||
240 |
/** |
|
241 |
* AppendToFieldAddressesL |
|
242 |
* Append TO-field addresses. |
|
243 |
* @param aAddress Array of address objects. |
|
244 |
*/ |
|
245 |
void AppendToFieldAddressesL( |
|
246 |
RPointerArray<CNcsEmailAddressObject>& aAddress ); |
|
247 |
||
248 |
/** |
|
249 |
* AppendCcFieldAddressesL |
|
250 |
* Append CC-field addresses. |
|
251 |
* @param aAddress Array of address objects. |
|
252 |
*/ |
|
253 |
void AppendCcFieldAddressesL( |
|
254 |
RPointerArray<CNcsEmailAddressObject>& aAddress ); |
|
255 |
||
256 |
/** |
|
257 |
* AppendBccFieldAddressesL |
|
258 |
* Append BCC-field addresses. |
|
259 |
* @param aAddress Array of address objects. |
|
260 |
*/ |
|
261 |
void AppendBccFieldAddressesL( |
|
262 |
RPointerArray<CNcsEmailAddressObject>& aAddress ); |
|
263 |
||
264 |
/** |
|
265 |
* SetSubjectL |
|
266 |
* Set SUBJECT-field text. |
|
267 |
* @param aSubject Text. |
|
268 |
*/ |
|
269 |
void SetSubjectL( const TDesC& aSubject ); |
|
270 |
||
271 |
/** |
|
272 |
* SetCcFieldVisibleL |
|
273 |
* Set the visibility of CC-field. |
|
274 |
* @param aVisible True if the field is to be visible. |
|
275 |
* @param aFocus True if the field is to be focused. |
|
276 |
*/ |
|
277 |
void SetCcFieldVisibleL( TBool aVisible, TBool aFocus=ETrue ); |
|
278 |
||
279 |
/** |
|
280 |
* SetBccFieldVisibleL |
|
281 |
* Set the visibility of BCC-field. |
|
282 |
* @param aVisible True if the field is to be visible. |
|
283 |
* @param aFocus True if the field is to be focused. |
|
284 |
*/ |
|
285 |
void SetBccFieldVisibleL( TBool aVisible, TBool aFocus=ETrue ); |
|
286 |
||
287 |
/** |
|
288 |
* SetMenuBar |
|
289 |
* Set the menu bar. |
|
290 |
* @param aMenuBar The menu bar. |
|
291 |
*/ |
|
292 |
void SetMenuBar( CEikButtonGroupContainer* aMenuBar ); |
|
293 |
||
294 |
/** |
|
295 |
* SetAttachmentLabelTextsL |
|
296 |
* Set attachment label informations from arrays of file name and |
|
297 |
* size informations. Some decorations may be added. |
|
298 |
* The file name will be truncated autoamtically if needed. |
|
299 |
* The method takes ownership of the passed arrays. |
|
300 |
* @param aAttachmentNames Descriptor array containing file names. |
|
301 |
* @param aAttachmentSizes Descriptor array containing file sizes. |
|
302 |
*/ |
|
303 |
void SetAttachmentLabelTextsLD( CDesCArray* aAttachmentNames, |
|
304 |
CDesCArray* aAttachmentSizes ); |
|
305 |
||
306 |
/** |
|
307 |
* FocusedAttachmentLabelIndex |
|
308 |
* Returns the index of the attachment label that is currently focused |
|
309 |
* @return Index of the focused attachment label. |
|
310 |
*/ |
|
311 |
TInt FocusedAttachmentLabelIndex(); |
|
312 |
||
313 |
/** |
|
314 |
* FixSemicolonL |
|
315 |
* Fixes possibly missing semicolon in message header address fields. |
|
316 |
*/ |
|
317 |
void FixSemicolonL(); |
|
318 |
||
319 |
void HideAttachmentLabel(); |
|
320 |
||
321 |
/** |
|
322 |
* IsCcFieldVisible |
|
323 |
* Test if CC-field is visible. |
|
324 |
* @return True if visible. |
|
325 |
*/ |
|
326 |
TBool IsCcFieldVisible() const; |
|
327 |
||
328 |
/** |
|
329 |
* IsBccFieldVisible |
|
330 |
* Test if BCC-field is visible. |
|
331 |
* @return True if visible. |
|
332 |
*/ |
|
333 |
TBool IsBccFieldVisible() const; |
|
334 |
||
335 |
/** |
|
336 |
* IsFocusTo |
|
337 |
* Test if TO-field is focused. |
|
338 |
* @return True if focused. |
|
339 |
*/ |
|
340 |
TBool IsFocusTo() const; |
|
341 |
||
342 |
/** |
|
343 |
* IsFocusCc |
|
344 |
* Test if CC-field is focused. |
|
345 |
* @return True if focused. |
|
346 |
*/ |
|
347 |
TBool IsFocusCc() const; |
|
348 |
||
349 |
/** |
|
350 |
* IsFocusBcc |
|
351 |
* Test if BCC-field is focused. |
|
352 |
* @return True if focused. |
|
353 |
*/ |
|
354 |
TBool IsFocusBcc() const; |
|
355 |
||
356 |
/** |
|
357 |
* IsFocusAttachments |
|
358 |
* Test if ATTACHMENTS-field is focused. |
|
359 |
* @return True if focused. |
|
360 |
*/ |
|
361 |
TBool IsFocusAttachments() const; |
|
362 |
||
363 |
/** |
|
364 |
* IncludeAddressL |
|
365 |
*/ |
|
366 |
void IncludeAddressL(); |
|
367 |
||
368 |
/** |
|
369 |
* IncludeAddressL |
|
370 |
*/ |
|
371 |
void IncludeAddressL(const CNcsEmailAddressObject& eml); |
|
372 |
||
373 |
/** |
|
374 |
* ClosePopupContactListL |
|
375 |
* Closes the popup listbox. |
|
376 |
*/ |
|
377 |
void ClosePopupContactListL(); |
|
378 |
||
379 |
/** |
|
380 |
* DeleteSelectionL |
|
381 |
* Deletes selected text in focused AIF |
|
382 |
*/ |
|
383 |
void DeleteSelectionL(); |
|
384 |
||
385 |
/** |
|
386 |
* Set the contents of the message body. |
|
387 |
* @param aMessage Contents of MESSAGE-field. |
|
388 |
* @parem aReadOnlyQuote Contents of read-only quote field. |
|
389 |
*/ |
|
390 |
void SetBodyContentL( const TDesC& aMessage, const TDesC& aReadOnlyQuote ); |
|
391 |
||
392 |
/** |
|
393 |
* Set the contents of the message body in asnchronous way. |
|
394 |
* @param aMessage Contents of MESSAGE-field. |
|
395 |
* @param aReadOnlyQuote Contents of read-only quote field. |
|
396 |
*/ |
|
397 |
void SetBodyContentAsyncL( const TDesC& aMessage, const TDesC& aReadOnlyQuote ); |
|
398 |
||
399 |
/** |
|
400 |
* Get the contents of message body. The message body consists of |
|
401 |
* MESSAGE-field followed by optional read-only quote field. |
|
402 |
* @return Message body. |
|
403 |
*/ |
|
404 |
HBufC* GetBodyContentLC(); |
|
405 |
||
406 |
/** |
|
407 |
* BodyText |
|
408 |
* Gets modifiable reference to the text in body text field. |
|
409 |
*/ |
|
410 |
CRichText& BodyText(); |
|
411 |
||
412 |
/** |
|
413 |
* SetFocusToToField |
|
414 |
* Focuses the TO-field. |
|
415 |
*/ |
|
416 |
void SetFocusToToField(); |
|
417 |
||
418 |
/** |
|
419 |
* SetFocusToAttachmentField |
|
420 |
* Focuses the ATTACHEMENT-field. |
|
421 |
*/ |
|
422 |
void SetFocusToAttachmentField(); |
|
423 |
||
424 |
/** |
|
425 |
* SetFocusToMessageFieldL |
|
426 |
* Focuses the MESSAGE-field. |
|
427 |
*/ |
|
428 |
void SetFocusToMessageFieldL(); |
|
429 |
||
430 |
/** |
|
431 |
* AddQuickTextL |
|
432 |
* Inserts text in current cursor position. |
|
433 |
* @param aText Text to insert. |
|
434 |
*/ |
|
435 |
void AddQuickTextL( const TDesC& aText ); |
|
436 |
||
437 |
/** |
|
438 |
* SelectAllToFieldTextL |
|
439 |
* Selects all TO-field text. |
|
440 |
*/ |
|
441 |
void SelectAllToFieldTextL(); |
|
442 |
||
443 |
/** |
|
444 |
* SelectAllCcFieldTextL |
|
445 |
* Selects all CC-field text. |
|
446 |
*/ |
|
447 |
void SelectAllCcFieldTextL(); |
|
448 |
||
449 |
/** |
|
450 |
* SelectAllBccFieldTextL |
|
451 |
* Selects all BCC-field text. |
|
452 |
*/ |
|
453 |
void SelectAllBccFieldTextL(); |
|
454 |
||
455 |
/** |
|
456 |
* SelectAllSubjectFieldTextL |
|
457 |
* Selects all SUBJECT-field text. |
|
458 |
*/ |
|
459 |
void SelectAllSubjectFieldTextL(); |
|
460 |
||
461 |
/** |
|
462 |
* IsSubjectFieldEmpty |
|
463 |
* Tells if SUBJECT-field is empty (has default text or is empty). |
|
464 |
* @return True if user has not put anything to the field. |
|
465 |
*/ |
|
466 |
TBool IsSubjectFieldEmpty(); |
|
467 |
||
468 |
/** |
|
469 |
* AppendAddressesL |
|
470 |
* Displays contacts dialog and appends selected addresses in |
|
471 |
* focused AIF. |
|
472 |
* |
|
473 |
* @return ETrue if addresses we tried to append, EFalse otherwise. |
|
474 |
*/ |
|
475 |
TBool AppendAddressesL(); |
|
476 |
||
477 |
/** |
|
478 |
* HandleAttachmentsOpenCommand |
|
479 |
* |
|
480 |
*/ |
|
481 |
void HandleAttachmentsOpenCommandL(); |
|
482 |
||
483 |
/** |
|
484 |
* LaunchStylusPopupMenu |
|
485 |
* |
|
486 |
*/ |
|
487 |
void LaunchStylusPopupMenu( const TPoint& aPenEventScreenLocation ); |
|
488 |
||
489 |
/** |
|
490 |
* AreAddressFieldsEmpty |
|
491 |
* |
|
492 |
*/ |
|
493 |
TBool AreAddressFieldsEmpty(); |
|
494 |
||
495 |
void DoPopupSelectL(); |
|
496 |
||
497 |
void HandleLayoutChangeL(); |
|
498 |
||
499 |
void HandleSkinChangeL(); |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
500 |
|
64 | 501 |
TInt ContentTotalHeight(); |
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
502 |
TInt VisibleAreaHeight(); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
503 |
|
64 | 504 |
/** |
505 |
* CommitL |
|
506 |
* Commits changes to message |
|
507 |
*/ |
|
508 |
void CommitL( TFieldToCommit aFieldToCommit = EAllFields ); |
|
509 |
||
510 |
/** |
|
511 |
* SwitchChangeMskOff |
|
512 |
* Sets up iSwitchChangeMskOff falg, which disables changes of MSK label |
|
513 |
* if any popup dialog is open |
|
514 |
*/ |
|
515 |
void SwitchChangeMskOff(TBool aTag); |
|
516 |
||
517 |
/** |
|
518 |
* Scroll |
|
519 |
* @param aTargetPos Scrolls display to given position |
|
520 |
*/ |
|
521 |
void Scroll( TInt aTargetPos, TBool aDrawNow = ETrue ); |
|
522 |
||
523 |
/** |
|
524 |
* Stopping asynchronous text formatting of message body. |
|
525 |
*/ |
|
526 |
void StopAsyncTextFormatter(); |
|
527 |
||
528 |
public: // from MAsyncTextFormatterObserver |
|
529 |
||
530 |
/** |
|
531 |
* Called when text formatting was cancelled. |
|
532 |
*/ |
|
533 |
void FormatAllTextCancelled(); |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
534 |
|
64 | 535 |
/** |
536 |
* Called when text formatting is complete. |
|
537 |
*/ |
|
538 |
void FormatAllTextComplete(); |
|
539 |
||
540 |
public: // from CoeControl |
|
541 |
||
542 |
/** |
|
543 |
* Draw |
|
544 |
* Draw this CNcsComposeViewContainer to the screen. |
|
545 |
* @param aRect the rectangle of this view that needs updating |
|
546 |
*/ |
|
547 |
void Draw( const TRect& aRect ) const; |
|
548 |
||
549 |
void SetMskL(); |
|
550 |
||
551 |
/** |
|
552 |
* Handle pointer event |
|
553 |
* |
|
554 |
*/ |
|
555 |
void HandlePointerEventL( const TPointerEvent& aPointerEvent ); |
|
556 |
||
557 |
/** |
|
558 |
* OfferKeyEventL |
|
559 |
* Key event handler. |
|
560 |
* @param aKeyEvent The key event. |
|
561 |
* @param aType The type of key event. |
|
562 |
* @return Indicates whether the key event was used by this control. |
|
563 |
*/ |
|
564 |
TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
565 |
||
566 |
/** |
|
567 |
* SizeChanged |
|
568 |
* Responds to changes to the size and position of the contents of this control. |
|
569 |
*/ |
|
570 |
void SizeChanged(); |
|
571 |
||
572 |
/** |
|
573 |
* Responds to a change in focus. |
|
574 |
* @param aDrawNow Contains the value that was passed to SetFocus. |
|
575 |
*/ |
|
576 |
void FocusChanged(TDrawNow aDrawNow); |
|
577 |
||
578 |
/** |
|
579 |
* MopSupplyObject |
|
580 |
* Retrieves an object of the same type as that encapsulated in aId. |
|
581 |
* @param aId An encapsulated object type ID. |
|
582 |
*/ |
|
583 |
TTypeUid::Ptr MopSupplyObject( TTypeUid aId ); |
|
584 |
||
585 |
/** |
|
586 |
* Informs if Remotesearch is in progress |
|
587 |
*/ |
|
588 |
TBool IsRemoteSearchInprogress() const; |
|
589 |
||
590 |
public: // from MEikScrollBarObserver |
|
591 |
||
592 |
/** |
|
593 |
* HandleScrollEventL |
|
594 |
*/ |
|
595 |
void HandleScrollEventL( |
|
596 |
CEikScrollBar* aScrollBar, TEikScrollEvent aEventType ); |
|
597 |
||
598 |
public: // from MFSEmailUiContactHandlerObserver |
|
599 |
||
600 |
void OperationCompleteL( TContactHandlerCmd aCmd, |
|
601 |
const RPointerArray<CFSEmailUiClsItem>& aContacts ); |
|
602 |
void OperationErrorL( TContactHandlerCmd aCmd, TInt aError ); |
|
603 |
||
604 |
public: // from base class MEikEdwinObserver |
|
605 |
||
606 |
void HandleEdwinEventL( CEikEdwin* aEdwin, TEdwinEvent aEventType ); |
|
607 |
||
608 |
public: // from base class MEikEdwinSizeObserver |
|
609 |
||
610 |
TBool HandleEdwinSizeEventL( CEikEdwin* aEdwin, |
|
611 |
TEdwinSizeEvent aEventType, TSize aDesirableEdwinSize ); |
|
612 |
||
613 |
public: // from MNcsFieldSizeObserver |
|
614 |
||
615 |
TBool UpdateFieldSizeL( TBool aDoScroll ); |
|
616 |
void UpdateFieldPosition( CCoeControl* aAnchor ); |
|
617 |
||
618 |
private: //From MAknLongTapDetectorCallBack |
|
619 |
void HandleLongTapEventL( const TPoint& aPenEventLocation, |
|
620 |
const TPoint& aPenEventScreenLocation ); |
|
621 |
||
622 |
private: |
|
623 |
||
624 |
/** |
|
625 |
* Constructor |
|
626 |
* @param aView The parent view |
|
627 |
*/ |
|
628 |
CNcsComposeViewContainer( CNcsComposeView& aView, CFsAutoSaver& aAutoSaver, |
|
629 |
CFSMailBox& aMailBox ); |
|
630 |
||
631 |
/** |
|
632 |
* ConstructL |
|
633 |
* 2nd phase constructor |
|
634 |
* @param aRect Rectangle where container is drawn to. |
|
635 |
*/ |
|
636 |
void ConstructL( const TRect& aRect, TInt aFlags ); |
|
637 |
||
638 |
/** |
|
639 |
* ChangeFocusL |
|
640 |
* Changes focus according to key event and focused control. |
|
641 |
* @param aKeyEvent The key event. |
|
642 |
* @return Indicates whether the key event was used by this control. |
|
643 |
*/ |
|
644 |
TKeyResponse ChangeFocusL( const TKeyEvent& aKeyEvent ); |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
645 |
|
64 | 646 |
/** |
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
647 |
* UpdateScreenPosition |
64 | 648 |
* @param aKeyCode Needed to recognize presses of the enter key |
649 |
* in moving of display. |
|
650 |
*/ |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
651 |
void UpdateScreenPosition( const TUint& aKeyCode = EKeyNull ); |
64 | 652 |
|
653 |
/** |
|
654 |
* CalculateSeparatorLineSecondaryColor |
|
655 |
* @return Separator line secondary color |
|
656 |
*/ |
|
657 |
TRgb CalculateSeparatorLineSecondaryColor(); |
|
658 |
||
659 |
void UpdatePhysicsL(); |
|
660 |
||
661 |
private: // from MAknPhysicsObserver |
|
662 |
||
663 |
/** |
|
664 |
* @see MAknPhysicsObserver::ViewPositionChanged |
|
665 |
*/ |
|
666 |
virtual void ViewPositionChanged( const TPoint& aNewPosition, |
|
667 |
TBool aDrawNow, TUint aFlags ); |
|
668 |
||
669 |
/** |
|
670 |
* @see MAknPhysicsObserver::PhysicEmulationEnded |
|
671 |
*/ |
|
672 |
virtual void PhysicEmulationEnded(); |
|
673 |
||
674 |
/** |
|
675 |
* @see MAknPhysicsObserver::ViewPosition |
|
676 |
*/ |
|
677 |
virtual TPoint ViewPosition() const; |
|
678 |
||
679 |
private: // data |
|
680 |
||
681 |
/** |
|
682 |
* header container |
|
683 |
*/ |
|
684 |
CNcsHeaderContainer* iHeader; |
|
685 |
||
686 |
/** |
|
687 |
* message body field |
|
688 |
*/ |
|
689 |
CNcsEditor* iMessageField; |
|
690 |
||
691 |
/** |
|
692 |
* field for read-only quote used with some protocols on reply/forward |
|
693 |
*/ |
|
694 |
CNcsEditor* iReadOnlyQuoteField; |
|
695 |
||
696 |
/** |
|
697 |
* currently focused control |
|
698 |
*/ |
|
699 |
CCoeControl* iFocused; |
|
700 |
||
701 |
/** |
|
702 |
* Long tap detector. |
|
703 |
* Owned. |
|
704 |
*/ |
|
705 |
CAknLongTapDetector* iLongTapDetector; |
|
706 |
||
707 |
/** |
|
708 |
* |
|
709 |
*/ |
|
710 |
TPoint iContentBasePoint; |
|
711 |
||
712 |
/** |
|
713 |
* |
|
714 |
*/ |
|
715 |
CAknDoubleSpanScrollBar* iScrollBar; |
|
716 |
||
717 |
/** |
|
718 |
* |
|
719 |
*/ |
|
720 |
TAknDoubleSpanScrollBarModel iScrollBarModel; |
|
721 |
||
722 |
/** |
|
723 |
* |
|
724 |
*/ |
|
725 |
TRect iApplicationRect; |
|
726 |
||
727 |
/** |
|
728 |
* |
|
729 |
*/ |
|
730 |
HBufC* iLengthReference; |
|
731 |
||
732 |
/** |
|
733 |
* owner view |
|
734 |
*/ |
|
735 |
CNcsComposeView& iView; |
|
736 |
||
737 |
TInt iAmountMesFieldMovedUp; |
|
738 |
||
739 |
CFsAutoSaver& iAutoSaver; |
|
740 |
||
741 |
CAknsBasicBackgroundControlContext* iBgContext; |
|
742 |
||
743 |
/** Reference to current mailbox */ |
|
744 |
CFSMailBox& iMailBox; |
|
745 |
||
746 |
TAppendAddresses iAppendAddresses; |
|
747 |
||
748 |
TInt iSeparatorLineYPos; |
|
749 |
||
750 |
// panning related |
|
751 |
CAknPhysics* iPhysics; |
|
752 |
TPoint iPreviousPosition; |
|
753 |
TPoint iOriginalPosition; |
|
754 |
TBool iIsDragging; |
|
755 |
TBool iIsFlicking; |
|
756 |
TTime iStartTime; |
|
757 |
||
758 |
// for body editor row line drawing |
|
759 |
TInt iPrevDesiredHeigth; |
|
760 |
TInt iMessageEditorMinHeigth; |
|
761 |
||
762 |
// not owned contact handler pointer |
|
763 |
CFSEmailUiContactHandler* iContactHandler; |
|
764 |
||
765 |
// Descriptor for read-only quote text. Own. |
|
766 |
HBufC* iReadOnlyQuote; |
|
767 |
||
768 |
TInt iTotalComposerHeight; |
|
769 |
TInt iVisibleAreaHeight; |
|
770 |
TInt iTotalMoveY; |
|
771 |
TInt iSeparatorHeight; |
|
772 |
TInt iHeaderHeight; |
|
773 |
||
774 |
/** |
|
775 |
* Flag for switching off text formatting. |
|
776 |
*/ |
|
777 |
TBool iSwitchOffFormattingText; |
|
778 |
||
779 |
/** |
|
780 |
* Currently processed field - needed by async text formatting. |
|
781 |
*/ |
|
782 |
CNcsEditor* iProcessedField; |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
783 |
|
64 | 784 |
/** |
785 |
* Async text formatter. |
|
786 |
* Own. |
|
787 |
*/ |
|
788 |
CFSAsyncTextFormatter* iAsyncTextFormatter; |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
789 |
|
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
790 |
// Cmail pane rect, calculated during SizeChanged. |
64 | 791 |
TRect iCmailPaneRect; |
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
792 |
// Header origin, calculated during SizeChanged. |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
793 |
TPoint iHeaderPos; |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
794 |
|
64 | 795 |
}; |
796 |
||
797 |
||
798 |
#endif |