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