|
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 functions for alftextstylemanager.h |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // [INCLUDE FILES] |
|
21 #include <alf/alftextstylemanager.h> |
|
22 #include <alf/alftextstyle.h> |
|
23 |
|
24 #include "testplatalfvisual.h" |
|
25 |
|
26 |
|
27 |
|
28 // ============================ MEMBER FUNCTIONS =============================== |
|
29 |
|
30 // ----------------------------------------------------------------------------- |
|
31 // CTestPlatAlfVisual::TestStyleMgrTextStyleMethodsL |
|
32 // ----------------------------------------------------------------------------- |
|
33 // |
|
34 TInt CTestPlatAlfVisual::TestStyleMgrTextStyleMethodsL( CStifItemParser& /*aItem*/ ) |
|
35 { |
|
36 // Print to UI |
|
37 _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" ); |
|
38 _LIT( KTestStyleMgrTextStyleMethodsL, "TestStyleMgrTextStyleMethodsL" ); |
|
39 TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestStyleMgrTextStyleMethodsL ); |
|
40 // Print to log file |
|
41 iLog->Log( KTestStyleMgrTextStyleMethodsL ); |
|
42 |
|
43 CAlfTextStyleManager* styleMgr = &( iAlfEnv->TextStyleManager() ); |
|
44 |
|
45 // create a new TextStyle A |
|
46 TInt styleAId = styleMgr->CreatePlatformTextStyleL( |
|
47 EAknLogicalFontSecondaryFont, EAlfTextStyleNormal ); |
|
48 |
|
49 // create a new style B having A as parent |
|
50 TInt styleBId = styleMgr->CreatePlatformTextStyleL( styleAId ); |
|
51 |
|
52 // clone TextStyle C from B |
|
53 TInt styleCId = styleMgr->CopyTextStyleL( styleBId ); |
|
54 |
|
55 styleMgr->TextStyle( styleAId ); |
|
56 styleMgr->TextStyle( styleBId ); |
|
57 styleMgr->TextStyle( styleCId ); |
|
58 |
|
59 styleMgr->DeleteTextStyle( styleAId ); |
|
60 styleMgr->DeleteTextStyle( styleBId ); |
|
61 styleMgr->DeleteTextStyle( styleCId ); |
|
62 |
|
63 return KErrNone; |
|
64 } |
|
65 |
|
66 |
|
67 // [End of File] |