1 /* |
1 /* |
2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
16 * |
16 * |
17 */ |
17 */ |
18 |
18 |
19 |
19 |
20 // INCLUDE FILES |
20 // INCLUDE FILES |
|
21 |
|
22 #include <ussd.rsg> |
|
23 #include <aknkeys.h> |
|
24 #include <eikedwin.h> |
|
25 #include <bldvariant.hrh> |
|
26 #include <featmgr.h> |
|
27 #include <centralrepository.h> |
|
28 #include <telinternalcrkeys.h> |
|
29 #include <csxhelp/ussd.hlp.hrh> // for help context |
|
30 |
|
31 // For skinning. |
|
32 #include <AknsBasicBackgroundControlContext.h> |
|
33 #include <AknsDrawUtils.h> |
|
34 #include <AknsUtils.h> |
|
35 #include <txtglobl.h> |
|
36 |
|
37 #include "telephonyvariant.hrh" |
21 #include "UssdComms.h" |
38 #include "UssdComms.h" |
22 #include "UssdNaviPane.h" |
39 #include "UssdNaviPane.h" |
23 #include "UssdAppUi.h" |
40 #include "UssdAppUi.h" |
24 #include "UssdContainer.h" |
41 #include "UssdContainer.h" |
25 #include "UssdEditorLines.h" |
42 #include "UssdEditorLines.h" |
26 #include <ussd.rsg> |
|
27 #include "UssdLayout.h" |
43 #include "UssdLayout.h" |
28 #include <aknkeys.h> |
|
29 #include "ussd.hrh" |
44 #include "ussd.hrh" |
30 #include <eikedwin.h> |
|
31 #include <bldvariant.hrh> |
|
32 #include <featmgr.h> |
|
33 |
|
34 #include <centralrepository.h> |
|
35 #include <telinternalcrkeys.h> |
|
36 #include "telephonyvariant.hrh" |
|
37 |
|
38 #include <csxhelp/ussd.hlp.hrh> // for help context |
|
39 #include "UssdApp.h" // for applicationUID |
45 #include "UssdApp.h" // for applicationUID |
40 #include <AknUtils.h> |
46 #include "UssdLogger.h" |
41 |
|
42 // For skinning. |
|
43 #include <AknsBasicBackgroundControlContext.h> |
|
44 #include <AknsDrawUtils.h> |
|
45 #include <AknsUtils.h> |
|
46 #include <txtglobl.h> |
|
47 |
|
48 |
|
49 |
47 |
50 // ============================ MEMBER FUNCTIONS =============================== |
48 // ============================ MEMBER FUNCTIONS =============================== |
51 |
49 |
52 // ----------------------------------------------------------------------------- |
50 // ----------------------------------------------------------------------------- |
53 // CUssdContainer::CUssdContainer |
51 // CUssdContainer::CUssdContainer |
65 // Symbian 2nd phase constructor can leave. |
63 // Symbian 2nd phase constructor can leave. |
66 // ----------------------------------------------------------------------------- |
64 // ----------------------------------------------------------------------------- |
67 // |
65 // |
68 void CUssdContainer::ConstructL( const TRect& aRect ) |
66 void CUssdContainer::ConstructL( const TRect& aRect ) |
69 { |
67 { |
|
68 _LOGSTRING( "CUssdContainer::ConstructL =>" ) |
70 CreateWindowL(); |
69 CreateWindowL(); |
71 |
70 |
72 // Create background control context for skins. |
71 // Create background control context for skins. |
73 iBgContext = CAknsBasicBackgroundControlContext::NewL( |
72 iBgContext = CAknsBasicBackgroundControlContext::NewL( |
74 KAknsIIDQsnBgAreaMainMessage, aRect, ETrue /*Parent absolute*/ ); |
73 KAknsIIDQsnBgAreaMainMessage, aRect, ETrue /*Parent absolute*/ ); |
98 // Finish the job |
97 // Finish the job |
99 SetRect( aRect ); |
98 SetRect( aRect ); |
100 ActivateL(); |
99 ActivateL(); |
101 |
100 |
102 iEditor->SetFocus( ETrue ); |
101 iEditor->SetFocus( ETrue ); |
|
102 _LOGSTRING( "CUssdContainer::ConstructL <=" ) |
103 } |
103 } |
104 |
104 |
105 |
105 |
106 // Destructor |
106 // Destructor |
107 CUssdContainer::~CUssdContainer() |
107 CUssdContainer::~CUssdContainer() |
108 { |
108 { |
|
109 _LOGSTRING( "CUssdContainer::~CUssdContainer =>" ) |
109 delete iLines; |
110 delete iLines; |
110 |
111 |
111 AknsUtils::DeregisterControlPosition( iEditor ); |
112 AknsUtils::DeregisterControlPosition( iEditor ); |
112 delete iEditor; |
113 delete iEditor; |
113 delete iNaviPaneHandler; |
114 delete iNaviPaneHandler; |
114 |
115 |
115 delete iBgContext; // For skinning, can be deleted, NULL if not exist. |
116 delete iBgContext; // For skinning, can be deleted, NULL if not exist. |
|
117 _LOGSTRING( "CUssdContainer::~CUssdContainer <=" ) |
116 } |
118 } |
117 |
119 |
118 // ----------------------------------------------------------------------------- |
120 // ----------------------------------------------------------------------------- |
119 // CUssdContainer::HandleEdwinEventL |
121 // CUssdContainer::HandleEdwinEventL |
120 // Called by framework when the Editor is changed |
122 // Called by framework when the Editor is changed |
286 // ----------------------------------------------------------------------------- |
288 // ----------------------------------------------------------------------------- |
287 // |
289 // |
288 TKeyResponse CUssdContainer::OfferKeyEventL( |
290 TKeyResponse CUssdContainer::OfferKeyEventL( |
289 const TKeyEvent& aKeyEvent, TEventCode aType ) |
291 const TKeyEvent& aKeyEvent, TEventCode aType ) |
290 { |
292 { |
|
293 _LOGSTRING3( |
|
294 "CUssdContainer::OfferKeyEventL =>,TKeyEvent::iCode=%d,TEventCode=%d", |
|
295 aKeyEvent.iCode, aType ) |
291 TKeyResponse response = EKeyWasNotConsumed; |
296 TKeyResponse response = EKeyWasNotConsumed; |
292 |
297 |
293 // Special key handling comes first. |
298 // Special key handling comes first. |
294 if ( aKeyEvent.iScanCode == EStdKeyYes ) // Send key. |
299 if ( aKeyEvent.iScanCode == EStdKeyYes ) // Send key. |
295 { |
300 { |
480 // --------------------------------------------------------- |
486 // --------------------------------------------------------- |
481 // CUssdContainer::UpdateNavipaneMsgLengthL |
487 // CUssdContainer::UpdateNavipaneMsgLengthL |
482 // --------------------------------------------------------- |
488 // --------------------------------------------------------- |
483 void CUssdContainer::UpdateNavipaneMsgLengthL() |
489 void CUssdContainer::UpdateNavipaneMsgLengthL() |
484 { |
490 { |
|
491 _LOGSTRING( "CUssdContainer::UpdateNavipaneMsgLengthL =>" ) |
485 |
492 |
486 if ( iNaviPaneHandler ) |
493 if ( iNaviPaneHandler ) |
487 { |
494 { |
488 |
495 |
489 TInt maxLen=0; |
496 TInt maxLen=0; |