|
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: for testing the method of the CHuiTextVisual |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <uiacceltk\huiflowlayout.h> |
|
19 |
|
20 #include "testuiaifcoretoolkit.h" |
|
21 |
|
22 const TInt KWidth = 10; |
|
23 const TInt KHeight = 10; |
|
24 |
|
25 // ----------------------------------------------------------------------------- |
|
26 // Ctestplatalfcoretoolkit::TestHuiFlowLayoutAddNewL |
|
27 // ----------------------------------------------------------------------------- |
|
28 // |
|
29 TInt CTestUiAifCoreToolkit::TestHuiFlowLayoutAddNewL( CStifItemParser& /*aItem*/ ) |
|
30 { |
|
31 |
|
32 // Print to UI |
|
33 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
34 _LIT( KTestHuiFlowLayoutAddNewL, "In TestHuiFlowLayoutAddNewL" ); |
|
35 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiFlowLayoutAddNewL ); |
|
36 // Print to log file |
|
37 iLog->Log( KTestHuiFlowLayoutAddNewL ); |
|
38 |
|
39 TRAPD( error, iHuiFlowLayout = iHuiFlowLayout->AddNewL( *iHuiControl, CHuiFlowLayout::EFlowHorizontal ) ); |
|
40 |
|
41 return error; |
|
42 |
|
43 } |
|
44 |
|
45 // ----------------------------------------------------------------------------- |
|
46 // Ctestplatalfcoretoolkit::TestHuiFlowLayoutDelete |
|
47 // ----------------------------------------------------------------------------- |
|
48 // |
|
49 TInt CTestUiAifCoreToolkit::TestHuiFlowLayoutDelete( CStifItemParser& /*aItem*/ ) |
|
50 { |
|
51 |
|
52 // Print to UI |
|
53 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
54 _LIT( KTestHuiFlowLayoutDelete, "In TestHuiFlowLayoutDelete" ); |
|
55 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiFlowLayoutDelete ); |
|
56 // Print to log file |
|
57 iLog->Log( KTestHuiFlowLayoutDelete ); |
|
58 |
|
59 delete iHuiFlowLayout; |
|
60 iHuiFlowLayout = NULL; |
|
61 |
|
62 return KErrNone; |
|
63 |
|
64 } |
|
65 |
|
66 // ----------------------------------------------------------------------------- |
|
67 // Ctestplatalfcoretoolkit::TestHuiFlowLayoutSetSize |
|
68 // ----------------------------------------------------------------------------- |
|
69 // |
|
70 TInt CTestUiAifCoreToolkit::TestHuiFlowLayoutSetSize( CStifItemParser& /*aItem*/ ) |
|
71 { |
|
72 |
|
73 // Print to UI |
|
74 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
75 _LIT( KTestHuiFlowLayoutSetSize, "In TestHuiFlowLayoutSetSize" ); |
|
76 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiFlowLayoutSetSize ); |
|
77 // Print to log file |
|
78 iLog->Log( KTestHuiFlowLayoutSetSize ); |
|
79 |
|
80 THuiRealSize size( KWidth, KHeight ); |
|
81 |
|
82 iHuiFlowLayout->SetSize( size ); |
|
83 |
|
84 return KErrNone; |
|
85 |
|
86 } |
|
87 |
|
88 // ----------------------------------------------------------------------------- |
|
89 // Ctestplatalfcoretoolkit::TestHuiFlowLayoutSetFlowDirection |
|
90 // ----------------------------------------------------------------------------- |
|
91 // |
|
92 TInt CTestUiAifCoreToolkit::TestHuiFlowLayoutSetFlowDirection( CStifItemParser& /*aItem*/ ) |
|
93 { |
|
94 |
|
95 // Print to UI |
|
96 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
97 _LIT( KTestHuiFlowLayoutSetFlowDirection, "In TestHuiFlowLayoutSetFlowDirection" ); |
|
98 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiFlowLayoutSetFlowDirection ); |
|
99 // Print to log file |
|
100 iLog->Log( KTestHuiFlowLayoutSetFlowDirection ); |
|
101 |
|
102 iHuiFlowLayout->SetFlowDirection( CHuiFlowLayout::EFlowHorizontal ); |
|
103 |
|
104 return KErrNone; |
|
105 |
|
106 } |
|
107 |
|
108 // ----------------------------------------------------------------------------- |
|
109 // Ctestplatalfcoretoolkit::TestHuiFlowLayoutSetCentering |
|
110 // ----------------------------------------------------------------------------- |
|
111 // |
|
112 TInt CTestUiAifCoreToolkit::TestHuiFlowLayoutSetCentering( CStifItemParser& /*aItem*/ ) |
|
113 { |
|
114 |
|
115 // Print to UI |
|
116 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
117 _LIT( KTestHuiFlowLayoutSetCentering, "In TestHuiFlowLayoutSetCentering" ); |
|
118 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiFlowLayoutSetCentering ); |
|
119 // Print to log file |
|
120 iLog->Log( KTestHuiFlowLayoutSetCentering ); |
|
121 |
|
122 iHuiFlowLayout->SetCentering( ETrue ); |
|
123 |
|
124 return KErrNone; |
|
125 |
|
126 } |
|
127 |
|
128 // ----------------------------------------------------------------------------- |
|
129 // Ctestplatalfcoretoolkit::TestHuiFlowLayoutSetMode |
|
130 // ----------------------------------------------------------------------------- |
|
131 // |
|
132 TInt CTestUiAifCoreToolkit::TestHuiFlowLayoutSetMode( CStifItemParser& /*aItem*/ ) |
|
133 { |
|
134 |
|
135 // Print to UI |
|
136 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
137 _LIT( KTestHuiFlowLayoutSetMode, "In TestHuiFlowLayoutSetMode" ); |
|
138 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiFlowLayoutSetMode ); |
|
139 // Print to log file |
|
140 iLog->Log( KTestHuiFlowLayoutSetMode ); |
|
141 |
|
142 iHuiFlowLayout->SetMode( CHuiFlowLayout::EModeCenterPerpendicular ); |
|
143 |
|
144 return KErrNone; |
|
145 |
|
146 } |
|
147 |
|
148 // ----------------------------------------------------------------------------- |
|
149 // Ctestplatalfcoretoolkit::TestHuiFlowLayoutMode |
|
150 // ----------------------------------------------------------------------------- |
|
151 // |
|
152 TInt CTestUiAifCoreToolkit::TestHuiFlowLayoutMode( CStifItemParser& /*aItem*/ ) |
|
153 { |
|
154 |
|
155 // Print to UI |
|
156 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
157 _LIT( KTestHuiFlowLayoutMode, "In TestHuiFlowLayoutMode" ); |
|
158 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiFlowLayoutMode ); |
|
159 // Print to log file |
|
160 iLog->Log( KTestHuiFlowLayoutMode ); |
|
161 |
|
162 iHuiFlowLayout->Mode(); |
|
163 |
|
164 return KErrNone; |
|
165 |
|
166 } |
|
167 |
|
168 // End of file |