|
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.ConfigurationPages.EditorHighlightingStylesPage</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.ConfigurationPages.EditorHighlightingStylesPage</h1> |
|
12 <p> |
|
13 Module implementing the Editor Highlighting Styles configuration page. |
|
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="#EditorHighlightingStylesPage">EditorHighlightingStylesPage</a></td> |
|
23 <td>Class implementing the Editor Highlighting Styles configuration page.</td> |
|
24 </tr> |
|
25 </table> |
|
26 <h3>Functions</h3> |
|
27 <table> |
|
28 <tr> |
|
29 <td><a href="#create">create</a></td> |
|
30 <td>Module function to create the configuration page.</td> |
|
31 </tr> |
|
32 </table> |
|
33 <hr /><hr /> |
|
34 <a NAME="EditorHighlightingStylesPage" ID="EditorHighlightingStylesPage"></a> |
|
35 <h2>EditorHighlightingStylesPage</h2> |
|
36 <p> |
|
37 Class implementing the Editor Highlighting Styles configuration page. |
|
38 </p> |
|
39 <h3>Derived from</h3> |
|
40 ConfigurationPageBase, Ui_EditorHighlightingStylesPage |
|
41 <h3>Class Attributes</h3> |
|
42 <table> |
|
43 <tr><td>None</td></tr> |
|
44 </table> |
|
45 <h3>Methods</h3> |
|
46 <table> |
|
47 <tr> |
|
48 <td><a href="#EditorHighlightingStylesPage.__init__">EditorHighlightingStylesPage</a></td> |
|
49 <td>Constructor</td> |
|
50 </tr><tr> |
|
51 <td><a href="#EditorHighlightingStylesPage.__exportStyles">__exportStyles</a></td> |
|
52 <td>Private method to export the styles of the given lexers.</td> |
|
53 </tr><tr> |
|
54 <td><a href="#EditorHighlightingStylesPage.__importStyles">__importStyles</a></td> |
|
55 <td>Private method to import the styles of the given lexers.</td> |
|
56 </tr><tr> |
|
57 <td><a href="#EditorHighlightingStylesPage.__setToDefault">__setToDefault</a></td> |
|
58 <td>Private method to set a specific style to it's default values.</td> |
|
59 </tr><tr> |
|
60 <td><a href="#EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked">on_allBackgroundColoursButton_clicked</a></td> |
|
61 <td>Private method used to select the background colour of all styles of a selected lexer.</td> |
|
62 </tr><tr> |
|
63 <td><a href="#EditorHighlightingStylesPage.on_allDefaultButton_clicked">on_allDefaultButton_clicked</a></td> |
|
64 <td>Private method to set all styles to their default values.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#EditorHighlightingStylesPage.on_allEolFillButton_clicked">on_allEolFillButton_clicked</a></td> |
|
67 <td>Private method used to set the eolfill for all styles of a selected lexer.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#EditorHighlightingStylesPage.on_allFontsButton_clicked">on_allFontsButton_clicked</a></td> |
|
70 <td>Private method used to change the font of all styles of a selected lexer.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#EditorHighlightingStylesPage.on_backgroundButton_clicked">on_backgroundButton_clicked</a></td> |
|
73 <td>Private method used to select the background colour of the selected style and lexer.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#EditorHighlightingStylesPage.on_defaultButton_clicked">on_defaultButton_clicked</a></td> |
|
76 <td>Private method to set the current style to it's default values.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#EditorHighlightingStylesPage.on_eolfillCheckBox_toggled">on_eolfillCheckBox_toggled</a></td> |
|
79 <td>Private method used to set the eolfill for the selected style and lexer.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#EditorHighlightingStylesPage.on_exportAllButton_clicked">on_exportAllButton_clicked</a></td> |
|
82 <td>Private slot to export the styles of all lexers.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#EditorHighlightingStylesPage.on_exportCurrentButton_clicked">on_exportCurrentButton_clicked</a></td> |
|
85 <td>Private slot to export the styles of the current lexer.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#EditorHighlightingStylesPage.on_fontButton_clicked">on_fontButton_clicked</a></td> |
|
88 <td>Private method used to select the font of the selected style and lexer.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#EditorHighlightingStylesPage.on_foregroundButton_clicked">on_foregroundButton_clicked</a></td> |
|
91 <td>Private method used to select the foreground colour of the selected style and lexer.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#EditorHighlightingStylesPage.on_importAllButton_clicked">on_importAllButton_clicked</a></td> |
|
94 <td>Private slot to import the styles of all lexers.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#EditorHighlightingStylesPage.on_importCurrentButton_clicked">on_importCurrentButton_clicked</a></td> |
|
97 <td>Private slot to import the styles of the current lexer.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#EditorHighlightingStylesPage.on_lexerLanguageComboBox_activated">on_lexerLanguageComboBox_activated</a></td> |
|
100 <td>Private slot to fill the style combo of the source page.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#EditorHighlightingStylesPage.on_styleElementList_currentRowChanged">on_styleElementList_currentRowChanged</a></td> |
|
103 <td>Private method to set up the style element part of the source page.</td> |
|
104 </tr><tr> |
|
105 <td><a href="#EditorHighlightingStylesPage.save">save</a></td> |
|
106 <td>Public slot to save the Editor Highlighting Styles configuration.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#EditorHighlightingStylesPage.saveState">saveState</a></td> |
|
109 <td>Public method to save the current state of the widget.</td> |
|
110 </tr><tr> |
|
111 <td><a href="#EditorHighlightingStylesPage.setState">setState</a></td> |
|
112 <td>Public method to set the state of the widget.</td> |
|
113 </tr> |
|
114 </table> |
|
115 <a NAME="EditorHighlightingStylesPage.__init__" ID="EditorHighlightingStylesPage.__init__"></a> |
|
116 <h4>EditorHighlightingStylesPage (Constructor)</h4> |
|
117 <b>EditorHighlightingStylesPage</b>(<i>lexers</i>) |
|
118 <p> |
|
119 Constructor |
|
120 </p><dl> |
|
121 <dt><i>lexers</i></dt> |
|
122 <dd> |
|
123 reference to the lexers dictionary |
|
124 </dd> |
|
125 </dl><a NAME="EditorHighlightingStylesPage.__exportStyles" ID="EditorHighlightingStylesPage.__exportStyles"></a> |
|
126 <h4>EditorHighlightingStylesPage.__exportStyles</h4> |
|
127 <b>__exportStyles</b>(<i>lexers</i>) |
|
128 <p> |
|
129 Private method to export the styles of the given lexers. |
|
130 </p><dl> |
|
131 <dt><i>lexers</i></dt> |
|
132 <dd> |
|
133 list of lexer objects for which to export the styles |
|
134 </dd> |
|
135 </dl><a NAME="EditorHighlightingStylesPage.__importStyles" ID="EditorHighlightingStylesPage.__importStyles"></a> |
|
136 <h4>EditorHighlightingStylesPage.__importStyles</h4> |
|
137 <b>__importStyles</b>(<i>lexers</i>) |
|
138 <p> |
|
139 Private method to import the styles of the given lexers. |
|
140 </p><dl> |
|
141 <dt><i>lexers</i></dt> |
|
142 <dd> |
|
143 dictionary of lexer objects for which to import the styles |
|
144 </dd> |
|
145 </dl><a NAME="EditorHighlightingStylesPage.__setToDefault" ID="EditorHighlightingStylesPage.__setToDefault"></a> |
|
146 <h4>EditorHighlightingStylesPage.__setToDefault</h4> |
|
147 <b>__setToDefault</b>(<i>style</i>) |
|
148 <p> |
|
149 Private method to set a specific style to it's default values. |
|
150 </p><dl> |
|
151 <dt><i>style</i></dt> |
|
152 <dd> |
|
153 style to be reset (integer) |
|
154 </dd> |
|
155 </dl><a NAME="EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked" ID="EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked"></a> |
|
156 <h4>EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked</h4> |
|
157 <b>on_allBackgroundColoursButton_clicked</b>(<i></i>) |
|
158 <p> |
|
159 Private method used to select the background colour of all styles of a |
|
160 selected lexer. |
|
161 </p><a NAME="EditorHighlightingStylesPage.on_allDefaultButton_clicked" ID="EditorHighlightingStylesPage.on_allDefaultButton_clicked"></a> |
|
162 <h4>EditorHighlightingStylesPage.on_allDefaultButton_clicked</h4> |
|
163 <b>on_allDefaultButton_clicked</b>(<i></i>) |
|
164 <p> |
|
165 Private method to set all styles to their default values. |
|
166 </p><a NAME="EditorHighlightingStylesPage.on_allEolFillButton_clicked" ID="EditorHighlightingStylesPage.on_allEolFillButton_clicked"></a> |
|
167 <h4>EditorHighlightingStylesPage.on_allEolFillButton_clicked</h4> |
|
168 <b>on_allEolFillButton_clicked</b>(<i></i>) |
|
169 <p> |
|
170 Private method used to set the eolfill for all styles of a selected lexer. |
|
171 </p><a NAME="EditorHighlightingStylesPage.on_allFontsButton_clicked" ID="EditorHighlightingStylesPage.on_allFontsButton_clicked"></a> |
|
172 <h4>EditorHighlightingStylesPage.on_allFontsButton_clicked</h4> |
|
173 <b>on_allFontsButton_clicked</b>(<i></i>) |
|
174 <p> |
|
175 Private method used to change the font of all styles of a selected lexer. |
|
176 </p><a NAME="EditorHighlightingStylesPage.on_backgroundButton_clicked" ID="EditorHighlightingStylesPage.on_backgroundButton_clicked"></a> |
|
177 <h4>EditorHighlightingStylesPage.on_backgroundButton_clicked</h4> |
|
178 <b>on_backgroundButton_clicked</b>(<i></i>) |
|
179 <p> |
|
180 Private method used to select the background colour of the selected style |
|
181 and lexer. |
|
182 </p><a NAME="EditorHighlightingStylesPage.on_defaultButton_clicked" ID="EditorHighlightingStylesPage.on_defaultButton_clicked"></a> |
|
183 <h4>EditorHighlightingStylesPage.on_defaultButton_clicked</h4> |
|
184 <b>on_defaultButton_clicked</b>(<i></i>) |
|
185 <p> |
|
186 Private method to set the current style to it's default values. |
|
187 </p><a NAME="EditorHighlightingStylesPage.on_eolfillCheckBox_toggled" ID="EditorHighlightingStylesPage.on_eolfillCheckBox_toggled"></a> |
|
188 <h4>EditorHighlightingStylesPage.on_eolfillCheckBox_toggled</h4> |
|
189 <b>on_eolfillCheckBox_toggled</b>(<i>b</i>) |
|
190 <p> |
|
191 Private method used to set the eolfill for the selected style and lexer. |
|
192 </p><dl> |
|
193 <dt><i>b</i></dt> |
|
194 <dd> |
|
195 Flag indicating enabled or disabled state. |
|
196 </dd> |
|
197 </dl><a NAME="EditorHighlightingStylesPage.on_exportAllButton_clicked" ID="EditorHighlightingStylesPage.on_exportAllButton_clicked"></a> |
|
198 <h4>EditorHighlightingStylesPage.on_exportAllButton_clicked</h4> |
|
199 <b>on_exportAllButton_clicked</b>(<i></i>) |
|
200 <p> |
|
201 Private slot to export the styles of all lexers. |
|
202 </p><a NAME="EditorHighlightingStylesPage.on_exportCurrentButton_clicked" ID="EditorHighlightingStylesPage.on_exportCurrentButton_clicked"></a> |
|
203 <h4>EditorHighlightingStylesPage.on_exportCurrentButton_clicked</h4> |
|
204 <b>on_exportCurrentButton_clicked</b>(<i></i>) |
|
205 <p> |
|
206 Private slot to export the styles of the current lexer. |
|
207 </p><a NAME="EditorHighlightingStylesPage.on_fontButton_clicked" ID="EditorHighlightingStylesPage.on_fontButton_clicked"></a> |
|
208 <h4>EditorHighlightingStylesPage.on_fontButton_clicked</h4> |
|
209 <b>on_fontButton_clicked</b>(<i></i>) |
|
210 <p> |
|
211 Private method used to select the font of the selected style and lexer. |
|
212 </p><a NAME="EditorHighlightingStylesPage.on_foregroundButton_clicked" ID="EditorHighlightingStylesPage.on_foregroundButton_clicked"></a> |
|
213 <h4>EditorHighlightingStylesPage.on_foregroundButton_clicked</h4> |
|
214 <b>on_foregroundButton_clicked</b>(<i></i>) |
|
215 <p> |
|
216 Private method used to select the foreground colour of the selected style |
|
217 and lexer. |
|
218 </p><a NAME="EditorHighlightingStylesPage.on_importAllButton_clicked" ID="EditorHighlightingStylesPage.on_importAllButton_clicked"></a> |
|
219 <h4>EditorHighlightingStylesPage.on_importAllButton_clicked</h4> |
|
220 <b>on_importAllButton_clicked</b>(<i></i>) |
|
221 <p> |
|
222 Private slot to import the styles of all lexers. |
|
223 </p><a NAME="EditorHighlightingStylesPage.on_importCurrentButton_clicked" ID="EditorHighlightingStylesPage.on_importCurrentButton_clicked"></a> |
|
224 <h4>EditorHighlightingStylesPage.on_importCurrentButton_clicked</h4> |
|
225 <b>on_importCurrentButton_clicked</b>(<i></i>) |
|
226 <p> |
|
227 Private slot to import the styles of the current lexer. |
|
228 </p><a NAME="EditorHighlightingStylesPage.on_lexerLanguageComboBox_activated" ID="EditorHighlightingStylesPage.on_lexerLanguageComboBox_activated"></a> |
|
229 <h4>EditorHighlightingStylesPage.on_lexerLanguageComboBox_activated</h4> |
|
230 <b>on_lexerLanguageComboBox_activated</b>(<i>language</i>) |
|
231 <p> |
|
232 Private slot to fill the style combo of the source page. |
|
233 </p><dl> |
|
234 <dt><i>language</i></dt> |
|
235 <dd> |
|
236 The lexer language (string) |
|
237 </dd> |
|
238 </dl><a NAME="EditorHighlightingStylesPage.on_styleElementList_currentRowChanged" ID="EditorHighlightingStylesPage.on_styleElementList_currentRowChanged"></a> |
|
239 <h4>EditorHighlightingStylesPage.on_styleElementList_currentRowChanged</h4> |
|
240 <b>on_styleElementList_currentRowChanged</b>(<i>index</i>) |
|
241 <p> |
|
242 Private method to set up the style element part of the source page. |
|
243 </p><dl> |
|
244 <dt><i>index</i></dt> |
|
245 <dd> |
|
246 the style index. |
|
247 </dd> |
|
248 </dl><a NAME="EditorHighlightingStylesPage.save" ID="EditorHighlightingStylesPage.save"></a> |
|
249 <h4>EditorHighlightingStylesPage.save</h4> |
|
250 <b>save</b>(<i></i>) |
|
251 <p> |
|
252 Public slot to save the Editor Highlighting Styles configuration. |
|
253 </p><a NAME="EditorHighlightingStylesPage.saveState" ID="EditorHighlightingStylesPage.saveState"></a> |
|
254 <h4>EditorHighlightingStylesPage.saveState</h4> |
|
255 <b>saveState</b>(<i></i>) |
|
256 <p> |
|
257 Public method to save the current state of the widget. |
|
258 </p><dl> |
|
259 <dt>Returns:</dt> |
|
260 <dd> |
|
261 array containing the index of the selected lexer language (integer) |
|
262 and the index of the selected lexer entry (integer) |
|
263 </dd> |
|
264 </dl><a NAME="EditorHighlightingStylesPage.setState" ID="EditorHighlightingStylesPage.setState"></a> |
|
265 <h4>EditorHighlightingStylesPage.setState</h4> |
|
266 <b>setState</b>(<i>state</i>) |
|
267 <p> |
|
268 Public method to set the state of the widget. |
|
269 </p><dl> |
|
270 <dt><i>state</i></dt> |
|
271 <dd> |
|
272 state data generated by saveState |
|
273 </dd> |
|
274 </dl> |
|
275 <div align="right"><a href="#top">Up</a></div> |
|
276 <hr /><hr /> |
|
277 <a NAME="create" ID="create"></a> |
|
278 <h2>create</h2> |
|
279 <b>create</b>(<i>dlg</i>) |
|
280 <p> |
|
281 Module function to create the configuration page. |
|
282 </p><dl> |
|
283 <dt><i>dlg</i></dt> |
|
284 <dd> |
|
285 reference to the configuration dialog |
|
286 </dd> |
|
287 </dl> |
|
288 <div align="right"><a href="#top">Up</a></div> |
|
289 <hr /> |
|
290 </body></html> |