|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.QScintilla.MarkupProviders.RestructuredTextProvider</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.QScintilla.MarkupProviders.RestructuredTextProvider</h1> |
|
23 <p> |
|
24 Module implementing the reStructured Text markup provider. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#RestructuredTextProvider">RestructuredTextProvider</a></td> |
|
34 <td>Class implementing the reStructured Text markup provider.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr><td>None</td></tr> |
|
40 </table> |
|
41 <hr /><hr /> |
|
42 <a NAME="RestructuredTextProvider" ID="RestructuredTextProvider"></a> |
|
43 <h2>RestructuredTextProvider</h2> |
|
44 <p> |
|
45 Class implementing the reStructured Text markup provider. |
|
46 </p> |
|
47 <h3>Derived from</h3> |
|
48 MarkupBase |
|
49 <h3>Class Attributes</h3> |
|
50 <table> |
|
51 <tr><td>None</td></tr> |
|
52 </table> |
|
53 <h3>Class Methods</h3> |
|
54 <table> |
|
55 <tr><td>None</td></tr> |
|
56 </table> |
|
57 <h3>Methods</h3> |
|
58 <table> |
|
59 <tr> |
|
60 <td><a href="#RestructuredTextProvider.__init__">RestructuredTextProvider</a></td> |
|
61 <td>Constructor</td> |
|
62 </tr><tr> |
|
63 <td><a href="#RestructuredTextProvider.__insertMarkup">__insertMarkup</a></td> |
|
64 <td>Private method to insert the specified markup.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#RestructuredTextProvider.__makeList">__makeList</a></td> |
|
67 <td>Private method to generate the desired list markup.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#RestructuredTextProvider.bold">bold</a></td> |
|
70 <td>Public method to generate bold text.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#RestructuredTextProvider.bulletedList">bulletedList</a></td> |
|
73 <td>Public method to generate bulleted list text.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#RestructuredTextProvider.code">code</a></td> |
|
76 <td>Public method to generate inline code text.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#RestructuredTextProvider.codeBlock">codeBlock</a></td> |
|
79 <td>Public method to generate code block text.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#RestructuredTextProvider.hasBold">hasBold</a></td> |
|
82 <td>Public method to indicate the availability of bold markup.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#RestructuredTextProvider.hasBulletedList">hasBulletedList</a></td> |
|
85 <td>Public method to indicate the availability of bulleted list markup.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#RestructuredTextProvider.hasCode">hasCode</a></td> |
|
88 <td>Public method to indicate the availability of inline code markup.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#RestructuredTextProvider.hasCodeBlock">hasCodeBlock</a></td> |
|
91 <td>Public method to indicate the availability of code block markup.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#RestructuredTextProvider.hasHyperlink">hasHyperlink</a></td> |
|
94 <td>Public method to indicate the availability of hyperlink markup.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#RestructuredTextProvider.hasImage">hasImage</a></td> |
|
97 <td>Public method to indicate the availability of image markup.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#RestructuredTextProvider.hasItalic">hasItalic</a></td> |
|
100 <td>Public method to indicate the availability of italic markup.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#RestructuredTextProvider.hasLine">hasLine</a></td> |
|
103 <td>Public method to indicate the availability of a horizontal line markup.</td> |
|
104 </tr><tr> |
|
105 <td><a href="#RestructuredTextProvider.hasNumberedList">hasNumberedList</a></td> |
|
106 <td>Public method to indicate the availability of numbered list markup.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#RestructuredTextProvider.hasQuote">hasQuote</a></td> |
|
109 <td>Public method to indicate the availability of block quote markup.</td> |
|
110 </tr><tr> |
|
111 <td><a href="#RestructuredTextProvider.header">header</a></td> |
|
112 <td>Public method to generate a header.</td> |
|
113 </tr><tr> |
|
114 <td><a href="#RestructuredTextProvider.headerLevels">headerLevels</a></td> |
|
115 <td>Public method to determine the available header levels.</td> |
|
116 </tr><tr> |
|
117 <td><a href="#RestructuredTextProvider.hyperlink">hyperlink</a></td> |
|
118 <td>Public method to generate hyperlink text.</td> |
|
119 </tr><tr> |
|
120 <td><a href="#RestructuredTextProvider.image">image</a></td> |
|
121 <td>Public method to generate image text.</td> |
|
122 </tr><tr> |
|
123 <td><a href="#RestructuredTextProvider.italic">italic</a></td> |
|
124 <td>Public method to generate italic text.</td> |
|
125 </tr><tr> |
|
126 <td><a href="#RestructuredTextProvider.kind">kind</a></td> |
|
127 <td>Public method to get the markup kind.</td> |
|
128 </tr><tr> |
|
129 <td><a href="#RestructuredTextProvider.line">line</a></td> |
|
130 <td>Public method to generate a horizontal line text.</td> |
|
131 </tr><tr> |
|
132 <td><a href="#RestructuredTextProvider.numberedList">numberedList</a></td> |
|
133 <td>Public method to generate numbered list text.</td> |
|
134 </tr><tr> |
|
135 <td><a href="#RestructuredTextProvider.quote">quote</a></td> |
|
136 <td>Public method to generate block quote text.</td> |
|
137 </tr> |
|
138 </table> |
|
139 <h3>Static Methods</h3> |
|
140 <table> |
|
141 <tr><td>None</td></tr> |
|
142 </table> |
|
143 <a NAME="RestructuredTextProvider.__init__" ID="RestructuredTextProvider.__init__"></a> |
|
144 <h4>RestructuredTextProvider (Constructor)</h4> |
|
145 <b>RestructuredTextProvider</b>(<i></i>) |
|
146 <p> |
|
147 Constructor |
|
148 </p><a NAME="RestructuredTextProvider.__insertMarkup" ID="RestructuredTextProvider.__insertMarkup"></a> |
|
149 <h4>RestructuredTextProvider.__insertMarkup</h4> |
|
150 <b>__insertMarkup</b>(<i>markup, editor</i>) |
|
151 <p> |
|
152 Private method to insert the specified markup. |
|
153 </p><p> |
|
154 If the editor has selected text, this text is enclosed by the given |
|
155 markup. If no text is selected, the markup is inserted at the cursor |
|
156 position and the cursor is positioned in between. |
|
157 </p><dl> |
|
158 <dt><i>markup</i> (str)</dt> |
|
159 <dd> |
|
160 markup string to be inserted |
|
161 </dd><dt><i>editor</i> (Editor)</dt> |
|
162 <dd> |
|
163 reference to the editor to work on |
|
164 </dd> |
|
165 </dl><a NAME="RestructuredTextProvider.__makeList" ID="RestructuredTextProvider.__makeList"></a> |
|
166 <h4>RestructuredTextProvider.__makeList</h4> |
|
167 <b>__makeList</b>(<i>editor, numberedList</i>) |
|
168 <p> |
|
169 Private method to generate the desired list markup. |
|
170 </p><dl> |
|
171 <dt><i>editor</i> (Editor)</dt> |
|
172 <dd> |
|
173 reference to the editor to work on |
|
174 </dd><dt><i>numberedList</i> (bool)</dt> |
|
175 <dd> |
|
176 flag indicating the generation of a numbered list |
|
177 </dd> |
|
178 </dl><a NAME="RestructuredTextProvider.bold" ID="RestructuredTextProvider.bold"></a> |
|
179 <h4>RestructuredTextProvider.bold</h4> |
|
180 <b>bold</b>(<i>editor</i>) |
|
181 <p> |
|
182 Public method to generate bold text. |
|
183 </p><dl> |
|
184 <dt><i>editor</i> (Editor)</dt> |
|
185 <dd> |
|
186 reference to the editor to work on |
|
187 </dd> |
|
188 </dl><a NAME="RestructuredTextProvider.bulletedList" ID="RestructuredTextProvider.bulletedList"></a> |
|
189 <h4>RestructuredTextProvider.bulletedList</h4> |
|
190 <b>bulletedList</b>(<i>editor</i>) |
|
191 <p> |
|
192 Public method to generate bulleted list text. |
|
193 </p><dl> |
|
194 <dt><i>editor</i> (Editor)</dt> |
|
195 <dd> |
|
196 reference to the editor to work on |
|
197 </dd> |
|
198 </dl><a NAME="RestructuredTextProvider.code" ID="RestructuredTextProvider.code"></a> |
|
199 <h4>RestructuredTextProvider.code</h4> |
|
200 <b>code</b>(<i>editor</i>) |
|
201 <p> |
|
202 Public method to generate inline code text. |
|
203 </p><dl> |
|
204 <dt><i>editor</i> (Editor)</dt> |
|
205 <dd> |
|
206 reference to the editor to work on |
|
207 </dd> |
|
208 </dl><a NAME="RestructuredTextProvider.codeBlock" ID="RestructuredTextProvider.codeBlock"></a> |
|
209 <h4>RestructuredTextProvider.codeBlock</h4> |
|
210 <b>codeBlock</b>(<i>editor</i>) |
|
211 <p> |
|
212 Public method to generate code block text. |
|
213 </p><dl> |
|
214 <dt><i>editor</i> (Editor)</dt> |
|
215 <dd> |
|
216 reference to the editor to work on |
|
217 </dd> |
|
218 </dl><a NAME="RestructuredTextProvider.hasBold" ID="RestructuredTextProvider.hasBold"></a> |
|
219 <h4>RestructuredTextProvider.hasBold</h4> |
|
220 <b>hasBold</b>(<i></i>) |
|
221 <p> |
|
222 Public method to indicate the availability of bold markup. |
|
223 </p><dl> |
|
224 <dt>Returns:</dt> |
|
225 <dd> |
|
226 flag indicating the availability of bold markup |
|
227 </dd> |
|
228 </dl><dl> |
|
229 <dt>Return Type:</dt> |
|
230 <dd> |
|
231 bool |
|
232 </dd> |
|
233 </dl><a NAME="RestructuredTextProvider.hasBulletedList" ID="RestructuredTextProvider.hasBulletedList"></a> |
|
234 <h4>RestructuredTextProvider.hasBulletedList</h4> |
|
235 <b>hasBulletedList</b>(<i></i>) |
|
236 <p> |
|
237 Public method to indicate the availability of bulleted list markup. |
|
238 </p><dl> |
|
239 <dt>Returns:</dt> |
|
240 <dd> |
|
241 flag indicating the availability of bulleted list markup |
|
242 </dd> |
|
243 </dl><dl> |
|
244 <dt>Return Type:</dt> |
|
245 <dd> |
|
246 bool |
|
247 </dd> |
|
248 </dl><a NAME="RestructuredTextProvider.hasCode" ID="RestructuredTextProvider.hasCode"></a> |
|
249 <h4>RestructuredTextProvider.hasCode</h4> |
|
250 <b>hasCode</b>(<i></i>) |
|
251 <p> |
|
252 Public method to indicate the availability of inline code markup. |
|
253 </p><dl> |
|
254 <dt>Returns:</dt> |
|
255 <dd> |
|
256 flag indicating the availability of inline code markup |
|
257 </dd> |
|
258 </dl><dl> |
|
259 <dt>Return Type:</dt> |
|
260 <dd> |
|
261 bool |
|
262 </dd> |
|
263 </dl><a NAME="RestructuredTextProvider.hasCodeBlock" ID="RestructuredTextProvider.hasCodeBlock"></a> |
|
264 <h4>RestructuredTextProvider.hasCodeBlock</h4> |
|
265 <b>hasCodeBlock</b>(<i></i>) |
|
266 <p> |
|
267 Public method to indicate the availability of code block markup. |
|
268 </p><dl> |
|
269 <dt>Returns:</dt> |
|
270 <dd> |
|
271 flag indicating the availability of code block markup |
|
272 </dd> |
|
273 </dl><dl> |
|
274 <dt>Return Type:</dt> |
|
275 <dd> |
|
276 bool |
|
277 </dd> |
|
278 </dl><a NAME="RestructuredTextProvider.hasHyperlink" ID="RestructuredTextProvider.hasHyperlink"></a> |
|
279 <h4>RestructuredTextProvider.hasHyperlink</h4> |
|
280 <b>hasHyperlink</b>(<i></i>) |
|
281 <p> |
|
282 Public method to indicate the availability of hyperlink markup. |
|
283 </p><dl> |
|
284 <dt>Returns:</dt> |
|
285 <dd> |
|
286 flag indicating the availability of hyperlink markup |
|
287 </dd> |
|
288 </dl><dl> |
|
289 <dt>Return Type:</dt> |
|
290 <dd> |
|
291 bool |
|
292 </dd> |
|
293 </dl><a NAME="RestructuredTextProvider.hasImage" ID="RestructuredTextProvider.hasImage"></a> |
|
294 <h4>RestructuredTextProvider.hasImage</h4> |
|
295 <b>hasImage</b>(<i></i>) |
|
296 <p> |
|
297 Public method to indicate the availability of image markup. |
|
298 </p><dl> |
|
299 <dt>Returns:</dt> |
|
300 <dd> |
|
301 flag indicating the availability of image markup |
|
302 </dd> |
|
303 </dl><dl> |
|
304 <dt>Return Type:</dt> |
|
305 <dd> |
|
306 bool |
|
307 </dd> |
|
308 </dl><a NAME="RestructuredTextProvider.hasItalic" ID="RestructuredTextProvider.hasItalic"></a> |
|
309 <h4>RestructuredTextProvider.hasItalic</h4> |
|
310 <b>hasItalic</b>(<i></i>) |
|
311 <p> |
|
312 Public method to indicate the availability of italic markup. |
|
313 </p><dl> |
|
314 <dt>Returns:</dt> |
|
315 <dd> |
|
316 flag indicating the availability of italic markup |
|
317 </dd> |
|
318 </dl><dl> |
|
319 <dt>Return Type:</dt> |
|
320 <dd> |
|
321 bool |
|
322 </dd> |
|
323 </dl><a NAME="RestructuredTextProvider.hasLine" ID="RestructuredTextProvider.hasLine"></a> |
|
324 <h4>RestructuredTextProvider.hasLine</h4> |
|
325 <b>hasLine</b>(<i></i>) |
|
326 <p> |
|
327 Public method to indicate the availability of a horizontal line markup. |
|
328 </p><dl> |
|
329 <dt>Returns:</dt> |
|
330 <dd> |
|
331 flag indicating the availability of a horizontal line markup |
|
332 </dd> |
|
333 </dl><dl> |
|
334 <dt>Return Type:</dt> |
|
335 <dd> |
|
336 bool |
|
337 </dd> |
|
338 </dl><a NAME="RestructuredTextProvider.hasNumberedList" ID="RestructuredTextProvider.hasNumberedList"></a> |
|
339 <h4>RestructuredTextProvider.hasNumberedList</h4> |
|
340 <b>hasNumberedList</b>(<i></i>) |
|
341 <p> |
|
342 Public method to indicate the availability of numbered list markup. |
|
343 </p><dl> |
|
344 <dt>Returns:</dt> |
|
345 <dd> |
|
346 flag indicating the availability of numbered list markup |
|
347 </dd> |
|
348 </dl><dl> |
|
349 <dt>Return Type:</dt> |
|
350 <dd> |
|
351 bool |
|
352 </dd> |
|
353 </dl><a NAME="RestructuredTextProvider.hasQuote" ID="RestructuredTextProvider.hasQuote"></a> |
|
354 <h4>RestructuredTextProvider.hasQuote</h4> |
|
355 <b>hasQuote</b>(<i></i>) |
|
356 <p> |
|
357 Public method to indicate the availability of block quote markup. |
|
358 </p><dl> |
|
359 <dt>Returns:</dt> |
|
360 <dd> |
|
361 flag indicating the availability of block quote markup |
|
362 </dd> |
|
363 </dl><dl> |
|
364 <dt>Return Type:</dt> |
|
365 <dd> |
|
366 bool |
|
367 </dd> |
|
368 </dl><a NAME="RestructuredTextProvider.header" ID="RestructuredTextProvider.header"></a> |
|
369 <h4>RestructuredTextProvider.header</h4> |
|
370 <b>header</b>(<i>editor, level</i>) |
|
371 <p> |
|
372 Public method to generate a header. |
|
373 </p><dl> |
|
374 <dt><i>editor</i> (Editor)</dt> |
|
375 <dd> |
|
376 reference to the editor to work on |
|
377 </dd><dt><i>level</i> (int)</dt> |
|
378 <dd> |
|
379 header level |
|
380 </dd> |
|
381 </dl><a NAME="RestructuredTextProvider.headerLevels" ID="RestructuredTextProvider.headerLevels"></a> |
|
382 <h4>RestructuredTextProvider.headerLevels</h4> |
|
383 <b>headerLevels</b>(<i></i>) |
|
384 <p> |
|
385 Public method to determine the available header levels. |
|
386 </p><dl> |
|
387 <dt>Returns:</dt> |
|
388 <dd> |
|
389 supported header levels |
|
390 </dd> |
|
391 </dl><dl> |
|
392 <dt>Return Type:</dt> |
|
393 <dd> |
|
394 int |
|
395 </dd> |
|
396 </dl><a NAME="RestructuredTextProvider.hyperlink" ID="RestructuredTextProvider.hyperlink"></a> |
|
397 <h4>RestructuredTextProvider.hyperlink</h4> |
|
398 <b>hyperlink</b>(<i>editor</i>) |
|
399 <p> |
|
400 Public method to generate hyperlink text. |
|
401 </p><dl> |
|
402 <dt><i>editor</i> (Editor)</dt> |
|
403 <dd> |
|
404 reference to the editor to work on |
|
405 </dd> |
|
406 </dl><a NAME="RestructuredTextProvider.image" ID="RestructuredTextProvider.image"></a> |
|
407 <h4>RestructuredTextProvider.image</h4> |
|
408 <b>image</b>(<i>editor</i>) |
|
409 <p> |
|
410 Public method to generate image text. |
|
411 </p><dl> |
|
412 <dt><i>editor</i> (Editor)</dt> |
|
413 <dd> |
|
414 reference to the editor to work on |
|
415 </dd> |
|
416 </dl><a NAME="RestructuredTextProvider.italic" ID="RestructuredTextProvider.italic"></a> |
|
417 <h4>RestructuredTextProvider.italic</h4> |
|
418 <b>italic</b>(<i>editor</i>) |
|
419 <p> |
|
420 Public method to generate italic text. |
|
421 </p><dl> |
|
422 <dt><i>editor</i> (Editor)</dt> |
|
423 <dd> |
|
424 reference to the editor to work on |
|
425 </dd> |
|
426 </dl><a NAME="RestructuredTextProvider.kind" ID="RestructuredTextProvider.kind"></a> |
|
427 <h4>RestructuredTextProvider.kind</h4> |
|
428 <b>kind</b>(<i></i>) |
|
429 <p> |
|
430 Public method to get the markup kind. |
|
431 </p><dl> |
|
432 <dt>Returns:</dt> |
|
433 <dd> |
|
434 string with markup kind |
|
435 </dd> |
|
436 </dl><dl> |
|
437 <dt>Return Type:</dt> |
|
438 <dd> |
|
439 str |
|
440 </dd> |
|
441 </dl><a NAME="RestructuredTextProvider.line" ID="RestructuredTextProvider.line"></a> |
|
442 <h4>RestructuredTextProvider.line</h4> |
|
443 <b>line</b>(<i>editor</i>) |
|
444 <p> |
|
445 Public method to generate a horizontal line text. |
|
446 </p><dl> |
|
447 <dt><i>editor</i> (Editor)</dt> |
|
448 <dd> |
|
449 reference to the editor to work on |
|
450 </dd> |
|
451 </dl><a NAME="RestructuredTextProvider.numberedList" ID="RestructuredTextProvider.numberedList"></a> |
|
452 <h4>RestructuredTextProvider.numberedList</h4> |
|
453 <b>numberedList</b>(<i>editor</i>) |
|
454 <p> |
|
455 Public method to generate numbered list text. |
|
456 </p><dl> |
|
457 <dt><i>editor</i> (Editor)</dt> |
|
458 <dd> |
|
459 reference to the editor to work on |
|
460 </dd> |
|
461 </dl><a NAME="RestructuredTextProvider.quote" ID="RestructuredTextProvider.quote"></a> |
|
462 <h4>RestructuredTextProvider.quote</h4> |
|
463 <b>quote</b>(<i>editor</i>) |
|
464 <p> |
|
465 Public method to generate block quote text. |
|
466 </p><dl> |
|
467 <dt><i>editor</i> (Editor)</dt> |
|
468 <dd> |
|
469 reference to the editor to work on |
|
470 </dd> |
|
471 </dl> |
|
472 <div align="right"><a href="#top">Up</a></div> |
|
473 <hr /> |
|
474 </body></html> |