|
1 /* |
|
2 * Copyright (c) 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 the License "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: |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 |
|
22 #include <avkon.hrh> |
|
23 |
|
24 #include "BrowserScriptPromptDialog.h" |
|
25 |
|
26 // ================= MEMBER FUNCTIONS ======================= |
|
27 |
|
28 |
|
29 // --------------------------------------------------------- |
|
30 // CBrowserScriptPromptDialog::CBrowserScriptPromptDialog |
|
31 // |
|
32 // C++ default constructor can NOT contain any code, that |
|
33 // might leave. |
|
34 // --------------------------------------------------------- |
|
35 // |
|
36 CBrowserScriptPromptDialog::CBrowserScriptPromptDialog( TDes& aDefInput, |
|
37 HBufC*& aRetBuf ) |
|
38 : CAknTextQueryDialog( aDefInput ) |
|
39 , iRetBuf( aRetBuf ) |
|
40 { |
|
41 } |
|
42 |
|
43 // --------------------------------------------------------- |
|
44 // CBrowserScriptPromptDialog::PreLayoutDynInitL |
|
45 // --------------------------------------------------------- |
|
46 // |
|
47 void CBrowserScriptPromptDialog::PreLayoutDynInitL() |
|
48 { |
|
49 CAknTextQueryDialog::PreLayoutDynInitL(); |
|
50 |
|
51 MakeLeftSoftkeyVisible( ETrue ); |
|
52 } |
|
53 |
|
54 // --------------------------------------------------------- |
|
55 // CBrowserScriptPromptDialog::OkToExitL |
|
56 // --------------------------------------------------------- |
|
57 // |
|
58 TBool CBrowserScriptPromptDialog::OkToExitL( TInt aKeycode ) |
|
59 { |
|
60 TBool ret( EFalse ); |
|
61 |
|
62 if ( aKeycode == EAknSoftkeyOk ) |
|
63 { |
|
64 CAknQueryControl* control = QueryControl(); |
|
65 |
|
66 __ASSERT_DEBUG( control, User::Panic( KNullDesC, KErrGeneral ) ); |
|
67 |
|
68 iRetBuf = HBufC::NewL( control->GetTextLength() ); |
|
69 TPtr temp( iRetBuf->Des() ); |
|
70 control->GetText( temp ); |
|
71 |
|
72 ret = ETrue; |
|
73 } |
|
74 |
|
75 return ret; |
|
76 } |
|
77 |
|
78 // ---------------------------------------------------------------------------- |
|
79 // CBrowserScriptPromptDialog::HandleQueryEditorStateEventL |
|
80 // |
|
81 // This code is base on AknQueryDialog.cpp |
|
82 // ---------------------------------------------------------------------------- |
|
83 // |
|
84 TBool CBrowserScriptPromptDialog::HandleQueryEditorStateEventL( |
|
85 CAknQueryControl* /*aQueryControl*/, |
|
86 TQueryControlEvent /*aEventType*/, |
|
87 TQueryValidationStatus /*aStatus*/ ) |
|
88 { |
|
89 return EFalse; |
|
90 } |
|
91 |
|
92 // End of File |