|
1 /* |
|
2 * Copyright (c) 2008 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: test eikscrlb.h |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // [INCLUDE FILES] |
|
20 #include <eikscrlb.h> |
|
21 |
|
22 #include "testsdkscroller.h" |
|
23 #include "testsdkscrollercontrol.h" |
|
24 #include "testsdkscrollereikscrlb.h" |
|
25 |
|
26 // CONSTANTS |
|
27 const TInt KPointX = 5; |
|
28 const TInt KPointY = 5; |
|
29 const TInt KWidth = 100; |
|
30 const TInt KHeight = 100; |
|
31 const TInt KLength = 9; |
|
32 |
|
33 // ============================ MEMBER FUNCTIONS =============================== |
|
34 |
|
35 // ----------------------------------------------------------------------------- |
|
36 // CTestSDKScroller::TestSDKEikSbmDefConsL |
|
37 // ----------------------------------------------------------------------------- |
|
38 // |
|
39 TInt CTestSDKScroller::TestSDKEikSbmDefConsL( CStifItemParser& /*aItem*/ ) |
|
40 { |
|
41 |
|
42 // Print to UI |
|
43 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
44 _LIT( KTestSDKEikSbmDefCons, "in EikSbmDefCons" ); |
|
45 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbmDefCons ); |
|
46 // Print to log file |
|
47 iLog->Log( KTestSDKEikSbmDefCons ); |
|
48 |
|
49 TEikScrollBarModel* sbModel = new ( ELeave ) TEikScrollBarModel; |
|
50 CleanupStack::PushL( sbModel ); |
|
51 STIF_ASSERT_NOT_NULL( sbModel ); |
|
52 |
|
53 CleanupStack::PopAndDestroy( sbModel ); |
|
54 return KErrNone; |
|
55 |
|
56 } |
|
57 |
|
58 // ----------------------------------------------------------------------------- |
|
59 // CTestSDKScroller::TestSDKEikSbmDefConsWithPaL |
|
60 // ----------------------------------------------------------------------------- |
|
61 // |
|
62 TInt CTestSDKScroller::TestSDKEikSbmDefConsWithPaL( CStifItemParser& /*aItem*/ ) |
|
63 { |
|
64 |
|
65 // Print to UI |
|
66 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
67 _LIT( KTestSDKEikSbmDefConsWithPa, "in EikSbmDefConsWithPa" ); |
|
68 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbmDefConsWithPa ); |
|
69 // Print to log file |
|
70 iLog->Log( KTestSDKEikSbmDefConsWithPa ); |
|
71 |
|
72 TInt scSpan = 0; |
|
73 TEikScrollBarModel* sbModel = new ( ELeave ) TEikScrollBarModel( scSpan ); |
|
74 CleanupStack::PushL( sbModel ); |
|
75 STIF_ASSERT_NOT_NULL( sbModel ); |
|
76 |
|
77 CleanupStack::PopAndDestroy( sbModel ); |
|
78 return KErrNone; |
|
79 |
|
80 } |
|
81 |
|
82 // ----------------------------------------------------------------------------- |
|
83 // CTestSDKScroller::TestSDKEikSbmEquOpaL |
|
84 // ----------------------------------------------------------------------------- |
|
85 // |
|
86 TInt CTestSDKScroller::TestSDKEikSbmEquOpaL( CStifItemParser& /*aItem*/ ) |
|
87 { |
|
88 |
|
89 // Print to UI |
|
90 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
91 _LIT( KTestSDKEikSbmEquOpa, "in EikSbmEquOpa" ); |
|
92 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbmEquOpa ); |
|
93 // Print to log file |
|
94 iLog->Log( KTestSDKEikSbmEquOpa ); |
|
95 |
|
96 TInt scSpan = 0; |
|
97 TEikScrollBarModel* sbModel = new ( ELeave ) TEikScrollBarModel( scSpan ); |
|
98 CleanupStack::PushL( sbModel ); |
|
99 TEikScrollBarModel* model = new ( ELeave ) TEikScrollBarModel( scSpan ); |
|
100 CleanupStack::PushL( model ); |
|
101 STIF_ASSERT_TRUE( *sbModel == *model ); |
|
102 |
|
103 CleanupStack::PopAndDestroy( model ); |
|
104 CleanupStack::PopAndDestroy( sbModel ); |
|
105 return KErrNone; |
|
106 |
|
107 } |
|
108 |
|
109 // ----------------------------------------------------------------------------- |
|
110 // CTestSDKScroller::TestSDKEikSbmNotEquOpaL |
|
111 // ----------------------------------------------------------------------------- |
|
112 // |
|
113 TInt CTestSDKScroller::TestSDKEikSbmNotEquOpaL( CStifItemParser& /*aItem*/ ) |
|
114 { |
|
115 |
|
116 // Print to UI |
|
117 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
118 _LIT( KTestSDKEikSbmNotEquOpa, "in EikSbmNotEquOpa" ); |
|
119 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbmNotEquOpa ); |
|
120 // Print to log file |
|
121 iLog->Log( KTestSDKEikSbmNotEquOpa ); |
|
122 |
|
123 TInt scSpan = 0; |
|
124 TEikScrollBarModel* sbModel = new ( ELeave ) TEikScrollBarModel( scSpan ); |
|
125 CleanupStack::PushL( sbModel ); |
|
126 TEikScrollBarModel* model = new ( ELeave ) TEikScrollBarModel( scSpan ); |
|
127 CleanupStack::PushL( model ); |
|
128 STIF_ASSERT_FALSE( *sbModel != *model ); |
|
129 |
|
130 CleanupStack::PopAndDestroy( model ); |
|
131 CleanupStack::PopAndDestroy( sbModel ); |
|
132 return KErrNone; |
|
133 |
|
134 } |
|
135 |
|
136 // ----------------------------------------------------------------------------- |
|
137 // CTestSDKScroller::TestSDKEikSbmSbUsefulL |
|
138 // ----------------------------------------------------------------------------- |
|
139 // |
|
140 TInt CTestSDKScroller::TestSDKEikSbmSbUsefulL( CStifItemParser& /*aItem*/ ) |
|
141 { |
|
142 |
|
143 // Print to UI |
|
144 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
145 _LIT( KTestSDKEikSbmSbUseful, "in EikSbmSbUseful" ); |
|
146 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbmSbUseful ); |
|
147 // Print to log file |
|
148 iLog->Log( KTestSDKEikSbmSbUseful ); |
|
149 |
|
150 TInt scSpan = 1; |
|
151 TEikScrollBarModel* sbModel = new ( ELeave ) TEikScrollBarModel( scSpan ); |
|
152 CleanupStack::PushL( sbModel ); |
|
153 |
|
154 TBool sbUseful = sbModel->ScrollBarUseful(); |
|
155 STIF_ASSERT_TRUE( sbUseful ); |
|
156 |
|
157 CleanupStack::PopAndDestroy( sbModel ); |
|
158 return KErrNone; |
|
159 |
|
160 } |
|
161 |
|
162 // ----------------------------------------------------------------------------- |
|
163 // CTestSDKScroller::TestSDKEikSbmMaxThumbPosL |
|
164 // ----------------------------------------------------------------------------- |
|
165 // |
|
166 TInt CTestSDKScroller::TestSDKEikSbmMaxThumbPosL( CStifItemParser& /*aItem*/ ) |
|
167 { |
|
168 |
|
169 // Print to UI |
|
170 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
171 _LIT( KTestSDKEikSbmMaxThumbPos, "in EikSbmMaxThumbPos" ); |
|
172 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbmMaxThumbPos ); |
|
173 // Print to log file |
|
174 iLog->Log( KTestSDKEikSbmMaxThumbPos ); |
|
175 |
|
176 TInt scSpan = 1; |
|
177 TEikScrollBarModel* sbModel = new ( ELeave ) TEikScrollBarModel( scSpan ); |
|
178 CleanupStack::PushL( sbModel ); |
|
179 |
|
180 TInt maxThumbPos = sbModel->MaxThumbPos(); |
|
181 STIF_ASSERT_EQUALS( scSpan, maxThumbPos ); |
|
182 |
|
183 CleanupStack::PopAndDestroy( sbModel ); |
|
184 return KErrNone; |
|
185 |
|
186 } |
|
187 |
|
188 // ----------------------------------------------------------------------------- |
|
189 // CTestSDKScroller::TestSDKEikSbmCheckBoundsL |
|
190 // ----------------------------------------------------------------------------- |
|
191 // |
|
192 TInt CTestSDKScroller::TestSDKEikSbmCheckBoundsL( CStifItemParser& /*aItem*/ ) |
|
193 { |
|
194 |
|
195 // Print to UI |
|
196 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
197 _LIT( KTestSDKEikSbmCheckBounds, "in EikSbmCheckBounds" ); |
|
198 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbmCheckBounds ); |
|
199 // Print to log file |
|
200 iLog->Log( KTestSDKEikSbmCheckBounds ); |
|
201 |
|
202 TInt scSpan = 1; |
|
203 TEikScrollBarModel* sbModel = new ( ELeave ) TEikScrollBarModel( scSpan ); |
|
204 CleanupStack::PushL( sbModel ); |
|
205 |
|
206 sbModel->CheckBounds(); |
|
207 |
|
208 CleanupStack::PopAndDestroy( sbModel ); |
|
209 return KErrNone; |
|
210 |
|
211 } |
|
212 |
|
213 // ----------------------------------------------------------------------------- |
|
214 // CTestSDKScroller::TestSDKDsModelDefConsL |
|
215 // ----------------------------------------------------------------------------- |
|
216 // |
|
217 TInt CTestSDKScroller::TestSDKDsModelDefConsL( CStifItemParser& /*aItem*/ ) |
|
218 { |
|
219 |
|
220 // Print to UI |
|
221 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
222 _LIT( KTestSDKDsModelDefCons, "in DsModelDefCons" ); |
|
223 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDsModelDefCons ); |
|
224 // Print to log file |
|
225 iLog->Log( KTestSDKDsModelDefCons ); |
|
226 |
|
227 TAknDoubleSpanScrollBarModel* dsModel = new ( ELeave ) TAknDoubleSpanScrollBarModel; |
|
228 CleanupStack::PushL( dsModel ); |
|
229 STIF_ASSERT_NOT_NULL( dsModel ); |
|
230 |
|
231 CleanupStack::PopAndDestroy( dsModel ); |
|
232 return KErrNone; |
|
233 |
|
234 } |
|
235 |
|
236 // ----------------------------------------------------------------------------- |
|
237 // CTestSDKScroller::TestSDKDsModelDefConsWithPaL |
|
238 // ----------------------------------------------------------------------------- |
|
239 // |
|
240 TInt CTestSDKScroller::TestSDKDsModelDefConsWithPaL( CStifItemParser& /*aItem*/ ) |
|
241 { |
|
242 |
|
243 // Print to UI |
|
244 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
245 _LIT( KTestSDKDsModelDefConsWithPa, "in DsModelDefConsWithPa" ); |
|
246 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDsModelDefConsWithPa ); |
|
247 // Print to log file |
|
248 iLog->Log( KTestSDKDsModelDefConsWithPa ); |
|
249 |
|
250 TEikScrollBarModel* sbModel = new ( ELeave ) TEikScrollBarModel; |
|
251 CleanupStack::PushL( sbModel ); |
|
252 TAknDoubleSpanScrollBarModel* dsModel = new ( ELeave ) |
|
253 TAknDoubleSpanScrollBarModel( *sbModel ); |
|
254 CleanupStack::PushL( dsModel ); |
|
255 STIF_ASSERT_NOT_NULL( dsModel ); |
|
256 |
|
257 CleanupStack::PopAndDestroy( dsModel ); |
|
258 CleanupStack::PopAndDestroy( sbModel ); |
|
259 return KErrNone; |
|
260 |
|
261 } |
|
262 |
|
263 // ----------------------------------------------------------------------------- |
|
264 // CTestSDKScroller::TestSDKDsModelSetScrollSpanL |
|
265 // ----------------------------------------------------------------------------- |
|
266 // |
|
267 TInt CTestSDKScroller::TestSDKDsModelSetScrollSpanL( CStifItemParser& /*aItem*/ ) |
|
268 { |
|
269 |
|
270 // Print to UI |
|
271 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
272 _LIT( KTestSDKDsModelSetScrollSpan, "in DsModelSetScrollSpan" ); |
|
273 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDsModelSetScrollSpan ); |
|
274 // Print to log file |
|
275 iLog->Log( KTestSDKDsModelSetScrollSpan ); |
|
276 |
|
277 TAknDoubleSpanScrollBarModel* dsModel = new ( ELeave ) TAknDoubleSpanScrollBarModel; |
|
278 CleanupStack::PushL( dsModel ); |
|
279 |
|
280 TInt value = 1; |
|
281 dsModel->SetScrollSpan( value ); |
|
282 |
|
283 CleanupStack::PopAndDestroy( dsModel ); |
|
284 return KErrNone; |
|
285 |
|
286 } |
|
287 |
|
288 // ----------------------------------------------------------------------------- |
|
289 // CTestSDKScroller::TestSDKDsModelSetFocusPosL |
|
290 // ----------------------------------------------------------------------------- |
|
291 // |
|
292 TInt CTestSDKScroller::TestSDKDsModelSetFocusPosL( CStifItemParser& /*aItem*/ ) |
|
293 { |
|
294 |
|
295 // Print to UI |
|
296 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
297 _LIT( KTestSDKDsModelSetFocusPos, "in DsModelSetFocusPos" ); |
|
298 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDsModelSetFocusPos ); |
|
299 // Print to log file |
|
300 iLog->Log( KTestSDKDsModelSetFocusPos ); |
|
301 |
|
302 TAknDoubleSpanScrollBarModel* dsModel = new ( ELeave ) TAknDoubleSpanScrollBarModel; |
|
303 CleanupStack::PushL( dsModel ); |
|
304 |
|
305 TInt value = 1; |
|
306 dsModel->SetFocusPosition( value ); |
|
307 |
|
308 CleanupStack::PopAndDestroy( dsModel ); |
|
309 return KErrNone; |
|
310 |
|
311 } |
|
312 |
|
313 // ----------------------------------------------------------------------------- |
|
314 // CTestSDKScroller::TestSDKDsModelSetWinSizeL |
|
315 // ----------------------------------------------------------------------------- |
|
316 // |
|
317 TInt CTestSDKScroller::TestSDKDsModelSetWinSizeL( CStifItemParser& /*aItem*/ ) |
|
318 { |
|
319 |
|
320 // Print to UI |
|
321 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
322 _LIT( KTestSDKDsModelSetWinSize, "in DsModelSetWinSize" ); |
|
323 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDsModelSetWinSize ); |
|
324 // Print to log file |
|
325 iLog->Log( KTestSDKDsModelSetWinSize ); |
|
326 |
|
327 TAknDoubleSpanScrollBarModel* dsModel = new ( ELeave ) TAknDoubleSpanScrollBarModel; |
|
328 CleanupStack::PushL( dsModel ); |
|
329 |
|
330 TInt value = 1; |
|
331 dsModel->SetWindowSize( value ); |
|
332 |
|
333 CleanupStack::PopAndDestroy( dsModel ); |
|
334 return KErrNone; |
|
335 |
|
336 } |
|
337 |
|
338 // ----------------------------------------------------------------------------- |
|
339 // CTestSDKScroller::TestSDKDsModelSetFieldSizeL |
|
340 // ----------------------------------------------------------------------------- |
|
341 // |
|
342 TInt CTestSDKScroller::TestSDKDsModelSetFieldSizeL( CStifItemParser& /*aItem*/ ) |
|
343 { |
|
344 |
|
345 // Print to UI |
|
346 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
347 _LIT( KTestSDKDsModelSetFieldSize, "in DsModelSetFieldSize" ); |
|
348 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDsModelSetFieldSize ); |
|
349 // Print to log file |
|
350 iLog->Log( KTestSDKDsModelSetFieldSize ); |
|
351 |
|
352 TAknDoubleSpanScrollBarModel* dsModel = new ( ELeave ) TAknDoubleSpanScrollBarModel; |
|
353 CleanupStack::PushL( dsModel ); |
|
354 |
|
355 TInt value = 1; |
|
356 dsModel->SetFieldSize( value ); |
|
357 |
|
358 CleanupStack::PopAndDestroy( dsModel ); |
|
359 return KErrNone; |
|
360 |
|
361 } |
|
362 |
|
363 // ----------------------------------------------------------------------------- |
|
364 // CTestSDKScroller::TestSDKDsModelSetFieldPosL |
|
365 // ----------------------------------------------------------------------------- |
|
366 // |
|
367 TInt CTestSDKScroller::TestSDKDsModelSetFieldPosL( CStifItemParser& /*aItem*/ ) |
|
368 { |
|
369 |
|
370 // Print to UI |
|
371 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
372 _LIT( KTestSDKDsModelSetFieldPos, "in DsModelSetFieldPos" ); |
|
373 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDsModelSetFieldPos ); |
|
374 // Print to log file |
|
375 iLog->Log( KTestSDKDsModelSetFieldPos ); |
|
376 |
|
377 TAknDoubleSpanScrollBarModel* dsModel = new ( ELeave ) TAknDoubleSpanScrollBarModel; |
|
378 CleanupStack::PushL( dsModel ); |
|
379 |
|
380 TInt value = 1; |
|
381 dsModel->SetFieldPosition( value ); |
|
382 |
|
383 CleanupStack::PopAndDestroy( dsModel ); |
|
384 return KErrNone; |
|
385 |
|
386 } |
|
387 |
|
388 // ----------------------------------------------------------------------------- |
|
389 // CTestSDKScroller::TestSDKDsModelScrollSpanL |
|
390 // ----------------------------------------------------------------------------- |
|
391 // |
|
392 TInt CTestSDKScroller::TestSDKDsModelScrollSpanL( CStifItemParser& /*aItem*/ ) |
|
393 { |
|
394 |
|
395 // Print to UI |
|
396 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
397 _LIT( KTestSDKDsModelScrollSpan, "in DsModelScrollSpan" ); |
|
398 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDsModelScrollSpan ); |
|
399 // Print to log file |
|
400 iLog->Log( KTestSDKDsModelScrollSpan ); |
|
401 |
|
402 TAknDoubleSpanScrollBarModel* dsModel = new ( ELeave ) TAknDoubleSpanScrollBarModel; |
|
403 CleanupStack::PushL( dsModel ); |
|
404 |
|
405 TInt value = dsModel->ScrollSpan(); |
|
406 STIF_ASSERT_EQUALS( 0, value ); |
|
407 |
|
408 CleanupStack::PopAndDestroy( dsModel ); |
|
409 return KErrNone; |
|
410 |
|
411 } |
|
412 |
|
413 // ----------------------------------------------------------------------------- |
|
414 // CTestSDKScroller::TestSDKDsModelFocusPosL |
|
415 // ----------------------------------------------------------------------------- |
|
416 // |
|
417 TInt CTestSDKScroller::TestSDKDsModelFocusPosL( CStifItemParser& /*aItem*/ ) |
|
418 { |
|
419 |
|
420 // Print to UI |
|
421 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
422 _LIT( KTestSDKDsModelFocusPos, "in DsModelFocusPos" ); |
|
423 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDsModelFocusPos ); |
|
424 // Print to log file |
|
425 iLog->Log( KTestSDKDsModelFocusPos ); |
|
426 |
|
427 TAknDoubleSpanScrollBarModel* dsModel = new ( ELeave ) TAknDoubleSpanScrollBarModel; |
|
428 CleanupStack::PushL( dsModel ); |
|
429 |
|
430 TInt value = dsModel->FocusPosition(); |
|
431 STIF_ASSERT_EQUALS( 0, value ); |
|
432 |
|
433 CleanupStack::PopAndDestroy( dsModel ); |
|
434 return KErrNone; |
|
435 |
|
436 } |
|
437 |
|
438 // ----------------------------------------------------------------------------- |
|
439 // CTestSDKScroller::TestSDKDsModelWinSizeL |
|
440 // ----------------------------------------------------------------------------- |
|
441 // |
|
442 TInt CTestSDKScroller::TestSDKDsModelWinSizeL( CStifItemParser& /*aItem*/ ) |
|
443 { |
|
444 |
|
445 // Print to UI |
|
446 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
447 _LIT( KTestSDKDsModelWinSize, "in DsModelWinSize" ); |
|
448 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDsModelWinSize ); |
|
449 // Print to log file |
|
450 iLog->Log( KTestSDKDsModelWinSize ); |
|
451 |
|
452 TAknDoubleSpanScrollBarModel* dsModel = new ( ELeave ) TAknDoubleSpanScrollBarModel; |
|
453 CleanupStack::PushL( dsModel ); |
|
454 |
|
455 TInt value = dsModel->WindowSize(); |
|
456 STIF_ASSERT_EQUALS( 0, value ); |
|
457 |
|
458 CleanupStack::PopAndDestroy( dsModel ); |
|
459 return KErrNone; |
|
460 |
|
461 } |
|
462 |
|
463 // ----------------------------------------------------------------------------- |
|
464 // CTestSDKScroller::TestSDKDsModelFieldSizeL |
|
465 // ----------------------------------------------------------------------------- |
|
466 // |
|
467 TInt CTestSDKScroller::TestSDKDsModelFieldSizeL( CStifItemParser& /*aItem*/ ) |
|
468 { |
|
469 |
|
470 // Print to UI |
|
471 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
472 _LIT( KTestSDKDsModelFieldSize, "in DsModelFieldSize" ); |
|
473 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDsModelFieldSize ); |
|
474 // Print to log file |
|
475 iLog->Log( KTestSDKDsModelFieldSize ); |
|
476 |
|
477 TAknDoubleSpanScrollBarModel* dsModel = new ( ELeave ) TAknDoubleSpanScrollBarModel; |
|
478 CleanupStack::PushL( dsModel ); |
|
479 |
|
480 TInt value = dsModel->FieldSize(); |
|
481 STIF_ASSERT_EQUALS( 0, value ); |
|
482 |
|
483 CleanupStack::PopAndDestroy( dsModel ); |
|
484 return KErrNone; |
|
485 |
|
486 } |
|
487 |
|
488 // ----------------------------------------------------------------------------- |
|
489 // CTestSDKScroller::TestSDKDsModelFieldPosL |
|
490 // ----------------------------------------------------------------------------- |
|
491 // |
|
492 TInt CTestSDKScroller::TestSDKDsModelFieldPosL( CStifItemParser& /*aItem*/ ) |
|
493 { |
|
494 |
|
495 // Print to UI |
|
496 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
497 _LIT( KTestSDKDsModelFieldPos, "in DsModelFieldPos" ); |
|
498 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDsModelFieldPos ); |
|
499 // Print to log file |
|
500 iLog->Log( KTestSDKDsModelFieldPos ); |
|
501 |
|
502 TAknDoubleSpanScrollBarModel* dsModel = new ( ELeave ) TAknDoubleSpanScrollBarModel; |
|
503 CleanupStack::PushL( dsModel ); |
|
504 |
|
505 TInt value = dsModel->FieldPosition(); |
|
506 STIF_ASSERT_EQUALS( 0, value ); |
|
507 |
|
508 CleanupStack::PopAndDestroy( dsModel ); |
|
509 return KErrNone; |
|
510 |
|
511 } |
|
512 |
|
513 // ----------------------------------------------------------------------------- |
|
514 // CTestSDKScroller::TestSDKEikSbDefConsL |
|
515 // ----------------------------------------------------------------------------- |
|
516 // |
|
517 TInt CTestSDKScroller::TestSDKEikSbDefConsL( CStifItemParser& /*aItem*/ ) |
|
518 { |
|
519 |
|
520 // Print to UI |
|
521 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
522 _LIT( KTestSDKEikSbDefCons, "in EikSbDefCons" ); |
|
523 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbDefCons ); |
|
524 // Print to log file |
|
525 iLog->Log( KTestSDKEikSbDefCons ); |
|
526 |
|
527 CEikScrollBar* scBar = new ( ELeave ) CEikScrollBar; |
|
528 CleanupStack::PushL( scBar ); |
|
529 STIF_ASSERT_NOT_NULL( scBar ); |
|
530 |
|
531 CleanupStack::PopAndDestroy( scBar ); |
|
532 return KErrNone; |
|
533 |
|
534 } |
|
535 |
|
536 // ----------------------------------------------------------------------------- |
|
537 // CTestSDKScroller::TestSDKEikSbConstructL |
|
538 // ----------------------------------------------------------------------------- |
|
539 // |
|
540 TInt CTestSDKScroller::TestSDKEikSbConstructL( CStifItemParser& /*aItem*/ ) |
|
541 { |
|
542 |
|
543 // Print to UI |
|
544 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
545 _LIT( KTestSDKEikSbConstructL, "in EikSbConstructL" ); |
|
546 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbConstructL ); |
|
547 // Print to log file |
|
548 iLog->Log( KTestSDKEikSbConstructL ); |
|
549 |
|
550 CEikScrollBar* scBar = new ( ELeave ) CEikScrollBar; |
|
551 CleanupStack::PushL( scBar ); |
|
552 CTestScrollerControl* control = CTestScrollerControl::NewL(); |
|
553 CleanupStack::PushL( control ); |
|
554 CEikScrollBar::TOrientation orientation = CEikScrollBar::EVertical; |
|
555 |
|
556 scBar->ConstructL( control, control, orientation, KLength ); |
|
557 |
|
558 CleanupStack::PopAndDestroy( control ); |
|
559 CleanupStack::PopAndDestroy( scBar ); |
|
560 return KErrNone; |
|
561 |
|
562 } |
|
563 |
|
564 // ----------------------------------------------------------------------------- |
|
565 // CTestSDKScroller::TestSDKEikSbSetLengthL |
|
566 // ----------------------------------------------------------------------------- |
|
567 // |
|
568 TInt CTestSDKScroller::TestSDKEikSbSetLengthL( CStifItemParser& /*aItem*/ ) |
|
569 { |
|
570 |
|
571 // Print to UI |
|
572 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
573 _LIT( KTestSDKEikSbSetLengthL, "in EikSbSetLengthL" ); |
|
574 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbSetLengthL ); |
|
575 // Print to log file |
|
576 iLog->Log( KTestSDKEikSbSetLengthL ); |
|
577 |
|
578 CEikScrollBar* scBar = new ( ELeave ) CEikScrollBar; |
|
579 CleanupStack::PushL( scBar ); |
|
580 CTestScrollerControl* control = CTestScrollerControl::NewL(); |
|
581 CleanupStack::PushL( control ); |
|
582 CEikScrollBar::TOrientation orientation = CEikScrollBar::EVertical; |
|
583 scBar->ConstructL( control, control, orientation, KLength ); |
|
584 |
|
585 scBar->SetLengthL( KLength ); |
|
586 |
|
587 CleanupStack::PopAndDestroy( control ); |
|
588 CleanupStack::PopAndDestroy( scBar ); |
|
589 return KErrNone; |
|
590 |
|
591 } |
|
592 |
|
593 // ----------------------------------------------------------------------------- |
|
594 // CTestSDKScroller::TestSDKEikSbSetModelL |
|
595 // ----------------------------------------------------------------------------- |
|
596 // |
|
597 TInt CTestSDKScroller::TestSDKEikSbSetModelL( CStifItemParser& /*aItem*/ ) |
|
598 { |
|
599 |
|
600 // Print to UI |
|
601 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
602 _LIT( KTestSDKEikSbSetModelL, "in EikSbSetModelL" ); |
|
603 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbSetModelL ); |
|
604 // Print to log file |
|
605 iLog->Log( KTestSDKEikSbSetModelL ); |
|
606 |
|
607 CEikScrollBar* scBar = new ( ELeave ) CEikScrollBar; |
|
608 CleanupStack::PushL( scBar ); |
|
609 CTestScrollerControl* control = CTestScrollerControl::NewL(); |
|
610 CleanupStack::PushL( control ); |
|
611 CEikScrollBar::TOrientation orientation = CEikScrollBar::EVertical; |
|
612 scBar->ConstructL( control, control, orientation, KLength ); |
|
613 |
|
614 TEikScrollBarModel* sbModel = new ( ELeave ) TEikScrollBarModel; |
|
615 CleanupStack::PushL( sbModel ); |
|
616 scBar->SetModelL( sbModel ); |
|
617 |
|
618 CleanupStack::PopAndDestroy( sbModel ); |
|
619 CleanupStack::PopAndDestroy( control ); |
|
620 CleanupStack::PopAndDestroy( scBar ); |
|
621 return KErrNone; |
|
622 |
|
623 } |
|
624 |
|
625 // ----------------------------------------------------------------------------- |
|
626 // CTestSDKScroller::TestSDKEikSbSetModeL |
|
627 // ----------------------------------------------------------------------------- |
|
628 // |
|
629 TInt CTestSDKScroller::TestSDKEikSbSetModeL( CStifItemParser& /*aItem*/ ) |
|
630 { |
|
631 |
|
632 // Print to UI |
|
633 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
634 _LIT( KTestSDKEikSbSetModel, "in EikSbSetModel" ); |
|
635 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbSetModel ); |
|
636 // Print to log file |
|
637 iLog->Log( KTestSDKEikSbSetModel ); |
|
638 |
|
639 CEikScrollBar* scBar = new ( ELeave ) CEikScrollBar; |
|
640 CleanupStack::PushL( scBar ); |
|
641 CTestScrollerControl* control = CTestScrollerControl::NewL(); |
|
642 CleanupStack::PushL( control ); |
|
643 CEikScrollBar::TOrientation orientation = CEikScrollBar::EVertical; |
|
644 scBar->ConstructL( control, control, orientation, KLength ); |
|
645 |
|
646 TEikScrollBarModel* sbModel = new ( ELeave ) TEikScrollBarModel; |
|
647 CleanupStack::PushL( sbModel ); |
|
648 scBar->SetModel( sbModel ); |
|
649 |
|
650 CleanupStack::PopAndDestroy( sbModel ); |
|
651 CleanupStack::PopAndDestroy( control ); |
|
652 CleanupStack::PopAndDestroy( scBar ); |
|
653 return KErrNone; |
|
654 |
|
655 } |
|
656 |
|
657 // ----------------------------------------------------------------------------- |
|
658 // CTestSDKScroller::TestSDKEikSbSetLenAndModL |
|
659 // ----------------------------------------------------------------------------- |
|
660 // |
|
661 TInt CTestSDKScroller::TestSDKEikSbSetLenAndModL( CStifItemParser& /*aItem*/ ) |
|
662 { |
|
663 |
|
664 // Print to UI |
|
665 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
666 _LIT( KTestSDKEikSbSetLenAndModL, "in EikSbSetLenAndModL" ); |
|
667 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbSetLenAndModL ); |
|
668 // Print to log file |
|
669 iLog->Log( KTestSDKEikSbSetLenAndModL ); |
|
670 |
|
671 CEikScrollBar* scBar = new ( ELeave ) CEikScrollBar; |
|
672 CleanupStack::PushL( scBar ); |
|
673 TEikScrollBarModel* sbModel = new ( ELeave ) TEikScrollBarModel; |
|
674 CleanupStack::PushL( sbModel ); |
|
675 |
|
676 scBar->SetLengthAndModelL( KLength, sbModel ); |
|
677 |
|
678 CleanupStack::PopAndDestroy( sbModel ); |
|
679 CleanupStack::PopAndDestroy( scBar ); |
|
680 return KErrNone; |
|
681 |
|
682 } |
|
683 |
|
684 // ----------------------------------------------------------------------------- |
|
685 // CTestSDKScroller::TestSDKEikSbSetModThuPosL |
|
686 // ----------------------------------------------------------------------------- |
|
687 // |
|
688 TInt CTestSDKScroller::TestSDKEikSbSetModThuPosL( CStifItemParser& /*aItem*/ ) |
|
689 { |
|
690 |
|
691 // Print to UI |
|
692 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
693 _LIT( KTestSDKEikSbSetModThuPos, "in EikSbSetModThuPos" ); |
|
694 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbSetModThuPos ); |
|
695 // Print to log file |
|
696 iLog->Log( KTestSDKEikSbSetModThuPos ); |
|
697 |
|
698 CEikScrollBar* scBar = new ( ELeave ) CEikScrollBar; |
|
699 CleanupStack::PushL( scBar ); |
|
700 TInt thumbPos = 0; |
|
701 |
|
702 scBar->SetModelThumbPosition( thumbPos ); |
|
703 |
|
704 CleanupStack::PopAndDestroy( scBar ); |
|
705 return KErrNone; |
|
706 |
|
707 } |
|
708 |
|
709 // ----------------------------------------------------------------------------- |
|
710 // CTestSDKScroller::TestSDKEikSbSetFoPosToThPosL |
|
711 // ----------------------------------------------------------------------------- |
|
712 // |
|
713 TInt CTestSDKScroller::TestSDKEikSbSetFoPosToThPosL( CStifItemParser& /*aItem*/ ) |
|
714 { |
|
715 |
|
716 // Print to UI |
|
717 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
718 _LIT( KTestSDKEikSbSetFoPosToThPos, "in EikSbSetFoPosToThPos" ); |
|
719 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbSetFoPosToThPos ); |
|
720 // Print to log file |
|
721 iLog->Log( KTestSDKEikSbSetFoPosToThPos ); |
|
722 |
|
723 CEikScrollBar* scBar = new ( ELeave ) CEikScrollBar; |
|
724 CleanupStack::PushL( scBar ); |
|
725 TInt focusPos = 0; |
|
726 |
|
727 scBar->SetFocusPosToThumbPos( focusPos ); |
|
728 |
|
729 CleanupStack::PopAndDestroy( scBar ); |
|
730 return KErrNone; |
|
731 |
|
732 } |
|
733 |
|
734 // ----------------------------------------------------------------------------- |
|
735 // CTestSDKScroller::TestSDKEikSbDefSbBreadth |
|
736 // ----------------------------------------------------------------------------- |
|
737 // |
|
738 TInt CTestSDKScroller::TestSDKEikSbDefSbBreadth( CStifItemParser& /*aItem*/ ) |
|
739 { |
|
740 |
|
741 // Print to UI |
|
742 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
743 _LIT( KTestSDKEikSbDefSbBreadth, "in EikSbDefSbBreadth" ); |
|
744 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbDefSbBreadth ); |
|
745 // Print to log file |
|
746 iLog->Log( KTestSDKEikSbDefSbBreadth ); |
|
747 |
|
748 TInt breadth = CEikScrollBar::DefaultScrollBarBreadth(); |
|
749 STIF_ASSERT_EQUALS( KLength, breadth ); |
|
750 |
|
751 return KErrNone; |
|
752 |
|
753 } |
|
754 |
|
755 // ----------------------------------------------------------------------------- |
|
756 // CTestSDKScroller::TestSDKEikSbPoModelL |
|
757 // ----------------------------------------------------------------------------- |
|
758 // |
|
759 TInt CTestSDKScroller::TestSDKEikSbPoModelL( CStifItemParser& /*aItem*/ ) |
|
760 { |
|
761 |
|
762 // Print to UI |
|
763 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
764 _LIT( KTestSDKEikSbPoModel, "in EikSbPoModel" ); |
|
765 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbPoModel ); |
|
766 // Print to log file |
|
767 iLog->Log( KTestSDKEikSbPoModel ); |
|
768 |
|
769 CEikScrollBar* scBar = new ( ELeave ) CEikScrollBar; |
|
770 CleanupStack::PushL( scBar ); |
|
771 |
|
772 const TEikScrollBarModel* sbModel = scBar->Model(); |
|
773 STIF_ASSERT_NOT_NULL( sbModel ); |
|
774 |
|
775 CleanupStack::PopAndDestroy( scBar ); |
|
776 return KErrNone; |
|
777 |
|
778 } |
|
779 |
|
780 // ----------------------------------------------------------------------------- |
|
781 // CTestSDKScroller::TestSDKEikSbThumbPosL |
|
782 // ----------------------------------------------------------------------------- |
|
783 // |
|
784 TInt CTestSDKScroller::TestSDKEikSbThumbPosL( CStifItemParser& /*aItem*/ ) |
|
785 { |
|
786 |
|
787 // Print to UI |
|
788 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
789 _LIT( KTestSDKEikSbThumbPos, "in EikSbThumbPos" ); |
|
790 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbThumbPos ); |
|
791 // Print to log file |
|
792 iLog->Log( KTestSDKEikSbThumbPos ); |
|
793 |
|
794 CEikScrollBar* scBar = new ( ELeave ) CEikScrollBar; |
|
795 CleanupStack::PushL( scBar ); |
|
796 |
|
797 TInt thumbPos = scBar->ThumbPosition(); |
|
798 STIF_ASSERT_EQUALS( 0, thumbPos ); |
|
799 |
|
800 CleanupStack::PopAndDestroy( scBar ); |
|
801 return KErrNone; |
|
802 |
|
803 } |
|
804 |
|
805 // ----------------------------------------------------------------------------- |
|
806 // CTestSDKScroller::TestSDKEikSbScBarBreaL |
|
807 // ----------------------------------------------------------------------------- |
|
808 // |
|
809 TInt CTestSDKScroller::TestSDKEikSbScBarBreaL( CStifItemParser& /*aItem*/ ) |
|
810 { |
|
811 |
|
812 // Print to UI |
|
813 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
814 _LIT( KTestSDKEikSbScBarBrea, "in EikSbScBarBrea" ); |
|
815 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbScBarBrea ); |
|
816 // Print to log file |
|
817 iLog->Log( KTestSDKEikSbScBarBrea ); |
|
818 |
|
819 CEikScrollBar* scBar = new ( ELeave ) CEikScrollBar; |
|
820 CleanupStack::PushL( scBar ); |
|
821 |
|
822 TInt sbBreadth = scBar->ScrollBarBreadth(); |
|
823 STIF_ASSERT_EQUALS( 0, sbBreadth ); |
|
824 |
|
825 CleanupStack::PopAndDestroy( scBar ); |
|
826 return KErrNone; |
|
827 |
|
828 } |
|
829 |
|
830 // ----------------------------------------------------------------------------- |
|
831 // CTestSDKScroller::TestSDKEikSbMinVisLen |
|
832 // ----------------------------------------------------------------------------- |
|
833 // |
|
834 TInt CTestSDKScroller::TestSDKEikSbMinVisLen( CStifItemParser& /*aItem*/ ) |
|
835 { |
|
836 |
|
837 // Print to UI |
|
838 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
839 _LIT( KTestSDKEikSbMinVisLen, "in EikSbMinVisLen" ); |
|
840 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbMinVisLen ); |
|
841 // Print to log file |
|
842 iLog->Log( KTestSDKEikSbMinVisLen ); |
|
843 |
|
844 TInt sbFlags = 0; |
|
845 TInt minLength = CEikScrollBar::MinVisibleLength( sbFlags ); |
|
846 STIF_ASSERT_EQUALS( 0, minLength ); |
|
847 |
|
848 return KErrNone; |
|
849 |
|
850 } |
|
851 |
|
852 // ----------------------------------------------------------------------------- |
|
853 // CTestSDKScroller::TestSDKEikSbSetDecButDimmedL |
|
854 // ----------------------------------------------------------------------------- |
|
855 // |
|
856 TInt CTestSDKScroller::TestSDKEikSbSetDecButDimmedL( CStifItemParser& /*aItem*/ ) |
|
857 { |
|
858 |
|
859 // Print to UI |
|
860 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
861 _LIT( KTestSDKEikSbSetDecButDimmed, "in EikSbSetDecButDimmed" ); |
|
862 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbSetDecButDimmed ); |
|
863 // Print to log file |
|
864 iLog->Log( KTestSDKEikSbSetDecButDimmed ); |
|
865 |
|
866 CEikScrollBar* scBar = new ( ELeave ) CEikScrollBar; |
|
867 CleanupStack::PushL( scBar ); |
|
868 |
|
869 scBar->SetDecreaseButtonsDimmed( ETrue ); |
|
870 |
|
871 CleanupStack::PopAndDestroy( scBar ); |
|
872 return KErrNone; |
|
873 |
|
874 } |
|
875 |
|
876 // ----------------------------------------------------------------------------- |
|
877 // CTestSDKScroller::TestSDKEikSbSetIncButDimmedL |
|
878 // ----------------------------------------------------------------------------- |
|
879 // |
|
880 TInt CTestSDKScroller::TestSDKEikSbSetIncButDimmedL( CStifItemParser& /*aItem*/ ) |
|
881 { |
|
882 |
|
883 // Print to UI |
|
884 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
885 _LIT( KTestSDKEikSbSetIncButDimmed, "in EikSbSetIncButDimmed" ); |
|
886 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbSetIncButDimmed ); |
|
887 // Print to log file |
|
888 iLog->Log( KTestSDKEikSbSetIncButDimmed ); |
|
889 |
|
890 CEikScrollBar* scBar = new ( ELeave ) CEikScrollBar; |
|
891 CleanupStack::PushL( scBar ); |
|
892 |
|
893 scBar->SetIncreaseButtonsDimmed( ETrue ); |
|
894 |
|
895 CleanupStack::PopAndDestroy( scBar ); |
|
896 return KErrNone; |
|
897 |
|
898 } |
|
899 |
|
900 // ----------------------------------------------------------------------------- |
|
901 // CTestSDKScroller::TestSDKEikSbSetAllButDimmedL |
|
902 // ----------------------------------------------------------------------------- |
|
903 // |
|
904 TInt CTestSDKScroller::TestSDKEikSbSetAllButDimmedL( CStifItemParser& /*aItem*/ ) |
|
905 { |
|
906 |
|
907 // Print to UI |
|
908 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
909 _LIT( KTestSDKEikSbSetAllButDimmed, "in EikSbSetAllButDimmed" ); |
|
910 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbSetAllButDimmed ); |
|
911 // Print to log file |
|
912 iLog->Log( KTestSDKEikSbSetAllButDimmed ); |
|
913 |
|
914 CEikScrollBar* scBar = new ( ELeave ) CEikScrollBar; |
|
915 CleanupStack::PushL( scBar ); |
|
916 |
|
917 scBar->SetAllButtonsDimmed( ETrue ); |
|
918 |
|
919 CleanupStack::PopAndDestroy( scBar ); |
|
920 return KErrNone; |
|
921 |
|
922 } |
|
923 |
|
924 // ----------------------------------------------------------------------------- |
|
925 // CTestSDKScroller::TestSDKEikSbIncNudgeButL |
|
926 // ----------------------------------------------------------------------------- |
|
927 // |
|
928 TInt CTestSDKScroller::TestSDKEikSbIncNudgeButL( CStifItemParser& /*aItem*/ ) |
|
929 { |
|
930 |
|
931 // Print to UI |
|
932 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
933 _LIT( KTestSDKEikSbIncNudgeBut, "in EikSbIncNudgeBut" ); |
|
934 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbIncNudgeBut ); |
|
935 // Print to log file |
|
936 iLog->Log( KTestSDKEikSbIncNudgeBut ); |
|
937 |
|
938 CEikScrollBar* scBar = new ( ELeave ) CEikScrollBar; |
|
939 CleanupStack::PushL( scBar ); |
|
940 |
|
941 CAknScrollButton* scBut = scBar->IncreaseNudgeButton(); |
|
942 STIF_ASSERT_NULL( scBut ); |
|
943 |
|
944 CleanupStack::PopAndDestroy( scBar ); |
|
945 return KErrNone; |
|
946 |
|
947 } |
|
948 |
|
949 // ----------------------------------------------------------------------------- |
|
950 // CTestSDKScroller::TestSDKEikSbDecNudgeButL |
|
951 // ----------------------------------------------------------------------------- |
|
952 // |
|
953 TInt CTestSDKScroller::TestSDKEikSbDecNudgeButL( CStifItemParser& /*aItem*/ ) |
|
954 { |
|
955 |
|
956 // Print to UI |
|
957 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
958 _LIT( KTestSDKEikSbDecNudgeBut, "in EikSbDecNudgeBut" ); |
|
959 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbDecNudgeBut ); |
|
960 // Print to log file |
|
961 iLog->Log( KTestSDKEikSbDecNudgeBut ); |
|
962 |
|
963 CEikScrollBar* scBar = new ( ELeave ) CEikScrollBar; |
|
964 CleanupStack::PushL( scBar ); |
|
965 |
|
966 CAknScrollButton* scBut = scBar->DecreaseNudgeButton(); |
|
967 STIF_ASSERT_NULL( scBut ); |
|
968 |
|
969 CleanupStack::PopAndDestroy( scBar ); |
|
970 return KErrNone; |
|
971 |
|
972 } |
|
973 |
|
974 // ----------------------------------------------------------------------------- |
|
975 // CTestSDKScroller::TestSDKEikSbSetContCbaL |
|
976 // ----------------------------------------------------------------------------- |
|
977 // |
|
978 TInt CTestSDKScroller::TestSDKEikSbSetContCbaL( CStifItemParser& /*aItem*/ ) |
|
979 { |
|
980 |
|
981 // Print to UI |
|
982 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
983 _LIT( KTestSDKEikSbSetContCba, "in EikSbSetContCba" ); |
|
984 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbSetContCba ); |
|
985 // Print to log file |
|
986 iLog->Log( KTestSDKEikSbSetContCba ); |
|
987 |
|
988 CEikScrollBar* scBar = new ( ELeave ) CEikScrollBar; |
|
989 CleanupStack::PushL( scBar ); |
|
990 CTestScrollerControl* control = CTestScrollerControl::NewL(); |
|
991 CleanupStack::PushL( control ); |
|
992 CEikScrollBar::TOrientation orientation = CEikScrollBar::EVertical; |
|
993 scBar->ConstructL( control, control, orientation, KLength ); |
|
994 CEikCba* cba = NULL; |
|
995 |
|
996 scBar->SetContainingCba( cba ); |
|
997 |
|
998 CleanupStack::PopAndDestroy( control ); |
|
999 CleanupStack::PopAndDestroy( scBar ); |
|
1000 |
|
1001 return KErrNone; |
|
1002 |
|
1003 } |
|
1004 |
|
1005 // ----------------------------------------------------------------------------- |
|
1006 // CTestSDKScroller::TestSDKEikSbMakeVisibleL |
|
1007 // ----------------------------------------------------------------------------- |
|
1008 // |
|
1009 TInt CTestSDKScroller::TestSDKEikSbMakeVisibleL( CStifItemParser& /*aItem*/ ) |
|
1010 { |
|
1011 |
|
1012 // Print to UI |
|
1013 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
1014 _LIT( KTestSDKEikSbMakeVisible, "in EikSbMakeVisible" ); |
|
1015 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbMakeVisible ); |
|
1016 // Print to log file |
|
1017 iLog->Log( KTestSDKEikSbMakeVisible ); |
|
1018 |
|
1019 CEikScrollBar* scBar = new ( ELeave ) CEikScrollBar; |
|
1020 CleanupStack::PushL( scBar ); |
|
1021 |
|
1022 scBar->MakeVisible( ETrue ); |
|
1023 |
|
1024 CleanupStack::PopAndDestroy( scBar ); |
|
1025 return KErrNone; |
|
1026 |
|
1027 } |
|
1028 |
|
1029 // ----------------------------------------------------------------------------- |
|
1030 // CTestSDKScroller::TestSDKEikSbHanPointEveL |
|
1031 // ----------------------------------------------------------------------------- |
|
1032 // |
|
1033 TInt CTestSDKScroller::TestSDKEikSbHanPointEveL( CStifItemParser& /*aItem*/ ) |
|
1034 { |
|
1035 |
|
1036 // Print to UI |
|
1037 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
1038 _LIT( KTestSDKEikSbHanPointEveL, "in EikSbHanPointEveL" ); |
|
1039 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbHanPointEveL ); |
|
1040 // Print to log file |
|
1041 iLog->Log( KTestSDKEikSbHanPointEveL ); |
|
1042 |
|
1043 CEikScrollBar* scBar = new ( ELeave ) CEikScrollBar; |
|
1044 CleanupStack::PushL( scBar ); |
|
1045 |
|
1046 TPointerEvent event; |
|
1047 event.iType = TPointerEvent::EButton1Down; |
|
1048 event.iModifiers = 0; |
|
1049 TPoint eventPos( KPointX, KPointY ); |
|
1050 event.iPosition = eventPos; |
|
1051 event.iParentPosition = eventPos; |
|
1052 |
|
1053 scBar->HandlePointerEventL( event ); |
|
1054 |
|
1055 CleanupStack::PopAndDestroy( scBar ); |
|
1056 return KErrNone; |
|
1057 |
|
1058 } |
|
1059 |
|
1060 // ----------------------------------------------------------------------------- |
|
1061 // CTestSDKScroller::TestSDKEikSbCompCtrlL |
|
1062 // ----------------------------------------------------------------------------- |
|
1063 // |
|
1064 TInt CTestSDKScroller::TestSDKEikSbCompCtrlL( CStifItemParser& /*aItem*/ ) |
|
1065 { |
|
1066 |
|
1067 // Print to UI |
|
1068 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
1069 _LIT( KTestSDKEikSbCompCtrl, "in EikSbCompCtrl" ); |
|
1070 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbCompCtrl ); |
|
1071 // Print to log file |
|
1072 iLog->Log( KTestSDKEikSbCompCtrl ); |
|
1073 |
|
1074 CEikScrollBarExt* scBarExt = new ( ELeave ) CEikScrollBarExt; |
|
1075 CleanupStack::PushL( scBarExt ); |
|
1076 |
|
1077 TInt index = 0; |
|
1078 CCoeControl* control = scBarExt->DoComponentControl( index ); |
|
1079 STIF_ASSERT_NULL( control ); |
|
1080 |
|
1081 CleanupStack::PopAndDestroy( scBarExt ); |
|
1082 return KErrNone; |
|
1083 |
|
1084 } |
|
1085 |
|
1086 // ----------------------------------------------------------------------------- |
|
1087 // CTestSDKScroller::TestSDKEikSbCountCompCtrlsL |
|
1088 // ----------------------------------------------------------------------------- |
|
1089 // |
|
1090 TInt CTestSDKScroller::TestSDKEikSbCountCompCtrlsL( CStifItemParser& /*aItem*/ ) |
|
1091 { |
|
1092 |
|
1093 // Print to UI |
|
1094 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
1095 _LIT( KTestSDKEikSbCountCompCtrls, "in EikSbCountCompCtrls" ); |
|
1096 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbCountCompCtrls ); |
|
1097 // Print to log file |
|
1098 iLog->Log( KTestSDKEikSbCountCompCtrls ); |
|
1099 |
|
1100 CEikScrollBarExt* scBarExt = new ( ELeave ) CEikScrollBarExt; |
|
1101 CleanupStack::PushL( scBarExt ); |
|
1102 |
|
1103 TInt count = scBarExt->DoCountComponentControls(); |
|
1104 STIF_ASSERT_EQUALS( 0, count ); |
|
1105 |
|
1106 CleanupStack::PopAndDestroy( scBarExt ); |
|
1107 return KErrNone; |
|
1108 |
|
1109 } |
|
1110 |
|
1111 // ----------------------------------------------------------------------------- |
|
1112 // CTestSDKScroller::TestSDKEikSbSetButPosL |
|
1113 // ----------------------------------------------------------------------------- |
|
1114 // |
|
1115 TInt CTestSDKScroller::TestSDKEikSbSetButPosL( CStifItemParser& /*aItem*/ ) |
|
1116 { |
|
1117 |
|
1118 // Print to UI |
|
1119 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
1120 _LIT( KTestSDKEikSbSetButPosL, "in EikSbSetButPosL" ); |
|
1121 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbSetButPosL ); |
|
1122 // Print to log file |
|
1123 iLog->Log( KTestSDKEikSbSetButPosL ); |
|
1124 |
|
1125 CEikScrollBarExt* scBarExt = new ( ELeave ) CEikScrollBarExt; |
|
1126 CleanupStack::PushL( scBarExt ); |
|
1127 CAknScrollButton::TType type = CAknScrollButton::ENudgeUp; |
|
1128 CAknScrollButton* scBut = CAknScrollButton::NewL( type ); |
|
1129 CleanupStack::PushL( scBut ); |
|
1130 |
|
1131 scBarExt->DoSetButtonPositionL( scBut ); |
|
1132 |
|
1133 CleanupStack::PopAndDestroy( scBut ); |
|
1134 CleanupStack::PopAndDestroy( scBarExt ); |
|
1135 return KErrNone; |
|
1136 |
|
1137 } |
|
1138 |
|
1139 // ----------------------------------------------------------------------------- |
|
1140 // CTestSDKScroller::TestSDKArrHeSbDefConsL |
|
1141 // ----------------------------------------------------------------------------- |
|
1142 // |
|
1143 TInt CTestSDKScroller::TestSDKArrHeSbDefConsL( CStifItemParser& /*aItem*/ ) |
|
1144 { |
|
1145 |
|
1146 // Print to UI |
|
1147 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
1148 _LIT( KTestSDKArrHeSbDefCons, "in ArrHeSbDefCons" ); |
|
1149 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKArrHeSbDefCons ); |
|
1150 // Print to log file |
|
1151 iLog->Log( KTestSDKArrHeSbDefCons ); |
|
1152 |
|
1153 CTestScrollerControl* control = CTestScrollerControl::NewL(); |
|
1154 CleanupStack::PushL( control ); |
|
1155 |
|
1156 CEikArrowHeadScrollBar* ahScBar = new ( ELeave ) CEikArrowHeadScrollBar( control ); |
|
1157 CleanupStack::PushL( ahScBar ); |
|
1158 STIF_ASSERT_NOT_NULL( ahScBar ); |
|
1159 |
|
1160 CleanupStack::PopAndDestroy( ahScBar ); |
|
1161 CleanupStack::PopAndDestroy( control ); |
|
1162 return KErrNone; |
|
1163 |
|
1164 } |
|
1165 |
|
1166 // ----------------------------------------------------------------------------- |
|
1167 // CTestSDKScroller::TestSDKArrHeSbConstructL |
|
1168 // ----------------------------------------------------------------------------- |
|
1169 // |
|
1170 TInt CTestSDKScroller::TestSDKArrHeSbConstructL( CStifItemParser& /*aItem*/ ) |
|
1171 { |
|
1172 |
|
1173 // Print to UI |
|
1174 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
1175 _LIT( KTestSDKArrHeSbConstructL, "in ArrHeSbConstructL" ); |
|
1176 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKArrHeSbConstructL ); |
|
1177 // Print to log file |
|
1178 iLog->Log( KTestSDKArrHeSbConstructL ); |
|
1179 |
|
1180 CTestScrollerControl* control = CTestScrollerControl::NewL(); |
|
1181 CleanupStack::PushL( control ); |
|
1182 CEikArrowHeadScrollBar* ahScBar = new ( ELeave ) CEikArrowHeadScrollBar( control ); |
|
1183 CleanupStack::PushL( ahScBar ); |
|
1184 CEikScrollBar::TOrientation orientation = CEikScrollBar::EVertical; |
|
1185 |
|
1186 ahScBar->ConstructL( control, control, orientation, KLength ); |
|
1187 |
|
1188 CleanupStack::PopAndDestroy( ahScBar ); |
|
1189 CleanupStack::PopAndDestroy( control ); |
|
1190 return KErrNone; |
|
1191 |
|
1192 } |
|
1193 |
|
1194 // ----------------------------------------------------------------------------- |
|
1195 // CTestSDKScroller::TestSDKArrHeSbHanPointEveL |
|
1196 // ----------------------------------------------------------------------------- |
|
1197 // |
|
1198 TInt CTestSDKScroller::TestSDKArrHeSbHanPointEveL( CStifItemParser& /*aItem*/ ) |
|
1199 { |
|
1200 |
|
1201 // Print to UI |
|
1202 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
1203 _LIT( KTestSDKArrHeSbHanPointEveL, "in ArrHeSbHanPointEveL" ); |
|
1204 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKArrHeSbHanPointEveL ); |
|
1205 // Print to log file |
|
1206 iLog->Log( KTestSDKArrHeSbHanPointEveL ); |
|
1207 |
|
1208 CTestScrollerControl* control = CTestScrollerControl::NewL(); |
|
1209 CleanupStack::PushL( control ); |
|
1210 CEikArrowHeadScrollBar* ahScBar = new ( ELeave ) CEikArrowHeadScrollBar( control ); |
|
1211 CleanupStack::PushL( ahScBar ); |
|
1212 |
|
1213 TPointerEvent event; |
|
1214 event.iType = TPointerEvent::EButton1Down; |
|
1215 event.iModifiers = 0; |
|
1216 TPoint eventPos( KPointX, KPointY ); |
|
1217 event.iPosition = eventPos; |
|
1218 event.iParentPosition = eventPos; |
|
1219 |
|
1220 ahScBar->HandlePointerEventL( event ); |
|
1221 |
|
1222 CleanupStack::PopAndDestroy( ahScBar ); |
|
1223 CleanupStack::PopAndDestroy( control ); |
|
1224 return KErrNone; |
|
1225 |
|
1226 } |
|
1227 |
|
1228 // ----------------------------------------------------------------------------- |
|
1229 // CTestSDKScroller::TestSDKDbSpaSbDefConsL |
|
1230 // ----------------------------------------------------------------------------- |
|
1231 // |
|
1232 TInt CTestSDKScroller::TestSDKDbSpaSbDefConsL( CStifItemParser& /*aItem*/ ) |
|
1233 { |
|
1234 |
|
1235 // Print to UI |
|
1236 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
1237 _LIT( KTestSDKDbSpaSbDefCons, "in DbSpaSbDefCons" ); |
|
1238 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDbSpaSbDefCons ); |
|
1239 // Print to log file |
|
1240 iLog->Log( KTestSDKDbSpaSbDefCons ); |
|
1241 |
|
1242 CTestScrollerControl* control = CTestScrollerControl::NewL(); |
|
1243 CleanupStack::PushL( control ); |
|
1244 |
|
1245 CAknDoubleSpanScrollBar* dbSpanSb = new ( ELeave ) CAknDoubleSpanScrollBar( control ); |
|
1246 CleanupStack::PushL( dbSpanSb ); |
|
1247 STIF_ASSERT_NOT_NULL( dbSpanSb ); |
|
1248 |
|
1249 CleanupStack::PopAndDestroy( dbSpanSb ); |
|
1250 CleanupStack::PopAndDestroy( control ); |
|
1251 return KErrNone; |
|
1252 |
|
1253 } |
|
1254 |
|
1255 // ----------------------------------------------------------------------------- |
|
1256 // CTestSDKScroller::TestSDKDbSpaSbSetFlRectL |
|
1257 // ----------------------------------------------------------------------------- |
|
1258 // |
|
1259 TInt CTestSDKScroller::TestSDKDbSpaSbSetFlRectL( CStifItemParser& /*aItem*/ ) |
|
1260 { |
|
1261 |
|
1262 // Print to UI |
|
1263 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
1264 _LIT( KTestSDKDbSpaSbSetFlRect, "in DbSpaSbSetFlRect" ); |
|
1265 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDbSpaSbSetFlRect ); |
|
1266 // Print to log file |
|
1267 iLog->Log( KTestSDKDbSpaSbSetFlRect ); |
|
1268 |
|
1269 CTestScrollerControl* control = CTestScrollerControl::NewL(); |
|
1270 CleanupStack::PushL( control ); |
|
1271 CAknDoubleSpanScrollBar* dbSpanSb = new ( ELeave ) CAknDoubleSpanScrollBar( control ); |
|
1272 CleanupStack::PushL( dbSpanSb ); |
|
1273 |
|
1274 TSize size( KWidth, KHeight ); |
|
1275 TRect rect( size ); |
|
1276 dbSpanSb->SetFixedLayoutRect( rect ); |
|
1277 |
|
1278 CleanupStack::PopAndDestroy( dbSpanSb ); |
|
1279 CleanupStack::PopAndDestroy( control ); |
|
1280 return KErrNone; |
|
1281 |
|
1282 } |
|
1283 |
|
1284 // ----------------------------------------------------------------------------- |
|
1285 // CTestSDKScroller::TestSDKDbSpaSbConstructL |
|
1286 // ----------------------------------------------------------------------------- |
|
1287 // |
|
1288 TInt CTestSDKScroller::TestSDKDbSpaSbConstructL( CStifItemParser& /*aItem*/ ) |
|
1289 { |
|
1290 |
|
1291 // Print to UI |
|
1292 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
1293 _LIT( KTestSDKDbSpaSbConstructL, "in DbSpaSbConstructL" ); |
|
1294 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDbSpaSbConstructL ); |
|
1295 // Print to log file |
|
1296 iLog->Log( KTestSDKDbSpaSbConstructL ); |
|
1297 |
|
1298 CTestScrollerControl* control = CTestScrollerControl::NewL(); |
|
1299 CleanupStack::PushL( control ); |
|
1300 CAknDoubleSpanScrollBar* dbSpanSb = new ( ELeave ) CAknDoubleSpanScrollBar( control ); |
|
1301 CleanupStack::PushL( dbSpanSb ); |
|
1302 CEikScrollBar::TOrientation orientation = CEikScrollBar::EVertical; |
|
1303 |
|
1304 dbSpanSb->ConstructL( EFalse, control, control, orientation, KLength ); |
|
1305 |
|
1306 CleanupStack::PopAndDestroy( dbSpanSb ); |
|
1307 CleanupStack::PopAndDestroy( control ); |
|
1308 return KErrNone; |
|
1309 |
|
1310 } |
|
1311 |
|
1312 // ----------------------------------------------------------------------------- |
|
1313 // CTestSDKScroller::TestSDKDbSpaSbSetSpInfoTextL |
|
1314 // ----------------------------------------------------------------------------- |
|
1315 // |
|
1316 TInt CTestSDKScroller::TestSDKDbSpaSbSetSpInfoTextL( CStifItemParser& /*aItem*/ ) |
|
1317 { |
|
1318 |
|
1319 // Print to UI |
|
1320 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
1321 _LIT( KTestSDKDbSpaSbSetSpInfoTextL, "in DbSpaSbSetSpInfoTextL" ); |
|
1322 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDbSpaSbSetSpInfoTextL ); |
|
1323 // Print to log file |
|
1324 iLog->Log( KTestSDKDbSpaSbSetSpInfoTextL ); |
|
1325 |
|
1326 CTestScrollerControl* control = CTestScrollerControl::NewL(); |
|
1327 CleanupStack::PushL( control ); |
|
1328 CAknDoubleSpanScrollBar* dbSpanSb = new ( ELeave ) CAknDoubleSpanScrollBar( control ); |
|
1329 CleanupStack::PushL( dbSpanSb ); |
|
1330 |
|
1331 _LIT( KText, "ScrollPopupInfoText" ); |
|
1332 dbSpanSb->SetScrollPopupInfoTextL( KText ); |
|
1333 |
|
1334 CleanupStack::PopAndDestroy( dbSpanSb ); |
|
1335 CleanupStack::PopAndDestroy( control ); |
|
1336 return KErrNone; |
|
1337 |
|
1338 } |
|
1339 |
|
1340 // ----------------------------------------------------------------------------- |
|
1341 // CTestSDKScroller::TestSDKDbSpaSbConstructExtL |
|
1342 // ----------------------------------------------------------------------------- |
|
1343 // |
|
1344 TInt CTestSDKScroller::TestSDKDbSpaSbConstructExtL( CStifItemParser& /*aItem*/ ) |
|
1345 { |
|
1346 |
|
1347 // Print to UI |
|
1348 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
1349 _LIT( KTestSDKDbSpaSbConstructExtL, "in DbSpaSbConstructExtL" ); |
|
1350 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDbSpaSbConstructExtL ); |
|
1351 // Print to log file |
|
1352 iLog->Log( KTestSDKDbSpaSbConstructExtL ); |
|
1353 |
|
1354 CTestScrollerControl* control = CTestScrollerControl::NewL(); |
|
1355 CleanupStack::PushL( control ); |
|
1356 CAknDoubleSpanScrollBar* dbSpanSb = new ( ELeave ) CAknDoubleSpanScrollBar( control ); |
|
1357 CleanupStack::PushL( dbSpanSb ); |
|
1358 CEikScrollBar::TOrientation orientation = CEikScrollBar::EVertical; |
|
1359 |
|
1360 dbSpanSb->ConstructL( control, control, orientation, KLength ); |
|
1361 |
|
1362 CleanupStack::PopAndDestroy( dbSpanSb ); |
|
1363 CleanupStack::PopAndDestroy( control ); |
|
1364 return KErrNone; |
|
1365 |
|
1366 } |
|
1367 |
|
1368 // ----------------------------------------------------------------------------- |
|
1369 // CTestSDKScroller::TestSDKDbSpaSbMakeVisibleL |
|
1370 // ----------------------------------------------------------------------------- |
|
1371 // |
|
1372 TInt CTestSDKScroller::TestSDKDbSpaSbMakeVisibleL( CStifItemParser& /*aItem*/ ) |
|
1373 { |
|
1374 |
|
1375 // Print to UI |
|
1376 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
1377 _LIT( KTestSDKDbSpaSbMakeVisible, "in DbSpaSbMakeVisible" ); |
|
1378 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDbSpaSbMakeVisible ); |
|
1379 // Print to log file |
|
1380 iLog->Log( KTestSDKDbSpaSbMakeVisible ); |
|
1381 |
|
1382 CTestScrollerControl* control = CTestScrollerControl::NewL(); |
|
1383 CleanupStack::PushL( control ); |
|
1384 CAknDoubleSpanScrollBar* dbSpanSb = new ( ELeave ) CAknDoubleSpanScrollBar( control ); |
|
1385 CleanupStack::PushL( dbSpanSb ); |
|
1386 CEikScrollBar::TOrientation orientation = CEikScrollBar::EVertical; |
|
1387 dbSpanSb->ConstructL( EFalse, control, control, orientation, KLength ); |
|
1388 |
|
1389 dbSpanSb->MakeVisible( ETrue ); |
|
1390 |
|
1391 CleanupStack::PopAndDestroy( dbSpanSb ); |
|
1392 CleanupStack::PopAndDestroy( control ); |
|
1393 return KErrNone; |
|
1394 |
|
1395 } |
|
1396 |
|
1397 // ----------------------------------------------------------------------------- |
|
1398 // CTestSDKScroller::TestSDKDbSpaSbHanPointEveL |
|
1399 // ----------------------------------------------------------------------------- |
|
1400 // |
|
1401 TInt CTestSDKScroller::TestSDKDbSpaSbHanPointEveL( CStifItemParser& /*aItem*/ ) |
|
1402 { |
|
1403 |
|
1404 // Print to UI |
|
1405 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
1406 _LIT( KTestSDKDbSpaSbHanPointEveL, "in DbSpaSbHanPointEveL" ); |
|
1407 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDbSpaSbHanPointEveL ); |
|
1408 // Print to log file |
|
1409 iLog->Log( KTestSDKDbSpaSbHanPointEveL ); |
|
1410 |
|
1411 CTestScrollerControl* control = CTestScrollerControl::NewL(); |
|
1412 CleanupStack::PushL( control ); |
|
1413 CAknDoubleSpanScrollBar* dbSpanSb = new ( ELeave ) CAknDoubleSpanScrollBar( control ); |
|
1414 CleanupStack::PushL( dbSpanSb ); |
|
1415 |
|
1416 TPointerEvent event; |
|
1417 event.iType = TPointerEvent::EButton1Down; |
|
1418 event.iModifiers = 0; |
|
1419 TPoint eventPos( KPointX, KPointY ); |
|
1420 event.iPosition = eventPos; |
|
1421 event.iParentPosition = eventPos; |
|
1422 |
|
1423 dbSpanSb->HandlePointerEventL( event ); |
|
1424 |
|
1425 CleanupStack::PopAndDestroy( dbSpanSb ); |
|
1426 CleanupStack::PopAndDestroy( control ); |
|
1427 return KErrNone; |
|
1428 |
|
1429 } |
|
1430 |
|
1431 // ----------------------------------------------------------------------------- |
|
1432 // CTestSDKScroller::TestSDKDbSpaSbCompCtrlL |
|
1433 // ----------------------------------------------------------------------------- |
|
1434 // |
|
1435 TInt CTestSDKScroller::TestSDKDbSpaSbCompCtrlL( CStifItemParser& /*aItem*/ ) |
|
1436 { |
|
1437 |
|
1438 // Print to UI |
|
1439 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
1440 _LIT( KTestSDKDbSpaSbCompCtrl, "in DbSpaSbCompCtrl" ); |
|
1441 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDbSpaSbCompCtrl ); |
|
1442 // Print to log file |
|
1443 iLog->Log( KTestSDKDbSpaSbCompCtrl ); |
|
1444 |
|
1445 CTestScrollerControl* control = CTestScrollerControl::NewL(); |
|
1446 CleanupStack::PushL( control ); |
|
1447 CAknDouSpanScBarExt* dbSpaSbExt = new ( ELeave ) CAknDouSpanScBarExt( control ); |
|
1448 CleanupStack::PushL( dbSpaSbExt ); |
|
1449 |
|
1450 TInt index = 0; |
|
1451 CCoeControl* dbControl = dbSpaSbExt->DoComponentControl( index ); |
|
1452 STIF_ASSERT_NULL( dbControl ); |
|
1453 |
|
1454 CleanupStack::PopAndDestroy( dbSpaSbExt ); |
|
1455 CleanupStack::PopAndDestroy( control ); |
|
1456 return KErrNone; |
|
1457 |
|
1458 } |
|
1459 |
|
1460 // ----------------------------------------------------------------------------- |
|
1461 // CTestSDKScroller::TestSDKDbSpaSbCountCompCtrlsL |
|
1462 // ----------------------------------------------------------------------------- |
|
1463 // |
|
1464 TInt CTestSDKScroller::TestSDKDbSpaSbCountCompCtrlsL( CStifItemParser& /*aItem*/ ) |
|
1465 { |
|
1466 |
|
1467 // Print to UI |
|
1468 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
1469 _LIT( KTestSDKDbSpaSbCountCompCtrls, "in DbSpaSbCountCompCtrls" ); |
|
1470 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKDbSpaSbCountCompCtrls ); |
|
1471 // Print to log file |
|
1472 iLog->Log( KTestSDKDbSpaSbCountCompCtrls ); |
|
1473 |
|
1474 CTestScrollerControl* control = CTestScrollerControl::NewL(); |
|
1475 CleanupStack::PushL( control ); |
|
1476 CAknDouSpanScBarExt* dbSpaSbExt = new ( ELeave ) CAknDouSpanScBarExt( control ); |
|
1477 CleanupStack::PushL( dbSpaSbExt ); |
|
1478 |
|
1479 TInt count = dbSpaSbExt->DoCountComponentControls(); |
|
1480 STIF_ASSERT_EQUALS( 0, count ); |
|
1481 |
|
1482 CleanupStack::PopAndDestroy( dbSpaSbExt ); |
|
1483 CleanupStack::PopAndDestroy( control ); |
|
1484 return KErrNone; |
|
1485 |
|
1486 } |
|
1487 |
|
1488 // ----------------------------------------------------------------------------- |
|
1489 // CTestSDKScroller::TestSDKEikSbSetExtensionAreaTypeL |
|
1490 // ----------------------------------------------------------------------------- |
|
1491 // |
|
1492 TInt CTestSDKScroller::TestSDKEikSbSetExtensionAreaTypeL( CStifItemParser& /*aItem*/ ) |
|
1493 { |
|
1494 |
|
1495 // Print to UI |
|
1496 _LIT( KTestSDKScroller, "testsdkscroller" ); |
|
1497 _LIT( KTestSDKEikSbSetExtensionAreaTypeL, "in EikSbSetExtensionAreaTypeL" ); |
|
1498 TestModuleIf().Printf( 0, KTestSDKScroller, KTestSDKEikSbSetExtensionAreaTypeL ); |
|
1499 // Print to log file |
|
1500 iLog->Log( KTestSDKEikSbSetExtensionAreaTypeL ); |
|
1501 |
|
1502 CEikScrollBar* scBar = new ( ELeave ) CEikScrollBar; |
|
1503 CleanupStack::PushL( scBar ); |
|
1504 CTestScrollerControl* control = CTestScrollerControl::NewL(); |
|
1505 CleanupStack::PushL( control ); |
|
1506 CEikScrollBar::TOrientation orientation = CEikScrollBar::EVertical; |
|
1507 scBar->ConstructL( control, control, orientation, KLength ); |
|
1508 |
|
1509 scBar->SetExtensionAreaType( CEikScrollBar::ENormalExpandedTouchArea ); |
|
1510 |
|
1511 CleanupStack::PopAndDestroy( control ); |
|
1512 CleanupStack::PopAndDestroy( scBar ); |
|
1513 return KErrNone; |
|
1514 |
|
1515 } |
|
1516 |
|
1517 |
|
1518 // [End of file] |