|
1 /* |
|
2 * Copyright (c) 2002-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: Declares container control for application. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef USSDCONTAINER_H |
|
20 #define USSDCONTAINER_H |
|
21 |
|
22 |
|
23 // INCLUDES |
|
24 #include <coecntrl.h> |
|
25 #include <bldvariant.hrh> |
|
26 // Include file for MEikEdwinObserver |
|
27 #include <eikedwob.h> |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CEikEdwin; |
|
31 class CUssdEditorLines; |
|
32 class CUssdAppUi; |
|
33 class CAknsBasicBackgroundControlContext; |
|
34 class CUssdNaviPane; |
|
35 |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * CUssdContainer |
|
41 * Declares container control for application. |
|
42 * |
|
43 * @since 1.0 |
|
44 */ |
|
45 class CUssdContainer : public CCoeControl, |
|
46 public MEikEdwinObserver |
|
47 { |
|
48 public: // Constructors and destructor |
|
49 |
|
50 /** |
|
51 * Constructor. |
|
52 * @param aAppUi A reference to AppUI for container. |
|
53 */ |
|
54 CUssdContainer( CUssdAppUi& aAppUi ); |
|
55 |
|
56 |
|
57 /** |
|
58 * 2nd phase constructor |
|
59 * @param aRect Frame rectangle for container. |
|
60 */ |
|
61 void ConstructL( const TRect& aRect ); |
|
62 |
|
63 /** |
|
64 * Destructor. |
|
65 */ |
|
66 ~CUssdContainer(); |
|
67 |
|
68 public: // New functions |
|
69 |
|
70 /** |
|
71 * Gives editor. |
|
72 * @return Reference to editor |
|
73 */ |
|
74 CEikEdwin& Editor(); |
|
75 |
|
76 public: // Functions from base classes |
|
77 |
|
78 /** |
|
79 * From CoeControl,GetHelpContext. |
|
80 * Does nothing if help is not defined. |
|
81 */ |
|
82 void GetHelpContext( TCoeHelpContext& aContext ) const; |
|
83 |
|
84 /** |
|
85 * From CoeControl, FocusChanged |
|
86 */ |
|
87 void FocusChanged( TDrawNow aDrawNow ); |
|
88 |
|
89 /** |
|
90 * Update the message length information to navipane |
|
91 */ |
|
92 void UpdateNavipaneMsgLengthL(); |
|
93 |
|
94 private: // Functions from base classes |
|
95 |
|
96 /** |
|
97 * From CoeControl, SizeChanged. |
|
98 */ |
|
99 void SizeChanged(); |
|
100 |
|
101 /** |
|
102 * From CoeControl, CountComponentControls. |
|
103 */ |
|
104 TInt CountComponentControls() const; |
|
105 |
|
106 /** |
|
107 * From CCoeControl, ComponentControl. |
|
108 */ |
|
109 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
110 |
|
111 /** |
|
112 * From CCoeControl, Draw. |
|
113 */ |
|
114 void Draw( const TRect& aRect ) const; |
|
115 |
|
116 /** |
|
117 * From CCoeControl, OfferKeyEventL. |
|
118 */ |
|
119 TKeyResponse OfferKeyEventL( |
|
120 const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
121 |
|
122 /** |
|
123 * From CCoeControl, HandleResourceChange |
|
124 */ |
|
125 void HandleResourceChange( TInt aType ); |
|
126 |
|
127 /** |
|
128 * From CCoeControl, MopSupplyObject |
|
129 */ |
|
130 TTypeUid::Ptr MopSupplyObject( TTypeUid aId ); |
|
131 |
|
132 /** |
|
133 * Functions from MEikEdwinObserver, Handle editor event. |
|
134 */ |
|
135 void HandleEdwinEventL( CEikEdwin* aEdwin, TEdwinEvent aEventType ); |
|
136 |
|
137 private: //new functions |
|
138 |
|
139 // Creates edwin |
|
140 CEikEdwin* CreateEdwinL(); |
|
141 |
|
142 private: //data |
|
143 |
|
144 CUssdAppUi& iAppUi; // Application UI |
|
145 CEikEdwin* iEditor; // The edit window. |
|
146 CUssdEditorLines* iLines; // Application ine drawer |
|
147 |
|
148 CAknsBasicBackgroundControlContext* iBgContext; // Skinning context. |
|
149 // The navipane control handler |
|
150 CUssdNaviPane* iNaviPaneHandler; |
|
151 }; |
|
152 |
|
153 #endif // USSDCONTAINER_H |
|
154 |
|
155 // End of File |