|
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.QScintilla.Lexers.LexerContainer</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.QScintilla.Lexers.LexerContainer</h1> |
|
12 <p> |
|
13 Module implementing a base class for custom lexers. |
|
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="#LexerContainer">LexerContainer</a></td> |
|
23 <td>Subclass as a base for the implementation of custom lexers.</td> |
|
24 </tr> |
|
25 </table> |
|
26 <h3>Functions</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <hr /><hr /> |
|
31 <a NAME="LexerContainer" ID="LexerContainer"></a> |
|
32 <h2>LexerContainer</h2> |
|
33 <p> |
|
34 |
|
35 </p><p> |
|
36 Subclass as a base for the implementation of custom lexers. |
|
37 </p> |
|
38 <h3>Derived from</h3> |
|
39 QsciLexer, Lexer |
|
40 <h3>Class Attributes</h3> |
|
41 <table> |
|
42 <tr><td>None</td></tr> |
|
43 </table> |
|
44 <h3>Methods</h3> |
|
45 <table> |
|
46 <tr> |
|
47 <td><a href="#LexerContainer.__init__">LexerContainer</a></td> |
|
48 <td>Constructor</td> |
|
49 </tr><tr> |
|
50 <td><a href="#LexerContainer.description">description</a></td> |
|
51 <td>Public method returning the descriptions of the styles supported by the lexer.</td> |
|
52 </tr><tr> |
|
53 <td><a href="#LexerContainer.language">language</a></td> |
|
54 <td>Public method returning the language of the lexer.</td> |
|
55 </tr><tr> |
|
56 <td><a href="#LexerContainer.lexer">lexer</a></td> |
|
57 <td>Public method returning the type of the lexer.</td> |
|
58 </tr><tr> |
|
59 <td><a href="#LexerContainer.styleBitsNeeded">styleBitsNeeded</a></td> |
|
60 <td>Public method to get the number of style bits needed by the lexer.</td> |
|
61 </tr><tr> |
|
62 <td><a href="#LexerContainer.styleText">styleText</a></td> |
|
63 <td>Public method to perform the styling.</td> |
|
64 </tr> |
|
65 </table> |
|
66 <a NAME="LexerContainer.__init__" ID="LexerContainer.__init__"></a> |
|
67 <h4>LexerContainer (Constructor)</h4> |
|
68 <b>LexerContainer</b>(<i>parent = None</i>) |
|
69 <p> |
|
70 Constructor |
|
71 </p><dl> |
|
72 <dt><i>parent</i></dt> |
|
73 <dd> |
|
74 parent widget of this lexer |
|
75 </dd> |
|
76 </dl><a NAME="LexerContainer.description" ID="LexerContainer.description"></a> |
|
77 <h4>LexerContainer.description</h4> |
|
78 <b>description</b>(<i>style</i>) |
|
79 <p> |
|
80 Public method returning the descriptions of the styles supported |
|
81 by the lexer. |
|
82 </p><p> |
|
83 <b>Note</b>: This methods needs to be overridden by the lexer class. |
|
84 </p><dl> |
|
85 <dt><i>style</i></dt> |
|
86 <dd> |
|
87 style number (integer) |
|
88 </dd> |
|
89 </dl><dl> |
|
90 <dt>Returns:</dt> |
|
91 <dd> |
|
92 description for the given style (string) |
|
93 </dd> |
|
94 </dl><a NAME="LexerContainer.language" ID="LexerContainer.language"></a> |
|
95 <h4>LexerContainer.language</h4> |
|
96 <b>language</b>(<i></i>) |
|
97 <p> |
|
98 Public method returning the language of the lexer. |
|
99 </p><dl> |
|
100 <dt>Returns:</dt> |
|
101 <dd> |
|
102 language of the lexer (string) |
|
103 </dd> |
|
104 </dl><a NAME="LexerContainer.lexer" ID="LexerContainer.lexer"></a> |
|
105 <h4>LexerContainer.lexer</h4> |
|
106 <b>lexer</b>(<i></i>) |
|
107 <p> |
|
108 Public method returning the type of the lexer. |
|
109 </p><dl> |
|
110 <dt>Returns:</dt> |
|
111 <dd> |
|
112 type of the lexer (string) |
|
113 </dd> |
|
114 </dl><a NAME="LexerContainer.styleBitsNeeded" ID="LexerContainer.styleBitsNeeded"></a> |
|
115 <h4>LexerContainer.styleBitsNeeded</h4> |
|
116 <b>styleBitsNeeded</b>(<i></i>) |
|
117 <p> |
|
118 Public method to get the number of style bits needed by the lexer. |
|
119 </p><dl> |
|
120 <dt>Returns:</dt> |
|
121 <dd> |
|
122 number of style bits needed (integer) |
|
123 </dd> |
|
124 </dl><a NAME="LexerContainer.styleText" ID="LexerContainer.styleText"></a> |
|
125 <h4>LexerContainer.styleText</h4> |
|
126 <b>styleText</b>(<i>start, end</i>) |
|
127 <p> |
|
128 Public method to perform the styling. |
|
129 </p><dl> |
|
130 <dt><i>start</i></dt> |
|
131 <dd> |
|
132 position of first character to be styled (integer) |
|
133 </dd><dt><i>end</i></dt> |
|
134 <dd> |
|
135 position of last character to be styled (integer) |
|
136 </dd> |
|
137 </dl> |
|
138 <div align="right"><a href="#top">Up</a></div> |
|
139 <hr /> |
|
140 </body></html> |