|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' |
|
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> |
|
4 <html><head> |
|
5 <title>eric4.Preferences.PreferencesLexer</title> |
|
6 <style> |
|
7 body { |
|
8 background:white; |
|
9 margin: 0em 1em 10em 1em; |
|
10 color: black; |
|
11 } |
|
12 |
|
13 h1 { color: white; background: #4FA4FF; } |
|
14 h2 { color: white; background: #4FA4FF; } |
|
15 h3 { color: white; background: #00557F; } |
|
16 h4 { color: white; background: #00557F; } |
|
17 |
|
18 a { color: #AA5500; } |
|
19 |
|
20 </style> |
|
21 </head> |
|
22 <body><a NAME="top" ID="top"></a> |
|
23 <h1>eric4.Preferences.PreferencesLexer</h1> |
|
24 <p> |
|
25 Module implementing a special QextScintilla lexer to handle the preferences. |
|
26 </p> |
|
27 <h3>Global Attributes</h3> |
|
28 <table> |
|
29 <tr><td>None</td></tr> |
|
30 </table> |
|
31 <h3>Classes</h3> |
|
32 <table> |
|
33 <tr> |
|
34 <td><a href="#PreferencesLexer">PreferencesLexer</a></td> |
|
35 <td>Subclass of QsciLexer to implement preferences specific lexer methods.</td> |
|
36 </tr><tr> |
|
37 <td><a href="#PreferencesLexerError">PreferencesLexerError</a></td> |
|
38 <td>Class defining a special error for the PreferencesLexer class.</td> |
|
39 </tr><tr> |
|
40 <td><a href="#PreferencesLexerLanguageError">PreferencesLexerLanguageError</a></td> |
|
41 <td>Class defining a special error for the PreferencesLexer class.</td> |
|
42 </tr> |
|
43 </table> |
|
44 <h3>Functions</h3> |
|
45 <table> |
|
46 <tr><td>None</td></tr> |
|
47 </table> |
|
48 <hr /><hr /> |
|
49 <a NAME="PreferencesLexer" ID="PreferencesLexer"></a> |
|
50 <h2>PreferencesLexer</h2> |
|
51 <p> |
|
52 |
|
53 </p><p> |
|
54 Subclass of QsciLexer to implement preferences specific lexer methods. |
|
55 </p> |
|
56 <h3>Derived from</h3> |
|
57 QsciLexer |
|
58 <h3>Class Attributes</h3> |
|
59 <table> |
|
60 <tr><td>None</td></tr> |
|
61 </table> |
|
62 <h3>Methods</h3> |
|
63 <table> |
|
64 <tr> |
|
65 <td><a href="#PreferencesLexer.__init__">PreferencesLexer</a></td> |
|
66 <td>Constructor</td> |
|
67 </tr><tr> |
|
68 <td><a href="#PreferencesLexer.color">color</a></td> |
|
69 <td>Public method to get the colour of a style.</td> |
|
70 </tr><tr> |
|
71 <td><a href="#PreferencesLexer.defaulEolFill">defaulEolFill</a></td> |
|
72 <td>Public method to get the default eolFill flag for a style.</td> |
|
73 </tr><tr> |
|
74 <td><a href="#PreferencesLexer.defaultColor">defaultColor</a></td> |
|
75 <td>Public method to get the default colour of a style.</td> |
|
76 </tr><tr> |
|
77 <td><a href="#PreferencesLexer.defaultFont">defaultFont</a></td> |
|
78 <td>Public method to get the default font for a style.</td> |
|
79 </tr><tr> |
|
80 <td><a href="#PreferencesLexer.defaultPaper">defaultPaper</a></td> |
|
81 <td>Public method to get the default background for a style.</td> |
|
82 </tr><tr> |
|
83 <td><a href="#PreferencesLexer.description">description</a></td> |
|
84 <td>Public method to get a descriptive string for a style.</td> |
|
85 </tr><tr> |
|
86 <td><a href="#PreferencesLexer.eolFill">eolFill</a></td> |
|
87 <td>Public method to get the eolFill flag for a style.</td> |
|
88 </tr><tr> |
|
89 <td><a href="#PreferencesLexer.font">font</a></td> |
|
90 <td>Public method to get the font for a style.</td> |
|
91 </tr><tr> |
|
92 <td><a href="#PreferencesLexer.language">language</a></td> |
|
93 <td>Public method to get the lexers programming language.</td> |
|
94 </tr><tr> |
|
95 <td><a href="#PreferencesLexer.paper">paper</a></td> |
|
96 <td>Public method to get the background for a style.</td> |
|
97 </tr><tr> |
|
98 <td><a href="#PreferencesLexer.setColor">setColor</a></td> |
|
99 <td>Public method to set the colour for a style.</td> |
|
100 </tr><tr> |
|
101 <td><a href="#PreferencesLexer.setEolFill">setEolFill</a></td> |
|
102 <td>Public method to set the eolFill flag for a style.</td> |
|
103 </tr><tr> |
|
104 <td><a href="#PreferencesLexer.setFont">setFont</a></td> |
|
105 <td>Public method to set the font for a style.</td> |
|
106 </tr><tr> |
|
107 <td><a href="#PreferencesLexer.setPaper">setPaper</a></td> |
|
108 <td>Public method to set the background for a style.</td> |
|
109 </tr> |
|
110 </table> |
|
111 <a NAME="PreferencesLexer.__init__" ID="PreferencesLexer.__init__"></a> |
|
112 <h4>PreferencesLexer (Constructor)</h4> |
|
113 <b>PreferencesLexer</b>(<i>language, parent=None</i>) |
|
114 <p> |
|
115 Constructor |
|
116 </p><dl> |
|
117 <dt><i>language</i></dt> |
|
118 <dd> |
|
119 The lexer language. (string) |
|
120 </dd><dt><i>parent</i></dt> |
|
121 <dd> |
|
122 The parent widget of this lexer. (QextScintilla) |
|
123 </dd> |
|
124 </dl><a NAME="PreferencesLexer.color" ID="PreferencesLexer.color"></a> |
|
125 <h4>PreferencesLexer.color</h4> |
|
126 <b>color</b>(<i>style</i>) |
|
127 <p> |
|
128 Public method to get the colour of a style. |
|
129 </p><dl> |
|
130 <dt><i>style</i></dt> |
|
131 <dd> |
|
132 the style number (int) |
|
133 </dd> |
|
134 </dl><dl> |
|
135 <dt>Returns:</dt> |
|
136 <dd> |
|
137 colour |
|
138 </dd> |
|
139 </dl><a NAME="PreferencesLexer.defaulEolFill" ID="PreferencesLexer.defaulEolFill"></a> |
|
140 <h4>PreferencesLexer.defaulEolFill</h4> |
|
141 <b>defaulEolFill</b>(<i>style</i>) |
|
142 <p> |
|
143 Public method to get the default eolFill flag for a style. |
|
144 </p><dl> |
|
145 <dt><i>style</i></dt> |
|
146 <dd> |
|
147 the style number (int) |
|
148 </dd> |
|
149 </dl><dl> |
|
150 <dt>Returns:</dt> |
|
151 <dd> |
|
152 eolFill flag |
|
153 </dd> |
|
154 </dl><a NAME="PreferencesLexer.defaultColor" ID="PreferencesLexer.defaultColor"></a> |
|
155 <h4>PreferencesLexer.defaultColor</h4> |
|
156 <b>defaultColor</b>(<i>style</i>) |
|
157 <p> |
|
158 Public method to get the default colour of a style. |
|
159 </p><dl> |
|
160 <dt><i>style</i></dt> |
|
161 <dd> |
|
162 the style number (int) |
|
163 </dd> |
|
164 </dl><dl> |
|
165 <dt>Returns:</dt> |
|
166 <dd> |
|
167 colour |
|
168 </dd> |
|
169 </dl><a NAME="PreferencesLexer.defaultFont" ID="PreferencesLexer.defaultFont"></a> |
|
170 <h4>PreferencesLexer.defaultFont</h4> |
|
171 <b>defaultFont</b>(<i>style</i>) |
|
172 <p> |
|
173 Public method to get the default font for a style. |
|
174 </p><dl> |
|
175 <dt><i>style</i></dt> |
|
176 <dd> |
|
177 the style number (int) |
|
178 </dd> |
|
179 </dl><dl> |
|
180 <dt>Returns:</dt> |
|
181 <dd> |
|
182 font |
|
183 </dd> |
|
184 </dl><a NAME="PreferencesLexer.defaultPaper" ID="PreferencesLexer.defaultPaper"></a> |
|
185 <h4>PreferencesLexer.defaultPaper</h4> |
|
186 <b>defaultPaper</b>(<i>style</i>) |
|
187 <p> |
|
188 Public method to get the default background for a style. |
|
189 </p><dl> |
|
190 <dt><i>style</i></dt> |
|
191 <dd> |
|
192 the style number (int) |
|
193 </dd> |
|
194 </dl><dl> |
|
195 <dt>Returns:</dt> |
|
196 <dd> |
|
197 colour |
|
198 </dd> |
|
199 </dl><a NAME="PreferencesLexer.description" ID="PreferencesLexer.description"></a> |
|
200 <h4>PreferencesLexer.description</h4> |
|
201 <b>description</b>(<i>style</i>) |
|
202 <p> |
|
203 Public method to get a descriptive string for a style. |
|
204 </p><dl> |
|
205 <dt><i>style</i></dt> |
|
206 <dd> |
|
207 the style number (int) |
|
208 </dd> |
|
209 </dl><dl> |
|
210 <dt>Returns:</dt> |
|
211 <dd> |
|
212 description of the style (string) |
|
213 </dd> |
|
214 </dl><a NAME="PreferencesLexer.eolFill" ID="PreferencesLexer.eolFill"></a> |
|
215 <h4>PreferencesLexer.eolFill</h4> |
|
216 <b>eolFill</b>(<i>style</i>) |
|
217 <p> |
|
218 Public method to get the eolFill flag for a style. |
|
219 </p><dl> |
|
220 <dt><i>style</i></dt> |
|
221 <dd> |
|
222 the style number (int) |
|
223 </dd> |
|
224 </dl><dl> |
|
225 <dt>Returns:</dt> |
|
226 <dd> |
|
227 eolFill flag |
|
228 </dd> |
|
229 </dl><a NAME="PreferencesLexer.font" ID="PreferencesLexer.font"></a> |
|
230 <h4>PreferencesLexer.font</h4> |
|
231 <b>font</b>(<i>style</i>) |
|
232 <p> |
|
233 Public method to get the font for a style. |
|
234 </p><dl> |
|
235 <dt><i>style</i></dt> |
|
236 <dd> |
|
237 the style number (int) |
|
238 </dd> |
|
239 </dl><dl> |
|
240 <dt>Returns:</dt> |
|
241 <dd> |
|
242 font |
|
243 </dd> |
|
244 </dl><a NAME="PreferencesLexer.language" ID="PreferencesLexer.language"></a> |
|
245 <h4>PreferencesLexer.language</h4> |
|
246 <b>language</b>(<i></i>) |
|
247 <p> |
|
248 Public method to get the lexers programming language. |
|
249 </p><dl> |
|
250 <dt>Returns:</dt> |
|
251 <dd> |
|
252 language |
|
253 </dd> |
|
254 </dl><a NAME="PreferencesLexer.paper" ID="PreferencesLexer.paper"></a> |
|
255 <h4>PreferencesLexer.paper</h4> |
|
256 <b>paper</b>(<i>style</i>) |
|
257 <p> |
|
258 Public method to get the background for a style. |
|
259 </p><dl> |
|
260 <dt><i>style</i></dt> |
|
261 <dd> |
|
262 the style number (int) |
|
263 </dd> |
|
264 </dl><dl> |
|
265 <dt>Returns:</dt> |
|
266 <dd> |
|
267 colour |
|
268 </dd> |
|
269 </dl><a NAME="PreferencesLexer.setColor" ID="PreferencesLexer.setColor"></a> |
|
270 <h4>PreferencesLexer.setColor</h4> |
|
271 <b>setColor</b>(<i>c, style</i>) |
|
272 <p> |
|
273 Public method to set the colour for a style. |
|
274 </p><dl> |
|
275 <dt><i>c</i></dt> |
|
276 <dd> |
|
277 colour (int) |
|
278 </dd><dt><i>style</i></dt> |
|
279 <dd> |
|
280 the style number (int) |
|
281 </dd> |
|
282 </dl><a NAME="PreferencesLexer.setEolFill" ID="PreferencesLexer.setEolFill"></a> |
|
283 <h4>PreferencesLexer.setEolFill</h4> |
|
284 <b>setEolFill</b>(<i>eolfill, style</i>) |
|
285 <p> |
|
286 Public method to set the eolFill flag for a style. |
|
287 </p><dl> |
|
288 <dt><i>eolfill</i></dt> |
|
289 <dd> |
|
290 eolFill flag (boolean) |
|
291 </dd><dt><i>style</i></dt> |
|
292 <dd> |
|
293 the style number (int) |
|
294 </dd> |
|
295 </dl><a NAME="PreferencesLexer.setFont" ID="PreferencesLexer.setFont"></a> |
|
296 <h4>PreferencesLexer.setFont</h4> |
|
297 <b>setFont</b>(<i>f, style</i>) |
|
298 <p> |
|
299 Public method to set the font for a style. |
|
300 </p><dl> |
|
301 <dt><i>f</i></dt> |
|
302 <dd> |
|
303 font |
|
304 </dd><dt><i>style</i></dt> |
|
305 <dd> |
|
306 the style number (int) |
|
307 </dd> |
|
308 </dl><a NAME="PreferencesLexer.setPaper" ID="PreferencesLexer.setPaper"></a> |
|
309 <h4>PreferencesLexer.setPaper</h4> |
|
310 <b>setPaper</b>(<i>c, style</i>) |
|
311 <p> |
|
312 Public method to set the background for a style. |
|
313 </p><dl> |
|
314 <dt><i>c</i></dt> |
|
315 <dd> |
|
316 colour (int) |
|
317 </dd><dt><i>style</i></dt> |
|
318 <dd> |
|
319 the style number (int) |
|
320 </dd> |
|
321 </dl> |
|
322 <div align="right"><a href="#top">Up</a></div> |
|
323 <hr /><hr /> |
|
324 <a NAME="PreferencesLexerError" ID="PreferencesLexerError"></a> |
|
325 <h2>PreferencesLexerError</h2> |
|
326 <p> |
|
327 Class defining a special error for the PreferencesLexer class. |
|
328 </p> |
|
329 <h3>Derived from</h3> |
|
330 Exception |
|
331 <h3>Class Attributes</h3> |
|
332 <table> |
|
333 <tr><td>None</td></tr> |
|
334 </table> |
|
335 <h3>Methods</h3> |
|
336 <table> |
|
337 <tr> |
|
338 <td><a href="#PreferencesLexerError.__init__">PreferencesLexerError</a></td> |
|
339 <td>Constructor</td> |
|
340 </tr><tr> |
|
341 <td><a href="#PreferencesLexerError.__repr__">__repr__</a></td> |
|
342 <td>Private method returning a representation of the exception.</td> |
|
343 </tr><tr> |
|
344 <td><a href="#PreferencesLexerError.__str__">__str__</a></td> |
|
345 <td>Private method returning a string representation of the exception.</td> |
|
346 </tr> |
|
347 </table> |
|
348 <a NAME="PreferencesLexerError.__init__" ID="PreferencesLexerError.__init__"></a> |
|
349 <h4>PreferencesLexerError (Constructor)</h4> |
|
350 <b>PreferencesLexerError</b>(<i></i>) |
|
351 <p> |
|
352 Constructor |
|
353 </p><a NAME="PreferencesLexerError.__repr__" ID="PreferencesLexerError.__repr__"></a> |
|
354 <h4>PreferencesLexerError.__repr__</h4> |
|
355 <b>__repr__</b>(<i></i>) |
|
356 <p> |
|
357 Private method returning a representation of the exception. |
|
358 </p><dl> |
|
359 <dt>Returns:</dt> |
|
360 <dd> |
|
361 string representing the error message |
|
362 </dd> |
|
363 </dl><a NAME="PreferencesLexerError.__str__" ID="PreferencesLexerError.__str__"></a> |
|
364 <h4>PreferencesLexerError.__str__</h4> |
|
365 <b>__str__</b>(<i></i>) |
|
366 <p> |
|
367 Private method returning a string representation of the exception. |
|
368 </p><dl> |
|
369 <dt>Returns:</dt> |
|
370 <dd> |
|
371 string representing the error message |
|
372 </dd> |
|
373 </dl> |
|
374 <div align="right"><a href="#top">Up</a></div> |
|
375 <hr /><hr /> |
|
376 <a NAME="PreferencesLexerLanguageError" ID="PreferencesLexerLanguageError"></a> |
|
377 <h2>PreferencesLexerLanguageError</h2> |
|
378 <p> |
|
379 Class defining a special error for the PreferencesLexer class. |
|
380 </p> |
|
381 <h3>Derived from</h3> |
|
382 PreferencesLexerError |
|
383 <h3>Class Attributes</h3> |
|
384 <table> |
|
385 <tr><td>None</td></tr> |
|
386 </table> |
|
387 <h3>Methods</h3> |
|
388 <table> |
|
389 <tr> |
|
390 <td><a href="#PreferencesLexerLanguageError.__init__">PreferencesLexerLanguageError</a></td> |
|
391 <td>Constructor</td> |
|
392 </tr> |
|
393 </table> |
|
394 <a NAME="PreferencesLexerLanguageError.__init__" ID="PreferencesLexerLanguageError.__init__"></a> |
|
395 <h4>PreferencesLexerLanguageError (Constructor)</h4> |
|
396 <b>PreferencesLexerLanguageError</b>(<i>language</i>) |
|
397 <p> |
|
398 Constructor |
|
399 </p> |
|
400 <div align="right"><a href="#top">Up</a></div> |
|
401 <hr /> |
|
402 </body></html> |