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