Finish the cleanup in graphics.
[lyx.git] / src / FuncCode.h
blob1a57ce227fd42eb5b3a6e2fec799d094517a2af4
1 // -*- C++ -*-
2 /**
3 * \file FuncCode.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * Full author contact details are available in file CREDITS.
9 * To add a new function:
10 * - add a new enum constant immediately before LFUN_LASTACTION
11 * - add an appropriate line and documentation in LyXAction.cpp
12 * - add a branch to a suitable ::doDispatch() method
13 * - add correct test to the corresponding ::getStatus() method
16 #ifndef FUNCCODE_H
17 #define FUNCCODE_H
19 namespace lyx {
21 /** These are all the lyx functions, the main mechanism
22 * through which the frontends communicate with the core.
24 * They are managed in LyXAction.cpp and handled in various
25 * ::dispatch() functions, starting with LyXFunc.C:dispatch(),
26 * BufferView::dispatch(), Cursor::dispatch() and
27 * Inset*::doDispatch();
29 enum FuncCode
31 LFUN_UNKNOWN_ACTION = -1,
32 // 0
33 LFUN_NOACTION = 0,
34 LFUN_COMMAND_PREFIX,
35 LFUN_SCREEN_RECENTER,
36 LFUN_BUFFER_NEW,
37 LFUN_BUFFER_WRITE,
38 // 5
39 LFUN_BUFFER_WRITE_AS,
40 LFUN_BUILD_PROGRAM,
41 LFUN_BUFFER_VIEW,
42 LFUN_BUFFER_CLOSE,
43 LFUN_LYX_QUIT,
44 // 10
45 LFUN_BUFFER_AUTO_SAVE,
46 LFUN_UNDO,
47 LFUN_REDO,
48 LFUN_PASTE,
49 LFUN_PRIMARY_SELECTION_PASTE,
50 // 15
51 LFUN_CUT,
52 LFUN_COPY,
53 LFUN_CLOSE_TAB_GROUP,
54 LFUN_NOTE_NEXT,
55 LFUN_INSET_TOGGLE,
56 // 20
57 LFUN_HFILL_INSERT,
58 LFUN_TEXTSTYLE_APPLY,
59 LFUN_TEXTSTYLE_UPDATE,
60 LFUN_FONT_EMPH,
61 LFUN_FONT_BOLD,
62 // 25
63 LFUN_FONT_BOLDSYMBOL,
64 LFUN_FONT_ROMAN,
65 LFUN_FONT_NOUN,
66 LFUN_FONT_ITAL,
67 LFUN_FONT_FRAK,
68 // 30
69 LFUN_CHAR_FORWARD,
70 LFUN_CHAR_BACKWARD,
71 LFUN_UP,
72 LFUN_DOWN,
73 LFUN_SCREEN_UP,
74 // 35
75 LFUN_SCREEN_DOWN,
76 LFUN_LINE_BEGIN,
77 LFUN_LINE_END,
78 LFUN_CELL_FORWARD,
79 LFUN_CELL_BACKWARD,
80 // 40
81 LFUN_WORD_FORWARD,
82 LFUN_WORD_BACKWARD,
83 LFUN_BUFFER_BEGIN,
84 LFUN_BUFFER_END,
85 LFUN_CHAR_FORWARD_SELECT,
86 // 45
87 LFUN_CHAR_BACKWARD_SELECT,
88 LFUN_UP_SELECT,
89 LFUN_DOWN_SELECT,
90 LFUN_SCREEN_UP_SELECT,
91 LFUN_SCREEN_DOWN_SELECT,
92 // 50
93 LFUN_LINE_BEGIN_SELECT,
94 LFUN_LINE_END_SELECT,
95 LFUN_WORD_FORWARD_SELECT,
96 LFUN_WORD_BACKWARD_SELECT,
97 LFUN_WORD_SELECT,
98 // 55
99 LFUN_BUFFER_BEGIN_SELECT,
100 LFUN_BUFFER_END_SELECT,
101 LFUN_SPACE_INSERT, // JSpitzm 20030520
102 LFUN_SPECIALCHAR_INSERT, // JSpitzm, 20071206
103 LFUN_MARK_TOGGLE,
104 // 60
105 LFUN_CHAR_DELETE_FORWARD,
106 LFUN_CHAR_DELETE_BACKWARD,
107 LFUN_NEWLINE_INSERT, // renamed: JSpitzm, 20080325
108 LFUN_BREAK_PARAGRAPH,
109 LFUN_QUOTE_INSERT,
110 // 65
111 LFUN_ACCENT_CIRCUMFLEX,
112 LFUN_MATH_SUBSCRIPT,
113 LFUN_MATH_SUPERSCRIPT,
114 LFUN_ACCENT_GRAVE,
115 LFUN_ACCENT_ACUTE,
116 // 70
117 LFUN_ACCENT_TILDE,
118 LFUN_ACCENT_CEDILLA,
119 LFUN_ACCENT_MACRON,
120 LFUN_ACCENT_UNDERBAR,
121 LFUN_ACCENT_UNDERDOT,
122 // 75
123 LFUN_ACCENT_CIRCLE,
124 LFUN_ACCENT_TIE,
125 LFUN_ACCENT_BREVE,
126 LFUN_ACCENT_CARON,
127 LFUN_ACCENT_HUNGARIAN_UMLAUT,
128 // 80
129 LFUN_ACCENT_UMLAUT,
130 LFUN_ACCENT_DOT,
131 LFUN_ACCENT_OGONEK,
132 LFUN_SELF_INSERT,
133 LFUN_GETBUFNAME,
134 // 85
135 LFUN_SERVER_GET_XY,
136 LFUN_SERVER_SET_XY,
137 LFUN_SPLIT_VIEW,
138 LFUN_LINEATCURSOR,
139 LFUN_SERVER_GET_LAYOUT,
140 // 90
141 LFUN_SERVER_GET_FILENAME,
142 LFUN_SERVER_NOTIFY,
143 LFUN_SERVER_GOTO_FILE_ROW,
144 LFUN_NOTE_INSERT,
145 LFUN_UI_TOGGLE,
146 // 95
147 LFUN_KEYMAP_OFF,
148 LFUN_KEYMAP_PRIMARY,
149 LFUN_KEYMAP_SECONDARY,
150 LFUN_KEYMAP_TOGGLE,
151 LFUN_MATH_INSERT,
152 // 100
153 LFUN_MATH_MATRIX,
154 LFUN_MATH_LIMITS,
155 LFUN_MATH_DELIM, // Alejandro 180696
156 LFUN_MATH_DISPLAY, // Alejandro 180696
157 LFUN_MATH_MODE, // Alejandro 040696
158 // 105
159 LFUN_MATH_NUMBER_TOGGLE,
160 LFUN_MATH_NUMBER_LINE_TOGGLE,
161 LFUN_MATH_SIZE, // Alejandro 150896
162 LFUN_MATH_MACRO, // ale970510
163 LFUN_MATH_EXTERN, // Andre' 20010424
164 // 110
165 LFUN_MATH_MUTATE, // Andre' 20010523
166 LFUN_MATH_SPACE, // Andre' 20010725
167 LFUN_WORD_DELETE_FORWARD,
168 LFUN_WORD_DELETE_BACKWARD,
169 LFUN_LINE_DELETE,
170 // 115
171 LFUN_NOTES_MUTATE,
172 LFUN_MARK_OFF,
173 LFUN_MARK_ON,
174 LFUN_LAYOUT,
175 LFUN_LAYOUT_PARAGRAPH,
176 // 120
177 LFUN_DROP_LAYOUTS_CHOICE, // used in bindings as of 20071228
178 LFUN_FONT_TYPEWRITER, // changed from FONT_CODE 20070920
179 LFUN_FONT_SANS,
180 LFUN_FONT_DEFAULT,
181 LFUN_FONT_UNDERLINE,
182 // 125
183 LFUN_FONT_SIZE,
184 LFUN_FONT_STATE,
185 LFUN_WORD_UPCASE,
186 LFUN_WORD_LOWCASE,
187 LFUN_WORD_CAPITALIZE,
188 // 130
189 LFUN_LABEL_INSERT,
190 LFUN_DEPTH_DECREMENT,
191 LFUN_DEPTH_INCREMENT,
192 LFUN_MENU_OPEN, // used in bindings as of 20060905
193 LFUN_CANCEL,
194 // 135
195 LFUN_META_PREFIX,
196 LFUN_COMMAND_EXECUTE,
197 LFUN_FILE_INSERT,
198 LFUN_FILE_INSERT_PLAINTEXT, // CFO-G 1997-11-19
199 LFUN_FILE_INSERT_PLAINTEXT_PARA,// Levon 2001-02-14
200 // 140
201 LFUN_FILE_OPEN,
202 LFUN_PARAGRAPH_UP, // Asger 1996-10-01
203 LFUN_PARAGRAPH_UP_SELECT, // Asger 1996-10-01
204 LFUN_PARAGRAPH_DOWN, // Asger 1996-10-01
205 LFUN_PARAGRAPH_DOWN_SELECT, // Asger 1996-10-01
206 // 145
207 LFUN_NEXT_INSET_MODIFY, // JSpitzm 20080323
208 LFUN_BUFFER_NEW_TEMPLATE, // Asger 1997-02-02
209 LFUN_BUFFER_RELOAD, // Asger 1997-02-02
210 LFUN_RECONFIGURE,
211 LFUN_BRANCH_ACTIVATE,
212 // 150
213 LFUN_BRANCH_DEACTIVATE,
214 LFUN_INDEX_PRINT, // Lgb 97-02-27
215 LFUN_CELL_SPLIT,
216 LFUN_BUFFER_CHILD_OPEN, // Ale 970528
217 LFUN_TOC_INSERT, // Lgb 97-05-27
218 // 155
219 LFUN_FLOAT_LIST_INSERT, // Lgb 20010503
220 LFUN_BUFFER_TOGGLE_READ_ONLY, // Lgb 97-05-27
221 LFUN_VC_REGISTER, // Lgb 97-07-01
222 LFUN_VC_CHECK_IN, // Lgb 97-07-01
223 LFUN_VC_CHECK_OUT, // Lgb 97-07-01
224 // 160
225 LFUN_VC_REVERT, // Lgb 97-07-01
226 LFUN_VC_UNDO_LAST, // Lgb 97-07-01
227 LFUN_BUFFER_EXPORT, // Lgb 97-07-29
228 LFUN_LABEL_GOTO, // Ale 970806
229 LFUN_CURSOR_FOLLOWS_SCROLLBAR_TOGGLE, // ARRae 971202
230 // 165
231 LFUN_BUFFER_CHKTEX, // Asger 971030
232 LFUN_HYPERLINK_INSERT, // CFO-G 971121
233 LFUN_WORD_FIND_FORWARD, // Etienne 980216
234 LFUN_WORD_FIND_BACKWARD, // Etienne 980220
235 LFUN_APPENDIX, // ettrich 980505
236 // 170
237 LFUN_BUFFER_IMPORT, // Asger 980724
238 LFUN_COMMAND_SEQUENCE, // Andre' 991111
239 LFUN_PREFERENCES_SAVE,
240 LFUN_HELP_OPEN, // Jug 990627
241 LFUN_DATE_INSERT, // jdblair 20000131
242 // 175
243 LFUN_LANGUAGE, // Dekel 20000203
244 LFUN_ERT_INSERT, // Jug 20000218
245 LFUN_FOOTNOTE_INSERT, // Jug 20000307
246 LFUN_PARAGRAPH_SPACING, // Lgb 20000411
247 LFUN_TABULAR_INSERT, // Jug 20000412
248 // 180
249 LFUN_LOFVIEW, // Dekel 20000519
250 LFUN_LOTVIEW, // Dekel 20000519
251 LFUN_LOAVIEW, // Dekel 20000519
252 LFUN_SET_COLOR, // SLior 20000611
253 LFUN_MARGINALNOTE_INSERT, // Lgb 20000626
254 // 185
255 LFUN_FLOAT_INSERT, // Lgb 20000627
256 LFUN_FLOAT_WIDE_INSERT, // Lgb 20010531
257 LFUN_CAPTION_INSERT, // Lgb 20000718; inactive as of 20060905
258 LFUN_BUFFER_SWITCH,
259 LFUN_TABULAR_FEATURE, // Jug 20000728
260 // 190
261 LFUN_LAYOUT_TABULAR, // Jug 20000731
262 LFUN_BUFFER_UPDATE, // Dekel 20000805
263 LFUN_INDEX_INSERT, // Angus 20000803
264 LFUN_SCREEN_FONT_UPDATE, // ARRae 20000813
265 LFUN_PARAGRAPH_GOTO, // Dekel 20000826
266 // 195
267 LFUN_REFERENCE_NEXT, // Dekel 20010114
268 LFUN_BOOKMARK_SAVE,
269 LFUN_BOOKMARK_GOTO,
270 LFUN_SELECT_FILE_SYNC, // Levon 20010214
271 LFUN_MESSAGE, // Lgb 20010408; for scripting purposes, output in minibuffer
272 // 200
273 LFUN_CHARS_TRANSPOSE, // Lgb 20010425
274 LFUN_ESCAPE, // Lgb 20010517
275 LFUN_THESAURUS_ENTRY, // Levon 20010720
276 LFUN_OPTIONAL_INSERT, // Martin 12 Aug 2002
277 LFUN_MOUSE_PRESS, // André 9 Aug 2002
278 // 205
279 LFUN_MOUSE_MOTION, // André 9 Aug 2002
280 LFUN_MOUSE_RELEASE, // André 9 Aug 2002
281 LFUN_MOUSE_DOUBLE, // André 9 Aug 2002
282 LFUN_MOUSE_TRIPLE, // André 9 Aug 2002
283 LFUN_WRAP_INSERT, // Dekel 7 Apr 2002
284 // 210
285 LFUN_CHANGES_TRACK, // Levon 20021001 (cool date !)
286 LFUN_CHANGES_MERGE, // Levon 20021016
287 LFUN_CHANGE_ACCEPT, // Levon 20021016
288 LFUN_CHANGE_REJECT, // Levon 20021016
289 LFUN_ALL_CHANGES_ACCEPT, // Levon 20021016
290 // 215
291 LFUN_ALL_CHANGES_REJECT, // Levon 20021016
292 LFUN_SCROLL,
293 LFUN_DIALOG_SHOW,
294 LFUN_DIALOG_SHOW_NEW_INSET,
295 LFUN_DIALOG_UPDATE,
296 // 220
297 LFUN_DIALOG_HIDE,
298 LFUN_DIALOG_TOGGLE, // JSpitzm 20070430
299 LFUN_DIALOG_DISCONNECT_INSET,
300 LFUN_INSET_APPLY,
301 LFUN_INSET_INSERT,
302 // 225
303 LFUN_INSET_MODIFY,
304 LFUN_INSET_DIALOG_UPDATE,
305 LFUN_INSET_SETTINGS,
306 LFUN_PARAGRAPH_PARAMS_APPLY,
307 LFUN_PARAGRAPH_UPDATE,
308 // 230
309 LFUN_INSET_EDIT, // JSpitzm 20080427
310 LFUN_BRANCH_INSERT,
311 LFUN_BOX_INSERT,
312 LFUN_LINE_INSERT,
313 LFUN_NEWPAGE_INSERT, // uwestoehr, 20071124
314 // 235
315 LFUN_REPEAT,
316 LFUN_FINISHED_LEFT,
317 LFUN_FINISHED_RIGHT,
318 LFUN_FLEX_INSERT,
319 LFUN_WORD_FIND,
320 // 240
321 LFUN_WORD_REPLACE,
322 LFUN_BUFFER_EXPORT_CUSTOM,
323 LFUN_BUFFER_PRINT,
324 LFUN_NEXT_INSET_TOGGLE,
325 LFUN_ALL_INSETS_TOGGLE,
326 // 245
327 LFUN_BUFFER_LANGUAGE,
328 LFUN_TEXTCLASS_APPLY,
329 LFUN_TEXTCLASS_LOAD,
330 LFUN_BUFFER_SAVE_AS_DEFAULT,
331 LFUN_BUFFER_PARAMS_APPLY,
332 // 250
333 LFUN_LYXRC_APPLY,
334 LFUN_BUFFER_NEXT,
335 LFUN_BUFFER_PREVIOUS,
336 LFUN_STATISTICS,
337 LFUN_CHANGES_OUTPUT, // jspitzm 20050121
338 // 255
339 LFUN_BIBTEX_DATABASE_ADD,
340 LFUN_BIBTEX_DATABASE_DEL,
341 LFUN_CITATION_INSERT,
342 LFUN_OUTLINE_UP,
343 LFUN_OUTLINE_DOWN,
344 // 260
345 LFUN_OUTLINE_IN,
346 LFUN_OUTLINE_OUT,
347 LFUN_PARAGRAPH_MOVE_DOWN,
348 LFUN_PARAGRAPH_MOVE_UP,
349 LFUN_BUFFER_TOGGLE_COMPRESSION, // bpeng 20060427
350 // 265
351 LFUN_MATH_BIGDELIM,
352 LFUN_CLIPBOARD_PASTE,
353 LFUN_INSET_DISSOLVE, // jspitzm 20060807
354 LFUN_CHANGE_NEXT,
355 LFUN_WINDOW_NEW, // Abdel 20061021
356 // 270
357 LFUN_WINDOW_CLOSE, // Abdel 20061023
358 LFUN_UNICODE_INSERT, // Lgb 20061022
359 LFUN_BOOKMARK_CLEAR, // bpeng 20061031
360 LFUN_NOMENCL_INSERT, // Ugras
361 LFUN_NOMENCL_PRINT, // Ugras
362 // 275
363 LFUN_LISTING_INSERT, // Herbert 20011110, bpeng 20070502
364 LFUN_TOOLBAR_TOGGLE, // Edwin 20070521
365 LFUN_BUFFER_WRITE_ALL, // rgh, gpothier 200707XX
366 LFUN_PARAGRAPH_PARAMS,
367 LFUN_LAYOUT_MODULES_CLEAR,
368 // 280
369 LFUN_LAYOUT_MODULE_ADD,
370 LFUN_LAYOUT_RELOAD,
371 LFUN_MASTER_BUFFER_VIEW, // Tommaso, 20070920
372 LFUN_MASTER_BUFFER_UPDATE, // Tommaso, 20070920
373 LFUN_INFO_INSERT, // bpeng, 20071007
374 // 285
375 LFUN_CALL, // broider, 20071002
376 LFUN_CHAR_LEFT, // dov, 20071022
377 LFUN_CHAR_LEFT_SELECT, // dov, 20071022
378 LFUN_CHAR_RIGHT, // dov, 20071022
379 LFUN_CHAR_RIGHT_SELECT, // dov, 20071022
380 // 290
381 LFUN_FINISHED_BACKWARD, // dov, 20071022
382 LFUN_FINISHED_FORWARD, // dov, 20071022
383 LFUN_WORD_LEFT, // dov, 20071028
384 LFUN_WORD_LEFT_SELECT, // dov, 20071028
385 LFUN_WORD_RIGHT, // dov, 20071028
386 // 295
387 LFUN_WORD_RIGHT_SELECT, // dov, 20071028
388 LFUN_MATH_MACRO_FOLD,
389 LFUN_MATH_MACRO_UNFOLD,
390 LFUN_MATH_MACRO_ADD_PARAM,
391 LFUN_MATH_MACRO_REMOVE_PARAM,
392 // 300
393 LFUN_MATH_MACRO_APPEND_GREEDY_PARAM,
394 LFUN_MATH_MACRO_REMOVE_GREEDY_PARAM,
395 LFUN_MATH_MACRO_MAKE_OPTIONAL,
396 LFUN_MATH_MACRO_MAKE_NONOPTIONAL,
397 LFUN_MATH_MACRO_ADD_OPTIONAL_PARAM,
398 // 305
399 LFUN_MATH_MACRO_REMOVE_OPTIONAL_PARAM,
400 LFUN_MATH_MACRO_ADD_GREEDY_OPTIONAL_PARAM,
401 LFUN_IN_MATHMACROTEMPLATE,
402 LFUN_COMPLETION_POPUP,
403 LFUN_COMPLETION_INLINE,
404 // 310
405 LFUN_COMPLETION_COMPLETE,
406 LFUN_SET_GRAPHICS_GROUP,
407 LFUN_COMPLETION_CANCEL,
408 LFUN_COMPLETION_ACCEPT,
409 LFUN_COMMAND_ALTERNATIVES,
410 // 315
411 LFUN_LASTACTION // end of the table
415 } // namespace lyx
417 #endif // FUNCCODE_H