|
1 /* |
|
2 * Copyright (c) 2009 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: Response dialog's custom control implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CESMRRESPONSEDIALOGVIEW_H |
|
20 #define CESMRRESPONSEDIALOGVIEW_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <coecntrl.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CAknsBasicBackgroundControlContext; |
|
27 class CEikRichTextEditor; |
|
28 |
|
29 /** |
|
30 * View for response dialog. |
|
31 * |
|
32 * @lib esmrgui.lib |
|
33 */ |
|
34 NONSHARABLE_CLASS( CESMRResponseDialogView ) : public CCoeControl |
|
35 { |
|
36 public: |
|
37 /** |
|
38 * Two-phased constructor. |
|
39 */ |
|
40 static CESMRResponseDialogView* NewL(); |
|
41 |
|
42 /** |
|
43 * Destructor. |
|
44 */ |
|
45 ~CESMRResponseDialogView(); |
|
46 |
|
47 /** |
|
48 * Fetches the text written to dialog, Ownership |
|
49 * is trasferred |
|
50 * @return HBufC Text in buffer |
|
51 */ |
|
52 HBufC* GetTextL(); |
|
53 |
|
54 public:// From CCoeControl |
|
55 void Draw(const TRect& aRect) const; |
|
56 TInt CountComponentControls() const; |
|
57 CCoeControl* ComponentControl( TInt aInd ) const; |
|
58 void SetContainerWindowL(const CCoeControl& aContainer); |
|
59 TKeyResponse OfferKeyEventL(const TKeyEvent& aEvent, TEventCode aType); |
|
60 void HandleResourceChange( TInt aType ); |
|
61 TTypeUid::Ptr MopSupplyObject( TTypeUid aId ); |
|
62 void SizeChanged(); |
|
63 |
|
64 private: |
|
65 |
|
66 CESMRResponseDialogView(); |
|
67 void ConstructL(); |
|
68 private: // Data |
|
69 /// Own: |
|
70 CEikRichTextEditor* iEditor; |
|
71 /// Own: bg context |
|
72 CAknsBasicBackgroundControlContext* iBgContext; |
|
73 }; |
|
74 |
|
75 #endif // CESMRRESPONSEDIALOGVIEW_H |