|
1 /* |
|
2 * Copyright (c) 2005-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: Handles of drawing text on navi and title panes. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_AISTATUSPANEL_H |
|
20 #define C_AISTATUSPANEL_H |
|
21 |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <telephonydomainpstypes.h> |
|
25 |
|
26 class CEikStatusPane; |
|
27 class CAknTitlePane; |
|
28 class CAknNavigationControlContainer; |
|
29 class CAknNavigationDecorator; |
|
30 class MAknNaviDecoratorObserver; |
|
31 class MAknTitlePaneObserver; |
|
32 |
|
33 namespace AiNativeUiController |
|
34 { |
|
35 |
|
36 /** |
|
37 * This class is used to draw text on navi and title pane. |
|
38 * And to draw bitmap on title pane. |
|
39 * |
|
40 * @since S60 3.2 |
|
41 */ |
|
42 class CAiStatusPanel : public CBase |
|
43 { |
|
44 public: |
|
45 |
|
46 static CAiStatusPanel* NewL(); |
|
47 |
|
48 virtual ~CAiStatusPanel(); |
|
49 |
|
50 /** |
|
51 * Get size for oplogo based on titlepane layout |
|
52 * @param aSize Operator logo size. |
|
53 * @return Error code. |
|
54 */ |
|
55 TInt GetTitlePaneSize( TSize& aSize ); |
|
56 |
|
57 /** |
|
58 * Updates operator indicator of phone application. |
|
59 * @param aDisplayInfo display info of operator indicator. |
|
60 */ |
|
61 void UpdatePhoneDisplayInfo( const TTelTitleDisplay& aDisplayInfo ); |
|
62 |
|
63 /** |
|
64 * Store text for navi pane. |
|
65 * Navi pane is not rendered until RenderNaviPaneL is called. |
|
66 * |
|
67 * @param aText Text for navi pane. |
|
68 */ |
|
69 void SetNaviPaneTextL( const TDesC& aText ); |
|
70 |
|
71 /** |
|
72 * Store text for title pane. |
|
73 * Title pane is not rendered until RenderTitlePaneL is called. |
|
74 * |
|
75 * @param aText Text for title pane. |
|
76 */ |
|
77 void SetTitlePaneTextL( const TDesC& aText ); |
|
78 |
|
79 /** |
|
80 * Store bitmap that is later set to title pane. |
|
81 * Title pane is not rendered until RenderTitlePaneL is called. |
|
82 * |
|
83 * @param aBitmapHandle Handle for bitmap. |
|
84 * @param aMaskHandle Handle for mask. |
|
85 */ |
|
86 void SetTitlePaneBitmapL( TInt aBitmapHandle, TInt aMaskHandle ); |
|
87 |
|
88 /** |
|
89 * Draw stored data to navi pane. |
|
90 */ |
|
91 void RenderNaviPaneL(); |
|
92 |
|
93 /** |
|
94 * Draw stored data to title pane. |
|
95 */ |
|
96 void RenderTitlePaneL(); |
|
97 |
|
98 /** |
|
99 * Stop titlepane text scrolling. |
|
100 */ |
|
101 void StopTitlePaneScrollingL(); |
|
102 |
|
103 /** |
|
104 * Resume titlepane text scrolling |
|
105 */ |
|
106 void ScrollTitlePaneTextL(); |
|
107 |
|
108 /** |
|
109 * Set navi decorator observer |
|
110 * @param aObserver navi decorator observer |
|
111 */ |
|
112 void SetNaviDecoratorObserver( MAknNaviDecoratorObserver* aObserver ); |
|
113 |
|
114 /** |
|
115 * Set title pane observer |
|
116 * @param aObserver title pane observer |
|
117 */ |
|
118 void SetTitlePaneObserver( MAknTitlePaneObserver* aObserver ); |
|
119 |
|
120 /** |
|
121 * Check keylock status |
|
122 */ |
|
123 TBool IsKeyLockEnabled(); |
|
124 |
|
125 |
|
126 private: |
|
127 |
|
128 CAiStatusPanel(); |
|
129 |
|
130 void ConstructL(); |
|
131 |
|
132 /** |
|
133 * Triggers text rendering on Navi pane |
|
134 */ |
|
135 void RenderTextOnNaviPaneL(); |
|
136 |
|
137 /** |
|
138 * Triggers text rendering on Title pane |
|
139 */ |
|
140 void RenderTextOnTitlePaneL(); |
|
141 |
|
142 /** |
|
143 * Triggers image rendering on Title pane |
|
144 */ |
|
145 void RenderBitmapOnTitlePaneL(); |
|
146 |
|
147 |
|
148 |
|
149 private: // data |
|
150 |
|
151 /** |
|
152 * Pointer to status pane. |
|
153 * Not own. |
|
154 */ |
|
155 CEikStatusPane* iStatusPane; |
|
156 |
|
157 /** |
|
158 * Pointer to title pane. |
|
159 * Not own. |
|
160 */ |
|
161 CAknTitlePane* iTitlePane; |
|
162 |
|
163 /** |
|
164 * Pointer to navi pane. |
|
165 * Not own. |
|
166 */ |
|
167 CAknNavigationControlContainer* iNaviPane; |
|
168 |
|
169 /** |
|
170 * Pointer to navi decorator. |
|
171 * Own. |
|
172 */ |
|
173 CAknNavigationDecorator* iNaviDecorator; |
|
174 |
|
175 /** |
|
176 * Telephony display information. |
|
177 * Not own. |
|
178 */ |
|
179 TTelTitleDisplay iDisplayInfo; |
|
180 |
|
181 /** |
|
182 * Text that is written to navi pane. |
|
183 * Own. |
|
184 */ |
|
185 HBufC* iNaviPaneText; |
|
186 |
|
187 /** |
|
188 * Text that is written to title pane. |
|
189 * Own if text is not rendered. See iTitlePaneTextTransferred member. |
|
190 */ |
|
191 HBufC* iTitlePaneText; |
|
192 |
|
193 /** |
|
194 * Bitmap handle for setting image to title pane. |
|
195 */ |
|
196 TInt iBitmapHandle; |
|
197 |
|
198 /** |
|
199 * Mask handle for setting image to title pane. |
|
200 */ |
|
201 TInt iMaskHandle; |
|
202 |
|
203 /** |
|
204 * Navidecorator observer |
|
205 */ |
|
206 MAknNaviDecoratorObserver* iNaviDecoratorObserver; |
|
207 |
|
208 /** |
|
209 * Flag to indicate wheter text is published to title pane |
|
210 */ |
|
211 TBool iTextInTitlePane; |
|
212 }; |
|
213 |
|
214 } // namespace AiNativeUiController |
|
215 |
|
216 #endif // C_AISTATUSPANEL_H |