|
1 /* |
|
2 * Copyright (c) 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: Custom key definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "emailtrace.h" |
|
20 #include <e32keys.h> |
|
21 |
|
22 #include "fstextviewerkeys.h" |
|
23 |
|
24 // --------------------------------------------------------------------------- |
|
25 // NewL |
|
26 // --------------------------------------------------------------------------- |
|
27 EXPORT_C CFsTextViewerKeys* CFsTextViewerKeys::NewL() |
|
28 { |
|
29 FUNC_LOG; |
|
30 CFsTextViewerKeys* self = new ( ELeave ) CFsTextViewerKeys(); |
|
31 CleanupStack::PushL( self ); |
|
32 self->ConstructL(); |
|
33 CleanupStack::Pop( self ); |
|
34 return self; |
|
35 } |
|
36 |
|
37 // --------------------------------------------------------------------------- |
|
38 // ~CFsTextViewerKeys |
|
39 // --------------------------------------------------------------------------- |
|
40 EXPORT_C CFsTextViewerKeys::~CFsTextViewerKeys() |
|
41 { |
|
42 FUNC_LOG; |
|
43 } |
|
44 |
|
45 // --------------------------------------------------------------------------- |
|
46 // SetKeyUp |
|
47 // --------------------------------------------------------------------------- |
|
48 EXPORT_C void CFsTextViewerKeys::SetKeyUp( TInt aKey ) |
|
49 { |
|
50 FUNC_LOG; |
|
51 iKeyUp = aKey; |
|
52 } |
|
53 |
|
54 // --------------------------------------------------------------------------- |
|
55 // SetKeyDown |
|
56 // --------------------------------------------------------------------------- |
|
57 EXPORT_C void CFsTextViewerKeys::SetKeyDown( TInt aKey ) |
|
58 { |
|
59 FUNC_LOG; |
|
60 iKeyDown = aKey; |
|
61 } |
|
62 |
|
63 // --------------------------------------------------------------------------- |
|
64 // SetKeyScrollUp |
|
65 // --------------------------------------------------------------------------- |
|
66 EXPORT_C void CFsTextViewerKeys::SetKeyScrollUp( TInt aKey ) |
|
67 { |
|
68 FUNC_LOG; |
|
69 iKeyScrollUp = aKey; |
|
70 } |
|
71 |
|
72 // --------------------------------------------------------------------------- |
|
73 // SetKeyScrollDown |
|
74 // --------------------------------------------------------------------------- |
|
75 EXPORT_C void CFsTextViewerKeys::SetKeyScrollDown( TInt aKey ) |
|
76 { |
|
77 FUNC_LOG; |
|
78 iKeyScrollDown = aKey; |
|
79 } |
|
80 |
|
81 // --------------------------------------------------------------------------- |
|
82 // SetKeyRight |
|
83 // --------------------------------------------------------------------------- |
|
84 EXPORT_C void CFsTextViewerKeys::SetKeyRight( TInt aKey ) |
|
85 { |
|
86 FUNC_LOG; |
|
87 iKeyRight = aKey; |
|
88 } |
|
89 |
|
90 // --------------------------------------------------------------------------- |
|
91 // SetKeyLeft |
|
92 // --------------------------------------------------------------------------- |
|
93 EXPORT_C void CFsTextViewerKeys::SetKeyLeft( TInt aKey ) |
|
94 { |
|
95 FUNC_LOG; |
|
96 iKeyLeft = aKey; |
|
97 } |
|
98 |
|
99 // --------------------------------------------------------------------------- |
|
100 // SetKeyPgUp |
|
101 // --------------------------------------------------------------------------- |
|
102 EXPORT_C void CFsTextViewerKeys::SetKeyPgUp( TInt aKey ) |
|
103 { |
|
104 FUNC_LOG; |
|
105 iKeyPgUp = aKey; |
|
106 } |
|
107 |
|
108 // --------------------------------------------------------------------------- |
|
109 // SetKeyPgDown |
|
110 // --------------------------------------------------------------------------- |
|
111 EXPORT_C void CFsTextViewerKeys::SetKeyPgDown( TInt aKey ) |
|
112 { |
|
113 FUNC_LOG; |
|
114 iKeyPgDown = aKey; |
|
115 } |
|
116 |
|
117 // --------------------------------------------------------------------------- |
|
118 // SetKeyMark |
|
119 // --------------------------------------------------------------------------- |
|
120 EXPORT_C void CFsTextViewerKeys::SetKeyMark( TInt aKey ) |
|
121 { |
|
122 FUNC_LOG; |
|
123 iKeyMark = aKey; |
|
124 } |
|
125 |
|
126 // --------------------------------------------------------------------------- |
|
127 // SetKeyClick |
|
128 // --------------------------------------------------------------------------- |
|
129 EXPORT_C void CFsTextViewerKeys::SetKeyClick( TInt aKey ) |
|
130 { |
|
131 FUNC_LOG; |
|
132 iKeyClick = aKey; |
|
133 } |
|
134 |
|
135 // --------------------------------------------------------------------------- |
|
136 // GetKeyUp |
|
137 // --------------------------------------------------------------------------- |
|
138 EXPORT_C TInt CFsTextViewerKeys::GetKeyUp() |
|
139 { |
|
140 FUNC_LOG; |
|
141 return iKeyUp; |
|
142 } |
|
143 |
|
144 // --------------------------------------------------------------------------- |
|
145 // GetKeyDown |
|
146 // --------------------------------------------------------------------------- |
|
147 EXPORT_C TInt CFsTextViewerKeys::GetKeyDown() |
|
148 { |
|
149 FUNC_LOG; |
|
150 return iKeyDown; |
|
151 } |
|
152 |
|
153 // --------------------------------------------------------------------------- |
|
154 // GetKeyScrollUp |
|
155 // --------------------------------------------------------------------------- |
|
156 EXPORT_C TInt CFsTextViewerKeys::GetKeyScrollUp() |
|
157 { |
|
158 FUNC_LOG; |
|
159 return iKeyScrollUp; |
|
160 } |
|
161 |
|
162 // --------------------------------------------------------------------------- |
|
163 // GetKeyScrollDown |
|
164 // --------------------------------------------------------------------------- |
|
165 EXPORT_C TInt CFsTextViewerKeys::GetKeyScrollDown() |
|
166 { |
|
167 FUNC_LOG; |
|
168 return iKeyScrollDown; |
|
169 } |
|
170 |
|
171 // --------------------------------------------------------------------------- |
|
172 // GetKeyRight |
|
173 // --------------------------------------------------------------------------- |
|
174 EXPORT_C TInt CFsTextViewerKeys::GetKeyRight() |
|
175 { |
|
176 FUNC_LOG; |
|
177 return iKeyRight; |
|
178 } |
|
179 |
|
180 // --------------------------------------------------------------------------- |
|
181 // GetKeyLeft |
|
182 // --------------------------------------------------------------------------- |
|
183 EXPORT_C TInt CFsTextViewerKeys::GetKeyLeft() |
|
184 { |
|
185 FUNC_LOG; |
|
186 return iKeyLeft; |
|
187 } |
|
188 |
|
189 // --------------------------------------------------------------------------- |
|
190 // GetKeyPgUp |
|
191 // --------------------------------------------------------------------------- |
|
192 EXPORT_C TInt CFsTextViewerKeys::GetKeyPgUp() |
|
193 { |
|
194 FUNC_LOG; |
|
195 return iKeyPgUp; |
|
196 } |
|
197 |
|
198 // --------------------------------------------------------------------------- |
|
199 // GetKeyPgDown |
|
200 // --------------------------------------------------------------------------- |
|
201 EXPORT_C TInt CFsTextViewerKeys::GetKeyPgDown() |
|
202 { |
|
203 FUNC_LOG; |
|
204 return iKeyPgDown; |
|
205 } |
|
206 |
|
207 // --------------------------------------------------------------------------- |
|
208 // GetKeyMark |
|
209 // --------------------------------------------------------------------------- |
|
210 EXPORT_C TInt CFsTextViewerKeys::GetKeyMark() |
|
211 { |
|
212 FUNC_LOG; |
|
213 return iKeyMark; |
|
214 } |
|
215 |
|
216 // --------------------------------------------------------------------------- |
|
217 // GetKeyClick |
|
218 // --------------------------------------------------------------------------- |
|
219 EXPORT_C TInt CFsTextViewerKeys::GetKeyClick() |
|
220 { |
|
221 FUNC_LOG; |
|
222 return iKeyClick; |
|
223 } |
|
224 |
|
225 // --------------------------------------------------------------------------- |
|
226 // CFsTextViewerKeys() |
|
227 // --------------------------------------------------------------------------- |
|
228 CFsTextViewerKeys::CFsTextViewerKeys() |
|
229 { |
|
230 FUNC_LOG; |
|
231 iKeyUp = EKeyUpArrow; |
|
232 iKeyDown = EKeyDownArrow; |
|
233 iKeyScrollUp = '2'; |
|
234 iKeyScrollDown = '8'; |
|
235 iKeyPgUp = '*'; |
|
236 iKeyPgDown = '#'; |
|
237 iKeyRight = EKeyRightArrow; |
|
238 iKeyLeft = EKeyLeftArrow; |
|
239 iKeyMark = '0'; |
|
240 iKeyClick = EKeyDevice3; |
|
241 } |
|
242 |
|
243 // --------------------------------------------------------------------------- |
|
244 // ConstructL |
|
245 // --------------------------------------------------------------------------- |
|
246 void CFsTextViewerKeys::ConstructL() |
|
247 { |
|
248 FUNC_LOG; |
|
249 } |
|
250 |