|
1 /* |
|
2 * Copyright (c) 2009 Symbian Foundation Ltd |
|
3 * This component and the accompanying materials are made available |
|
4 * under the terms of the License "Eclipse Public License v1.0" |
|
5 * which accompanies this distribution, and is available |
|
6 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 * |
|
8 * Initial Contributors: |
|
9 * Symbian Foundation Ltd - initial contribution. |
|
10 * |
|
11 * Contributors: |
|
12 * |
|
13 * Description: |
|
14 * Implementation of CTigerAppUi class |
|
15 */ |
|
16 |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include "TigerAppUi.h" |
|
20 #include "TigerContainer.h" |
|
21 #include <Tiger.rsg> |
|
22 #include "Tiger.hrh" |
|
23 |
|
24 #include <avkon.hrh> |
|
25 |
|
26 // ================= MEMBER FUNCTIONS ======================= |
|
27 // |
|
28 // ---------------------------------------------------------- |
|
29 // CTigerAppUi::ConstructL() |
|
30 // ---------------------------------------------------------- |
|
31 // |
|
32 void CTigerAppUi::ConstructL() |
|
33 { |
|
34 BaseConstructL(); |
|
35 iAppContainer = new (ELeave) CTigerContainer; |
|
36 iAppContainer->SetMopParent(this); |
|
37 iAppContainer->ConstructL( ClientRect() ); |
|
38 AddToStackL( iAppContainer ); |
|
39 } |
|
40 |
|
41 // ---------------------------------------------------- |
|
42 // CTigerAppUi::~CTigerAppUi() |
|
43 // Destructor |
|
44 // Frees reserved resources |
|
45 // ---------------------------------------------------- |
|
46 // |
|
47 CTigerAppUi::~CTigerAppUi() |
|
48 { |
|
49 if ( iAppContainer ) |
|
50 { |
|
51 RemoveFromStack( iAppContainer ); |
|
52 delete iAppContainer; |
|
53 } |
|
54 } |
|
55 |
|
56 // ------------------------------------------------------------------------------ |
|
57 // CTigerAppUi::::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane) |
|
58 // This function is called by the EIKON framework just before it displays |
|
59 // a menu pane. Its default implementation is empty, and by overriding it, |
|
60 // the application can set the state of menu items dynamically according |
|
61 // to the state of application data. |
|
62 // ------------------------------------------------------------------------------ |
|
63 // |
|
64 void CTigerAppUi::DynInitMenuPaneL( |
|
65 TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/) |
|
66 { |
|
67 } |
|
68 |
|
69 // ---------------------------------------------------- |
|
70 // CTigerAppUi::HandleKeyEventL( |
|
71 // const TKeyEvent& aKeyEvent,TEventCode /*aType*/) |
|
72 // Key event handler |
|
73 // ---------------------------------------------------- |
|
74 // |
|
75 TKeyResponse CTigerAppUi::HandleKeyEventL( |
|
76 const TKeyEvent& /*aKeyEvent*/ ,TEventCode /*aType*/) |
|
77 { |
|
78 return EKeyWasNotConsumed; |
|
79 } |
|
80 |
|
81 // ---------------------------------------------------- |
|
82 // CTigerAppUi::HandleCommandL(TInt aCommand) |
|
83 // Command handler |
|
84 // ---------------------------------------------------- |
|
85 // |
|
86 void CTigerAppUi::HandleCommandL(TInt aCommand) |
|
87 { |
|
88 switch ( aCommand ) |
|
89 { |
|
90 case EAknSoftkeyBack: |
|
91 case EEikCmdExit: |
|
92 { |
|
93 Exit(); |
|
94 break; |
|
95 } |
|
96 default: |
|
97 break; |
|
98 } |
|
99 } |
|
100 |
|
101 // End of File |