|
1 /* |
|
2 * Copyright (c) 1997-1999 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "EIKCDLIB.H" |
|
20 #include <eikinfo.h> |
|
21 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
22 #include <eikenv.h> |
|
23 #else |
|
24 #include <eikenv.h> |
|
25 #include <uikon/eikenvinterface.h> |
|
26 #endif |
|
27 #include <eikalert.h> |
|
28 #include <eikhfdlg.h> |
|
29 #include "EIKCDFTY.H" |
|
30 //#include <eikbprev.h> |
|
31 //#include <eikchmap.h> |
|
32 #include <eikpanic.h> |
|
33 |
|
34 // Static DLL functions |
|
35 GLDEF_C void Panic(TEikPanic aPanic) |
|
36 { |
|
37 _LIT(KPanicCat,"EIKCDLG"); |
|
38 User::Panic(KPanicCat,aPanic); |
|
39 } |
|
40 |
|
41 /////////////////////////////////////////////////////////////////////////////////////// |
|
42 // |
|
43 // CEikCDlgLibrary |
|
44 // |
|
45 /////////////////////////////////////////////////////////////////////////////////////// |
|
46 CEikCDlgLibrary::CEikCDlgLibrary() |
|
47 { |
|
48 } |
|
49 |
|
50 |
|
51 /////////////////////////////////////////////////////////////////////////////////////// |
|
52 // |
|
53 // InitializeL |
|
54 // |
|
55 /////////////////////////////////////////////////////////////////////////////////////// |
|
56 EXPORT_C void CEikCDlgLibrary::InitializeL() |
|
57 { |
|
58 CEikonEnv* eikEnv = CEikonEnv::Static(); |
|
59 // Inform the EikEnv of this library's presence |
|
60 // to allow creation of Info and query dialogs |
|
61 eikEnv->SetRequestQueryDialogFunc(RequestQueryDialogL); |
|
62 eikEnv->SetRequestInfoDialogFunc(RequestInfoDialogL); |
|
63 // Create the Alert win - owned by EikEnv |
|
64 CEikAlertNotifier* aAlertWin = new(ELeave) CEikAlertNotifier; |
|
65 eikEnv->SetAlertWin(aAlertWin); |
|
66 // Create the Debug keys - owned by Cone |
|
67 CEikDebugKeys* aDebugKeys=new(ELeave) CEikDebugKeys; |
|
68 eikEnv->SetDebugKeys(aDebugKeys); |
|
69 } |
|
70 |
|
71 /////////////////////////////////////////////////////////////////////////////////////// |
|
72 // |
|
73 // ResourceFile |
|
74 // |
|
75 /////////////////////////////////////////////////////////////////////////////////////// |
|
76 EXPORT_C TFileName CEikCDlgLibrary::ResourceFile() |
|
77 { |
|
78 _LIT(KResFileName,"z:\\resource\\eikcdlg.rsc"); |
|
79 return KResFileName(); |
|
80 } |
|
81 |
|
82 /////////////////////////////////////////////////////////////////////////////////////// |
|
83 // |
|
84 // ControlFactory |
|
85 // |
|
86 /////////////////////////////////////////////////////////////////////////////////////// |
|
87 EXPORT_C TCreateByTypeFunction CEikCDlgLibrary::ControlFactory() |
|
88 { |
|
89 return CreateByTypeL; |
|
90 } |
|
91 |
|
92 /////////////////////////////////////////////////////////////////////////////////////// |
|
93 // |
|
94 // RequestQueryDialogL |
|
95 // |
|
96 /////////////////////////////////////////////////////////////////////////////////////// |
|
97 EXPORT_C void CEikCDlgLibrary::RequestQueryDialogL() |
|
98 { |
|
99 CEikInfoDialog *queryDialog= new(ELeave) CEikInfoDialog(CEikInfoDialog::EIgnoreEnter); |
|
100 CEikonEnv::Static()->SetQueryDialog(queryDialog); |
|
101 } |
|
102 |
|
103 /////////////////////////////////////////////////////////////////////////////////////// |
|
104 // |
|
105 // RequestInfoDialogL |
|
106 // |
|
107 /////////////////////////////////////////////////////////////////////////////////////// |
|
108 EXPORT_C void CEikCDlgLibrary::RequestInfoDialogL() |
|
109 { |
|
110 CEikInfoDialog *infoDialog= new(ELeave) CEikInfoDialog(); |
|
111 CEikonEnv::Static()->SetInfoDialog(infoDialog); |
|
112 } |
|
113 |
|
114 /////////////////////////////////////////////////////////////////////////////////////// |
|
115 // |
|
116 // CreateByTypeL |
|
117 // |
|
118 /////////////////////////////////////////////////////////////////////////////////////// |
|
119 SEikControlInfo CEikCDlgLibrary::CreateByTypeL(TInt /*aControlType*/) |
|
120 { |
|
121 SEikControlInfo controlInfo; |
|
122 controlInfo.iControl = NULL; |
|
123 controlInfo.iTrailerTextId = 0; |
|
124 controlInfo.iFlags = 0; |
|
125 return controlInfo; |
|
126 } |
|
127 |
|
128 /////////////////////////////////////////////////////////////////////////////////////// |
|
129 // END OF FILE |
|
130 /////////////////////////////////////////////////////////////////////////////////////// |