|
45
|
1 |
/*
|
|
|
2 |
* Copyright (c) 2002 - 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: Test akngmsstylegrid.h
|
|
|
15 |
*
|
|
|
16 |
*/
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
/*
|
|
|
20 |
* [INCLUDE FILES]
|
|
|
21 |
*/
|
|
|
22 |
#include <akngmsstylegrid.h>
|
|
|
23 |
#include <stifparser.h>
|
|
|
24 |
#include <eiklbo.h>
|
|
|
25 |
#include <aknview.h>
|
|
|
26 |
#include <coeaui.h>
|
|
|
27 |
#include <coecobs.h>
|
|
|
28 |
#include <akngrid.h>
|
|
|
29 |
#include <w32std.h>
|
|
|
30 |
#include <testsdkgrids.rsg>
|
|
|
31 |
#include <barsread.h>
|
|
|
32 |
#include <eikdialg.h>
|
|
|
33 |
|
|
|
34 |
#include "testsdkgridscontainer.h"
|
|
|
35 |
#include "testsdkgrids.h"
|
|
|
36 |
|
|
|
37 |
const TInt KRectWidth = 50;
|
|
|
38 |
const TInt KRectHeight = 50;
|
|
|
39 |
const TInt KZero = 0;
|
|
|
40 |
|
|
|
41 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
|
42 |
|
|
|
43 |
//==========================class CAknGMSStyleGridView==========================
|
|
|
44 |
// -----------------------------------------------------------------------------
|
|
|
45 |
// Ctestsdkgrids::TestGridsGMSSGVConstuctionL
|
|
|
46 |
// -----------------------------------------------------------------------------
|
|
|
47 |
//
|
|
|
48 |
TInt CTestSDKGrids::TestGridsGMSSGVConstuctionL( CStifItemParser& /*aItem*/ )
|
|
|
49 |
{
|
|
|
50 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
51 |
_LIT( KTestGridsGMSSGVConstuctionL, "In TestGridsGMSSGVConstuctionL" );
|
|
|
52 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGVConstuctionL );
|
|
|
53 |
|
|
|
54 |
CAknGMSStyleGridView* gridView = new( ELeave ) CAknGMSStyleGridView();
|
|
|
55 |
CleanupStack::PushL( gridView );
|
|
|
56 |
STIF_ASSERT_NOT_NULL( gridView );
|
|
|
57 |
CleanupStack::PopAndDestroy( gridView );
|
|
|
58 |
|
|
|
59 |
return KErrNone;
|
|
|
60 |
}
|
|
|
61 |
|
|
|
62 |
// -----------------------------------------------------------------------------
|
|
|
63 |
// Ctestsdkgrids::TestGridsGMSSGVDrawL
|
|
|
64 |
// -----------------------------------------------------------------------------
|
|
|
65 |
//
|
|
|
66 |
TInt CTestSDKGrids::TestGridsGMSSGVDrawL( CStifItemParser& /*aItem*/ )
|
|
|
67 |
{
|
|
|
68 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
69 |
_LIT( KTestGridsGMSSGVDrawL, "In TestGridsGMSSGVDrawL" );
|
|
|
70 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGVDrawL );
|
|
|
71 |
iLog->Log( KTestGridsGMSSGVDrawL );
|
|
|
72 |
|
|
|
73 |
CAknGMSStyleGridView* gridView = new( ELeave ) CAknGMSStyleGridView();
|
|
|
74 |
CleanupStack::PushL( gridView );
|
|
|
75 |
CAknGrid* grid = new( ELeave ) CAknGrid();
|
|
|
76 |
CleanupStack::PushL( grid );
|
|
|
77 |
|
|
|
78 |
CAknGridM* model = new( ELeave ) CAknGridM();
|
|
|
79 |
CleanupStack::PushL( model );
|
|
|
80 |
grid->SetModel( model );
|
|
|
81 |
CleanupStack::Pop( model );
|
|
|
82 |
|
|
|
83 |
TResourceReader reader;
|
|
|
84 |
CEikonEnv::Static()->CreateResourceReaderLC( reader, R_TESTSDKGRIDS_GRID );
|
|
|
85 |
grid->SetContainerWindowL( *iContainer );
|
|
|
86 |
grid->ConstructFromResourceL( reader );
|
|
|
87 |
|
|
|
88 |
CTextListBoxModel* modeltwo = grid->Model();
|
|
|
89 |
CListItemDrawer* drawer = grid->ItemDrawer();
|
|
|
90 |
CWsScreenDevice * screendevice = CEikonEnv::Static()->ScreenDevice();
|
|
|
91 |
RWindowGroup& parent = CCoeEnv::Static()->RootWin();
|
|
|
92 |
CEikDialog* mydialog= new(ELeave) CEikDialog;
|
|
|
93 |
mydialog->PrepareLC(R_TEST_DIALOG);
|
|
|
94 |
RWindow* window = (RWindow*)mydialog->DrawableWindow();
|
|
|
95 |
TRect rect( TPoint( KRectWidth, KRectHeight ), TPoint( KRectWidth, KRectHeight ));
|
|
|
96 |
|
|
|
97 |
gridView->ConstructL( modeltwo, drawer, screendevice, &parent, window, rect, KZero );
|
|
|
98 |
gridView->SetupLayout( rect, ETrue, KZero );
|
|
|
99 |
gridView->Draw();
|
|
|
100 |
|
|
|
101 |
CleanupStack::PopAndDestroy( mydialog );
|
|
|
102 |
CleanupStack::PopAndDestroy();
|
|
|
103 |
CleanupStack::PopAndDestroy( grid );
|
|
|
104 |
CleanupStack::Pop( gridView );
|
|
|
105 |
return KErrNone;
|
|
|
106 |
}
|
|
|
107 |
|
|
|
108 |
// -----------------------------------------------------------------------------
|
|
|
109 |
// Ctestsdkgrids::TestGridsGMSSGVSetupLayoutL
|
|
|
110 |
// -----------------------------------------------------------------------------
|
|
|
111 |
//
|
|
|
112 |
TInt CTestSDKGrids::TestGridsGMSSGVSetupLayoutL( CStifItemParser& aItem )
|
|
|
113 |
{
|
|
|
114 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
115 |
_LIT( KTestGridsGMSSGVSetupLayoutL, "In TestGridsGMSSGVSetupLayoutL" );
|
|
|
116 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGVSetupLayoutL );
|
|
|
117 |
iLog->Log( KTestGridsGMSSGVSetupLayoutL );
|
|
|
118 |
|
|
|
119 |
CAknGMSStyleGridView* gridView = new( ELeave ) CAknGMSStyleGridView();
|
|
|
120 |
CleanupStack::PushL( gridView );
|
|
|
121 |
|
|
|
122 |
TRect rect = iContainer->Rect();
|
|
|
123 |
|
|
|
124 |
TInt flag;
|
|
|
125 |
TInt err = aItem.GetNextInt( flag );
|
|
|
126 |
if( err != KErrNone)
|
|
|
127 |
return err;
|
|
|
128 |
switch ( flag )
|
|
|
129 |
{
|
|
|
130 |
case 1:
|
|
|
131 |
gridView->SetupLayout( rect, EFalse, -1 );
|
|
|
132 |
break;
|
|
|
133 |
case 2:
|
|
|
134 |
gridView->SetupLayout( rect, ETrue, 1 );
|
|
|
135 |
break;
|
|
|
136 |
default:
|
|
|
137 |
break;
|
|
|
138 |
}
|
|
|
139 |
|
|
|
140 |
CleanupStack::PopAndDestroy( gridView );
|
|
|
141 |
|
|
|
142 |
return KErrNone;
|
|
|
143 |
}
|
|
|
144 |
|
|
|
145 |
//================================CAknGMSStyleGrid=============================//
|
|
|
146 |
// -----------------------------------------------------------------------------
|
|
|
147 |
// Ctestsdkgrids::TestGridsGMSSGNewL
|
|
|
148 |
// -----------------------------------------------------------------------------
|
|
|
149 |
//
|
|
|
150 |
TInt CTestSDKGrids::TestGridsGMSSGNewL( CStifItemParser& aItem )
|
|
|
151 |
{
|
|
|
152 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
153 |
_LIT( KTestGridsGMSSGNewL, "In TestGridsGMSSGNewL" );
|
|
|
154 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGNewL );
|
|
|
155 |
iLog->Log( KTestGridsGMSSGNewL );
|
|
|
156 |
|
|
|
157 |
TInt flag;
|
|
|
158 |
TInt err = aItem.GetNextInt( flag );
|
|
|
159 |
if( err != KErrNone)
|
|
|
160 |
return err;
|
|
|
161 |
switch ( flag )
|
|
|
162 |
{
|
|
|
163 |
case 1:
|
|
|
164 |
iStyleGrid = CAknGMSStyleGrid::NewL( iContainer , EFalse );
|
|
|
165 |
STIF_ASSERT_NOT_NULL( iStyleGrid );
|
|
|
166 |
break;
|
|
|
167 |
case 2:
|
|
|
168 |
iStyleGrid = CAknGMSStyleGrid::NewL( iContainer , ETrue );
|
|
|
169 |
STIF_ASSERT_NOT_NULL( iStyleGrid );
|
|
|
170 |
break;
|
|
|
171 |
default:
|
|
|
172 |
break;
|
|
|
173 |
}
|
|
|
174 |
|
|
|
175 |
return KErrNone;
|
|
|
176 |
}
|
|
|
177 |
|
|
|
178 |
// -----------------------------------------------------------------------------
|
|
|
179 |
// Ctestsdkgrids::TestGridsGMSSGConstructionL
|
|
|
180 |
// -----------------------------------------------------------------------------
|
|
|
181 |
//
|
|
|
182 |
TInt CTestSDKGrids::TestGridsGMSSGConstructionL( CStifItemParser& /*aItem*/ )
|
|
|
183 |
{
|
|
|
184 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
185 |
_LIT( KTestGridsGMSSGConstructionL, "In TestGridsGMSSGConstructionL" );
|
|
|
186 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGConstructionL );
|
|
|
187 |
iLog->Log( KTestGridsGMSSGConstructionL );
|
|
|
188 |
|
|
|
189 |
iStyleGrid = new( ELeave ) CAknGMSStyleGrid();
|
|
|
190 |
STIF_ASSERT_NOT_NULL( iStyleGrid );
|
|
|
191 |
|
|
|
192 |
return KErrNone;
|
|
|
193 |
}
|
|
|
194 |
|
|
|
195 |
// -----------------------------------------------------------------------------
|
|
|
196 |
// Ctestsdkgrids::TestGridsGMSSGConstructionWithTBoolL
|
|
|
197 |
// -----------------------------------------------------------------------------
|
|
|
198 |
//
|
|
|
199 |
TInt CTestSDKGrids::TestGridsGMSSGConstructionWithTBoolL( CStifItemParser& /*aItem*/ )
|
|
|
200 |
{
|
|
|
201 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
202 |
_LIT( KTestGridsGMSSGConstructionWithTBoolL, "In TestGridsGMSSGConstructionWithTBoolL" );
|
|
|
203 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGConstructionWithTBoolL );
|
|
|
204 |
iLog->Log( KTestGridsGMSSGConstructionWithTBoolL );
|
|
|
205 |
|
|
|
206 |
iStyleGrid = new( ELeave ) CAknGMSStyleGrid( EFalse );
|
|
|
207 |
STIF_ASSERT_NOT_NULL( iStyleGrid );
|
|
|
208 |
|
|
|
209 |
return KErrNone;
|
|
|
210 |
}
|
|
|
211 |
|
|
|
212 |
// -----------------------------------------------------------------------------
|
|
|
213 |
// Ctestsdkgrids::TestGridsGMSSGConstructL
|
|
|
214 |
// -----------------------------------------------------------------------------
|
|
|
215 |
//
|
|
|
216 |
TInt CTestSDKGrids::TestGridsGMSSGConstructL( CStifItemParser& /*aItem*/ )
|
|
|
217 |
{
|
|
|
218 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
219 |
_LIT( KTestGridsGMSSGConstructL, "In TestGridsGMSSGConstructL" );
|
|
|
220 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGConstructL );
|
|
|
221 |
iLog->Log( KTestGridsGMSSGConstructL );
|
|
|
222 |
|
|
|
223 |
TInt err;
|
|
|
224 |
TRAP( err, iStyleGrid->ConstructL( iContainer, 1, 1 ) );
|
|
|
225 |
|
|
|
226 |
return err;
|
|
|
227 |
}
|
|
|
228 |
|
|
|
229 |
// -----------------------------------------------------------------------------
|
|
|
230 |
// Ctestsdkgrids::TestGridsGMSSGDelete
|
|
|
231 |
// -----------------------------------------------------------------------------
|
|
|
232 |
//
|
|
|
233 |
TInt CTestSDKGrids::TestGridsGMSSGDelete( CStifItemParser& /*aItem*/ )
|
|
|
234 |
{
|
|
|
235 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
236 |
_LIT( KTestGridsGMSSGDelete, "In TestGridsGMSSGDelete" );
|
|
|
237 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGDelete );
|
|
|
238 |
iLog->Log( KTestGridsGMSSGDelete );
|
|
|
239 |
|
|
|
240 |
delete iStyleGrid;
|
|
|
241 |
iStyleGrid = NULL;
|
|
|
242 |
|
|
|
243 |
return KErrNone;
|
|
|
244 |
}
|
|
|
245 |
|
|
|
246 |
// -----------------------------------------------------------------------------
|
|
|
247 |
// Ctestsdkgrids::TestGridsGMSSGSetupLayout
|
|
|
248 |
// -----------------------------------------------------------------------------
|
|
|
249 |
//
|
|
|
250 |
TInt CTestSDKGrids::TestGridsGMSSGSetupLayout( CStifItemParser& /*aItem*/ )
|
|
|
251 |
{
|
|
|
252 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
253 |
_LIT( KTestGridsGMSSGSetupLayout, "In TestGridsGMSSGSetupLayout" );
|
|
|
254 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGSetupLayout );
|
|
|
255 |
iLog->Log( KTestGridsGMSSGSetupLayout );
|
|
|
256 |
|
|
|
257 |
iStyleGrid->SetupLayout();
|
|
|
258 |
|
|
|
259 |
return KErrNone;
|
|
|
260 |
}
|
|
|
261 |
|
|
|
262 |
// -----------------------------------------------------------------------------
|
|
|
263 |
// Ctestsdkgrids::TestGridsGMSSGHandlePointerEventL
|
|
|
264 |
// -----------------------------------------------------------------------------
|
|
|
265 |
//
|
|
|
266 |
TInt CTestSDKGrids::TestGridsGMSSGHandlePointerEventL( CStifItemParser& /*aItem*/ )
|
|
|
267 |
{
|
|
|
268 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
269 |
_LIT( KTestGridsGMSSGHandlePointerEventL, "In TestGridsGMSSGHandlePointerEventL" );
|
|
|
270 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGHandlePointerEventL );
|
|
|
271 |
iLog->Log( KTestGridsGMSSGHandlePointerEventL );
|
|
|
272 |
|
|
|
273 |
TInt err;
|
|
|
274 |
TPointerEvent pointerEvent( TPointerEvent::EButton1Up,
|
|
|
275 |
EModifierAutorepeatable, TPoint( 20, 20 ), TPoint( 0, 0 ) );
|
|
|
276 |
TRAP( err, iStyleGrid->HandlePointerEventL( pointerEvent ) );
|
|
|
277 |
|
|
|
278 |
return err;
|
|
|
279 |
}
|
|
|
280 |
|
|
|
281 |
// -----------------------------------------------------------------------------
|
|
|
282 |
// Ctestsdkgrids::TestGridsGMSSGSizeChanged
|
|
|
283 |
// -----------------------------------------------------------------------------
|
|
|
284 |
//
|
|
|
285 |
TInt CTestSDKGrids::TestGridsGMSSGSizeChanged( CStifItemParser& /*aItem*/ )
|
|
|
286 |
{
|
|
|
287 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
288 |
_LIT( KTestGridsGMSSGSizeChanged, "In TestGridsGMSSGSizeChanged" );
|
|
|
289 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGSizeChanged );
|
|
|
290 |
iLog->Log( KTestGridsGMSSGSizeChanged );
|
|
|
291 |
|
|
|
292 |
iStyleGrid->SizeChanged();
|
|
|
293 |
|
|
|
294 |
return KErrNone;
|
|
|
295 |
}
|
|
|
296 |
|
|
|
297 |
// -----------------------------------------------------------------------------
|
|
|
298 |
// Ctestsdkgrids::TestGridsGMSSGMinimumSize
|
|
|
299 |
// -----------------------------------------------------------------------------
|
|
|
300 |
//
|
|
|
301 |
TInt CTestSDKGrids::TestGridsGMSSGMinimumSize( CStifItemParser& /*aItem*/ )
|
|
|
302 |
{
|
|
|
303 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
304 |
_LIT( KTestGridsGMSSGMinimumSize, "In TestGridsGMSSGMinimumSize" );
|
|
|
305 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGMinimumSize );
|
|
|
306 |
iLog->Log( KTestGridsGMSSGMinimumSize );
|
|
|
307 |
|
|
|
308 |
TSize minimumSize = iStyleGrid->MinimumSize();
|
|
|
309 |
|
|
|
310 |
return KErrNone;
|
|
|
311 |
}
|
|
|
312 |
|
|
|
313 |
// -----------------------------------------------------------------------------
|
|
|
314 |
// Ctestsdkgrids::TestGridsGMSSGOfferKeyEventL
|
|
|
315 |
// -----------------------------------------------------------------------------
|
|
|
316 |
//
|
|
|
317 |
TInt CTestSDKGrids::TestGridsGMSSGOfferKeyEventL( CStifItemParser& /*aItem*/ )
|
|
|
318 |
{
|
|
|
319 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
320 |
_LIT( KTestGridsGMSSGMinimumSize, "In TestGridsGMSSGMinimumSize" );
|
|
|
321 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGMinimumSize );
|
|
|
322 |
iLog->Log( KTestGridsGMSSGMinimumSize );
|
|
|
323 |
|
|
|
324 |
TInt err;
|
|
|
325 |
TKeyEvent keyEvent = { EKeyPause, EStdKeySpace, 0, 0 };
|
|
|
326 |
|
|
|
327 |
TRAP( err, iStyleGrid->OfferKeyEventL( keyEvent, EEventNull ) );
|
|
|
328 |
|
|
|
329 |
return err;
|
|
|
330 |
}
|
|
|
331 |
|
|
|
332 |
// -----------------------------------------------------------------------------
|
|
|
333 |
// Ctestsdkgrids::TestGridsGMSSGDraw
|
|
|
334 |
// -----------------------------------------------------------------------------
|
|
|
335 |
//
|
|
|
336 |
TInt CTestSDKGrids::TestGridsGMSSGDraw( CStifItemParser& /*aItem*/ )
|
|
|
337 |
{
|
|
|
338 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
339 |
_LIT( KTestGridsGMSSGMinimumSize, "In TestGridsGMSSGMinimumSize" );
|
|
|
340 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGMinimumSize );
|
|
|
341 |
iLog->Log( KTestGridsGMSSGMinimumSize );
|
|
|
342 |
|
|
|
343 |
TRect rect = iContainer->Rect();
|
|
|
344 |
iStyleGrid->Draw( rect );
|
|
|
345 |
|
|
|
346 |
return KErrNone;
|
|
|
347 |
}
|
|
|
348 |
|
|
|
349 |
// -----------------------------------------------------------------------------
|
|
|
350 |
// Ctestsdkgrids::TestGridsGMSSGMakeViewClassInstanceL
|
|
|
351 |
// -----------------------------------------------------------------------------
|
|
|
352 |
//
|
|
|
353 |
TInt CTestSDKGrids::TestGridsGMSSGMakeViewClassInstanceL( CStifItemParser& /*aItem*/ )
|
|
|
354 |
{
|
|
|
355 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
356 |
_LIT( KTestGridsGMSSGMinimumSize, "In TestGridsGMSSGMinimumSize" );
|
|
|
357 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGMinimumSize );
|
|
|
358 |
iLog->Log( KTestGridsGMSSGMinimumSize );
|
|
|
359 |
|
|
|
360 |
CListBoxView* listBoxView = iStyleGrid->MakeViewClassInstanceL();
|
|
|
361 |
CleanupStack::PushL( listBoxView );
|
|
|
362 |
|
|
|
363 |
STIF_ASSERT_NOT_NULL( listBoxView );
|
|
|
364 |
|
|
|
365 |
CleanupStack::PopAndDestroy( listBoxView );
|
|
|
366 |
|
|
|
367 |
return KErrNone;
|
|
|
368 |
}
|
|
|
369 |
|
|
|
370 |
//==============================class CAknGMSPopupGrid==========================
|
|
|
371 |
// -----------------------------------------------------------------------------
|
|
|
372 |
// Ctestsdkgrids::TestGridsGMSPGNewL
|
|
|
373 |
// -----------------------------------------------------------------------------
|
|
|
374 |
//
|
|
|
375 |
TInt CTestSDKGrids::TestGridsGMSPGNewL( CStifItemParser& /*aItem*/ )
|
|
|
376 |
{
|
|
|
377 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
378 |
_LIT( KTestGridsGMSSGMinimumSize, "In TestGridsGMSSGMinimumSize" );
|
|
|
379 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGMinimumSize );
|
|
|
380 |
iLog->Log( KTestGridsGMSSGMinimumSize );
|
|
|
381 |
|
|
|
382 |
CAknGMSStyleGrid* styleGrid = CAknGMSStyleGrid::NewL( iContainer, EFalse );
|
|
|
383 |
CleanupStack::PushL( styleGrid );
|
|
|
384 |
CAknGMSPopupGrid* popupGrid = CAknGMSPopupGrid::NewL( styleGrid, R_GRIDS_CBA_OK_BACK, AknPopupLayouts::EMenuWindow );
|
|
|
385 |
CleanupStack::PushL( popupGrid );
|
|
|
386 |
|
|
|
387 |
STIF_ASSERT_NOT_NULL( popupGrid );
|
|
|
388 |
CleanupStack::PopAndDestroy( popupGrid );
|
|
|
389 |
CleanupStack::PopAndDestroy( styleGrid );
|
|
|
390 |
|
|
|
391 |
return KErrNone;
|
|
|
392 |
}
|
|
|
393 |
|
|
|
394 |
// -----------------------------------------------------------------------------
|
|
|
395 |
// Ctestsdkgrids::TestGridsGMSPGSetupWindowLayoutL
|
|
|
396 |
// -----------------------------------------------------------------------------
|
|
|
397 |
//
|
|
|
398 |
TInt CTestSDKGrids::TestGridsGMSPGSetupWindowLayoutL( CStifItemParser& /*aItem*/ )
|
|
|
399 |
{
|
|
|
400 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
401 |
_LIT( KTestGridsGMSSGMinimumSize, "In TestGridsGMSSGMinimumSize" );
|
|
|
402 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGMinimumSize );
|
|
|
403 |
iLog->Log( KTestGridsGMSSGMinimumSize );
|
|
|
404 |
|
|
|
405 |
CAknGMSStyleGrid* styleGrid = CAknGMSStyleGrid::NewL( iContainer, EFalse );
|
|
|
406 |
CleanupStack::PushL( styleGrid );
|
|
|
407 |
CAknGMSPopupGrid* popupGrid = CAknGMSPopupGrid::NewL( styleGrid, R_GRIDS_CBA_OK_BACK, AknPopupLayouts::EMenuWindow );
|
|
|
408 |
CleanupStack::PushL( popupGrid );
|
|
|
409 |
|
|
|
410 |
popupGrid->SetupWindowLayout( AknPopupLayouts::EMenuWindow );
|
|
|
411 |
popupGrid->SetupWindowLayout( AknPopupLayouts::EMenuGraphicWindow );
|
|
|
412 |
popupGrid->SetupWindowLayout( AknPopupLayouts::EMenuGraphicHeadingWindow );
|
|
|
413 |
popupGrid->SetupWindowLayout( AknPopupLayouts::EMenuDoubleWindow );
|
|
|
414 |
popupGrid->SetupWindowLayout(
|
|
|
415 |
AknPopupLayouts::EMenuDoubleLargeGraphicWindow );
|
|
|
416 |
popupGrid->SetupWindowLayout( AknPopupLayouts::EPopupSNotePopupWindow );
|
|
|
417 |
popupGrid->SetupWindowLayout(
|
|
|
418 |
AknPopupLayouts::EMenuUnknownColumnWindow );
|
|
|
419 |
popupGrid->SetupWindowLayout(
|
|
|
420 |
AknPopupLayouts::EMenuUnknownFormattedCellWindow );
|
|
|
421 |
popupGrid->SetupWindowLayout( AknPopupLayouts::EDynMenuWindow );
|
|
|
422 |
popupGrid->SetupWindowLayout( AknPopupLayouts::EDynMenuGraphicWindow );
|
|
|
423 |
popupGrid->SetupWindowLayout( AknPopupLayouts::EDynMenuGraphicHeadingWindow );
|
|
|
424 |
popupGrid->SetupWindowLayout( AknPopupLayouts::EDynMenuDoubleWindow );
|
|
|
425 |
popupGrid->SetupWindowLayout( AknPopupLayouts::EDynMenuDoubleLargeGraphicWindow );
|
|
|
426 |
|
|
|
427 |
CleanupStack::PopAndDestroy( popupGrid );
|
|
|
428 |
CleanupStack::PopAndDestroy( styleGrid );
|
|
|
429 |
|
|
|
430 |
return KErrNone;
|
|
|
431 |
}
|
|
|
432 |
|
|
|
433 |
// -----------------------------------------------------------------------------
|
|
|
434 |
// Ctestsdkgrids::TestGridsGMSPGCalcPopupGridLargeGraphicWindowL
|
|
|
435 |
// -----------------------------------------------------------------------------
|
|
|
436 |
//
|
|
|
437 |
TInt CTestSDKGrids::TestGridsGMSPGCalcPopupGridLargeGraphicWindowL( CStifItemParser& /*aItem*/ )
|
|
|
438 |
{
|
|
|
439 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
440 |
_LIT( KTestGridsGMSSGMinimumSize, "In TestGridsGMSSGMinimumSize" );
|
|
|
441 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGMinimumSize );
|
|
|
442 |
iLog->Log( KTestGridsGMSSGMinimumSize );
|
|
|
443 |
|
|
|
444 |
CAknGMSStyleGrid* styleGrid = CAknGMSStyleGrid::NewL( iContainer, EFalse );
|
|
|
445 |
CleanupStack::PushL( styleGrid );
|
|
|
446 |
CAknGMSPopupGrid* popupGrid = CAknGMSPopupGrid::NewL( styleGrid, R_GRIDS_CBA_OK_BACK, AknPopupLayouts::EMenuWindow );
|
|
|
447 |
CleanupStack::PushL( popupGrid );
|
|
|
448 |
|
|
|
449 |
TAknPopupWindowLayoutDef def;
|
|
|
450 |
TRect rect = iContainer->Rect();
|
|
|
451 |
TInt lines = 1;
|
|
|
452 |
|
|
|
453 |
popupGrid->CalcPopupGridLargeGraphicWindow( def, rect, lines );
|
|
|
454 |
|
|
|
455 |
CleanupStack::PopAndDestroy( popupGrid );
|
|
|
456 |
CleanupStack::PopAndDestroy( styleGrid );
|
|
|
457 |
|
|
|
458 |
return KErrNone;
|
|
|
459 |
}
|
|
|
460 |
|
|
|
461 |
// -----------------------------------------------------------------------------
|
|
|
462 |
// Ctestsdkgrids::TestGridsGMSPGSetupPopupGridLargeGraphicWindowL
|
|
|
463 |
// -----------------------------------------------------------------------------
|
|
|
464 |
//
|
|
|
465 |
TInt CTestSDKGrids::TestGridsGMSPGSetupPopupGridLargeGraphicWindowL( CStifItemParser& /*aItem*/ )
|
|
|
466 |
{
|
|
|
467 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
468 |
_LIT( KTestGridsGMSSGMinimumSize, "In TestGridsGMSSGMinimumSize" );
|
|
|
469 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGMinimumSize );
|
|
|
470 |
iLog->Log( KTestGridsGMSSGMinimumSize );
|
|
|
471 |
|
|
|
472 |
CAknGMSStyleGrid* styleGrid = CAknGMSStyleGrid::NewL( iContainer, EFalse );
|
|
|
473 |
CleanupStack::PushL( styleGrid );
|
|
|
474 |
CAknGMSPopupGrid* popupGrid = CAknGMSPopupGrid::NewL( styleGrid, R_GRIDS_CBA_OK_BACK, AknPopupLayouts::EMenuWindow );
|
|
|
475 |
CleanupStack::PushL( popupGrid );
|
|
|
476 |
|
|
|
477 |
popupGrid->SetupWindowLayout( AknPopupLayouts::EMenuDoubleWindow );
|
|
|
478 |
TAknPopupWindowLayoutDef def;
|
|
|
479 |
TInt lines = 1;
|
|
|
480 |
|
|
|
481 |
popupGrid->SetupPopupGridLargeGraphicWindow( def, lines, ETrue );
|
|
|
482 |
|
|
|
483 |
CleanupStack::PopAndDestroy( popupGrid );
|
|
|
484 |
CleanupStack::PopAndDestroy( styleGrid );
|
|
|
485 |
|
|
|
486 |
return KErrNone;
|
|
|
487 |
}
|
|
|
488 |
|
|
|
489 |
// -----------------------------------------------------------------------------
|
|
|
490 |
// Ctestsdkgrids::TestGridsGMSPGPopupGridLargeGraphicGraphicsL
|
|
|
491 |
// -----------------------------------------------------------------------------
|
|
|
492 |
//
|
|
|
493 |
TInt CTestSDKGrids::TestGridsGMSPGPopupGridLargeGraphicGraphicsL( CStifItemParser& /*aItem*/ )
|
|
|
494 |
{
|
|
|
495 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
496 |
_LIT( KTestGridsGMSSGMinimumSize, "In TestGridsGMSSGMinimumSize" );
|
|
|
497 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGMinimumSize );
|
|
|
498 |
iLog->Log( KTestGridsGMSSGMinimumSize );
|
|
|
499 |
|
|
|
500 |
CAknGMSStyleGrid* styleGrid = CAknGMSStyleGrid::NewL( iContainer, EFalse );
|
|
|
501 |
CleanupStack::PushL( styleGrid );
|
|
|
502 |
CAknGMSPopupGrid* popupGrid = CAknGMSPopupGrid::NewL( styleGrid, R_GRIDS_CBA_OK_BACK, AknPopupLayouts::EMenuWindow );
|
|
|
503 |
CleanupStack::PushL( popupGrid );
|
|
|
504 |
|
|
|
505 |
TAknPopupWindowLayoutDef def;
|
|
|
506 |
|
|
|
507 |
popupGrid->PopupGridLargeGraphicGraphics( def );
|
|
|
508 |
|
|
|
509 |
CleanupStack::PopAndDestroy( popupGrid );
|
|
|
510 |
CleanupStack::PopAndDestroy( styleGrid );
|
|
|
511 |
|
|
|
512 |
return KErrNone;
|
|
|
513 |
}
|
|
|
514 |
|
|
|
515 |
// -----------------------------------------------------------------------------
|
|
|
516 |
// Ctestsdkgrids::TestGridsGMSPGHandlePointerEventL
|
|
|
517 |
// -----------------------------------------------------------------------------
|
|
|
518 |
//
|
|
|
519 |
TInt CTestSDKGrids::TestGridsGMSPGHandlePointerEventL( CStifItemParser& /*aItem*/ )
|
|
|
520 |
{
|
|
|
521 |
_LIT( Ktestsdkgrid, "testsdkgrid" );
|
|
|
522 |
_LIT( KTestGridsGMSSGMinimumSize, "In TestGridsGMSSGMinimumSize" );
|
|
|
523 |
TestModuleIf().Printf( 0, Ktestsdkgrid, KTestGridsGMSSGMinimumSize );
|
|
|
524 |
iLog->Log( KTestGridsGMSSGMinimumSize );
|
|
|
525 |
|
|
|
526 |
CAknGMSStyleGrid* styleGrid = CAknGMSStyleGrid::NewL( iContainer, EFalse );
|
|
|
527 |
CleanupStack::PushL( styleGrid );
|
|
|
528 |
CAknGMSPopupGrid* popupGrid = CAknGMSPopupGrid::NewL( styleGrid, R_GRIDS_CBA_OK_BACK, AknPopupLayouts::EMenuWindow );
|
|
|
529 |
CleanupStack::PushL( popupGrid );
|
|
|
530 |
|
|
|
531 |
TPointerEvent pointerEvent( TPointerEvent::EButton1Up,
|
|
|
532 |
EModifierAutorepeatable, TPoint( 20, 20 ), TPoint( 0, 0 ) );
|
|
|
533 |
popupGrid->HandlePointerEventL( pointerEvent );
|
|
|
534 |
|
|
|
535 |
CleanupStack::PopAndDestroy( popupGrid );
|
|
|
536 |
CleanupStack::PopAndDestroy( styleGrid );
|
|
|
537 |
|
|
|
538 |
return KErrNone;
|
|
|
539 |
}
|
|
|
540 |
|
|
|
541 |
/*
|
|
|
542 |
* End files
|
|
|
543 |
*/
|