|
1 /* |
|
2 * Copyright (c) 2002-2004 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: Japanese user dictionary Application UI class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 // INCLUDE FILES |
|
24 #include "UdictAppUi.h" |
|
25 #include "UdictView.h" |
|
26 #include "UdictDocument.h" |
|
27 #include "UdictModel.h" |
|
28 |
|
29 // ============================ MEMBER FUNCTIONS =============================== |
|
30 |
|
31 // ----------------------------------------------------------------------------- |
|
32 // CUserDictAppUi::CUserDictAppUi |
|
33 // C++ default constructor can NOT contain any code, that |
|
34 // might leave. |
|
35 // ----------------------------------------------------------------------------- |
|
36 // |
|
37 CUserDictAppUi::CUserDictAppUi() |
|
38 { |
|
39 } |
|
40 |
|
41 // Destructor |
|
42 CUserDictAppUi::~CUserDictAppUi() |
|
43 { |
|
44 } |
|
45 |
|
46 // ----------------------------------------------------------------------------- |
|
47 // CUserDictAppUi::ConstructL |
|
48 // Symbian 2nd phase constructor can leave. |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 void CUserDictAppUi::ConstructL() |
|
52 { |
|
53 BaseConstructL(EAknEnableSkin | EAknEnableMSK); |
|
54 CUserDictView* view = CUserDictView::NewLC( |
|
55 static_cast<CUserDictDocument*>(Document())->Model()); |
|
56 |
|
57 AddViewL(view); // transfer ownership to CAknViewAppUi |
|
58 CleanupStack::Pop(); // view |
|
59 |
|
60 SetDefaultViewL(*view); |
|
61 } |
|
62 |
|
63 // ----------------------------------------------------------------------------- |
|
64 // CUserDictAppUi::HandleCommandL |
|
65 // ----------------------------------------------------------------------------- |
|
66 // |
|
67 void CUserDictAppUi::HandleCommandL(TInt aCommand) |
|
68 { |
|
69 switch (aCommand) |
|
70 { |
|
71 case EEikCmdExit: |
|
72 Exit(); |
|
73 break; |
|
74 default: |
|
75 break; |
|
76 } |
|
77 } |
|
78 |
|
79 // ----------------------------------------------------------------------------- |
|
80 // CUserDictAppUi::HandleScreenDeviceChangedL |
|
81 // ----------------------------------------------------------------------------- |
|
82 // |
|
83 void CUserDictAppUi::HandleScreenDeviceChangedL() |
|
84 { |
|
85 CAknViewAppUi::HandleScreenDeviceChangedL(); |
|
86 CEikAppUi::HandleScreenDeviceChangedL(); |
|
87 const TUid KViewId = {1}; // UID of View |
|
88 CAknView* view = View(KViewId); |
|
89 if (view) |
|
90 { |
|
91 |
|
92 static_cast<CUserDictView*>(view)->HandleClientRectChange(); |
|
93 } |
|
94 } |
|
95 |
|
96 // End of File |