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