|
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 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
20 #include <uikon/eikctrlstatus.h> |
|
21 #endif |
|
22 #include <eikctlib.h> |
|
23 #include <eikpanic.h> |
|
24 #include <eikon.hrh> |
|
25 #include <eikmfne.h> |
|
26 #include <eikseced.h> |
|
27 |
|
28 #include <eikprogi.h> |
|
29 #include <eikfpne.h> |
|
30 #include <eikrted.h> |
|
31 |
|
32 #include <eikgted.h> |
|
33 #include <eikspace.h> |
|
34 #include <eikfnlab.h> |
|
35 #include <eikclb.h> |
|
36 #include <eikctl.rsg> |
|
37 #include <aknipfed.h> |
|
38 #include <eikcoctlpanic.h> |
|
39 #include <aknlocationed.h> |
|
40 #include <aknuniteditor.h> |
|
41 |
|
42 // Static DLL functions |
|
43 GLDEF_C void Panic(TEikPanic aPanic) |
|
44 { |
|
45 _LIT(KPanicCat,"EIKCTL"); |
|
46 User::Panic(KPanicCat,aPanic); |
|
47 } |
|
48 |
|
49 GLDEF_C void Panic(TEikCoCtlPanic aPanic) |
|
50 { |
|
51 _LIT(KPanicCat,"AVKON-EIKCOCTL"); |
|
52 User::Panic(KPanicCat,aPanic); |
|
53 } |
|
54 |
|
55 CEikCtlLibrary::CEikCtlLibrary() |
|
56 { |
|
57 } |
|
58 |
|
59 EXPORT_C TFileName CEikCtlLibrary::ResourceFile() |
|
60 // static |
|
61 { |
|
62 _LIT(KResFileName,"z:\\resource\\eikctl.rsc"); |
|
63 return KResFileName(); |
|
64 } |
|
65 |
|
66 EXPORT_C TCreateByTypeFunction CEikCtlLibrary::ControlFactory() |
|
67 // static |
|
68 { |
|
69 return CreateByTypeL; |
|
70 } |
|
71 |
|
72 EXPORT_C void CEikCtlLibrary::InitializeL() |
|
73 // static |
|
74 { |
|
75 } |
|
76 |
|
77 /** |
|
78 * @internal |
|
79 * Internal to Symbian |
|
80 * @since App-Framework_6.1 |
|
81 */ |
|
82 EXPORT_C TCreateButtonGroupByTypeFunction CEikCtlLibrary::ButtonGroupFactory() |
|
83 {//static |
|
84 return CreateButtonGroupByTypeL; |
|
85 } |
|
86 |
|
87 SEikControlInfo CEikCtlLibrary::CreateByTypeL(TInt aControlType) |
|
88 // static |
|
89 { |
|
90 SEikControlInfo controlInfo; |
|
91 controlInfo.iControl = NULL; |
|
92 controlInfo.iTrailerTextId = 0; |
|
93 controlInfo.iFlags = 0; |
|
94 |
|
95 switch (aControlType) |
|
96 { |
|
97 case EEikCtRichTextEditor: |
|
98 controlInfo.iControl = new(ELeave) CEikRichTextEditor; |
|
99 break; |
|
100 case EEikCtSecretEd: |
|
101 controlInfo.iControl = new(ELeave) CEikSecretEditor; |
|
102 break; |
|
103 |
|
104 case EEikCtListBox: |
|
105 controlInfo.iControl = new(ELeave) CEikTextListBox; |
|
106 break; |
|
107 case EEikCtColListBox: |
|
108 controlInfo.iControl = new(ELeave) CEikColumnListBox; |
|
109 break; |
|
110 |
|
111 case EEikCtProgInfo: |
|
112 controlInfo.iControl = new(ELeave) CEikProgressInfo; |
|
113 controlInfo.iFlags = EEikControlIsNonFocusing; |
|
114 break; |
|
115 // Reintroduced, JIn 1/2/2001. |
|
116 case EEikCtFlPtEd: |
|
117 controlInfo.iControl = new(ELeave) CEikFloatingPointEditor; |
|
118 break; |
|
119 |
|
120 // Reintroduced, JIn 1/2/2001. |
|
121 case EEikCtFxPtEd: |
|
122 controlInfo.iControl = new(ELeave) CEikFixedPointEditor; |
|
123 break; |
|
124 |
|
125 case EEikCtNumberEditor: |
|
126 controlInfo.iControl = new(ELeave) CEikNumberEditor; |
|
127 controlInfo.iFlags = EEikControlHasEars; |
|
128 break; |
|
129 case EEikCtRangeEditor: |
|
130 controlInfo.iControl = new(ELeave) CEikRangeEditor; |
|
131 break; |
|
132 case EEikCtTimeEditor: |
|
133 controlInfo.iControl = new(ELeave) CEikTimeEditor; |
|
134 break; |
|
135 case EEikCtDateEditor: |
|
136 controlInfo.iControl = new(ELeave) CEikDateEditor; |
|
137 break; |
|
138 case EEikCtTimeAndDateEditor: |
|
139 controlInfo.iControl = new(ELeave) CEikTimeAndDateEditor; |
|
140 break; |
|
141 case EEikCtDurationEditor: |
|
142 controlInfo.iControl = new(ELeave) CEikDurationEditor; |
|
143 break; |
|
144 case EEikCtTimeOffsetEditor: |
|
145 controlInfo.iControl = new(ELeave) CEikTimeOffsetEditor; |
|
146 break; |
|
147 // case EEikCtLatitudeEditor: |
|
148 // controlInfo.iControl = new(ELeave) CEikLatitudeEditor; |
|
149 // break; |
|
150 // case EEikCtLongitudeEditor: |
|
151 // controlInfo.iControl = new(ELeave) CEikLongitudeEditor; |
|
152 // break; |
|
153 case EEikCtGlobalTextEditor: |
|
154 controlInfo.iControl = new(ELeave) CEikGlobalTextEditor; |
|
155 break; |
|
156 case EEikCtSpacer: |
|
157 controlInfo.iControl = new(ELeave) CEikSpacer; |
|
158 controlInfo.iFlags = EEikControlIsNonFocusing; |
|
159 break; |
|
160 |
|
161 case EAknCtIpFieldEditor: |
|
162 controlInfo.iControl = new(ELeave) CAknIpFieldEditor; |
|
163 break; |
|
164 case EAknCtLocationEditor: |
|
165 controlInfo.iControl = new(ELeave) CAknLocationEditor; |
|
166 break; |
|
167 case EAknCtUnitEditor: |
|
168 controlInfo.iControl = CAknUnitEditor::NewL(); |
|
169 break; |
|
170 default: |
|
171 break; |
|
172 } |
|
173 |
|
174 return controlInfo; |
|
175 } |
|
176 |
|
177 /** |
|
178 * Creates the button group identified by aButtonGroupType, if it exists in this button |
|
179 * group factory. Extra required information is supplied in aCreationData. If the button group |
|
180 * is to be added to the button group stack then this can be set in aAddToButtonGroupStack. |
|
181 * If the aButtonGroupType value does not exist, then it returns NULL. |
|
182 */ |
|
183 MEikButtonGroup* CEikCtlLibrary::CreateButtonGroupByTypeL(TInt /*aButtonGroupType*/,EikButtonGroupFactory::TCreationData& /*aCreationData*/,TBool& /*aAddToButtonGroupStack*/) |
|
184 {//static |
|
185 return NULL; |
|
186 } |