]> git.lyx.org Git - lyx.git/blob - src/LyXAction.cpp
Fix a crash when closing tabs
[lyx.git] / src / LyXAction.cpp
1 /*!
2  * \file LyXAction.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Lars Gullik Bjønnes
7  * \author Jean-Marc Lasgouttes
8  * \author John Levon
9  * \author André Pönitz
10  * \author Pavel Sanda
11  *
12  * Full author contact details are available in file CREDITS.
13  */
14
15 #include <config.h>
16
17 #include "LyXAction.h"
18
19 #include "FuncRequest.h"
20
21 #include "support/debug.h"
22 #include "support/lstrings.h"
23
24 #include "support/lassert.h"
25
26 #include <iostream>
27
28 using namespace std;
29 using namespace lyx::support;
30
31 namespace lyx {
32
33 /*
34      NAMING RULES FOR USER-COMMANDS
35      Here's the set of rules to apply when a new command name is introduced:
36
37      1) Use the object.event order. That is, use `word-forward'
38         instead of `forward-word'.
39      2) Don't introduce an alias for an already named object. Same for events.
40      3) Forward movement or focus is called `forward' (not `right').
41      4) Backward movement or focus is called `backward' (not `left').
42      5) Upward movement of focus is called `up'.
43      6) Downward movement is called `down'.
44      7) The begin of an object is called `begin' (not `start').
45      8) The end of an object is called `end'.
46
47      (May 19 1996, 12:04, RvdK)
48 */
49
50 /* LFUN documentation
51  *
52  * The documentation below primarily describes the purpose and syntax
53  * of the various LFUNs.
54  *
55  * The list is alphabetized. Try to keep it that way, and don't forget to add
56  * doxygen commentary. This allows the file LFUNs.lyx to be auto-generated.
57  * (If you should want to do that, see the gen_lfuns.py script, which is in
58  * the development/tools/ directory.)
59  *
60  * Doxygen template below. Some notes: Parameters should be set in uppercase
61  * and put in <BRACKETS>, [<PARAM>] means optional one.
62  *
63  * Use spaces for indentation (doxy -> .lyx generator is tab-sensitive).
64  */
65
66 /*!
67  * \var lyx::FuncCode lyx::LFUN_
68  * \li Action:
69  * \li Notion:
70  * \li Syntax:
71  * \li Params:
72  * \li Sample:
73  * \li Origin:
74  * \endvar
75  */
76
77 LyXAction lyxaction;
78
79
80 void LyXAction::newFunc(FuncCode action, string const & name,
81                         unsigned int attrib, LyXAction::FuncType type)
82 {
83         lyx_func_map[name] = action;
84         FuncInfo tmpinfo;
85         tmpinfo.name = name;
86         tmpinfo.attrib = attrib;
87         tmpinfo.type = type;
88         lyx_info_map[action] = tmpinfo;
89 }
90
91
92 // Needed for LFUNs documentation to be accepted, since doxygen won't take
93 // \var inside functions.
94 #ifndef DOXYGEN_SHOULD_SKIP_THIS
95 void LyXAction::init()
96 {
97         // This function was changed to use the array below in initalization
98         // instead of calling newFunc numerous times because of compilation
99         // times. Since the array is not static we get back the memory it
100         // occupies after the init is completed. It compiles several
101         // magnitudes faster.
102
103         static bool init;
104         if (init)
105                 return;
106
107         struct ev_item {
108                 FuncCode action;
109                 char const * name;
110                 unsigned int attrib;
111                 FuncType type;
112         };
113
114         ev_item const items[] = {
115 #endif
116
117 /*!
118  * \var lyx::FuncCode lyx::LFUN_ACCENT_ACUTE
119  * \li Action: Adds an acute accent \htmlonly (&aacute;)\endhtmlonly
120                to the next character typed.
121  * \li Syntax: accent-acute
122  * \endvar
123  */
124                 { LFUN_ACCENT_ACUTE, "accent-acute", Noop, Edit },
125
126 /*!
127  * \var lyx::FuncCode lyx::LFUN_ACCENT_BREVE
128  * \li Action: Adds a breve accent \htmlonly (&#259;)\endhtmlonly
129                to the next character typed.
130  * \li Syntax: accent-breve
131  * \endvar
132  */
133                 { LFUN_ACCENT_BREVE, "accent-breve", Noop, Edit },
134
135 /*!
136  * \var lyx::FuncCode lyx::LFUN_ACCENT_CARON
137  * \li Action: Adds a caron \htmlonly (&#462;)\endhtmlonly
138                to the next character typed.
139  * \li Syntax: accent-caron
140  * \endvar
141  */
142                 { LFUN_ACCENT_CARON, "accent-caron", Noop, Edit },
143
144 /*!
145  * \var lyx::FuncCode lyx::LFUN_ACCENT_CEDILLA
146  * \li Action: Adds a cedilla \htmlonly (&ccedil;)\endhtmlonly
147                to the next character typed.
148  * \li Syntax: accent-cedilla
149  * \endvar
150  */
151                 { LFUN_ACCENT_CEDILLA, "accent-cedilla", Noop, Edit },
152
153 /*!
154  * \var lyx::FuncCode lyx::LFUN_ACCENT_CIRCLE
155  * \li Action: Adds a circle accent \htmlonly (&aring;)\endhtmlonly
156                to the next character typed.
157  * \li Syntax: accent-circle
158  * \endvar
159  */
160                 { LFUN_ACCENT_CIRCLE, "accent-circle", Noop, Edit },
161
162 /*!
163  * \var lyx::FuncCode lyx::LFUN_ACCENT_CIRCUMFLEX
164  * \li Action: Adds a circumflex \htmlonly (&ecirc;)\endhtmlonly
165                to the next character typed.
166  * \li Syntax: accent-circumflex
167  * \endvar
168  */
169                 { LFUN_ACCENT_CIRCUMFLEX, "accent-circumflex", Noop, Edit },
170
171 /*!
172  * \var lyx::FuncCode lyx::LFUN_ACCENT_DOT
173  * \li Action: Adds a dot accent \htmlonly (&#380;)\endhtmlonly
174                to the next character typed.
175  * \li Syntax: accent-dot
176  * \endvar
177  */
178                 { LFUN_ACCENT_DOT, "accent-dot", Noop, Edit },
179
180 /*!
181  * \var lyx::FuncCode lyx::LFUN_ACCENT_GRAVE
182  * \li Action: Adds a grave accent \htmlonly (&egrave;)\endhtmlonly
183                to the next character typed.
184  * \li Syntax: accent-grave
185  * \endvar
186  */
187                 { LFUN_ACCENT_GRAVE, "accent-grave", Noop, Edit },
188
189 /*!
190  * \var lyx::FuncCode lyx::LFUN_ACCENT_HUNGARIAN_UMLAUT
191  * \li Action: Adds a Hungarian umlaut \htmlonly (&#337;)\endhtmlonly
192                to the next character typed.
193  * \li Syntax: accent-grave
194  * \endvar
195  */
196                 { LFUN_ACCENT_HUNGARIAN_UMLAUT, "accent-hungarian-umlaut", Noop, Edit },
197
198 /*!
199  * \var lyx::FuncCode lyx::LFUN_ACCENT_MACRON
200  * \li Action: Adds a macron \htmlonly (&#257;)\endhtmlonly
201                to the next character typed.
202  * \li Syntax: accent-macron
203  * \endvar
204  */
205                 { LFUN_ACCENT_MACRON, "accent-macron", Noop, Edit },
206
207 /*!
208  * \var lyx::FuncCode lyx::LFUN_ACCENT_OGONEK
209  * \li Action: Adds an ogonek accent \htmlonly (&#261;)\endhtmlonly
210                to the next character typed.
211  * \li Syntax: accent-ogonek
212  * \endvar
213  */
214                 { LFUN_ACCENT_OGONEK, "accent-ogonek", Noop, Edit },
215
216 /*!
217  * \var lyx::FuncCode lyx::LFUN_ACCENT_PERISPOMENI
218  * \li Action: Adds a perispomeni (Greek circumflex)
219                over the next character typed.
220  * \li Syntax: accent-perispomeni
221  * \endvar
222  */
223                 { LFUN_ACCENT_PERISPOMENI, "accent-perispomeni", Noop, Edit },
224
225 /*!
226  * \var lyx::FuncCode lyx::LFUN_ACCENT_TIE
227  * \li Action: Adds a tie \htmlonly (a&#865;)\endhtmlonly
228                over the next two character typed.
229  * \li Notion: The following char will finish the tie.
230  * \li Syntax: accent-tie
231  * \endvar
232  */
233                 { LFUN_ACCENT_TIE, "accent-tie", Noop, Edit },
234
235 /*!
236  * \var lyx::FuncCode lyx::LFUN_ACCENT_TILDE
237  * \li Action: Adds a tilde \htmlonly (&atilde;)\endhtmlonly
238                over the next character typed.
239  * \li Syntax: accent-tilde
240  * \endvar
241  */
242                 { LFUN_ACCENT_TILDE, "accent-tilde", Noop, Edit },
243
244 /*!
245  * \var lyx::FuncCode lyx::LFUN_ACCENT_UMLAUT
246  * \li Action: Adds an umlaut \htmlonly (&auml;)\endhtmlonly
247                over the next character typed.
248  * \li Syntax: accent-umlaut
249  * \endvar
250  */
251                 { LFUN_ACCENT_UMLAUT, "accent-umlaut", Noop, Edit },
252
253 /*!
254  * \var lyx::FuncCode lyx::LFUN_ACCENT_UNDERBAR
255  * \li Action: Adds a bar \htmlonly (a&#800;)\endhtmlonly
256                under the next character typed.
257  * \li Syntax: accent-underbar
258  * \endvar
259  */
260                 { LFUN_ACCENT_UNDERBAR, "accent-underbar", Noop, Edit },
261
262 /*!
263  * \var lyx::FuncCode lyx::LFUN_ACCENT_UNDERDOT
264  * \li Action: Adds a dot \htmlonly (&#7841;)\endhtmlonly
265                under the next character typed.
266  * \li Syntax: accent-underdot
267  * \endvar
268  */
269                 { LFUN_ACCENT_UNDERDOT, "accent-underdot", Noop, Edit },
270
271
272 /*!
273  * \var lyx::FuncCode lyx::LFUN_ALL_CHANGES_ACCEPT
274  * \li Action: Accepts all tracked changes in the document.
275  * \li Syntax: all-changes-accept
276  * \li Origin: Levon, 16 Oct 2002
277  * \endvar
278  */
279                 { LFUN_ALL_CHANGES_ACCEPT, "all-changes-accept", Noop, Edit },
280
281 /*!
282  * \var lyx::FuncCode lyx::LFUN_ALL_CHANGES_REJECT
283  * \li Action: Rejects all tracked changes in the document.
284  * \li Notion: Reject does not work recursively; the user may have to repeat the operation.
285  * \li Syntax: all-changes-reject
286  * \li Origin: Levon, 16 Oct 2002
287  * \endvar
288  */
289                 { LFUN_ALL_CHANGES_REJECT, "all-changes-reject", Noop, Edit },
290
291
292 /*!
293  * \var lyx::FuncCode lyx::LFUN_APPENDIX
294  * \li Action: Start (or remove) Appendix on the given cursor position.
295  * \li Syntax: appendix
296  * \li Origin: ettrich, 5 May 1998
297  * \endvar
298  */
299                 { LFUN_APPENDIX, "appendix", Noop, Edit },
300
301
302 /*!
303  * \var lyx::FuncCode lyx::LFUN_ARGUMENT_INSERT
304  * \li Action: Inserts an argument (short title) inset.
305  * \li Syntax: argument-insert <argument nr>
306  * \li Params: <argument nr>: see layout declarations
307  * \li Origin: vermeer, 12 Aug 2002
308  * \endvar
309  */
310                 { LFUN_ARGUMENT_INSERT, "argument-insert", Noop, Edit },
311
312 /*!
313  * \var lyx::FuncCode lyx::LFUN_BIBTEX_DATABASE_ADD
314  * \li Action: Adds database, which will be used for bibtex citations.
315  * \li Notion: Databases are added to the first BibTeX inset
316                (Inset->List/TOC->BibTeX bibliography) found from the cursor position.
317  * \li Syntax: bibtex-database-add <DATABASE-NAME>
318  * \li Origin: Ale, 30 May 1997
319  * \endvar
320  */
321                 { LFUN_BIBTEX_DATABASE_ADD, "bibtex-database-add", Noop, Edit },
322
323 /*!
324  * \var lyx::FuncCode lyx::LFUN_BIBTEX_DATABASE_DEL
325  * \li Action: Adds database, which will be used for bibtex citations.
326  * \li Notion: Databases are deleted from the first BibTeX inset
327                (Inset->List/TOC->BibTeX bibliography) found from the cursor position.
328  * \li Syntax: bibtex-database-del <DATABASE-NAME>
329  * \li Origin: Ale, 30 May 1997
330  * \endvar
331  */
332                 { LFUN_BIBTEX_DATABASE_DEL, "bibtex-database-del", Noop, Edit },
333
334
335 /*!
336  * \var lyx::FuncCode lyx::LFUN_BOOKMARK_CLEAR
337  * \li Action: Clears the list of saved bookmarks.
338  * \li Syntax: bookmark-clear
339  * \li Origin: bpeng, 31 October 2006
340  * \endvar
341  */
342                 { LFUN_BOOKMARK_CLEAR, "bookmark-clear", NoBuffer, Edit },
343
344
345 /*!
346  * \var lyx::FuncCode lyx::LFUN_BOOKMARK_GOTO
347  * \li Action: Moves the cursor to the numbered bookmark, opening the file
348                if necessary. Note that bookmarks are saved per-session, not
349                per file.
350  * \li Notion: Bookmark 0 has a special purpose. It is automatically set \n
351                1. to the paragraph you are currently editing \n
352                2. to the paragraph from where you are jumping to the last-edited
353                   position (jump-back feature) \n
354                3. when jumping from crossreference to the requested label by
355                   #LFUN_LABEL_GOTO.
356  * \li Syntax: bookmark-goto <NUMBER>
357  * \li Params: <NUMBER>: the number of the bookmark to restore.
358  * \li Origin: Dekel, 27 January 2001
359  * \endvar
360  */
361                 { LFUN_BOOKMARK_GOTO, "bookmark-goto", NoBuffer, Edit },
362
363 /*!
364  * \var lyx::FuncCode lyx::LFUN_BOOKMARK_SAVE
365  * \li Action: Save a bookmark.
366  * \li Notion: Saves a numbered bookmark to the sessions file. The number
367                must be between 1 and 9, inclusive. Note that bookmarks are
368                saved per-session, not per file.
369  * \li Syntax: bookmark-save <NUMBER>
370  * \li Params: <NUMBER>: the number of the bookmark to save.
371  * \li Origin: Dekel, 27 January 2001
372  * \endvar
373  */
374                 { LFUN_BOOKMARK_SAVE, "bookmark-save", ReadOnly, Edit },
375
376 /*!
377  * \var lyx::FuncCode lyx::LFUN_BOX_INSERT
378  * \li Action: Inserts Box inset.
379  * \li Syntax: box-insert [<TYPE>]
380  * \li Params: <TYPE>: Boxed|Frameless|Framed|ovalbox|Ovalbox|Shadowbox|Shaded|Doublebox \n
381                        Framed is the default one.
382  * \li Origin: vermeer, 7 Oct 2003
383  * \endvar
384  */
385                 { LFUN_BOX_INSERT, "box-insert", Noop, Edit },
386
387 /*!
388  * \var lyx::FuncCode lyx::LFUN_BRANCHES_RENAME
389  * \li Action: Rename all branches of a given name in a document.
390  * \li Syntax: branches-rename <OLDNAME> <NEWNAME>
391  * \li Params: <OLDNAME>: Current name of the branch to be renamed
392  *             <NEWNAME>: New name of the branch
393  * \li Origin: spitz, 9 Jul 2009
394  * \endvar
395  */
396                 { LFUN_BRANCHES_RENAME, "branches-rename", Noop, Buffer },
397
398 /*!
399  * \var lyx::FuncCode lyx::LFUN_BRANCH_ACTIVATE
400  * \li Action: Activate the branch.
401  * \li Syntax: branch-activate <BRANCH>
402  * \li Params: <BRANCH>: The branch to activate
403  * \li Sample: lyx -x "branch-activate answers" -e pdf2 finalexam.lyx \n
404                could be used to export a pdf with the answers branch included
405                without one's having to open LyX and activate the branch manually.
406  * \li Origin: rgh, 27 May 2008
407  * \endvar
408  */
409                 { LFUN_BRANCH_ACTIVATE, "branch-activate", AtPoint, Buffer },
410
411 /*!
412  * \var lyx::FuncCode lyx::LFUN_BRANCH_ADD
413  * \li Action: Add a branch to the buffer's BranchList.
414  * \li Syntax: branch-add <BRANCH>
415  * \li Params: <BRANCH>: Name of the branch to add
416  * \li Origin: spitz, 7 Jul 2009
417  * \endvar
418  */
419                 { LFUN_BRANCH_ADD, "branch-add", AtPoint, Buffer },
420
421
422
423 /*!
424  * \var lyx::FuncCode lyx::LFUN_BRANCH_ADD_INSERT
425  * \li Action: Create new branch and directly put the branch inset into
426                the document.
427  * \li Syntax: branch-add-insert [<NAME>]
428  * \li Params: <NAME>: Branch name. If it is not specified, you will be asked.
429  * \li Origin: sanda, 10 Jul 2009
430  * \endvar
431  */
432                 { LFUN_BRANCH_ADD_INSERT, "branch-add-insert", Noop, Buffer },
433
434
435
436 /*!
437  * \var lyx::FuncCode lyx::LFUN_BRANCH_DEACTIVATE
438  * \li Action: De-activate the branch.
439  * \li Syntax: branch-deactivate <BRANCH>
440  * \li Params: <BRANCH>: The branch to deactivate
441  * \li Origin: rgh, 27 May 2008
442  * \endvar
443  */
444                 { LFUN_BRANCH_DEACTIVATE, "branch-deactivate", AtPoint, Buffer },
445
446 /*!
447  * \var lyx::FuncCode lyx::LFUN_BRANCH_INSERT
448  * \li Action: Inserts branch inset.
449  * \li Syntax: branch-insert <BRANCH-NAME>
450  * \li Origin: vermeer, 17 Aug 2003
451  * \endvar
452  */
453                 { LFUN_BRANCH_INSERT, "branch-insert", Noop, Edit },
454
455 /*!
456  * \var lyx::FuncCode lyx::LFUN_BRANCH_INVERT
457  * \li Action: Toggles inversion status of branch inset.
458  * \li Syntax: branch-invert
459  * \li Origin: rgheck, 12 July 2016
460  * \endvar
461  */
462                 { LFUN_BRANCH_INVERT, "branch-invert", AtPoint, Buffer },
463
464
465 /*!
466  * \var lyx::FuncCode lyx::LFUN_BRANCH_MASTER_ACTIVATE
467  * \li Action: Activate the branch in the master buffer.
468  * \li Syntax: branch-master-activate <BRANCH>
469  * \li Params: <BRANCH>: The branch to activate
470  * \li Sample: lyx -x "branch-activate answers" -e pdf2 finalexam.lyx \n
471                could be used to export a pdf with the answers branch included
472                without one's having to open LyX and activate the branch manually.
473  * \li Origin: spitz, 30 Sep 2012
474  * \endvar
475  */
476                 { LFUN_BRANCH_MASTER_ACTIVATE, "branch-master-activate", AtPoint, Buffer },
477
478 /*!
479  * \var lyx::FuncCode lyx::LFUN_BRANCH_MASTER_DEACTIVATE
480  * \li Action: De-activate the branch in the master buffer.
481  * \li Syntax: branch-master-deactivate <BRANCH>
482  * \li Params: <BRANCH>: The branch to deactivate
483  * \li Origin: spitz, 30 Sep 2012
484  * \endvar
485  */
486                 { LFUN_BRANCH_MASTER_DEACTIVATE, "branch-master-deactivate", AtPoint, Buffer },
487
488
489 /*!
490  * \var lyx::FuncCode lyx::LFUN_BUFFER_ANONYMIZE
491  * \li Action: For debug purposes only. Convert all [a-zA-Z0-1] characters to
492                single character. Useful when submitting docs to list or bugzilla.
493  * \li Syntax: buffer-anonymize
494  * \li Origin: sanda, Feb 1 2018
495  * \endvar
496  */
497                 { LFUN_BUFFER_ANONYMIZE, "buffer-anonymize", Noop, Edit },
498
499
500 /*!
501  * \var lyx::FuncCode lyx::LFUN_BUFFER_AUTO_SAVE
502  * \li Action: Saves the current buffer to a temporary file.
503  * \li Notion: Saves the current buffer to a file named "#filename#". This LFUN
504                is called automatically by LyX, to "autosave" the current buffer.
505  * \li Syntax: buffer-auto-save
506  * \endvar
507  */
508                 { LFUN_BUFFER_AUTO_SAVE, "buffer-auto-save", Noop, Buffer },
509
510 /*!
511  * \var lyx::FuncCode lyx::LFUN_BUFFER_BEGIN
512  * \li Action: Move the cursor to the beginning of the document.
513  * \li Syntax: buffer-begin
514  * \endvar
515  */
516                 { LFUN_BUFFER_BEGIN, "buffer-begin", ReadOnly, Edit },
517
518 /*!
519  * \var lyx::FuncCode lyx::LFUN_BUFFER_BEGIN_SELECT
520  * \li Action: Move the cursor to the beginning of the document adding the
521                traversed text to the selection.
522  * \li Syntax: buffer-begin-select
523  * \endvar
524  */
525                 { LFUN_BUFFER_BEGIN_SELECT, "buffer-begin-select", ReadOnly, Edit },
526
527 /*!
528  * \var lyx::FuncCode lyx::LFUN_BUFFER_CHILD_OPEN
529  * \li Action: Loads the given child document.
530  * \li Notion: The current document is treated as a parent.
531  * \li Syntax: buffer-child-open <FILE>
532  * \li Params: <FILE>: Filename of the child. The directory of the parent is assumed by default.
533  * \li Origin: Ale, 28 May 1997
534  * \endvar
535  */
536                 { LFUN_BUFFER_CHILD_OPEN, "buffer-child-open", ReadOnly, Buffer },
537
538 /*!
539  * \var lyx::FuncCode lyx::LFUN_BUFFER_CHKTEX
540  * \li Action: Runs chktex for the current document.
541  * \li Syntax: buffer-chktex
542  * \li Origin: Asger, 30 Oct 1997
543  * \endvar
544  */
545                 { LFUN_BUFFER_CHKTEX, "buffer-chktex", ReadOnly, Buffer },
546
547 /*!
548  * \var lyx::FuncCode lyx::LFUN_BUFFER_CLOSE
549  * \li Action: Closes the current buffer.
550  * \li Notion: Closes the current buffer, asking whether to save it, etc,
551                if the buffer has been modified.
552  * \li Syntax: buffer-close
553  * \endvar
554  */
555                 { LFUN_BUFFER_CLOSE, "buffer-close", ReadOnly, Buffer },
556
557 /*!
558  * \var lyx::FuncCode lyx::LFUN_BUFFER_CLOSE_ALL
559  * \li Action: Closes all buffers.
560  * \li Notion: Closes all buffers, asking whether to save it, etc,
561                if a buffer has been modified.
562  * \li Syntax: buffer-close-all
563  * \endvar
564  */
565                 { LFUN_BUFFER_CLOSE_ALL, "buffer-close-all", ReadOnly, Buffer },
566
567 /*!
568  * \var lyx::FuncCode lyx::LFUN_BUFFER_END
569  * \li Action: Move the cursor to the end of the document.
570  * \li Syntax: buffer-end
571  * \endvar
572  */
573                 { LFUN_BUFFER_END, "buffer-end", ReadOnly, Edit },
574
575 /*!
576  * \var lyx::FuncCode lyx::LFUN_BUFFER_END_SELECT
577  * \li Action: Move the cursor to the end of the document adding the
578                traversed text to the selection.
579  * \li Syntax: buffer-end-select
580  * \endvar
581  */
582                 { LFUN_BUFFER_END_SELECT, "buffer-end-select", ReadOnly, Edit },
583
584
585 /*!
586  * \var lyx::FuncCode lyx::LFUN_BUFFER_EXPORT
587  * \li Action: Exports the current buffer (document) to the given format.
588  * \li Syntax: buffer-export [<FORMAT>] [<DEST>]
589  * \li Params: <FORMAT> is either "custom" or one of the formats which you
590                         can find in Tools->Preferences->File formats->Format.
591                         Usual format you will enter is "pdf2" (pdflatex),
592                         "pdflatex" (plain tex for pdflatex) or "ps" for postscript.\n
593                         In case of "custom" you will be asked for a format you
594                         want to start from and for the command that you want to
595                         apply to this format. Internally the control is then passed
596                         to #LFUN_BUFFER_EXPORT_CUSTOM.\n
597                         If absent or "default", then the default output format of the
598                         document is used.\n
599                <DEST>   If present, this argument provides the export destination
600                         filename. Its containing folder will also be the destination
601                         folder, where all the needed external files will be copied.
602  * \li Origin: Lgb, 29 Jul 1997
603  * \endvar
604  */
605                 { LFUN_BUFFER_EXPORT, "buffer-export", ReadOnly, Buffer },
606
607 /*!
608  * \var lyx::FuncCode lyx::LFUN_BUFFER_EXPORT_AS
609  * \li Action: Opens a dialog for exporting the current buffer.
610  * \li Syntax: buffer-export-as [<FORMAT>]
611  * \li Params: <FORMAT> is the export format initially selected in the dialog.
612  *                      You can pass any of the formats which you can find in
613  *                      Tools->Preferences->File formats->Format, provided it
614  *                      has the "document" flag set. If no format is specified
615  *                      the dialog will start with the default output format of
616  *                      the current document.
617  * \li Sample: buffer-export-as pdf2
618  * \li Origin: tommaso, 6 Oct 2011
619  * \endvar
620  */
621                 { LFUN_BUFFER_EXPORT_AS, "buffer-export-as", ReadOnly, Buffer },
622
623 /*!
624  * \var lyx::FuncCode lyx::LFUN_BUFFER_EXPORT_CUSTOM
625  * \li Action: Exports the current buffer (document) from the given format using
626                the given command on it.
627  * \li Syntax: buffer-export-custom <FORMAT> <COMMAND>
628  * \li Params: <FORMAT> format to start from (LyX will care to produce such
629                         intermediate file).\n
630                <COMMAND> this command will be launched on the file. Note that you can
631                          use "$$FName" string to qualify the intermediate file.
632  * \li Sample: buffer-export-custom dvi dvips -f $$FName -o myfile.ps
633  * \li Origin: leeming, 27 Mar 2004
634  * \endvar
635  */
636                 { LFUN_BUFFER_EXPORT_CUSTOM, "buffer-export-custom", ReadOnly, Buffer },
637
638 /*!
639  * \var lyx::FuncCode lyx::LFUN_BUFFER_FORALL
640  * \li Action: Applies a command to all non-hidden buffers.
641  * \li Notion: a buffer is `hidden' if it is internally open in LyX, but not
642                visible in any window.
643  * \li Syntax: buffer-forall <LFUN-COMMAND>
644  * \li Params: <LFUN-COMMAND>: The command to be applied to the buffers.
645  * \li Sample: Close all Notes in buffers: \n
646                buffer-forall inset-forall Note inset-toggle close \n
647                Toggle change tracking on buffers: \n
648                buffer-forall changes-track \n
649                Toggle read-only for buffers: \n
650                buffer-forall buffer-toggle-read-only \n
651                Show statistics for individual buffers: \n
652                buffer-forall statistics \n
653                Activate the branch named "Solutions" in buffers: \n
654                buffer-forall branch-activate Solutions \n
655                Export buffers to PDF (pdflatex): \n
656                buffer-forall buffer-export pdf2 \n
657  * \li Origin: skostysh, 20 Jul 2012
658  * \endvar
659  */
660                 { LFUN_BUFFER_FORALL, "buffer-forall", ReadOnly | Argument, Buffer },
661
662 /*!
663  * \var lyx::FuncCode lyx::LFUN_BUFFER_IMPORT
664  * \li Action: Import a given file as a lyx document.
665  * \li Notion: File can be imported iff lyx file format is (transitively) reachable via
666                defined converters in preferences. Look in the File->Import menu to get
667                an idea of the currently active import formats.
668  * \li Syntax: buffer-import <FORMAT> [<FILE>]
669  * \li Origin: Asger, 24 Jul 1998
670  * \endvar
671  */
672                 { LFUN_BUFFER_IMPORT, "buffer-import", NoBuffer, Buffer },
673
674 /*!
675  * \var lyx::FuncCode lyx::LFUN_BUFFER_LANGUAGE
676  * \li Action: Set language of the current document.
677  * \li Syntax: buffer-language <LANG>
678  * \li Params: <LANG>: language name. See lib/languages for list.
679  * \li Origin: leeming, 30 Mar 2004
680  * \endvar
681  */
682                 { LFUN_BUFFER_LANGUAGE, "buffer-language", Noop, Buffer },
683
684 /*!
685  * \var lyx::FuncCode lyx::LFUN_BUFFER_MOVE_NEXT
686  * \li Action: Moves the current tab one spot to the right.
687  * \li Syntax: buffer-move-next
688  * \li Origin: skostysh, 7 Apr 2015
689  * \endvar
690  */
691                 { LFUN_BUFFER_MOVE_NEXT, "buffer-move-next", ReadOnly, Buffer },
692
693 /*!
694  * \var lyx::FuncCode lyx::LFUN_BUFFER_MOVE_PREVIOUS
695  * \li Action: Moves the current tab one spot to the left.
696  * \li Syntax: buffer-move-previous
697  * \li Origin: skostysh, 7 Apr 2015
698  * \endvar
699  */
700                 { LFUN_BUFFER_MOVE_PREVIOUS, "buffer-move-previous", ReadOnly, Buffer },
701
702 /*!
703  * \var lyx::FuncCode lyx::LFUN_BUFFER_NEW
704  * \li Action: Creates a new buffer (that is, document) and switches to it.
705  * \li Notion: Implicit path can be set in Preferences dialog.
706  * \li Syntax: buffer-new [<FILE>]
707  * \li Params: <FILE>: filename of created file with absolute path.
708  * \endvar
709  */
710                 { LFUN_BUFFER_NEW, "buffer-new", NoBuffer, Buffer },
711
712 /*!
713  * \var lyx::FuncCode lyx::LFUN_BUFFER_NEW_TEMPLATE
714  * \li Action: Creates a new buffer (that is, document) from a template.
715  * \li Notion: Path for new files and templates can be set in Preferences dialog.
716                Template will be asked for via Open-dialog.
717  * \li Syntax: buffer-new-template [<FILE>] [<TEMPLATE FILE>]
718  * \li Params: <FILE>: filename of created file with absolute path. If empty
719  *                     or "newfile", a file with appropriate name is generated.
720  *             <TEMPLATE FILE>: filename of template with absolute path. If empty,
721  *                              a dialog is opened to select the new file.
722  * \endvar
723  */
724                 { LFUN_BUFFER_NEW_TEMPLATE,"buffer-new-template", NoBuffer, Buffer },
725
726 /*!
727  * \var lyx::FuncCode lyx::LFUN_BUFFER_NEXT
728  * \li Action: Switch to the next opened document.
729  * \li Notion: Note that this does not necessarily mean next in tabbar
730                (for full list see View menu).
731  * \li Syntax: buffer-next
732  * \endvar
733  */
734                 { LFUN_BUFFER_NEXT, "buffer-next", ReadOnly, Buffer },
735
736 /*!
737  * \var lyx::FuncCode lyx::LFUN_BUFFER_PARAMS_APPLY
738  * \li Action: Apply the given settings to the current document.
739  * \li Syntax: buffer-params-apply [<ARGS>]
740  * \li Params: <ARGS>: contains the particular settings to be saved. They obey the syntax
741                        you can find in document header of usual .lyx file.
742  * \li Origin: leeming, 30 Mar 2004
743  * \endvar
744  */
745                 { LFUN_BUFFER_PARAMS_APPLY, "buffer-params-apply", NoInternal, Buffer },
746
747
748 /*!
749  * \var lyx::FuncCode lyx::LFUN_BUFFER_PREVIOUS
750  * \li Action: Switch to the previous opened document.
751  * \li Syntax: buffer-previous
752  * \endvar
753  */
754                 { LFUN_BUFFER_PREVIOUS, "buffer-previous", ReadOnly, Buffer },
755
756 /*!
757  * \var lyx::FuncCode lyx::LFUN_BUFFER_RELOAD
758  * \li Action: Reverts opened document.
759  * \li Syntax: buffer-reload [dump]
760  * \li Params: dump: do not ask for any confirmation, just reload. All changes will be lost.
761  * \li Origin: Asger, 2 Feb 1997
762  * \endvar
763  */
764                 { LFUN_BUFFER_RELOAD, "buffer-reload", ReadOnly, Buffer },
765
766 /*!
767  * \var lyx::FuncCode lyx::LFUN_BUFFER_RESET_EXPORT
768  * \li Action: Removes the auxiliary file before next export to assure export is done afresh.
769  * \li Syntax: buffer-reset-export
770  * \li Origin: spitz, 27 Dec 2019
771  * \endvar
772  */
773                 { LFUN_BUFFER_RESET_EXPORT, "buffer-reset-export", ReadOnly, Buffer },
774
775 /*!
776  * \var lyx::FuncCode lyx::LFUN_BUFFER_SAVE_AS_DEFAULT
777  * \li Action: Save the current document settings as default.
778  * \li Notion: The file will will be saved into ~/.lyx/templates/defaults.lyx .
779  * \li Syntax: buffer-save-as-default [<ARGS>]
780  * \li Params: <ARGS>: contains the particular settings to be saved. They obey the syntax
781                        you can find in document header of usual .lyx file.
782  * \li Origin: leeming, 30 Mar 2004
783  * \endvar
784  */
785                 { LFUN_BUFFER_SAVE_AS_DEFAULT, "buffer-save-as-default", Noop, Buffer },
786
787 /*!
788  * \var lyx::FuncCode lyx::LFUN_BUFFER_SWITCH
789  * \li Action: Display and switch to the given buffer.
790  * \li Syntax: buffer-switch <BUFFER>
791  * \li Params: <BUFFER>: path and filename of already opened (but possibly hidden)
792                          document which is to be shown.
793  * \endvar
794  */
795                 { LFUN_BUFFER_SWITCH, "buffer-switch", NoBuffer | ReadOnly, Buffer },
796
797 /*!
798  * \var lyx::FuncCode lyx::LFUN_BUFFER_TOGGLE_COMPRESSION
799  * \li Action: Toggles compression of the current document on/off.
800  * \li Syntax: buffer-toggle-compression
801  * \li Origin: bpeng, 27 Apr 2006
802  * \endvar
803  */
804                 { LFUN_BUFFER_TOGGLE_COMPRESSION, "buffer-toggle-compression", Noop, Buffer },
805
806 /*!
807  * \var lyx::FuncCode lyx::LFUN_BUFFER_TOGGLE_OUTPUT_SYNC
808  * \li Action: Toggles including of resources for forward/reverse search of the given document.
809  * \li Notion: When toggled on, SyncTeX is invoked for PDF, while srcltx package
810                is used for DVI. Custom LaTeX macro can be defined in preferences.
811  * \li Syntax: buffer-toggle-output-sync
812  * \li Origin: sanda, 25 May 2010
813  * \endvar
814  */
815                 { LFUN_BUFFER_TOGGLE_OUTPUT_SYNC, "buffer-toggle-output-sync", Noop, System },
816
817 /*!
818  * \var lyx::FuncCode lyx::LFUN_BUFFER_TOGGLE_READ_ONLY
819  * \li Action: Toggle editing mode of the current document between read/write and read-only.
820  * \li Notion: This function is not allowed if the file is under version control, since
821                read-only flag is often used in version control file locking.
822  * \li Syntax: buffer-toggle-read-only
823  * \li Origin: Lgb, 27 May 1997
824  * \endvar
825  */
826                 { LFUN_BUFFER_TOGGLE_READ_ONLY, "buffer-toggle-read-only", ReadOnly, Buffer },
827
828 /*!
829  * \var lyx::FuncCode lyx::LFUN_BUFFER_UPDATE
830  * \li Action: Exports the current document and put the result into the
831                temporary directory.
832  * \li Notion: In case you are already viewing the exported document (see #LFUN_BUFFER_VIEW)
833                the output will be rewritten - updated. This is useful in case your viewer
834                is able to detect such changes (e.g. ghostview for postscript).
835  * \li Syntax: buffer-update [<FORMAT>]
836  * \li Params: <FORMAT>: The format to display, where this is one of the
837                          formats defined (in the current GUI) in the
838                          Tools>Preferences>File Formats dialog.
839                          If no format is given, the default format as
840                          specified in the same dialog is used.
841  * \li Origin: Dekel, 5 Aug 2000
842  * \endvar
843  */
844                 { LFUN_BUFFER_UPDATE, "buffer-update", ReadOnly, Buffer },
845
846
847 /*!
848  * \var lyx::FuncCode lyx::LFUN_BUFFER_VIEW
849  * \li Action: Displays current buffer in chosen format.
850  * \li Notion: Displays the contents of the current buffer in the chosen
851                format, for example, PDF or DVI. This runs the necessary
852                converter, calls the defined viewer, and so forth.
853  * \li Syntax: buffer-view [<FORMAT>]
854  * \li Params: <FORMAT>: The format to display, where this is one of the
855                          formats defined (in the current GUI) in the
856                          Tools>Preferences>File Formats dialog.
857                          If no format is given, the default format as
858                          specified in the same dialog is used.
859  * \endvar
860  */
861                 { LFUN_BUFFER_VIEW, "buffer-view", ReadOnly, Buffer },
862
863 /*!
864  * \var lyx::FuncCode lyx::LFUN_BUFFER_VIEW_CACHE
865  * \li Action: Opens the file that was created from last preview of this buffer.
866  * \li Notion: This LFUN is called by the "Show Output Anyway" button in the LaTeX
867  *             Errors dialog. It can also be called by the user, which is useful
868  *             if the document takes a long time to compile, and you just
869  *             want to see the last previewed version.
870  * \li Syntax: buffer-view-cache
871  * \endvar
872  */
873                 { LFUN_BUFFER_VIEW_CACHE, "buffer-view-cache", ReadOnly, Buffer },
874
875 /*!
876  * \var lyx::FuncCode lyx::LFUN_BUFFER_WRITE
877  * \li Action: Saves the current buffer.
878  * \li Notion: Saves the current buffer to disk, using the filename that
879                is already associated with the buffer, asking for one if
880                none is yet assigned.
881  * \li Syntax: buffer-write [force]
882  * \li Params: force: write even if buffer is clean.
883  * \endvar
884  */
885                 { LFUN_BUFFER_WRITE, "buffer-write", ReadOnly, Buffer },
886
887 /*!
888  * \var lyx::FuncCode lyx::LFUN_BUFFER_WRITE_ALL
889  * \li Action: Save all changed documents.
890  * \li Syntax: buffer-write-all
891  * \li Origin: rgh, gpothier 6 Aug 2007
892  * \endvar
893  */
894                 { LFUN_BUFFER_WRITE_ALL, "buffer-write-all", ReadOnly, Buffer },
895
896 /*!
897  * \var lyx::FuncCode lyx::LFUN_BUFFER_WRITE_AS
898  * \li Action: Rename and save current buffer.
899  * \li Syntax: buffer-write-as <FILENAME>
900  * \li Params: <FILENAME>: New name of the buffer/file. A relative path
901                is with respect to the original location of the buffer/file.
902  * \endvar
903  */
904                 { LFUN_BUFFER_WRITE_AS, "buffer-write-as", ReadOnly, Buffer },
905
906 /*!
907  * \var lyx::FuncCode lyx::LFUN_BUFFER_WRITE_AS_TEMPLATE
908  * \li Action: Rename and save current buffer in the local templates directory.
909  * \li Syntax: buffer-write-as-template <FILENAME>
910  * \li Params: <FILENAME>: New name of the buffer/file. A relative path
911                is with respect to the original location of the buffer/file.
912  * \endvar
913  */
914                 { LFUN_BUFFER_WRITE_AS_TEMPLATE, "buffer-write-as-template", ReadOnly, Buffer },
915
916
917 /*!
918  * \var lyx::FuncCode lyx::LFUN_BUFFER_EXTERNAL_MODIFICATION_CLEAR
919  * \li Action: Clear the external modification flag on the current buffer.
920  * \li Syntax: buffer-external-modification-clear
921  * \li Origin: gm, 2 March 2017
922  * \endvar
923  */
924                 { LFUN_BUFFER_EXTERNAL_MODIFICATION_CLEAR,
925                   "buffer-external-modification-clear", ReadOnly, Buffer },
926
927 /*!
928 * \var lyx::FuncCode lyx::LFUN_BUFFER_ZOOM
929 * \li Action: Sets the zoom of the screen fonts.
930 * \li Syntax: buffer-zoom [<ZOOM>]
931 * \li Params: <ZOOM>: The target zoom value in %;
932 *                     the default is the default zoom as saved in preferences.
933 * \li Origin: daniel, 28 Oct 2016
934 * \endvar
935 */
936                 { LFUN_BUFFER_ZOOM, "buffer-zoom", ReadOnly, Buffer },
937
938 /*!
939  * \var lyx::FuncCode lyx::LFUN_BUFFER_ZOOM_IN
940  * \li Action: Increases the zoom of the screen fonts.
941  * \li Syntax: buffer-zoom-in [<ZOOM>]
942  * \li Params: <ZOOM>: The zoom value addition in % (neg. or pos.);
943  *                     the default is 10% of the default zoom as saved in preferences.
944  * \li Origin: vfr, 30 Mar 2009
945  * \endvar
946  */
947                 { LFUN_BUFFER_ZOOM_IN, "buffer-zoom-in", ReadOnly, Buffer },
948
949
950 /*!
951  * \var lyx::FuncCode lyx::LFUN_BUFFER_ZOOM_OUT
952  * \li Action: Decreases the zoom of the screen fonts.
953  * \li Syntax: buffer-zoom-out [<ZOOM>]
954  * \li Params: <ZOOM>: The zoom value abstraction in % (neg. or pos.);
955  *                     the default is 10% of the default zoom as saved in preferences.
956  * \li Origin: vfr, 30 Mar 2009
957  * \endvar
958  */
959                 { LFUN_BUFFER_ZOOM_OUT, "buffer-zoom-out", ReadOnly, Buffer },
960
961
962 /*!
963  * \var lyx::FuncCode lyx::LFUN_BUILD_PROGRAM
964  * \li Action: Generates the code (literate programming).
965  * \li Notion: Latex file with extension \literate_extension is generated.
966                Then LyX invokes \build_command (with a default of ``make'') to generate the code and
967                \build_error_filter to process the compilation error messages. \n
968                In case you want to process your literate file with a script, or some other program,
969                just insert in your lyxrc file an entry with:\n
970                \build_command "my_script my_arguments" \n
971                The \build_error_filter differs from the \literate_error_filter only in that the
972                former will identify error messages from your compiler.
973  * \li Syntax: build-program
974  * \endvar
975  */
976                 { LFUN_BUILD_PROGRAM, "build-program", ReadOnly, Buffer },
977
978
979 /*!
980  * \var lyx::FuncCode lyx::LFUN_CALL
981  * \li Action: Executes a command defined in a .def file.
982  * \li Notion: The definitions are by default read from lib/commands/default.def.\n
983                A .def file allows to define a command with \define "<NAME>" "<LFUN>"
984                where <NAME> is the name of the new command and <LFUN> is the lfun code
985                to be executed (see e.g. #LFUN_COMMAND_SEQUENCE).
986                \def_file "FileName" allows to include another .def file. \n
987                This is particularly useful in connection with toolbar buttons:
988                Since the name of the button image for this lfun is
989                lib/images/commands/<NAME>.png this is the way to assign an image
990                to a complex command-sequence.
991  * \li Syntax: call <NAME>
992  * \li Params: <NAME>: Name of the command that must be called.
993  * \li Origin: broider, 2 Oct 2007
994  * \endvar
995  */
996                 { LFUN_CALL, "call", NoBuffer, System },
997
998 /*!
999  * \var lyx::FuncCode lyx::LFUN_CANCEL
1000  * \li Action: Cancels sequence prepared by #LFUN_META_PREFIX .
1001  * \li Syntax: cancel
1002  * \endvar
1003  */
1004                 { LFUN_CANCEL, "cancel", NoBuffer, System },
1005
1006
1007 /*!
1008  * \var lyx::FuncCode lyx::LFUN_CAPTION_INSERT
1009  * \li Action: Inserts a caption inset.
1010  * \li Syntax: caption-insert
1011  * \li Origin: Lgb, 18 Jul 2000
1012  * \endvar
1013  */
1014                 { LFUN_CAPTION_INSERT, "caption-insert", Noop, Edit },
1015
1016 /*!
1017  * \var lyx::FuncCode lyx::LFUN_CELL_BACKWARD
1018  * \li Action: Moves the cursor to the previous cell inside the table.
1019  * \li Syntax: cell-backward
1020  * \li Origin: Jug, 22 May 2000
1021  * \endvar
1022  */
1023                 { LFUN_CELL_BACKWARD, "cell-backward", ReadOnly | NoUpdate, Edit },
1024
1025 /*!
1026  * \var lyx::FuncCode lyx::LFUN_CELL_FORWARD
1027  * \li Action: Moves the cursor to the next cell inside the table.
1028  * \li Syntax: cell-forward
1029  * \endvar
1030  */
1031                 { LFUN_CELL_FORWARD, "cell-forward", ReadOnly | NoUpdate, Edit },
1032
1033 /*!
1034  * \var lyx::FuncCode lyx::LFUN_CELL_SPLIT
1035  * \li Action: Splits cell and shifts right part to the next cell (inside the math grid).
1036  * \li Syntax: cell-split
1037  * \li Origin: Ale, 15 May 1997
1038  * \endvar
1039  */
1040                 { LFUN_CELL_SPLIT, "cell-split", Noop, Edit },
1041
1042
1043 /*!
1044  * \var lyx::FuncCode lyx::LFUN_CHANGES_MERGE
1045  * \li Action: Open change tracking dialog for merging and moves the cursor
1046                to the position of the next change.
1047  * \li Syntax: changes-merge
1048  * \li Origin: Levon, 16 Oct 2002
1049  * \endvar
1050  */
1051                 { LFUN_CHANGES_MERGE, "changes-merge", ReadOnly, Edit },
1052
1053 /*!
1054  * \var lyx::FuncCode lyx::LFUN_CHANGES_OUTPUT
1055  * \li Action: Toggles showing of change tracking in typeset output.
1056  * \li Syntax: changes-output
1057  * \li Origin: spitz, 21 Jan 2005
1058  * \endvar
1059  */
1060                 { LFUN_CHANGES_OUTPUT, "changes-output", Noop, Edit },
1061
1062 /*!
1063  * \var lyx::FuncCode lyx::LFUN_CHANGES_TRACK
1064  * \li Action: Toggles change tracking to on/off.
1065  * \li Syntax: changes-track
1066  * \li Origin: levon, 1 Oct 2002
1067  * \endvar
1068  */
1069                 { LFUN_CHANGES_TRACK, "changes-track", Noop, Edit },
1070
1071 /*!
1072  * \var lyx::FuncCode lyx::LFUN_CHANGE_ACCEPT
1073  * \li Action: Accepts tracked change inside the selection.
1074  * \li Syntax: change-accept
1075  * \li Origin: Levon, 16 Oct 2002
1076  * \endvar
1077  */
1078                 { LFUN_CHANGE_ACCEPT, "change-accept", Noop, Edit },
1079
1080 /*!
1081  * \var lyx::FuncCode lyx::LFUN_CHANGE_NEXT
1082  * \li Action: Moves the cursor to the position of the next change
1083                of the change tracking records.
1084  * \li Syntax: change-next
1085  * \li Origin: schmitt, 4 Oct 2006
1086  * \endvar
1087  */
1088                 { LFUN_CHANGE_NEXT, "change-next", ReadOnly, Edit },
1089
1090 /*!
1091  * \var lyx::FuncCode lyx::LFUN_CHANGE_PREVIOUS
1092  * \li Action: Moves the cursor to the position of the previous change
1093                of the change tracking records.
1094  * \li Syntax: change-previous
1095  * \li Origin: vfr, 4 Apr 2009
1096  * \endvar
1097  */
1098                 { LFUN_CHANGE_PREVIOUS, "change-previous", ReadOnly, Edit },
1099
1100 /*!
1101  * \var lyx::FuncCode lyx::LFUN_CHANGE_REJECT
1102  * \li Action: Rejects tracked change inside the selection.
1103  * \li Syntax: change-reject
1104  * \li Origin: Levon, 16 Oct 2002
1105  * \endvar
1106  */
1107                 { LFUN_CHANGE_REJECT, "change-reject", Noop, Edit },
1108
1109 /*!
1110  * \var lyx::FuncCode lyx::LFUN_CHARS_TRANSPOSE
1111  * \li Action: Transposes the character at the cursor with the one before it.
1112  * \li Syntax: chars-transpose
1113  * \li Origin: Lgb, 25 Apr 2001
1114  * \endvar
1115  */
1116                 { LFUN_CHARS_TRANSPOSE, "chars-transpose", Noop, Edit },
1117
1118
1119 /*!
1120  * \var lyx::FuncCode lyx::LFUN_CHAR_BACKWARD
1121  * \li Action: Moves the cursor one position logically backwards.
1122  * \li Notion: This is not the action which should be bound to the arrow keys,
1123                because backwards may be left or right, depending on the
1124                language. The arrow keys should be bound to #LFUN_CHAR_LEFT or
1125                #LFUN_CHAR_RIGHT actions, which in turn may employ this one.
1126  * \li Syntax: char-backward
1127  * \endvar
1128  */
1129                 { LFUN_CHAR_BACKWARD, "char-backward", ReadOnly | NoUpdate, Edit },
1130
1131 /*!
1132  * \var lyx::FuncCode lyx::LFUN_CHAR_BACKWARD_SELECT
1133  * \li Action: Moves the cursor one position logically backwards, adding
1134                traversed position to the selection.
1135  * \li Notion: See also #LFUN_CHAR_BACKWARD.
1136  * \li Syntax: char-backward-select
1137  * \endvar
1138  */
1139                 { LFUN_CHAR_BACKWARD_SELECT, "char-backward-select", ReadOnly | SingleParUpdate, Edit },
1140
1141 /*!
1142  * \var lyx::FuncCode lyx::LFUN_CHAR_DELETE_BACKWARD
1143  * \li Action: Deletes one character in the backward direction (usually the "BackSpace" key).
1144  * \li Syntax: char-delete-backward [force]
1145  * \li Params: force: Delete big insets, do not only select them.
1146  * \endvar
1147  */
1148                 { LFUN_CHAR_DELETE_BACKWARD, "char-delete-backward", SingleParUpdate, Edit },
1149
1150 /*!
1151  * \var lyx::FuncCode lyx::LFUN_CHAR_DELETE_FORWARD
1152  * \li Action: Deletes one character in the backward direction (usually the "Delete" key).
1153  * \li Syntax: char-delete-forward [force]
1154  * \li Params: force: Delete big insets, do not only select them.
1155  * \endvar
1156  */
1157                 { LFUN_CHAR_DELETE_FORWARD, "char-delete-forward", SingleParUpdate, Edit },
1158
1159 /*!
1160  * \var lyx::FuncCode lyx::LFUN_CHAR_FORWARD
1161  * \li Action: Moves the cursor one position logically forward.
1162  * \li Notion: This is not the action which should be bound to the arrow keys,
1163                because forward may be left or right, depending on the language.
1164                The arrow keys should be bound to #LFUN_CHAR_LEFT or
1165                #LFUN_CHAR_RIGHT actions, which in turn may employ this one.
1166  * \li Syntax: char-forward
1167  * \endvar
1168  */
1169                 { LFUN_CHAR_FORWARD, "char-forward", ReadOnly | NoUpdate, Edit },
1170
1171 /*!
1172  * \var lyx::FuncCode lyx::LFUN_CHAR_FORWARD_SELECT
1173  * \li Action: Moves the cursor one position logically forward, adding
1174                traversed position to the selection.
1175  * \li Notion: See also #LFUN_CHAR_FORWARD.
1176  * \li Syntax: char-forward-select
1177  * \endvar
1178  */
1179                 { LFUN_CHAR_FORWARD_SELECT, "char-forward-select", ReadOnly | SingleParUpdate, Edit },
1180
1181 /*!
1182  * \var lyx::FuncCode lyx::LFUN_CHAR_LEFT
1183  * \li Action: Moves the cursor one position "to the left".
1184  * \li Notion: This is the action which should be taken when the "left" key
1185                is pressed. Generally, it moves the cursor one position to the
1186                left. However, in Bidi text this become slightly more
1187                complicated, and there are different modes of cursor movement.
1188                In "visual mode", this moves left, plain and simple. In "logical
1189                mode", movement is logically forward in RTL paragraphs, and
1190                logically backwards in LTR paragraphs.
1191  * \li Syntax: char-left
1192  * \endvar
1193  */
1194                 { LFUN_CHAR_LEFT, "char-left", ReadOnly | NoUpdate, Edit },
1195
1196 /*!
1197  * \var lyx::FuncCode lyx::LFUN_CHAR_LEFT_SELECT
1198  * \li Action: Moves the cursor one position "to the left", adding
1199                traversed position to the selection.
1200  * \li Notion: See also #LFUN_CHAR_LEFT for exact details of the movement.
1201  * \li Syntax: char-left-select
1202  * \endvar
1203  */
1204                 { LFUN_CHAR_LEFT_SELECT, "char-left-select", ReadOnly | SingleParUpdate, Edit },
1205
1206 /*!
1207  * \var lyx::FuncCode lyx::LFUN_CHAR_RIGHT
1208  * \li Action: Moves the cursor one position "to the right".
1209  * \li Notion: This is the action which should be taken when the "right" key
1210                is pressed. Generally, it moves the cursor one position to the
1211                right. However, in Bidi text this become slightly more
1212                complicated, and there are different modes of cursor movement.
1213                In "visual mode", this moves right, plain and simple. In "logical
1214                mode", movement is logically forward in LTR paragraphs, and
1215                logically backwards in RTL paragraphs.
1216  * \li Syntax: char-right
1217  * \endvar
1218  */
1219                 { LFUN_CHAR_RIGHT, "char-right", ReadOnly | NoUpdate, Edit },
1220
1221 /*!
1222  * \var lyx::FuncCode lyx::LFUN_CHAR_RIGHT_SELECT
1223  * \li Action: Moves the cursor one position "to the right", adding
1224                traversed position to the selection.
1225  * \li Notion: See also #LFUN_CHAR_RIGHT for exact details of the movement.
1226  * \li Syntax: char-right-select
1227  * \endvar
1228  */
1229                 { LFUN_CHAR_RIGHT_SELECT, "char-right-select", ReadOnly | SingleParUpdate, Edit },
1230
1231
1232 /*!
1233  * \var lyx::FuncCode lyx::LFUN_CITATION_INSERT
1234  * \li Action: Inserts citation from loaded citation database.
1235  * \li Syntax: citation-insert [<KEY>[|<TEXT_BEFORE>]]
1236  * \li Params: <KEY>: Citation (shortcut listed in available citations). \n
1237                <TEXT_BEFORE>: text which should appear before citation.
1238  * \li Origin: AAS, 97-02-23
1239  * \endvar
1240  */
1241                 { LFUN_CITATION_INSERT, "citation-insert", Noop, Edit },
1242 /*!
1243  * \var lyx::FuncCode lyx::LFUN_CITATION_OPEN
1244  * \li Action: Opens the corresponding pdf/url for a given citation inset.
1245  * \li Syntax: citation-open [EXTERNAL] TARGET
1246  * \li Params: <TARGET>: URL (https:,file:) of the document. \n
1247                <EXTERNAL>: Use external executable script for finding target \n
1248                and launching viewer. In this case TARGET consists of author and year \n
1249                and will be passed as an input argument to the script.
1250  * \li Origin: Sanda, 16 Aug 2020
1251  * \endvar
1252  */
1253                 { LFUN_CITATION_OPEN, "citation-open", ReadOnly | NoUpdate | Argument, Edit },
1254
1255 /*!
1256  * \var lyx::FuncCode lyx::LFUN_CLIPBOARD_PASTE
1257  * \li Action: Pastes text from the active clipboard (retains formatting if the
1258                clipboard contains formatted text). Pastes plain text if plain text is
1259                on the clipboard, but tries to interpret it in special ways for certain
1260                insets, e.g. converting csv data to rows and columns if the paste happens
1261                in a tabular inset.
1262  * \li Notion: Historically, LFUN_CLIPBOARD_PASTE was introduced as a counterpart of
1263                LFUN_PRIMARY_SELECTION_PASTE: It behaved exactly the same, but the source
1264                is the clipboard, not the selection.
1265  * \li Syntax: clipboard-paste [<ARG>]
1266  * \li Params: <ARG>: "paragraph" will cause pasting as one paragraph, i.e. "Join lines".
1267  * \li Origin: Georg, 10 Jul 2006
1268  * \endvar
1269  */
1270                 { LFUN_CLIPBOARD_PASTE, "clipboard-paste", Noop, Edit },
1271
1272 /*!
1273  * \var lyx::FuncCode lyx::LFUN_CLIPBOARD_PASTE_SIMPLE
1274  * \li Action: Pastes plain text from the active clipboard even if formatted
1275                LyX content is in the clipboard. Pastes plain text if plain text
1276                is on the clipboard, without trying to interpret it in special
1277                ways for certain insets, e.g. converting csv data to rows and
1278                columns if the paste happens in a tabular inset.
1279  * \li Syntax: clipboard-paste-simple [<ARG>]
1280  * \li Params: <ARG>: "paragraph" will cause pasting as one paragraph, i.e. "Join lines".
1281  * \endvar
1282  */
1283                 { LFUN_CLIPBOARD_PASTE_SIMPLE, "clipboard-paste-simple", Noop, Edit },
1284
1285 /*!
1286  * \var lyx::FuncCode lyx::LFUN_COMMAND_ALTERNATIVES
1287  * \li Action: Runs the first listed command that is enabled.
1288  * \li Notion: This can be used to bind multiple functions to a single key,
1289                and then which one is used will depend upon the context.
1290  * \li Syntax: command-alternatives <CMDS>
1291  * \li Params: <CMDS>: Sequence of commands separated by semicolons.
1292  * \li Sample: command-alternatives completion-accept;cell-forward
1293  * \li Origin: rgh, 24 September 2008
1294  * \endvar
1295  */
1296                 { LFUN_COMMAND_ALTERNATIVES, "command-alternatives", NoBuffer, System },
1297
1298 /*!
1299  * \var lyx::FuncCode lyx::LFUN_COMMAND_EXECUTE
1300  * \li Action: Switches the focus to the minibuffer so that the user can type
1301                in there. If necessary, it opens the minibuffer toolbar.
1302  * \li Notion: Usually bound to M-x shortcut.
1303  * \li Syntax: command-execute
1304  * \endvar
1305  */
1306                 { LFUN_COMMAND_EXECUTE, "command-execute", NoBuffer, Edit },
1307
1308
1309 /*!
1310  * \var lyx::FuncCode lyx::LFUN_COMMAND_PREFIX
1311  * \li Action: Return the current key sequence and available options as a string.
1312  * \li Notion: No options are added if no current map exists. \n
1313                This is probably usable only with connection to lyxserver.
1314  * \li Syntax: command-prefix
1315  * \endvar
1316  */
1317                 { LFUN_COMMAND_PREFIX, "command-prefix", NoBuffer, Hidden },
1318
1319 /*!
1320  * \var lyx::FuncCode lyx::LFUN_COMMAND_SEQUENCE
1321  * \li Action: Run more commands (LFUN and its parameters) in a sequence.
1322  * \li Syntax: command-sequence <CMDS>
1323  * \li Params: <CMDS>: Sequence of commands separated by semicolons.
1324  * \li Sample: command-sequence cut; ert-insert; self-insert \; paste; self-insert {}; inset-toggle;
1325  * \li Origin: Andre, 11 Nov 1999
1326  * \endvar
1327  */
1328                 { LFUN_COMMAND_SEQUENCE, "command-sequence", NoBuffer, System },
1329
1330 /*!
1331  * \var lyx::FuncCode lyx::LFUN_COMPLETE
1332  * \li Action: Try to complete the word or command at the cursor position.
1333  * \li Syntax: complete
1334  * \li Origin: sts, Feb 19 2008
1335  * \endvar
1336  */
1337                 { LFUN_COMPLETE, "complete", SingleParUpdate, Edit },
1338
1339
1340 /*!
1341  * \var lyx::FuncCode lyx::LFUN_COMPLETION_ACCEPT
1342  * \li Action: Accept suggested completion.
1343  * \li Syntax: completion-accept
1344  * \li Origin: sanda, Sep 08 2008
1345  * \endvar
1346  */
1347                 { LFUN_COMPLETION_ACCEPT, "completion-accept", SingleParUpdate, Edit },
1348
1349
1350
1351 /*!
1352  * \var lyx::FuncCode lyx::LFUN_COMPLETION_CANCEL
1353  * \li Action: Try to cancel completion, either the popup or the inline completion.
1354  * \li Syntax: completion-cancel
1355  * \li Origin: sts, Sep 07 2008
1356  * \endvar
1357  */
1358                 { LFUN_COMPLETION_CANCEL, "completion-cancel", SingleParUpdate, Edit },
1359
1360 /*!
1361  * \var lyx::FuncCode lyx::LFUN_COMPLETION_INLINE
1362  * \li Action: Show the inline completion at the cursor position.
1363  * \li Syntax: completion-inline
1364  * \li Origin: sts, Feb 19 2008
1365  * \endvar
1366  */
1367                 { LFUN_COMPLETION_INLINE, "completion-inline", ReadOnly | NoUpdate, Edit },
1368
1369 /*!
1370  * \var lyx::FuncCode lyx::LFUN_COMPLETION_POPUP
1371  * \li Action: Show the completion popup at the cursor position.
1372  * \li Syntax: completion-popup
1373  * \li Origin: sts, Feb 19 2008
1374  * \endvar
1375  */
1376                 { LFUN_COMPLETION_POPUP, "completion-popup", ReadOnly | NoUpdate, Edit },
1377
1378 /*!
1379  * \var lyx::FuncCode lyx::LFUN_COPY
1380  * \li Action: Copies the current selection to the clipboard.
1381  * \li Syntax: copy
1382  * \endvar
1383  */
1384                 { LFUN_COPY, "copy", ReadOnly, Edit },
1385
1386 /*!
1387  * \var lyx::FuncCode lyx::LFUN_CURSOR_FOLLOWS_SCROLLBAR_TOGGLE
1388  * \li Action: Determine whether to keep cursor inside the editing window regardless
1389                of the scrollbar movement.
1390  * \li Syntax: toggle-cursor-follows-scrollbar
1391  * \li Origin: ARRae, 2 Dec 1997
1392  * \endvar
1393  */
1394                 { LFUN_CURSOR_FOLLOWS_SCROLLBAR_TOGGLE, "cursor-follows-scrollbar-toggle", ReadOnly, System },
1395
1396 /*!
1397  * \var lyx::FuncCode lyx::LFUN_CUT
1398  * \li Action: Cuts to the clipboard.
1399  * \li Syntax: cut
1400  * \endvar
1401  */
1402                 { LFUN_CUT, "cut", Noop, Edit },
1403
1404 /*!
1405  * \var lyx::FuncCode lyx::LFUN_DEBUG_LEVEL_SET
1406  * \li Action: Set debug output level.
1407  * \li Syntax: debug-level-set <LEVEL>
1408  * \li Params: <LEVEL>: comma separated list of levels or the correspondent number
1409                         of their combination. 0 is equivalent to disabling all debug
1410                         events. See lyx -dbg for the current list of debug levels
1411                         and their numbers.
1412  * \li Origin: sanda, 28 Dec 2009
1413  * \endvar
1414  */
1415                 { LFUN_DEBUG_LEVEL_SET, "debug-level-set", NoBuffer, System },
1416
1417
1418 /*!
1419  * \var lyx::FuncCode lyx::LFUN_DEPTH_DECREMENT
1420  * \li Action: Decrease the nesting depth of the (selected) paragraph(s)
1421                inside lists.
1422  * \li Syntax: depth-decrement
1423  * \endvar
1424  */
1425                 { LFUN_DEPTH_DECREMENT, "depth-decrement", Noop, Edit },
1426
1427 /*!
1428  * \var lyx::FuncCode lyx::LFUN_DEPTH_INCREMENT
1429  * \li Action: Increase the nesting depth of the (selected) paragraph(s)
1430                inside lists.
1431  * \li Syntax: depth-increment
1432  * \endvar
1433  */
1434                 { LFUN_DEPTH_INCREMENT, "depth-increment", Noop, Edit },
1435
1436
1437 /*!
1438  * \var lyx::FuncCode lyx::LFUN_DEVEL_MODE_TOGGLE
1439  * \li Action: toggle a mode where more information is given in UI
1440  * \li Syntax: devel-mode-toggle
1441  * \li Notion: in so called "devel" mode, the information given in the
1442  *             status bar is more precise, and the help documents are
1443  *             open in editing mode.
1444  * \li Origin: lasgouttes, 23 Jul 2017
1445  * \endvar
1446  */
1447                 { LFUN_DEVEL_MODE_TOGGLE, "devel-mode-toggle", NoBuffer, System },
1448
1449
1450 /*!
1451  * \var lyx::FuncCode lyx::LFUN_DIALOG_DISCONNECT_INSET
1452  * \li Action: Closes opened connection to opened inset.
1453  * \li Notion: Connection is used for apply functions.
1454  * \li Syntax: dialog-disconnect-inset <INSET-NAME>
1455  * \li Origin: leeming, 25 Feb 2003
1456  * \endvar
1457  */
1458                 { LFUN_DIALOG_DISCONNECT_INSET, "dialog-disconnect-inset", Noop, Edit },
1459
1460
1461 /*!
1462  * \var lyx::FuncCode lyx::LFUN_DIALOG_HIDE
1463  * \li Action: Hides showed dialog. Counterpart to #LFUN_DIALOG_SHOW .
1464  * \li Syntax: dialog-hide <NAME>
1465  * \li Params: See #LFUN_DIALOG_SHOW .
1466  * \li Origin: leeming, 25 Feb 2003
1467  * \endvar
1468  */
1469                 { LFUN_DIALOG_HIDE, "dialog-hide", NoBuffer, Edit },
1470
1471 /*!
1472  * \var lyx::FuncCode lyx::LFUN_DIALOG_SHOW
1473  * \li Action: Shows hidden dialog or creates new one for a given function/inset settings etc.
1474  * \li Syntax: dialog-show <NAME> [<DATA>]
1475  * \li Params: <NAME>: aboutlyx|bibitem|bibtex|box|branch|changes|character|citation|\n
1476                compare|counter|document|errorlist|ert|external|file|findreplace|findreplaceadv|float|\n
1477                graphics|href|include|index|index_print|info|label|line|listings|log|mathdelimiter|\n
1478                mathmatrix|mathspace|nomenclature|nomencl_print|note|paragraph|phantom|prefs|\n
1479                print|ref|sendto|space|spellchecker|symbols|tabular|tabularcreate|\n
1480                thesaurus|texinfo|toc|view-source|vspace|wrap|<SPECIAL> \n
1481                <SPECIAL>: latexlog|vclog \n
1482                <DATA>: data, usually settings for the given dialog. Use debug mode for the
1483                        details.
1484  * \li Origin: leeming, 17 Jun 2003
1485  * \endvar
1486  */
1487                 { LFUN_DIALOG_SHOW, "dialog-show", NoBuffer, Edit },
1488
1489 /*!
1490  * \var lyx::FuncCode lyx::LFUN_DIALOG_SHOW_NEW_INSET
1491  * \li Action: Shows hidden dialog or create new one for a given inset settings etc.
1492  * \li Notion: Internally uses #LFUN_DIALOG_SHOW with processed data for a given inset.
1493  * \li Syntax: dialog-show-new-inset <NAME> [<DATA>]
1494  * \li Params: See #LFUN_DIALOG_SHOW .
1495  * \li Origin: leeming, 25 Feb 2003
1496  * \endvar
1497  */
1498                 { LFUN_DIALOG_SHOW_NEW_INSET, "dialog-show-new-inset", Noop, Edit },
1499
1500 /*!
1501  * \var lyx::FuncCode lyx::LFUN_DIALOG_TOGGLE
1502  * \li Action: Toggles dialog between showed/hidden state.
1503  * \li Notion: Internally uses #LFUN_DIALOG_SHOW , #LFUN_DIALOG_HIDE .
1504  * \li Syntax: dialog-toggle <NAME> [<DATA>]
1505  * \li Params: See #LFUN_DIALOG_SHOW .
1506  * \li Origin: spitz, 30 Apr 2007
1507  * \endvar
1508  */
1509                 { LFUN_DIALOG_TOGGLE, "dialog-toggle", NoBuffer, Edit },
1510
1511 /*!
1512  * \var lyx::FuncCode lyx::LFUN_DIALOG_UPDATE
1513  * \li Action: Updates the dialog values from the inset/paragraph/document.
1514  * \li Syntax: dialog-update <NAME>
1515  * \li Params: <NAME>: paragraph|prefs|<INSET> \n
1516                <INSET>: inset name
1517  * \li Origin: leeming, 25 Feb 2003
1518  * \endvar
1519  */
1520                 { LFUN_DIALOG_UPDATE, "dialog-update", NoBuffer, Edit },
1521
1522 /*!
1523  * \var lyx::FuncCode lyx::LFUN_DOWN
1524  * \li Action: Moves the cursor one line in downward direction.
1525  * \li Syntax: down
1526  * \endvar
1527  */
1528                 { LFUN_DOWN, "down", ReadOnly | NoUpdate, Edit },
1529
1530 /*!
1531  * \var lyx::FuncCode lyx::LFUN_DOWN_SELECT
1532  * \li Action: Moves the cursor one line in downward direction adding the current
1533                position to the selection.
1534  * \li Syntax: down-select
1535  * \endvar
1536  */
1537                 { LFUN_DOWN_SELECT, "down-select", ReadOnly | SingleParUpdate, Edit },
1538
1539 /*!
1540  * \var lyx::FuncCode lyx::LFUN_DROP_LAYOUTS_CHOICE
1541  * \li Action: Displays list of layout choices.
1542  * \li Notion: This LFUN opens the dropbox allowing for choice of layout.
1543  * \li Syntax: drop-layouts-choice
1544  * \endvar
1545  */
1546                 { LFUN_DROP_LAYOUTS_CHOICE, "drop-layouts-choice", ReadOnly, Layout },
1547
1548 /*!
1549  * \var lyx::FuncCode lyx::LFUN_ENVIRONMENT_SPLIT
1550  * \li Action: Splits the current environment with a Separator.
1551  * \li Syntax: environment-split [before|outer|previous]
1552  * \li Params: outer:    If this is given, LyX will split the outermost environment in
1553                          the current nesting hierarchy.\n
1554                previous: If this is given, LyX will split the environment in the previous
1555                          paragraph (if there is one).\n
1556                before:   If this is given, the new environment will be appended rather than
1557                          prepended.
1558  * \li Origin: spitz, 23 Dec 2012
1559  * \endvar
1560  */
1561                 { LFUN_ENVIRONMENT_SPLIT, "environment-split", Noop, Layout },
1562
1563
1564 /*!
1565  * \var lyx::FuncCode lyx::LFUN_ERT_INSERT
1566  * \li Action: Inserts an ERT inset.
1567  * \li Syntax: ert-insert
1568  * \li Origin: Jug, 18 Feb 2000
1569  * \endvar
1570  */
1571                 { LFUN_ERT_INSERT, "ert-insert", Noop, Edit },
1572
1573 /*!
1574  * \var lyx::FuncCode lyx::LFUN_ESCAPE
1575  * \li Action: Clears the selection. If no text is selected call #LFUN_FINISHED_FORWARD.
1576                Inside math mode jumps out of the math inset.
1577  * \li Syntax: escape
1578  * \li Origin: Lgb, 17 May 2001
1579  * \endvar
1580  */
1581                 { LFUN_ESCAPE, "escape", ReadOnly, Edit },
1582
1583 /*!
1584  * \var lyx::FuncCode lyx::LFUN_EXPORT_CANCEL
1585  * \li Action: Cancel background export process.
1586  * \li Syntax: export-cancel
1587  * \li Origin: rgh, 10 December 2017
1588  * \endvar
1589  */
1590                 { LFUN_EXPORT_CANCEL, "export-cancel", ReadOnly | NoUpdate | NoInternal, Edit },
1591
1592 /*!
1593  * \var lyx::FuncCode lyx::LFUN_FILE_INSERT
1594  * \li Action: Inserts another LyX file.
1595  * \li Syntax: file-insert [<FILE>] [ignorelang]
1596  * \li Params: <FILE>: Filename to be inserted.
1597  *             ignorelang: If given, the (main) language of the inserted file
1598  *             is ignored (the context language is used).
1599  * \endvar
1600  */
1601                 { LFUN_FILE_INSERT, "file-insert", Noop, Edit },
1602
1603 /*!
1604  * \var lyx::FuncCode lyx::LFUN_FILE_INSERT_PLAINTEXT
1605  * \li Action: Inserts plain text file.
1606  * \li Syntax: file-insert-plaintext [<FILE>]
1607  * \li Params: <FILE>: Filename to be inserted.
1608  * \li Origin: CFO-G, 19 Nov 1997
1609  * \endvar
1610  */
1611                 { LFUN_FILE_INSERT_PLAINTEXT, "file-insert-plaintext", Noop, Edit },
1612
1613 /*!
1614  * \var lyx::FuncCode lyx::LFUN_FILE_INSERT_PLAINTEXT_PARA
1615  * \li Action: Inserts plain text file as paragraph (i.e. join lines).
1616  * \li Syntax: file-insert-plaintext-para [<FILE>]
1617  * \li Params: <FILE>: Filename to be inserted.
1618  * \li Origin: Levon, 14 Feb 2001
1619  * \endvar
1620  */
1621                 { LFUN_FILE_INSERT_PLAINTEXT_PARA, "file-insert-plaintext-para", Noop, Edit },
1622
1623 /*!
1624  * \var lyx::FuncCode lyx::LFUN_FILE_OPEN
1625  * \li Action: Open LyX document.
1626  * \li Syntax: file-open [<FILE>]
1627  * \li Params: <FILE>: Filename to be opened.
1628  * \endvar
1629  */
1630                 { LFUN_FILE_OPEN, "file-open", NoBuffer, Buffer },
1631
1632
1633 /*!
1634  * \var lyx::FuncCode lyx::LFUN_FINISHED_BACKWARD
1635  * \li Action: Moves the cursor out of the current slice, going backwards.
1636  * \li Notion: See also #LFUN_FINISHED_FORWARD.
1637  * \endvar
1638  */
1639                 { LFUN_FINISHED_BACKWARD, "", ReadOnly, Hidden },
1640
1641 /*!
1642  * \var lyx::FuncCode lyx::LFUN_FINISHED_FORWARD
1643  * \li Action: Moves the cursor out of the current slice, going forward.
1644  * \li Notion: Cursor movement within an inset may be different than cursor
1645                movement in the surrounding text. This action should be called
1646                automatically by the cursor movement within the inset, when
1647                movement within the inset has ceased (reached the end of the
1648                last paragraph, for example), in order to move correctly
1649                back into the surrounding text.
1650  * \endvar
1651  */
1652                 { LFUN_FINISHED_FORWARD, "", ReadOnly, Hidden },
1653
1654 /*!
1655  * \var lyx::FuncCode lyx::LFUN_FINISHED_LEFT
1656  * \li Action: Moves the cursor out of the current slice, going left.
1657  * \li Notion: See also #LFUN_FINISHED_FORWARD.
1658  * \endvar
1659  */
1660                 { LFUN_FINISHED_LEFT, "", ReadOnly, Hidden },
1661
1662
1663 /*!
1664  * \var lyx::FuncCode lyx::LFUN_FINISHED_RIGHT
1665  * \li Action: Moves the cursor out of the current slice, going right.
1666  * \li Notion: See also #LFUN_FINISHED_FORWARD
1667  * \endvar
1668  */
1669                 { LFUN_FINISHED_RIGHT, "", ReadOnly, Hidden },
1670
1671 /*!
1672  * \var lyx::FuncCode lyx::LFUN_FLEX_INSERT
1673  * \li Action: Inserts CharStyle, Custom inset or XML short element.
1674  * \li Notion: Look into the Customization manual for more information about
1675                these elements.\n
1676                To make this command enabled the layout file for the document
1677                class you're using has to load the character styles. There are
1678                a few contained in the Logical Markup module. You can also of
1679                course create some yourself. \n
1680                For dissolving the element see #LFUN_INSET_DISSOLVE.
1681  * \li Syntax: flex-insert Name
1682  * \li Params: Name: This name must be defined either in your layout file
1683                      or imported by some module. The definition is
1684                      InsetLayout Name or InsetLayout <Flex:Name>. The Flex:
1685                      prefix is optional.
1686  * \li Sample: flex-insert Code
1687  * \endvar
1688  */
1689                 { LFUN_FLEX_INSERT, "flex-insert", Noop, Edit },
1690
1691 /*!
1692  * \var lyx::FuncCode lyx::LFUN_FLOAT_INSERT
1693  * \li Action: Inserts a float inset.
1694  * \li Syntax: float-insert <TYPE>
1695  * \li Params: <TYPE>: type of float depends on the used textclass. Usually
1696                        "algorithm", "table", "figure" parameters can be given.
1697  * \li Origin: Lgb, 27 Jun 2000
1698  * \endvar
1699  */
1700                 { LFUN_FLOAT_INSERT, "float-insert", Noop, Edit },
1701
1702 /*!
1703  * \var lyx::FuncCode lyx::LFUN_FLOAT_LIST_INSERT
1704  * \li Action: Inserts the list of floats in the document.
1705  * \li Syntax: float-list-insert <TYPE>
1706  * \li Params: <TYPE>: type of float depends on the used textclass. Usually
1707                        "algorithm", "table", "figure" parameters can be given.
1708  * \li Origin: Lgb, 3 May 2001
1709  * \endvar
1710  */
1711                 { LFUN_FLOAT_LIST_INSERT, "float-list-insert", Noop, Edit },
1712
1713 /*!
1714  * \var lyx::FuncCode lyx::LFUN_FLOAT_WIDE_INSERT
1715  * \li Action: Inserts float insets as in #LFUN_FLOAT_INSERT but span multiple columns.
1716  * \li Notion: Corresponds to the starred floats (figure*, table*, etc.) in LaTeX.
1717  * \li Syntax: float-wide-insert <TYPE>
1718  * \li Params: <TYPE>: type of float depends on the used textclass. Usually
1719                        "algorithm", "table", "figure" parameters can be given.
1720  * \li Origin: Lgb, 31 Oct 2001
1721  * \endvar
1722  */
1723                 { LFUN_FLOAT_WIDE_INSERT, "float-wide-insert", Noop, Edit },
1724
1725 /*!
1726  * \var lyx::FuncCode lyx::LFUN_FONT_BOLD
1727  * \li Action: Toggles the bold font (selection-wise) using mathbf in math.
1728  * \li Syntax: font-bold
1729  * \endvar
1730  */
1731                 { LFUN_FONT_BOLD, "font-bold", Noop, Layout },
1732
1733
1734 /*!
1735  * \var lyx::FuncCode lyx::LFUN_FONT_BOLDSYMBOL
1736  * \li Action: Toggles the bold font (selection-wise) using boldsymbol in math.
1737  * \li Syntax: font-boldsymbol
1738  * \endvar
1739  */
1740                 { LFUN_FONT_BOLDSYMBOL, "font-boldsymbol", Noop, Layout },
1741
1742 /*!
1743  * \var lyx::FuncCode lyx::LFUN_FONT_DEFAULT
1744  * \li Action: Reverts the settings of the font to the default values (selection-wise).
1745  * \li Syntax: font-default
1746  * \endvar
1747  */
1748                 { LFUN_FONT_DEFAULT, "font-default", Noop, Layout },
1749
1750 /*!
1751  * \var lyx::FuncCode lyx::LFUN_FONT_EMPH
1752  * \li Action: Toggles the emphasis font style (selection-wise).
1753  * \li Syntax: font-emph
1754  * \endvar
1755  */
1756                 { LFUN_FONT_EMPH, "font-emph", Noop, Layout },
1757
1758 /*!
1759  * \var lyx::FuncCode lyx::LFUN_FONT_FRAK
1760  * \li Action: Toggles Fraktur family font (math-mode, selection-wise).
1761  * \li Syntax: font-frak
1762  * \li Origin: vermeer, 10 Jan 2002
1763  * \endvar
1764  */
1765                 { LFUN_FONT_FRAK, "font-frak", Noop, Layout },
1766
1767 /*!
1768  * \var lyx::FuncCode lyx::LFUN_FONT_ITAL
1769  * \li Action: Toggles Italics font shape (math-mode, selection-wise).
1770  * \li Syntax: font-ital
1771  * \li Origin: vermeer, 10 Jan 2002
1772  * \endvar
1773  */
1774                 { LFUN_FONT_ITAL, "font-ital", Noop, Layout },
1775
1776 /*!
1777  * \var lyx::FuncCode lyx::LFUN_FONT_NOUN
1778  * \li Action: Toggles Noun text style font (selection-wise).
1779  * \li Syntax: font-noun
1780  * \endvar
1781  */
1782                 { LFUN_FONT_NOUN, "font-noun", Noop, Layout },
1783
1784 /*!
1785  * \var lyx::FuncCode lyx::LFUN_FONT_ROMAN
1786  * \li Action: Toggles Roman family font (selection-wise).
1787  * \li Syntax: font-roman
1788  * \endvar
1789  */
1790                 { LFUN_FONT_ROMAN, "font-roman", Noop, Layout },
1791
1792 /*!
1793  * \var lyx::FuncCode lyx::LFUN_FONT_SANS
1794  * \li Action: Toggles Sans Serif family font (selection-wise).
1795  * \li Syntax: font-sans
1796  * \endvar
1797  */
1798                 { LFUN_FONT_SANS, "font-sans", Noop, Layout },
1799
1800 /*!
1801  * \var lyx::FuncCode lyx::LFUN_FONT_SIZE
1802  * \li Action: Sets font size according to lyx format string.
1803  * \li Syntax: font-size <SIZE>
1804  * \li Params: <SIZE>: tiny|scriptsize|footnotesize|small|normal|large|larger|\n
1805                        largest|huge|giant|increase|decrease|default
1806  * \endvar
1807  */
1808                 { LFUN_FONT_SIZE, "font-size", Noop, Layout },
1809
1810 /*!
1811  * \var lyx::FuncCode lyx::LFUN_FONT_STATE
1812  * \li Action: Returns the info about the current font.
1813  * \li Syntax: font-state
1814  * \endvar
1815  */
1816                 { LFUN_FONT_STATE, "font-state", ReadOnly, Layout },
1817
1818
1819 /*!
1820  * \var lyx::FuncCode lyx::LFUN_FONT_STRIKEOUT
1821  * \li Action: Toggles strikeout (strike-through) in the font (selection-wise).
1822  * \li Syntax: font-strikeout
1823  * \li Origin: sanda, 3 May 2009
1824  * \endvar
1825  */
1826                 { LFUN_FONT_STRIKEOUT, "font-strikeout", Noop, Layout },
1827
1828 /*!
1829  * \var lyx::FuncCode lyx::LFUN_FONT_CROSSOUT
1830  * \li Action: Toggles xout (cross-through) in the font (selection-wise).
1831  * \li Syntax: font-crossout
1832  * \li Origin: uwestoehr, 4 April 2017
1833  * \endvar
1834  */
1835                 { LFUN_FONT_CROSSOUT, "font-crossout", Noop, Layout },
1836
1837 /*!
1838  * \var lyx::FuncCode lyx::LFUN_FONT_TYPEWRITER
1839  * \li Action: Toggles the typewriter family font (selection-wise).
1840  * \li Syntax: font-typewriter
1841  * \endvar
1842  */
1843                 { LFUN_FONT_TYPEWRITER, "font-typewriter", Noop, Layout },
1844
1845 /*!
1846  * \var lyx::FuncCode lyx::LFUN_FONT_UNDERLINE
1847  * \li Action: Toggles underline in the font (selection-wise).
1848  * \li Syntax: font-underline
1849  * \endvar
1850  */
1851                 { LFUN_FONT_UNDERLINE, "font-underline", Noop, Layout },
1852
1853 /*!
1854  * \var lyx::FuncCode lyx::LFUN_FONT_UNDERUNDERLINE
1855  * \li Action: Toggles double underline in the font (selection-wise).
1856  * \li Syntax: font-underunderline
1857  * \li Origin: sanda, 5 May 2009
1858  * \endvar
1859  */
1860                 { LFUN_FONT_UNDERUNDERLINE, "font-underunderline", Noop, Layout },
1861
1862 /*!
1863  * \var lyx::FuncCode lyx::LFUN_FONT_UNDERWAVE
1864  * \li Action: Toggles wavy underline in the font (selection-wise).
1865  * \li Syntax: font-underwave
1866  * \li Origin: sanda, 5 May 2009
1867  * \endvar
1868  */
1869                 { LFUN_FONT_UNDERWAVE, "font-underwave", Noop, Layout },
1870
1871 /*!
1872  * \var lyx::FuncCode lyx::LFUN_FOOTNOTE_INSERT
1873  * \li Action: Inserts a footnote inset.
1874  * \li Syntax: footnote-insert
1875  * \li Origin: Jug, 7 Mar 2000
1876  * \endvar
1877  */
1878                 { LFUN_FOOTNOTE_INSERT, "footnote-insert", Noop, Edit },
1879
1880 /*!
1881  * \var lyx::FuncCode lyx::LFUN_FORWARD_SEARCH
1882  * \li Action: Sets the cursor position in the previewed (dvi/pdf) file based on the row
1883                number in LyX window.
1884  * \li Notion: The external program used for forward search call can be specified in
1885                LyX Output preferences. See Additional manual for details of these
1886                settings.
1887  * \li Syntax: forward-search
1888  * \li Origin: sanda, 14 Apr 2010
1889  * \endvar
1890  */
1891                 { LFUN_FORWARD_SEARCH, "forward-search", ReadOnly, System },
1892
1893 /*!
1894  * \var lyx::FuncCode lyx::LFUN_HELP_OPEN
1895  * \li Action: Open the given help file according to the language setting.
1896  * \li Syntax: help-open <FILE>[.lyx]
1897  * \li Params: <FILE>: any document from (/usr/share/)doc directory.
1898  * \li Origin: Jug, 27 Jun 1999
1899  * \endvar
1900  */
1901                 { LFUN_HELP_OPEN, "help-open", NoBuffer | Argument, Buffer },
1902
1903 /*!
1904  * \var lyx::FuncCode lyx::LFUN_LYXFILES_OPEN
1905  * \li Action: Open lyxfiles (templates/examples). Create a view if he have none.
1906  * \li Syntax: lyxfiles-open [<TYPE>]
1907  * \li Params: <TYPE>: templates or examples. Default is templates.
1908  * \li Origin: spitz, 10 Feb 2021
1909  * \endvar
1910  */
1911                 { LFUN_LYXFILES_OPEN, "lyxfiles-open", NoBuffer | Argument, Buffer },
1912
1913 /*!
1914  * \var lyx::FuncCode lyx::LFUN_HREF_INSERT
1915  * \li Action: Inserts hyperlinks into the document (clickable in pdf output).
1916  * \li Notion: Hyperlink target can be set via selection + hyperlink-insert function.
1917  * \li Syntax: href-insert [<TARGET>]
1918  * \li Origin: CFO-G, 21 Nov 1997
1919  * \endvar
1920  */
1921                 { LFUN_HREF_INSERT, "href-insert", Noop, Edit },
1922
1923 /*!
1924  * \var lyx::FuncCode lyx::LFUN_ICON_SIZE
1925  * \li Action: Sets icon size of toolbars.
1926  * \li Syntax: icon-size [<SIZE>]
1927  * \li Params: <SIZE> : the icon size in px or one of the logical settings
1928                         small|normal|big|huge|giant, the default is normal
1929                         (whose size in px is icon set dependent).
1930  * \li Origin: 11 July 2016
1931  * \endvar
1932  */
1933                 { LFUN_ICON_SIZE, "icon-size", NoBuffer, Buffer },
1934
1935
1936 /*!
1937  * \var lyx::FuncCode lyx::LFUN_IF_RELATIVES
1938  * \li Action: Helper function for master-related actions
1939  * \li Notion: In a buffer, the function will be disabled if the buffer
1940  *             has no master or children. It thus allows to enable
1941  *             actions only in documents with master/children
1942  * \li Syntax: ifrelatives <ACTION>
1943  * \li Origin: spitz, 2 January 2020
1944  * \endvar
1945  */
1946                 { LFUN_IF_RELATIVES, "ifrelatives", Noop, Buffer },
1947
1948 /*!
1949  * \var lyx::FuncCode lyx::LFUN_INDEX_INSERT
1950  * \li Action: Inserts Index entry.
1951  * \li Notion: It automatically takes the word on the cursor position.
1952  * \li Syntax: index-insert [<TYPE:Name>]
1953  * \li Params: <TYPE:Name>: name of the index, if multiple indices are defined.
1954                With an empty argument, the default index is selected.
1955  * \li Origin: leeming, 3 Aug 2000
1956  * \endvar
1957  */
1958                 { LFUN_INDEX_INSERT, "index-insert", Noop, Edit },
1959
1960 /*!
1961  * \var lyx::FuncCode lyx::LFUN_INDEX_PRINT
1962  * \li Action: Inserts list of Index entries on a new page.
1963  * \li Syntax: index-print [<TYPE:Name>]
1964  * \li Params: <TYPE:Name>: name of the index, if multiple indices are defined.
1965                With an empty argument, the default index is selected.
1966  * \li Origin: Lgb, 27 Feb 1997
1967  * \endvar
1968  */
1969                 { LFUN_INDEX_PRINT, "index-print", Noop, Edit },
1970
1971 /*!
1972  * \var lyx::FuncCode lyx::LFUN_INFO_INSERT
1973  * \li Action: Displays shortcuts, lyxrc, package and textclass availability and menu
1974                information in a non-editable boxed InsetText.
1975  * \li Notion: Apart from lfun arguments you can use the following method: \n
1976                1. input the type and argument of this inset, e.g. "menu paste", in
1977                the work area.\n
1978                2. select the text and run info-insert lfun.
1979  * \li Syntax: info-insert <TYPE> <ARG>
1980  * \li Params: <TYPE>: date|moddate|fixdate|time|modtime|fixtime|shortcut|shortcuts|lyxrc|
1981  *                     lyxinfo|package|textclass|menu|l7n|icon|buffer|vcs \n
1982                <ARG>: argument for a given type. Look into InsetInfo.h for detailed
1983                       description. \n
1984                       date: current date (formatted and localized)\n
1985                       moddate: date of last modification (saving) (formatted and localized)\n
1986                       fixdate: a static date (formatted and localized)\n
1987                       time: current time (formatted and localized)\n
1988                       modtime: time of last modification (saving) (formatted and localized)\n
1989                       fixtime: a static time (formatted and localized)\n
1990                       shortcut[s]: name of lfun (e.g math-insert \alpha) \n
1991                       lyxrc: name of rc_entry (e.g. bind_file) \n
1992                       lyxinfo: "version" - used version of LyX \n
1993                       package: name of latex package (e.g. listings) \n
1994                       textclass: name of textclass (e.g. article) \n
1995                       menu: name of lfun used in menu  \n
1996                       l7n: localizable string.\n
1997                       icon: icon of lfun used in toolbar or direct icon name\n
1998                       buffer: "name"|"name-noext"|"path"|"class"
1999                       vcs: "tree-revision"|"revision"|"author"|"date"|"time"
2000  * \li Sample: command-sequence info-insert buffer path; info-insert buffer name
2001  * \li Origin: bpeng, 7 Oct 2007
2002  * \endvar
2003  */
2004                 { LFUN_INFO_INSERT, "info-insert", Noop, Edit },
2005
2006 /*!
2007  * \var lyx::FuncCode lyx::LFUN_INSET_APPLY
2008  * \li Action: Apply data for an inset.
2009  * \li Notion: LFUN_INSET_APPLY is sent from the dialogs when the data should
2010                be applied. This is either changed to #LFUN_INSET_MODIFY or
2011                #LFUN_INSET_INSERT depending on the context where it is called.
2012  * \li Syntax: inset-apply <ARGS>
2013  * \li Params: See #LFUN_INSET_INSERT .
2014  * \endvar
2015  */
2016                 { LFUN_INSET_APPLY, "inset-apply", Noop, Edit },
2017
2018 /*!
2019  * \var lyx::FuncCode lyx::LFUN_INSET_BEGIN
2020  * \li Action: Move the cursor to the beginning of the current inset
2021                if it is not already there. If the cursor is already at
2022                the beginning of the current inset, move it to the
2023                beginning of the enclosing inset or the main work area,
2024                respectively, if there is no enclosing inset.
2025  * \li Syntax: inset-begin
2026  * \li Origin: lasgouttes, 16 Mar 2009
2027  * \endvar
2028  */
2029                 { LFUN_INSET_BEGIN, "inset-begin", ReadOnly, Edit },
2030
2031 /*!
2032  * \var lyx::FuncCode lyx::LFUN_INSET_BEGIN_SELECT
2033  * \li Action: Move the cursor to the beginning of the current inset
2034                if it is not already there. If the cursor is already at
2035                the beginning of the current inset, move it to the
2036                beginning of the enclosing inset or the main work area,
2037                respectively, if there is no enclosing inset (adding the
2038                traversed text to the selection).
2039  * \li Syntax: inset-begin-select
2040  * \li Origin: lasgouttes, 16 Mar 2009
2041  * \endvar
2042  */
2043                 { LFUN_INSET_BEGIN_SELECT, "inset-begin-select", ReadOnly, Edit },
2044
2045 /*!
2046  * \var lyx::FuncCode lyx::LFUN_INSET_COPY_AS
2047  * \li Action: Copies the inset to the clipboard as a certain type.
2048  * \li Notion: Currently used only for InsetInfo where its content is copied as a text.
2049  * \li Syntax: inset-copy-as
2050  * \li Origin: vfr, 18 Apr 2010
2051  * \endvar
2052  */
2053                 { LFUN_INSET_COPY_AS, "inset-copy-as", ReadOnly | NoUpdate | AtPoint, Edit },
2054
2055
2056 /*!
2057  * \var lyx::FuncCode lyx::LFUN_INSET_DIALOG_UPDATE
2058  * \li Action: Updates the values inside the dialog from the inset.
2059  * \li Notion: This is an internal LFUN, not to be used by users. Called internally
2060                by #LFUN_DIALOG_UPDATE
2061  * \li Params: <DIALOG-NAME>
2062  * \li Origin: leeming, 25 Feb 2003
2063  * \endvar
2064  */
2065                 { LFUN_INSET_DIALOG_UPDATE, "", Noop, Hidden },
2066
2067 /*!
2068  * \var lyx::FuncCode lyx::LFUN_INSET_DISSOLVE
2069  * \li Action: Dissolve the current inset into text.
2070  * \li Syntax: inset-dissolve [<INSET>]
2071  * \li Params: <INSET>: this can be used to make sure the right kind of inset
2072                         is dissolved. For example "dissolve" entry in the charstyles
2073                         sub-menu should only dissolve the charstyle inset, even if the
2074                         cursor is inside several nested insets of different type.\n
2075                         For values see #lyx::InsetLayout::lyxtype_ .
2076  * \li Origin: JSpitz, 7 Aug 2006
2077  * \endvar
2078  */
2079                 { LFUN_INSET_DISSOLVE, "inset-dissolve", AtPoint, Edit },
2080
2081 /*!
2082  * \var lyx::FuncCode lyx::LFUN_INSET_EDIT
2083  * \li Action: Edit the inset at cursor with an external application,
2084                if one is attributed.
2085                If the inset is file based, the referenced file is edited.
2086                Otherwise, the inset contents is written to a temporary file,
2087                the inset is locked, and the temporary file is edited.
2088                In this case, #LFUN_INSET_END_EDIT must be called to overtake
2089                the changes and unlock the inset after editing is finished.
2090  * \li Syntax: inset-edit [<INSET_PARAMS>]
2091  * \li Params: <INSET_PARAMS>: Parameters for the inset. \n
2092                                Currently only the filename will be considered.
2093  * \li Origin: spitz, 27 Apr 2006
2094  * \endvar
2095  */
2096                 { LFUN_INSET_EDIT, "inset-edit", ReadOnly | AtPoint, Edit },
2097
2098
2099  /*!
2100  * \var lyx::FuncCode lyx::LFUN_INSET_END_EDIT
2101  * \li Action: End editing the inset at cursor with an external application.
2102  *             This replaces the inset contents with the contents of the
2103  *             temporary file, deletes the file and unlocks the inset.
2104  * \li Syntax: inset-end-edit 
2105  * \li Origin: gb, 11 Oct 2015
2106  * \endvar
2107  */
2108                 { LFUN_INSET_END_EDIT, "inset-end-edit", ReadOnly | AtPoint, Edit },
2109
2110 /*!
2111  * \var lyx::FuncCode lyx::LFUN_INSET_END
2112  * \li Action: Move the cursor to the end of the current inset if it
2113                is not already there. If the cursor is already at the
2114                end of the current inset, move it to the end of the
2115                enclosing inset or the main work area, respectively, if
2116                there is no enclosing inset.
2117  * \li Syntax: inset-end
2118  * \li Origin: lasgouttes, 16 Mar 2009
2119  * \endvar
2120  */
2121                 { LFUN_INSET_END, "inset-end", ReadOnly, Edit },
2122
2123 /*!
2124  * \var lyx::FuncCode lyx::LFUN_INSET_END_SELECT
2125  * \li Action: Move the cursor to the end of the current inset if it
2126                is not already there. If the cursor is already at the
2127                end of the current inset, move it to the end of the
2128                enclosing inset or the main work area, respectively, if
2129                there is no enclosing inset (adding the
2130                traversed text to the selection).
2131  * \li Syntax: inset-end-select
2132  * \li Origin: lasgouttes, 16 Mar 2009
2133  * \endvar
2134  */
2135                 { LFUN_INSET_END_SELECT, "inset-end-select", ReadOnly, Edit },
2136
2137
2138 /*!
2139  * \var lyx::FuncCode lyx::LFUN_INSET_FORALL
2140  * \li Action: Apply the given commands on insets of a given name.
2141  * \li Notion: WARNING: use at your own risks; this function gives
2142                you too many ways of shooting yourself in the foot.
2143                A typical example is
2144                    inset-forall Note note-insert
2145                which starts an infinite loop. This is mitigated by the fact
2146                that the number of actions is arbitrarily limited to 100000.
2147                Note also that inset-forall does not update metrics between
2148                iterations, which can lead to bugs. This has to be eventually
2149                fixed.
2150  * \li Syntax: inset-forall <NAME> <LFUN-COMMAND> \n
2151                <NAME>: Type of Inset. If <NAME> is *, all insets are matched.
2152                The name is used like for InsetLayout in layout files: "Note"
2153                matches all note insets, while "Note:Note" only matches LyX
2154                yellow note insets.
2155  * \li Sample: Remove all index insets: \n
2156                    inset-forall Index char-delete-forward force \n
2157                Close all Notes (also works for a particular branch, for example): \n
2158                    inset-forall Note inset-toggle close \n
2159                Transform all yellow notes to comments \n
2160                    inset-forall Note:Note inset-modify note Note Comment \n
2161                Try to put LyX in an infinite loop if there is at least a Note: \n
2162                    inset-forall Note char-backward
2163  * \li Origin: lasgouttes, 27 Nov 2009
2164  * \endvar
2165  */
2166                 { LFUN_INSET_FORALL, "inset-forall", ReadOnly, Edit },
2167
2168
2169 /*!
2170  * \var lyx::FuncCode lyx::LFUN_INSET_INSERT
2171  * \li Action: Insert new inset (type given by the parameters).
2172  * \li Syntax: inset-insert <INSET> <ARGS>
2173  * \li Params: <INSET>: <bibitem|bibtex|citation|ert|listings|external|graphics|tabular|\n
2174                          hyperlink|include|index|label|line|nomencl|vspace|ref|toc|script>\n
2175                <ARGS>: depends on the given inset. Use "lyx -dbg action" to explore.
2176  * \li Sample: inset-insert ref LatexCommand <Format> reference "<label name>"\end_inset \n
2177                where <label name> is the name of the referenced label and
2178                <Format> is one of the following: \n
2179                ref -- <reference> \n
2180                eqref -- (<reference>) \n
2181                pageref -- <page> \n
2182                vpageref -- on <page> \n
2183                vref -- <reference> on <page> \n
2184                formatted -- Formatted reference
2185  * \endvar
2186  */
2187                 { LFUN_INSET_INSERT, "inset-insert", Noop, Edit },
2188
2189 /*!
2190  * \var lyx::FuncCode lyx::LFUN_INSET_MODIFY
2191  * \li Action: Modify some properties of an inset.
2192  * \li Notion: Used for argument, bibitem, bibtex, box, branch, caption, citation,
2193                         command, ert, external, float, graphics, include, index,
2194                         info, label, line, listings, newline, newpage, nomencl,
2195                         note, phantom, quotes, ref, script, separator, space,
2196                         tabular, vspace and wrap insets.
2197  * \li Syntax: inset-modify <INSET> <ARGS> \n
2198                inset-modify changetype <TYPE>
2199  * \li Sample: Change a Note inset into a Comment inset: \n
2200                    inset-modify note Note Comment \n
2201                Change a Box into an Ovalbox: \n
2202                    inset-modify changetype Ovalbox \n
2203                Change a quotation mark to e[nglish style], l[eft side = opening], s[ingle = inner, secondary] \n
2204                    inset-modify changetype els \n
2205                Change only the style of a quotation mark, maintaining the other aspects (. = wildcard) \n
2206                    inset-modify changetype e.. \n
2207  * \endvar
2208  */
2209                 { LFUN_INSET_MODIFY, "inset-modify", AtPoint, Edit },
2210
2211 /*!
2212  * \var lyx::FuncCode lyx::LFUN_INSET_SELECT_ALL
2213  * \li Action: Select all contents of an inset.
2214  * \li Notion: There are 3 successive levels: select current cell,
2215  *             select all cells of inset, select the inset from outside
2216  *             (in the enclosing inset).
2217  * \li Syntax: inset-select-all
2218  * \li Origin: vfr, 22 Aug 2009; lasgouttes 1 Nov 2014
2219  * \endvar
2220  */
2221                 { LFUN_INSET_SELECT_ALL, "inset-select-all", ReadOnly, Edit },
2222
2223
2224 /*!
2225  * \var lyx::FuncCode lyx::LFUN_INSET_SETTINGS
2226  * \li Action: Open the inset's properties dialog.
2227  * \li Notion: Used for bibitem, bibtex, box, branch, citation, ert, external,
2228                float, graphics, href, include, index, index_print, label, line,
2229                listings, note, phantom, ref, space, tabular, vspace, wrap insets.
2230  * \li Syntax: inset-settings <INSET>
2231  * \li Params: <INSET>: <bibitem|bibtex|box|branch|citation|ert|external|float|\n
2232                          graphics|href|include|index|index_print|label|line|\n
2233                          listings|note|phantom|ref|space|tabular|vspace|wrap>.
2234  * \endvar
2235  */
2236                 { LFUN_INSET_SETTINGS, "inset-settings", ReadOnly | AtPoint, Edit },
2237
2238 /*!
2239  * \var lyx::FuncCode lyx::LFUN_INSET_SPLIT
2240  * \li Action: Splits the current inset into two at current position.
2241  * \li Syntax: inset-split [<INSET>]
2242  * \li Params: <INSET>: this can be used to make sure the right kind of inset
2243                         is dissolved. For example "split" entry in the charstyles
2244                         sub-menu should only dissolve the charstyle inset, even if the
2245                         cursor is inside several nested insets of different type.\n
2246                         For values see #lyx::InsetLayout::lyxtype_ .
2247  * \li Origin: spitz, 22 Dec 2020
2248  * \endvar
2249  */
2250                 { LFUN_INSET_SPLIT, "inset-split", AtPoint, Edit },
2251
2252 /*!
2253  * \var lyx::FuncCode lyx::LFUN_INSET_TOGGLE
2254  * \li Action: Toggles the collapsible inset at cursor position,
2255                or the inset we are currently in.
2256  * \li Syntax: inset-toggle [<ARG>]
2257  * \li Params: <ARG>: <open|close|toggle|assign>. \n
2258                open/close/toggle are for collapsible insets. toggle is used when no argument is given.\n
2259                assign synchronize the branch-inset with activation status of the branch.
2260                Used for global toggling when changed activation.
2261  * \li Origin: lasgouttes, 19 Jul 2001
2262  * \endvar
2263  */
2264                 { LFUN_INSET_TOGGLE, "inset-toggle", ReadOnly | AtPoint, Edit },
2265
2266 /*!
2267  * \var lyx::FuncCode lyx::LFUN_IN_IPA
2268  * \li Action: Only active in IPA inset.
2269  * \li Notion: Dummy function which is only active in a IPA inset.
2270                It's used to toggle the IPA toolbar if the cursor moves
2271                into an IPA inset.
2272  * \li Syntax: in-ipa
2273  * \li Origin: spitz, 20 May 2012
2274  * \endvar
2275  */
2276                 { LFUN_IN_IPA, "in-ipa", Noop, Edit },
2277
2278 /*!
2279  * \var lyx::FuncCode lyx::LFUN_IN_MATHMACROTEMPLATE
2280  * \li Action: Only active in Math Macro definition.
2281  * \li Notion: Dummy function which is only active in a Math Macro definition.
2282                It's used to toggle the Math Macro toolbar if the cursor moves
2283                into a Math Macro definition.
2284  * \li Syntax: in-mathmacrotemplate
2285  * \li Origin: sts, 06 January 2008
2286  * \endvar
2287  */
2288                 { LFUN_IN_MATHMACROTEMPLATE, "in-mathmacrotemplate", Noop, Math },
2289
2290
2291 /*!
2292  * \var lyx::FuncCode lyx::LFUN_IPAMACRO_INSERT
2293  * \li Action: Inserts special IPA macros into the document.
2294  * \li Syntax: ipamacro-insert <CHAR>
2295  * \li Params: <CHAR>: tone-falling, tone-rising, tone-high-rising, tone-low-rising,
2296  *                     tone-high-rising-falling, deco bottomtiebar, deco toptiebar.
2297  * \li Origin: spitz, 22 Aug 2012
2298  * \endvar
2299  */
2300                 { LFUN_IPAMACRO_INSERT, "ipamacro-insert", Noop, Edit },
2301
2302 /*!
2303  * \var lyx::FuncCode lyx::LFUN_IPA_INSERT
2304  * \li Action: Inserts an IPA inset.
2305  * \li Syntax: ipa-insert
2306  * \li Origin: spitz, 05 Mar 2012
2307  * \endvar
2308  */
2309                 { LFUN_IPA_INSERT, "ipa-insert", Noop, Edit },
2310
2311 /*!
2312  * \var lyx::FuncCode lyx::LFUN_KEYMAP_OFF
2313  * \li Action: Turn off the loaded keyboard map.
2314  * \li Syntax: keymap-off
2315  * \endvar
2316  */
2317                 { LFUN_KEYMAP_OFF, "keymap-off", ReadOnly, Edit },
2318
2319 /*!
2320  * \var lyx::FuncCode lyx::LFUN_KEYMAP_PRIMARY
2321  * \li Action: Turn on the primary keyboard map.
2322  * \li Notion: Maps were widely used in past, when X-windows didn't have nowadays
2323                keyboard support. They can be still used to maintain uniform keyboard
2324                layout across the various platforms.\n
2325                The language is to be set in the Preferences dialog.
2326  * \li Syntax: keymap-primary
2327  * \endvar
2328  */
2329                 { LFUN_KEYMAP_PRIMARY, "keymap-primary", ReadOnly, Edit },
2330
2331 /*!
2332  * \var lyx::FuncCode lyx::LFUN_KEYMAP_SECONDARY
2333  * \li Action: Turn on the secondary keyboard map.
2334  * \li Syntax: keymap-secondary
2335  * \endvar
2336  */
2337                 { LFUN_KEYMAP_SECONDARY, "keymap-secondary", ReadOnly, Edit },
2338
2339 /*!
2340  * \var lyx::FuncCode lyx::LFUN_KEYMAP_TOGGLE
2341  * \li Action: Toggles keyboard maps (first/second/off).
2342  * \li Syntax: keymap-toggle
2343  * \li Origin: leeming, 30 Mar 2004
2344  * \endvar
2345  */
2346                 { LFUN_KEYMAP_TOGGLE, "keymap-toggle", ReadOnly, Edit },
2347
2348
2349 /*!
2350  * \var lyx::FuncCode lyx::LFUN_LABEL_COPY_AS_REFERENCE
2351  * \li Action: Copies the label at the cursor as a cross-reference to be pasted elsewhere.
2352  * \li Syntax: copy-label-as-reference <LABEL>
2353  * \li Params: <LABEL>: The label to copy (for multi-line math)
2354  * \li Origin: sts, 16 Nov 2008
2355  * \endvar
2356  */
2357                 { LFUN_LABEL_COPY_AS_REFERENCE, "label-copy-as-reference",
2358                         ReadOnly | NoUpdate | AtPoint, Edit },
2359
2360
2361 /*!
2362  * \var lyx::FuncCode lyx::LFUN_LABEL_GOTO
2363  * \li Action: Goto a label.
2364  * \li Syntax: label-goto [<LABEL>]
2365  * \li Params: <LABEL>: Requested label. If no label is given and reference
2366                         is on cursor position, Bookmark 0 is saved and
2367                         cursor moves to the position of referenced label.
2368  * \li Origin: Ale, 6 Aug 1997
2369  * \endvar
2370  */
2371                 { LFUN_LABEL_GOTO, "label-goto", ReadOnly, Edit },
2372
2373 /*!
2374  * \var lyx::FuncCode lyx::LFUN_LABEL_INSERT
2375  * \li Action: Inserts label to text or displayed formula.
2376  * \li Syntax: label-insert [<LABEL>]
2377  * \li Params: <LABEL>: Requested label. If no label is given dialog requesting
2378                         name will be opened.
2379  * \endvar
2380  */
2381                 { LFUN_LABEL_INSERT, "label-insert", Noop, Edit },
2382
2383 /*!
2384  * \var lyx::FuncCode lyx::LFUN_LABEL_INSERT_AS_REFERENCE
2385  * \li Action: Inserts the label (in ToC pane) as a cross-reference at the position of the cursor.
2386  * \li Syntax: label-insert-as-reference
2387  * \li Origin: vfr, 7 Apr 2009
2388  * \endvar
2389  */
2390                 { LFUN_LABEL_INSERT_AS_REFERENCE, "label-insert-as-reference", Noop, Edit},
2391
2392
2393 /*!
2394  * \var lyx::FuncCode lyx::LFUN_LANGUAGE
2395  * \li Action: Set language from the current cursor position.
2396  * \li Syntax: language <LANG> [set]
2397  * \li Params: <LANG>: Requested language. Look in lib/languages for
2398                        the list. "language reset" or "language" (without param)
2399                        reset to the document language.
2400                   set: If used, the language will be set to the specified
2401                        language. Otherwise, the language will be toggled (i.e., if
2402                        the current language is LANG, switch to the document language
2403                        or the default language, if LANG is the document language).
2404  * \li Origin: Dekel, 2 Mar 2000
2405  * \endvar
2406  */
2407                 { LFUN_LANGUAGE, "language", Noop, Edit },
2408
2409
2410 /*!
2411  * \var lyx::FuncCode lyx::LFUN_LAYOUT
2412  * \li Action: Sets the layout (that is, environment) for the current paragraph.
2413  * \li Syntax: layout <LAYOUT> [ignoreautonests]
2414  * \li Params: <LAYOUT>: the layout to use\n
2415                ignoreautonests: If specified, nesting advices will be ignored.
2416  * \endvar
2417  */
2418                 { LFUN_LAYOUT, "layout", Noop, Layout },
2419
2420 /*!
2421  * \var lyx::FuncCode lyx::LFUN_LAYOUT_TOGGLE
2422  * \li Action: Toggles the layout (that is, environment) for the current paragraph.
2423  * \li Notion: Contrary to `layout', this function resets the current
2424  *             (or selection) layout to the standard layout it already has the
2425  *             correct layout. Useful for toolbar icons.
2426  * \li Syntax: layout-toggle <LAYOUT> [ignoreautonests]
2427  * \li Params: <LAYOUT>: the layout to toggle\n
2428                ignoreautonests: If specified, nesting advices will be ignored.
2429  * \li Origin: lasgouttes, 14 May 2018
2430  * \endvar
2431  */
2432                 { LFUN_LAYOUT_TOGGLE, "layout-toggle", Noop, Layout },
2433
2434 /*!
2435  * \var lyx::FuncCode lyx::LFUN_LAYOUT_MODULES_CLEAR
2436  * \li Action: Clears the module list.
2437  * \li Notion: Clears the list of included modules for the current buffer.
2438  * \li Syntax: layout-modules-clear
2439  * \li Origin: rgh, 25 August 2007
2440  * \endvar
2441  */
2442                 { LFUN_LAYOUT_MODULES_CLEAR, "layout-modules-clear", NoInternal, Layout },
2443
2444 /*!
2445  * \var lyx::FuncCode lyx::LFUN_LAYOUT_MODULE_ADD
2446  * \li Action: Adds a module.
2447  * \li Notion: Adds a module to the list of included modules for the current buffer.
2448  * \li Syntax: layout-module-add <MODULE>
2449  * \li Params: <MODULE>: the module to be added
2450  * \li Origin: rgh, 25 August 2007
2451  * \endvar
2452  */
2453                 { LFUN_LAYOUT_MODULE_ADD, "layout-module-add", NoInternal, Layout },
2454
2455 /*!
2456  * \var lyx::FuncCode lyx::LFUN_LAYOUT_PARAGRAPH
2457  * \li Action: Launches the paragraph settings dialog.
2458  * \li Syntax: layout-paragraph
2459  * \endvar
2460  */
2461                 { LFUN_LAYOUT_PARAGRAPH, "layout-paragraph", ReadOnly, Layout },
2462
2463 /*!
2464  * \var lyx::FuncCode lyx::LFUN_LAYOUT_RELOAD
2465  * \li Action: Reloads layout information.
2466  * \li Notion: Reloads all layout information for the current buffer from disk, thus
2467                recognizing any changes that have been made to layout files on the fly.
2468                This is intended to be used only by layout developers and should not be
2469                used when one is trying to do actual work.
2470  * \li Syntax: layout-reload
2471  * \li Origin: rgh, 3 September 2007
2472  * \endvar
2473  */
2474                 { LFUN_LAYOUT_RELOAD, "layout-reload", NoInternal, Layout },
2475
2476 /*!
2477  * \var lyx::FuncCode lyx::LFUN_LAYOUT_TABULAR
2478  * \li Action: Launches the tabular settings dialog.
2479  * \li Syntax: layout-tabular
2480  * \li Origin: Jug, 31 Jul 2000
2481  * \endvar
2482  */
2483                 { LFUN_LAYOUT_TABULAR, "layout-tabular", Noop, Layout },
2484
2485 /*!
2486  * \var lyx::FuncCode lyx::LFUN_LINE_BEGIN
2487  * \li Action: Move the cursor to the beginning of the (screen) line.
2488  * \li Syntax: line-begin
2489  * \endvar
2490  */
2491                 { LFUN_LINE_BEGIN, "line-begin", ReadOnly | NoUpdate, Edit },
2492
2493 /*!
2494  * \var lyx::FuncCode lyx::LFUN_LINE_BEGIN_SELECT
2495  * \li Action: Move the cursor to the beginning of the (screen) line adding the
2496                traversed text to the selection.
2497  * \li Syntax: line-begin-select
2498  * \endvar
2499  */
2500                 { LFUN_LINE_BEGIN_SELECT, "line-begin-select", ReadOnly | SingleParUpdate, Edit },
2501
2502 /*!
2503  * \var lyx::FuncCode lyx::LFUN_LINE_DELETE_FORWARD
2504  * \li Action: Deletes the letters to the end of the (screen) line or
2505                deletes the selection.
2506  * \li Syntax: line-delete-forward
2507  * \endvar
2508  */
2509                 { LFUN_LINE_DELETE_FORWARD, "line-delete-forward", Noop, Edit }, // there is no line-delete-backward
2510
2511 /*!
2512  * \var lyx::FuncCode lyx::LFUN_LINE_END
2513  * \li Action: Move the cursor to the end of the (screen) line.
2514  * \li Syntax: line-end
2515  * \endvar
2516  */
2517                 { LFUN_LINE_END, "line-end", ReadOnly | NoUpdate, Edit },
2518
2519 /*!
2520  * \var lyx::FuncCode lyx::LFUN_LINE_END_SELECT
2521  * \li Action: Move the cursor to the end of the (screen) line adding the
2522                traversed text to the selection.
2523  * \li Syntax: line-end-select
2524  * \endvar
2525  */
2526                 { LFUN_LINE_END_SELECT, "line-end-select", ReadOnly | SingleParUpdate, Edit },
2527
2528 /*!
2529  * \var lyx::FuncCode lyx::LFUN_LISTING_INSERT
2530  * \li Action: Inserts a new listings inset.
2531  * \li Syntax: listing-insert
2532  * \li Origin: Herbert, 10 Nov 2001; bpeng, 2 May 2007
2533  * \endvar
2534  */
2535                 { LFUN_LISTING_INSERT, "listing-insert", Noop, Edit },
2536
2537 /*!
2538  * \var lyx::FuncCode lyx::LFUN_LYXRC_APPLY
2539  * \li Action: Apply the given settings to user preferences.
2540  * \li Syntax: lyxrc-apply <SETTINGS>
2541  * \li Params: <SETTINGS>: settings which are to be set. Take a look into ~/.lyx/preferences
2542                            to get an idea which commands to use and their syntax.
2543                            #lyx::LyXRC::LyXRCTags has the list of possible commands.
2544  * \endvar
2545  */
2546                 { LFUN_LYXRC_APPLY, "lyxrc-apply", NoBuffer, System },
2547
2548 /*!
2549  * \var lyx::FuncCode lyx::LFUN_LYX_ACTIVATE
2550  * \li Action: Activates the LyX window.
2551  * \li Notion: On Linux and Mac OS, this action brings the LyX window
2552                into focus. Such behavior is not allowed by Windows OS
2553                so instead the color of the taskbar entry is changed to
2554                indicate that the window has changed in some way.
2555                This action is useful in combination with reverse search.
2556  * \li Syntax: lyx-activate
2557  * \li Origin: skostysh, 4 Aug 2016
2558  * \endvar
2559  */
2560                 { LFUN_LYX_ACTIVATE, "lyx-activate", ReadOnly | NoBuffer, Hidden },
2561
2562 /*!
2563  * \var lyx::FuncCode lyx::LFUN_LYX_QUIT
2564  * \li Action: Terminates the current LyX instance.
2565  * \li Notion: Terminates the current LyX instance, asking whether to save
2566                modified documents, etc.
2567  * \li Syntax: lyx-quit
2568  * \endvar
2569  */
2570                 { LFUN_LYX_QUIT, "lyx-quit", NoBuffer, Buffer },
2571
2572 /*!
2573  * \var lyx::FuncCode lyx::LFUN_MARGINALNOTE_INSERT
2574  * \li Action: Inserts a marginal note.
2575  * \li Syntax: marginalnote-insert
2576  * \li Origin: Lgb, 26 Jun 2000
2577  * \endvar
2578  */
2579                 { LFUN_MARGINALNOTE_INSERT, "marginalnote-insert", Noop, Edit },
2580
2581 /*!
2582  * \var lyx::FuncCode lyx::LFUN_MARK_OFF
2583  * \li Action: Disable selecting of text-region.
2584  * \li Syntax: mark-off
2585  * \endvar
2586  */
2587                 { LFUN_MARK_OFF, "mark-off", ReadOnly, Edit },
2588
2589 /*!
2590  * \var lyx::FuncCode lyx::LFUN_MARK_ON
2591  * \li Action: Enable selecting of text-region.
2592  * \li Notion: After enabling you can simply move arrow keys to get selected region.
2593  * \li Syntax: mark-on
2594  * \endvar
2595  */
2596                 { LFUN_MARK_ON, "mark-on", ReadOnly, Edit },
2597
2598 /*!
2599  * \var lyx::FuncCode lyx::LFUN_MARK_TOGGLE
2600  * \li Action: Toggle between #LFUN_MARK_ON and #LFUN_MARK_OFF .
2601  * \li Syntax: mark-toggle
2602  * \li Origin: Andre, May 5 2006
2603  * \endvar
2604  */
2605                 { LFUN_MARK_TOGGLE, "mark-toggle", ReadOnly, Edit },
2606
2607
2608 /*!
2609  * \var lyx::FuncCode lyx::LFUN_MASTER_BUFFER_EXPORT
2610  * \li Action: Exports the master buffer (document) to the given format.
2611  * \li Syntax: master-buffer-export [<FORMAT>] [<DEST>]
2612  * \li Params: <FORMAT> is one of the formats which you can find in 
2613                         Tools->Preferences->File formats->Format.
2614                         Usual format you will enter is "pdf2" (pdflatex),
2615                         "pdflatex" (plain tex for pdflatex) or "ps" for postscript.\n
2616                         Note that "custom" is not allowed in this case.\n
2617                         If absent or "default", then the default output format of the
2618                         document is used.\n
2619                <DEST>   If present, this argument provides the export destination
2620                         filename. Its containing folder will also be the destination
2621                         folder, where all the needed external files will be copied.
2622  * \li Origin: rkh, 18 April 2018
2623  * \endvar
2624  */
2625                 { LFUN_MASTER_BUFFER_EXPORT, "master-buffer-export", ReadOnly, Buffer },
2626                 
2627 /*!
2628  * \var lyx::FuncCode lyx::LFUN_MASTER_BUFFER_FORALL
2629  * \li Action: Applies a command to a buffer and all it children, starting from the master.
2630  * \li Syntax: master-buffer-forall <LFUN-COMMAND>
2631  * \li Params: <LFUN-COMMAND>: The command to be applied to the buffers.
2632  * \li Sample: Close all Notes in buffers: \n
2633                master-buffer-forall inset-forall Note inset-toggle close \n
2634                Toggle change tracking on buffers: \n
2635                master-buffer-forall changes-track \n
2636                Toggle read-only for buffers: \n
2637                master-buffer-forall buffer-toggle-read-only \n
2638                Show statistics for individual buffers: \n
2639                master-buffer-forall statistics \n
2640                Activate the branch named "Solutions" in buffers: \n
2641                master-buffer-forall branch-activate Solutions \n
2642  * \li Origin: spitz, 31 Dec 2019
2643  * \endvar
2644  */
2645                 { LFUN_MASTER_BUFFER_FORALL, "master-buffer-forall", ReadOnly | Argument, Buffer },
2646
2647 /*!
2648  * \var lyx::FuncCode lyx::LFUN_MASTER_BUFFER_UPDATE
2649  * \li Action: Update (export) the document built from the master buffer,
2650                if the current buffer is part of a master/child document.
2651  * \li Syntax: master-buffer-update [<FORMAT>]
2652  * \li Params: <FORMAT>: The format to display, where this is one of the
2653                          formats defined (in the current GUI) in the
2654                          Tools>Preferences>File Formats dialog.
2655                          If no format is given, the default format as
2656                          specified in the same dialog is used.
2657  * \li Origin: Tommaso, 20 Sep 2007
2658  * \endvar
2659  */
2660                 { LFUN_MASTER_BUFFER_UPDATE, "master-buffer-update", ReadOnly, Buffer },
2661
2662 /*!
2663  * \var lyx::FuncCode lyx::LFUN_MASTER_BUFFER_VIEW
2664  * \li Action: Show a preview built from the master buffer, if available.
2665                if the current buffer is part of a master/child document.
2666  * \li Syntax: master-buffer-view [<FORMAT>]
2667  * \li Params: <FORMAT>: The format to display, where this is one of the
2668                          formats defined (in the current GUI) in the
2669                          Tools>Preferences>File Formats dialog.
2670                          If no format is given, the default format as
2671                          specified in the same dialog is used.
2672  * \li Origin: Tommaso, 20 Sep 2007
2673  * \endvar
2674  */
2675                 { LFUN_MASTER_BUFFER_VIEW, "master-buffer-view", ReadOnly, Buffer },
2676
2677 /*!
2678  * \var lyx::FuncCode lyx::LFUN_MATH_AMS_MATRIX
2679  * \li Action: Inserts an extended matrix as provided by the amsmath package.
2680  * \li Syntax: math-matrix <COLS> <ROWS> [<DECORATION>]
2681  * \li Params: <DECORATION>: Decoration determines the LaTeX name of the matrix
2682                              that should be created. Possible values include
2683                              pmatrix, bmatrix, Bmatrix, vmatrix, Vmatrix, smallmatrix, and
2684                              matrix. The default is 'matrix'.
2685  * \li Sample: math-ams-matrix 3 3 bmatrix
2686  * \endvar
2687  */
2688                 { LFUN_MATH_AMS_MATRIX, "math-ams-matrix", Noop, Math },
2689
2690 /*!
2691  * \var lyx::FuncCode lyx::LFUN_MATH_BIGDELIM
2692  * \li Action: Inserts math fixed size delimiters (e.g. parentheses, brackets) enclosing expression.
2693  * \li Syntax: math-bigdelim <LSIZE> <LDELIM> <RSIZE> <RDELIM>
2694  * \li Params: <L/RSIZE>: bigl/r|Bigl/r|biggl/r|Biggl/r \n
2695                <L/RDELIM>: TeX code for delimiter. See Delimiter dialog for delimiters to be used.
2696  * \li Sample: math-bigdelim "Bigl" "\Downarrow" "Bigr" "\}"
2697  * \li Origin: Enrico & Georg, 7 May 2006
2698  * \endvar
2699  */
2700                 { LFUN_MATH_BIGDELIM, "math-bigdelim", Noop, Math },
2701
2702 /*!
2703  * \var lyx::FuncCode lyx::LFUN_MATH_DELIM
2704  * \li Action: Inserts math delimiters (e.g. parentheses, brackets) enclosing expression.
2705  * \li Syntax: math-delim [<LEFT>] [<RIGHT>]
2706  * \li Params: <LEFT/RIGHT>: Delimiters to be used. Each delimiter can be specified by
2707                              either a LaTeX name or a valid character.
2708                              ( is the default letter.
2709  * \li Sample: math-delim { rangle
2710  * \li Origin: Alejandro, 18 Jun 1996
2711  * \endvar
2712  */
2713                 { LFUN_MATH_DELIM, "math-delim", Noop, Math },
2714
2715 /*!
2716  * \var lyx::FuncCode lyx::LFUN_MATH_DISPLAY
2717  * \li Action: Creates a new displayed equation in text mode.
2718                Toggles inlined/display formula in math mode.
2719  * \li Syntax: math-display [<ARG>]
2720  * \li Params: <ARG>: this argument will be passed to #LFUN_MATH_INSERT when creating
2721                       new equation from the text mode.
2722  * \li Origin: Alejandro, 18 Jun 1996
2723  * \endvar
2724  */
2725                 { LFUN_MATH_DISPLAY, "math-display", Noop, Math },
2726
2727 /*!
2728  * \var lyx::FuncCode lyx::LFUN_MATH_EXTERN
2729  * \li Action: Calls external program and passes the current expression/equation
2730                as an argument for the calculation in the format appropriate to the
2731                given language.
2732  * \li Notion: Selection can be used to determine the input for the external program.
2733  * \li Syntax: math-extern <LANG> [<COMMAND>]
2734  * \li Params: <LANG>: octave|maxima|maple|mathematica|script \n
2735                        where "script" stands for the external script (normalized
2736                        expression will be passed)
2737  * \li Origin: Andre, 24 Apr 2001
2738  * \li Sample: math-extern maple simplify
2739  * \endvar
2740  */
2741                 { LFUN_MATH_EXTERN, "math-extern", Noop, Math },
2742
2743 /*!
2744  * \var lyx::FuncCode lyx::LFUN_MATH_FONT_STYLE
2745  * \li Action: Changes the text style used in math.
2746  * \li Syntax: math-font-style <STYLE>
2747  * \li Params: <STYLE>: mathnormal|mathcal|mathfrak|mathrm|mathsf|mathbf|textnormal\n
2748                |textrm|textsf|texttt|textbf|textmd|textit|textsc|textsl|textup
2749  * \li Origin: vfr, 9 jan 2009
2750  * \endvar
2751  */
2752                 { LFUN_MATH_FONT_STYLE, "math-font-style", Noop, Math },
2753
2754 /*!
2755  * \var lyx::FuncCode lyx::LFUN_MATH_INSERT
2756  * \li Action: Inserts math objects and symbols.
2757  * \li Syntax: math-insert <ARG>
2758  * \li Params: <ARG>: Symbol or LaTeX code to be inserted.
2759  * \li Notion: When <ARG> is a _single_ math inset with more than one cell
2760                (such as "x_y^z" or "\frac{x}{y}"), the content of cell(0) is
2761                replaced by the current selection (only works if the selection
2762                is in mathed). As an example, if "abc" is selected in mathed,
2763                "math-insert \frac{x}{y}" replaces "abc" with "\frac{abc}{y}",
2764                and "math-insert x_y^z" replaces "abc" with "abc_y^z".
2765                If nothing is selected (or the selection is not in mathed),
2766                math-insert works as expected.
2767  * \endvar
2768  */
2769                 { LFUN_MATH_INSERT, "math-insert", Noop, Math },
2770
2771 /*!
2772  * \var lyx::FuncCode lyx::LFUN_MATH_LIMITS
2773  * \li Action: Toggles the position of the limits from above/below to the right
2774                side an vice versa in integral symbol, a limit, a summation, etc.
2775  * \li Notion: Put the cursor before the symbol with the limits and then invoke
2776                math-limits.
2777  * \li Syntax: math-limits [<STATE>]
2778  * \li Params: <STATE>: limits|nolimits
2779  * \endvar
2780  */
2781                 { LFUN_MATH_LIMITS, "math-limits", Noop, Math },
2782
2783 /*!
2784  * \var lyx::FuncCode lyx::LFUN_MATH_MACRO
2785  * \li Action: Inserts a math macro definition at the cursor position in the text.
2786  * \li Syntax: math-macro <NAME> [<NARGS>] [def]
2787  * \li Params: <NAME>: The name of the macro, e.g. "mymacro".\n
2788                <NARGS>: The number of parameters of the macro. Default is 0.
2789                "def": Has no effect anymore, just for compatibility with former LyX versions.
2790  * \li Origin: ale, 10 May 1997;  sts, 21 Dec 2007
2791  * \endvar
2792  */
2793                 { LFUN_MATH_MACRO, "math-macro", Noop, Math },
2794
2795 /*!
2796  * \var lyx::FuncCode lyx::LFUN_MATH_MACRO_ADD_GREEDY_OPTIONAL_PARAM
2797  * \li Action: Add a greedy optional parameter.
2798  * \li Notion: Add a greedy optional parameter which eats the value
2799                from the following cells in mathed which are in the [value]
2800                format.
2801  * \li Syntax: math-macro-add-greedy-optional-param
2802  * \li Origin: sts, 06 January 2008
2803  * \endvar
2804  */
2805                 { LFUN_MATH_MACRO_ADD_GREEDY_OPTIONAL_PARAM, "math-macro-add-greedy-optional-param", Noop, Math },
2806
2807 /*!
2808  * \var lyx::FuncCode lyx::LFUN_MATH_MACRO_ADD_OPTIONAL_PARAM
2809  * \li Action: Add an optional parameter.
2810  * \li Notion: Insert an optional parameter just behind the
2811                already existing optional parameters.
2812  * \li Syntax: math-macro-add-optional-param
2813  * \li Origin: sts, 06 January 2008
2814  * \endvar
2815  */
2816                 { LFUN_MATH_MACRO_ADD_OPTIONAL_PARAM, "math-macro-add-optional-param", Noop, Math },
2817
2818 /*!
2819  * \var lyx::FuncCode lyx::LFUN_MATH_MACRO_ADD_PARAM
2820  * \li Action: Add a parameter.
2821  * \li Notion: Add a parameter to a Math Macro.
2822  * \li Params: <NUM>: The number of the parameter behind which the new one
2823                will be added (1 for the first, i.e. use 0 for add a
2824                parameter at the left), defaults to the last one.
2825  * \li Syntax: math-macro-add-param <NUM>
2826  * \li Origin: sts, 06 January 2008
2827  * \endvar
2828  */
2829                 { LFUN_MATH_MACRO_ADD_PARAM, "math-macro-add-param", Noop, Math },
2830
2831 /*!
2832  * \var lyx::FuncCode lyx::LFUN_MATH_MACRO_APPEND_GREEDY_PARAM
2833  * \li Action: Append a greedy parameter.
2834  * \li Notion: Append a greedy parameter to a Math Macro which
2835                eats the following mathed cell in every instance of
2836                the macro in the buffer.
2837  * \li Syntax: math-macro-append-greedy-param
2838  * \li Origin: sts, 06 January 2008
2839  * \endvar
2840  */
2841                 { LFUN_MATH_MACRO_APPEND_GREEDY_PARAM, "math-macro-append-greedy-param", Noop, Math },
2842
2843 /*!
2844  * \var lyx::FuncCode lyx::LFUN_MATH_MACRO_FOLD
2845  * \li Action: Fold a Math Macro.
2846  * \li Notion: Fold the Math Macro the cursor is in if it was
2847                unfolded, i.e. displayed as \foo before.
2848  * \li Syntax: math-macro-fold
2849  * \li Origin: sts, 06 January 2008
2850  * \endvar
2851  */
2852                 { LFUN_MATH_MACRO_FOLD, "math-macro-fold", ReadOnly | SingleParUpdate, Math },
2853
2854 /*!
2855  * \var lyx::FuncCode lyx::LFUN_MATH_MACRO_MAKE_NONOPTIONAL
2856  * \li Action: Make a parameter non-optional.
2857  * \li Notion: Turn the last optional parameter of a Math Macro
2858                into a non-optional parameter. The default value is
2859                remembered to be reused later if the user changes his mind.
2860  * \li Syntax: math-macro-make-nonoptional
2861  * \li Origin: sts, 06 January 2008
2862  * \endvar
2863  */
2864                 { LFUN_MATH_MACRO_MAKE_NONOPTIONAL, "math-macro-make-nonoptional", Noop, Math },
2865
2866 /*!
2867  * \var lyx::FuncCode lyx::LFUN_MATH_MACRO_MAKE_OPTIONAL
2868  * \li Action: Make a parameter optional.
2869  * \li Notion: Turn the first non-optional parameter of a Math Macro
2870                into an optional parameter with a default value.
2871  * \li Syntax: math-macro-make-optional
2872  * \li Origin: sts, 06 January 2008
2873  * \endvar
2874  */
2875                 { LFUN_MATH_MACRO_MAKE_OPTIONAL, "math-macro-make-optional", Noop, Math },
2876
2877 /*!
2878  * \var lyx::FuncCode lyx::LFUN_MATH_MACRO_REMOVE_GREEDY_PARAM
2879  * \li Action: Remove a greedy parameter.
2880  * \li Notion: Remove a greedy parameter of a Math Macro and spit
2881                out the values of it in every instance of the macro
2882                in the buffer. If it is an optional parameter the [valud]
2883                format is used.
2884  * \li Syntax: math-macro-remove-greedy-param
2885  * \li Origin: sts, 06 January 2008
2886  * \endvar
2887  */
2888                 { LFUN_MATH_MACRO_REMOVE_GREEDY_PARAM, "math-macro-remove-greedy-param", Noop, Math },
2889
2890 /*!
2891  * \var lyx::FuncCode lyx::LFUN_MATH_MACRO_REMOVE_OPTIONAL_PARAM
2892  * \li Action: Remove the last optional parameter.
2893  * \li Notion: Remove the last optional parameter of a Math Macro and
2894                remove it in all the instances of the macro in the buffer.
2895  * \li Syntax: math-macro-remove-optional-param
2896  * \li Origin: sts, 06 January 2008
2897  * \endvar
2898  */
2899                 { LFUN_MATH_MACRO_REMOVE_OPTIONAL_PARAM, "math-macro-remove-optional-param", Noop, Math },
2900
2901 /*!
2902  * \var lyx::FuncCode lyx::LFUN_MATH_MACRO_REMOVE_PARAM
2903  * \li Action: Remove the last parameter.
2904  * \li Notion: Remove the last parameter of a Math Macro and
2905                remove its value in all instances of the macro
2906                in the buffer.
2907  * \li Params: <NUM>: The number of the parameter to be deleted (1 for
2908                the first), defaults to the last one.
2909  * \li Syntax: math-macro-remove-param <NUM>
2910  * \li Origin: sts, 06 January 2008
2911  * \endvar
2912  */
2913                 { LFUN_MATH_MACRO_REMOVE_PARAM, "math-macro-remove-param", Noop, Math },
2914
2915 /*!
2916  * \var lyx::FuncCode lyx::LFUN_MATH_MACRO_UNFOLD
2917  * \li Action: Unfold a Math Macro.
2918  * \li Notion: Unfold the Math Macro the cursor is in, i.e.
2919                display it as \foo.
2920  * \li Syntax: math-macro-unfold
2921  * \li Origin: sts, 06 January 2008
2922  * \endvar
2923  */
2924                 { LFUN_MATH_MACRO_UNFOLD, "math-macro-unfold", ReadOnly | SingleParUpdate, Math },
2925
2926 /*!
2927  * \var lyx::FuncCode lyx::LFUN_MATH_MATRIX
2928  * \li Action: Inserts a matrix.
2929  * \li Syntax: math-matrix <COLS> <ROWS> [<ALIGN>]
2930  * \li Params: <ALIGN>: Alignment is a word composed of the vertical alignment
2931                         (b, c or t) (i.e. 1 char) and the horizontal alignments
2932                         (l, c or r) (i.e. <COL> chars).
2933  * \li Sample: math-matrix 3 3 bccc
2934  * \endvar
2935  */
2936                 { LFUN_MATH_MATRIX, "math-matrix", Noop, Math },
2937
2938 /*!
2939  * \var lyx::FuncCode lyx::LFUN_MATH_MODE
2940  * \li Action: In text mode enters math mode (i.e. puts math insets on the current
2941                cursor position), in math mode enters text mode inside math expression.
2942  * \li Notion: If there is some selected text, it puts the text inside created math box.
2943  * \li Syntax: math-mode [on|<ARG>]
2944  * \li Params: <ARG>: eventual argument (LaTeX code) is passed to #LFUN_MATH_INSERT .\n
2945                 "on": allow only entering of math mode from text mode.
2946  * \li Origin: Alejandro, 4 Jun 1996
2947  * \endvar
2948  */
2949                 { LFUN_MATH_MODE, "math-mode", Noop, Math },
2950
2951 /*!
2952  * \var lyx::FuncCode lyx::LFUN_MATH_MUTATE
2953  * \li Action: Mutates the type of math inset to the newly selected one.
2954  * \li Syntax: math-mutate <TYPE>
2955  * \li Params: <TYPE>: none|simple|equation|eqnarray|align|alignat|xalignat|xxalignat|
2956                        multline|gather|flalign
2957  * \li Origin: Andre, 23 May 2001
2958  * \endvar
2959  */
2960                 { LFUN_MATH_MUTATE, "math-mutate", Noop, Math },
2961
2962 /*!
2963  * \var lyx::FuncCode lyx::LFUN_MATH_NUMBER_LINE_TOGGLE
2964  * \li Action: Toggles numbering of the current formula line.
2965  * \li Notion: Must be in display formula mode.
2966  * \li Syntax: math-number-line-toggle
2967  * \li Origin: Alejandro, 18 Jun 1996
2968  * \endvar
2969  */
2970                 { LFUN_MATH_NUMBER_LINE_TOGGLE, "math-number-line-toggle", Noop, Math },
2971
2972 /*!
2973  * \var lyx::FuncCode lyx::LFUN_MATH_NUMBER_TOGGLE
2974  * \li Action: Toggles numbering/labeling of the current formula.
2975  * \li Notion: Must be in display formula mode.
2976  * \li Syntax: math-number-toggle
2977  * \li Origin: Alejandro, 4 Jun 1996
2978  * \endvar
2979  */
2980                 { LFUN_MATH_NUMBER_TOGGLE, "math-number-toggle", Noop, Math },
2981
2982 /*!
2983  * \var lyx::FuncCode lyx::LFUN_MATH_SIZE
2984  * \li Action: Changes arbitrarily the size used by math fonts inside a context.
2985  * \li Notion: Provides an interface to the LaTeX math mode font size commands.
2986  * \li Syntax: math-size <STYLE>
2987  * \li Params: <STYLE>: \displaystyle|\textstyle|\scriptstyle|\scriptscriptstyle
2988  * \li Origin: Alejandro, 15 Aug 1996; sanda, 14 Jun 2008
2989  * \endvar
2990  */
2991                 { LFUN_MATH_SIZE, "math-size", Noop, Math },
2992
2993 /*!
2994  * \var lyx::FuncCode lyx::LFUN_MATH_SPACE
2995  * \li Action: Inserts space into math expression.
2996  * \li Notion: Use spacebar after entering this space to change type of space.
2997  * \li Syntax: math-space [<TYPE>] [<LEN>]
2998  * \li Params: <TYPE>: negative spaces: !|negthinspace|negmedspace|negthickspace \n
2999                        positive spaces: ,|thinspace|:|medspace|;|thickspace|enskip|quad|qquad \n
3000                        custom space: hspace \n
3001                        "," used by default.\n
3002                        Note that ! is equivalent to negthinspace, , = thinspace,
3003                        : = medspace, and ; = thickspace.\n
3004                <LEN>: length for custom spaces (hspace)
3005  * \li Origin: Andre, 25 Jul 2001; sanda, 16 Jun 2008
3006  * \endvar
3007  */
3008                 { LFUN_MATH_SPACE, "math-space", Noop, Math },
3009
3010 /*!
3011  * \var lyx::FuncCode lyx::LFUN_MATH_SUBSCRIPT
3012  * \li Action: Enters subscript expression in math expression.
3013  * \li Syntax: math-subscript
3014  * \li Origin: vermeer, 12 Dec 2001
3015  * \endvar
3016  */
3017                 { LFUN_MATH_SUBSCRIPT, "math-subscript", Noop, Math },
3018
3019 /*!
3020  * \var lyx::FuncCode lyx::LFUN_MATH_SUPERSCRIPT
3021  * \li Action: Enters superscript expression in math expression.
3022  * \li Syntax: math-superscript
3023  * \li Origin: vermeer, 12 Dec 2001
3024  * \endvar
3025  */
3026                 { LFUN_MATH_SUPERSCRIPT, "math-superscript", Noop, Math },
3027
3028 /*!
3029  * \var lyx::FuncCode lyx::LFUN_MENU_OPEN
3030  * \li Action: Opens the menu given by its name.
3031  * \li Syntax: menu-open <NAME>
3032  * \li Params: <NAME>: menu name. See various .inc files in lib/ui for candidates.
3033  * \endvar
3034  */
3035                 { LFUN_MENU_OPEN, "menu-open", NoBuffer, Buffer },
3036
3037 /*!
3038  * \var lyx::FuncCode lyx::LFUN_MESSAGE
3039  * \li Action: Shows message in statusbar (for script purposes).
3040  * \li Syntax: message <STRING>
3041  * \li Origin: Lgb, 8 Apr 2001
3042  * \endvar
3043  */
3044                 { LFUN_MESSAGE, "message", NoBuffer, System },
3045
3046 /*!
3047  * \var lyx::FuncCode lyx::LFUN_META_PREFIX
3048  * \li Action: Simulate halting Meta key (Alt key on PCs).
3049  * \li Notion: Used for buffer edition not for GUI control.
3050  * \li Syntax: meta-prefix
3051  * \endvar
3052  */
3053                 { LFUN_META_PREFIX, "meta-prefix", NoBuffer, System },
3054
3055 /*!
3056  * \var lyx::FuncCode lyx::LFUN_MOUSE_DOUBLE
3057  * \li Action: This function is called when double click on mouse button is
3058                pressed (inside workarea). Action depends on the context.
3059  * \li Notion: This is an internal LFUN, not to be used by users.
3060  * \li Origin: Andre, 9 Aug 2002
3061  * \endvar
3062  */
3063                 { LFUN_MOUSE_DOUBLE, "", ReadOnly, Hidden },
3064
3065 /*!
3066  * \var lyx::FuncCode lyx::LFUN_MOUSE_MOTION
3067  * \li Action: This function is called when mouse cursor is moving over the text.
3068                Action depends on the context.
3069  * \li Notion: This is an internal LFUN, not to be used by users.
3070  * \li Origin: Andre, 9 Aug 2002
3071  * \endvar
3072  */
3073                 { LFUN_MOUSE_MOTION, "", ReadOnly | SingleParUpdate, Hidden },
3074
3075 /*!
3076  * \var lyx::FuncCode lyx::LFUN_MOUSE_PRESS
3077  * \li Action: This function is called when mouse button is pressed (inside workarea).
3078                Action depends on the context.
3079  * \li Notion: This is an internal LFUN, not to be used by users.
3080  * \li Origin: Andre, 9 Aug 2002
3081  * \endvar
3082  */
3083                 { LFUN_MOUSE_PRESS, "", ReadOnly, Hidden },
3084
3085 /*!
3086  * \var lyx::FuncCode lyx::LFUN_MOUSE_RELEASE
3087  * \li Action: This function is called when mouse button is released (inside workarea).
3088                Action depends on the context.
3089  * \li Notion: This is an internal LFUN, not to be used by users.
3090  * \li Origin: Andre, 9 Aug 2002
3091  * \endvar
3092  */
3093                 { LFUN_MOUSE_RELEASE, "", ReadOnly, Hidden },
3094
3095
3096 /*!
3097  * \var lyx::FuncCode lyx::LFUN_MOUSE_TRIPLE
3098  * \li Action: This function is called when triple click on mouse button is
3099                pressed (inside workarea). Action depends on the context.
3100  * \li Notion: This is an internal LFUN, not to be used by users.
3101  * \li Origin: Andre, 9 Aug 2002
3102  * \endvar
3103  */
3104                 { LFUN_MOUSE_TRIPLE, "", ReadOnly, Hidden },
3105
3106 /*!
3107  * \var lyx::FuncCode lyx::LFUN_NEWLINE_INSERT
3108  * \li Action: Inserts a line break or new line.
3109  * \li Syntax: newline-insert [<ARG>]
3110  * \li Params: <ARG>: <newline|linebreak> default: newline
3111  * \li Origin: spitz, 25 Mar 2008
3112  * \endvar
3113  */
3114                 { LFUN_NEWLINE_INSERT, "newline-insert", Noop, Edit },
3115
3116 /*!
3117  * \var lyx::FuncCode lyx::LFUN_NEWPAGE_INSERT
3118  * \li Action: Inserts a new page.
3119  * \li Syntax: newpage-insert <ARG>
3120  * \li Params: <ARG>: <newpage|pagebreak|clearpage|cleardoublepage> default: newpage
3121  * \li Origin: uwestoehr, 24 Nov 2007
3122  * \endvar
3123  */
3124                 { LFUN_NEWPAGE_INSERT, "newpage-insert", Noop, Edit },
3125
3126 /*!
3127  * \var lyx::FuncCode lyx::LFUN_NOMENCL_INSERT
3128  * \li Action: Inserts Nomenclature entry.
3129  * \li Notion: It automatically takes the word on the cursor position if no symbol is given.
3130  * \li Syntax: nomencl-insert [<SYMBOL>]
3131  * \li Origin: Ugras, 4 Nov 2006
3132  * \endvar
3133  */
3134                 { LFUN_NOMENCL_INSERT, "nomencl-insert", Noop, Edit },
3135
3136 /*!
3137  * \var lyx::FuncCode lyx::LFUN_NOMENCLATURE_PRINT
3138  * \li Action: Inserts list of Nomenclature entries.
3139  * \li Syntax: nomenclature-print
3140  * \li Origin: Ugras, 4 Nov 2006
3141  * \endvar
3142  */
3143                 { LFUN_NOMENCL_PRINT, "nomencl-print", Noop, Edit },
3144
3145
3146 /*!
3147  * \var lyx::FuncCode lyx::LFUN_NOTE_INSERT
3148  * \li Action: Inserts Note on the current cursor position,
3149                move selection inside the inset.
3150  * \li Syntax: note-insert [<TYPE>]
3151  * \li Params: <TYPE>: <Note|Greyedout|Comment> default: Note
3152  * \endvar
3153  */
3154                 { LFUN_NOTE_INSERT, "note-insert", Noop, Edit },
3155
3156 /*!
3157  * \var lyx::FuncCode lyx::LFUN_NOTE_NEXT
3158  * \li Action: Moves the cursor to the beginning of next Note inset.
3159  * \li Syntax: note-next
3160  * \endvar
3161  */
3162                 { LFUN_NOTE_NEXT, "note-next", ReadOnly, Edit },
3163
3164 /*!
3165  * \var lyx::FuncCode lyx::LFUN_OUTLINE_DOWN
3166  * \li Action: Move the current group in the downward direction in the
3167                structure of the document.
3168  * \li Notion: The "group" can be Part/Chapter/Section/etc. It moves
3169                the whole substructure of the group.
3170  * \li Syntax: outline-down
3171  * \li Origin: Vermeer, 23 Mar 2006
3172  * \endvar
3173  */
3174                 { LFUN_OUTLINE_DOWN, "outline-down", Noop, Edit },
3175
3176 /*!
3177  * \var lyx::FuncCode lyx::LFUN_OUTLINE_IN
3178  * \li Action: Moves the current group in the downward direction in the
3179                hierarchy of the document structure.
3180  * \li Notion: Part -> Chapter -> Section -> etc.
3181  * \li Syntax: outline-in
3182  * \li Origin: Vermeer, 23 Mar 2006
3183  * \endvar
3184  */
3185                 { LFUN_OUTLINE_IN, "outline-in", Noop, Edit },
3186
3187 /*!
3188  * \var lyx::FuncCode lyx::LFUN_OUTLINE_OUT
3189  * \li Action: Moves the current group in the upward direction in the
3190                hierarchy of the document structure.
3191  * \li Notion: Part <- Chapter <- Section <- etc.
3192  * \li Syntax: outline-out
3193  * \li Origin: Vermeer, 23 Mar 2006
3194  * \endvar
3195  */
3196                 { LFUN_OUTLINE_OUT, "outline-out", Noop, Edit },
3197
3198
3199 /*!
3200  * \var lyx::FuncCode lyx::LFUN_OUTLINE_UP
3201  * \li Action: Move the current group in the upward direction in the
3202                structure of the document.
3203  * \li Notion: The "group" can be Part/Chapter/Section/etc. It moves
3204                the whole substructure of the group.
3205  * \li Syntax: outline-up
3206  * \li Origin: Vermeer, 23 Mar 2006
3207  * \endvar
3208  */
3209                 { LFUN_OUTLINE_UP, "outline-up", Noop, Edit },
3210
3211 /*!
3212  * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_BREAK
3213  * \li Action: Breaks the current paragraph at the current location.
3214  * \li Notion: Removes the selection.
3215  * \li Syntax: paragraph-break [<LAYOUT>] [ignoresep]
3216  * \li Params: <LAYOUT>: "inverse" - decreases depth by one (or change layout
3217                          to default layout) when the cursor is at the end of
3218                          the line.\n
3219                ignoresep: Do not account for paragraph separators while breaking.
3220  * \endvar
3221  */
3222                 { LFUN_PARAGRAPH_BREAK, "paragraph-break", Noop, Edit },
3223
3224 /*!
3225  * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_DOWN
3226  * \li Action: Move the cursor to the next paragraph (or beginning of the current one)
3227                in downward direction.
3228  * \li Syntax: paragraph-down
3229  * \li Origin: Asger, 1 Oct 1996
3230  * \endvar
3231  */
3232                 { LFUN_PARAGRAPH_DOWN, "paragraph-down", ReadOnly | NoUpdate, Edit },
3233
3234 /*!
3235  * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_DOWN_SELECT
3236  * \li Action: Move the cursor and select the text to the next paragraph (or
3237                beginning of the current one) in downward direction.
3238  * \li Syntax: paragraph-down-select
3239  * \li Origin: Asger, 1 Oct 1996
3240  * \endvar
3241  */
3242                 { LFUN_PARAGRAPH_DOWN_SELECT, "paragraph-down-select", ReadOnly, Edit },
3243
3244 /*!
3245  * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_GOTO
3246  * \li Action: Jump to a paragraph given by its id number and optionally the
3247                desired position within the paragraph.
3248                If given four arguments id_start, pos_start, id_end, pos_end,
3249                perform a selection from start to end.
3250  * \li Notion: Note that id number of paragraph is not the sequential number of
3251                paragraph seen on the screen. Moreover the id is unique for all
3252                opened buffers (documents). Both ids must belong to the same
3253                buffer.
3254  * \li Syntax: paragraph-goto <PAR_ID> <POS_IN_PAR> [<PAR_ID> <POS_IN_PAR>]
3255  * \li Params: <PAR_ID>:  paragraph id \n
3256                <POS_IN_PAR>: desired position within the paragraph
3257  * \li Origin: Dekel, 26 Aug 2000
3258                gmunch, 5 Sep 2016
3259  * \endvar
3260  */
3261                 { LFUN_PARAGRAPH_GOTO, "paragraph-goto", ReadOnly | NoInternal, Edit },
3262
3263 /*!
3264  * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_MOVE_DOWN
3265  * \li Action: Moves the current paragraph downwards in the document.
3266  * \li Syntax: paragraph-move-down
3267  * \li Origin: Edwin, 8 Apr 2006
3268  * \endvar
3269  */
3270                 { LFUN_PARAGRAPH_MOVE_DOWN, "paragraph-move-down", Noop, Edit },
3271
3272 /*!
3273  * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_MOVE_UP
3274  * \li Action: Moves the current paragraph upwards in the document.
3275  * \li Notion: Movement through the document will possibly break the paragraph-depth
3276                (e.g. itemize structure).
3277  * \li Syntax: paragraph-move-up
3278  * \li Origin: Edwin, 8 Apr 2006
3279  * \endvar
3280  */
3281                 { LFUN_PARAGRAPH_MOVE_UP, "paragraph-move-up", Noop, Edit },
3282
3283
3284 /*!
3285  * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_PARAMS
3286  * \li Action: Change paragraph settings.
3287  * \li Notion: Modifies the current paragraph, or currently selected paragraphs.
3288                This function only modifies, and does not override, existing settings.
3289                Note that the "leftindent" indent setting is deprecated.
3290  * \li Syntax: paragraph-params [<INDENT>] [<SPACING>] [<ALIGN>] [<OTHERS>]
3291  * \li Params: <INDENT>:  \noindent|\indent|\indent-toggle|\leftindent LENGTH\n
3292                <SPACING>: \paragraph_spacing default|single|onehalf|double|other SIZE \n
3293                <ALIGN>:   \align block|left|right|center|default\n
3294                <OTHERS>:  \labelwidthstring WIDTH|\start_of_appendix
3295  * \li Origin: rgh, Aug 15 2007
3296  * \endvar
3297  */
3298                 { LFUN_PARAGRAPH_PARAMS, "paragraph-params", Noop, Edit },
3299
3300 /*!
3301  * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_PARAMS_APPLY
3302  * \li Action: Change paragraph settings.
3303  * \li Notion: Overwrite all nonspecified settings to the default ones.
3304                Use paragraph-params lfun if you don't want to overwrite others settings.
3305  * \li Syntax: paragraph-params-apply <INDENT> <SPACING> <ALIGN> <OTHERS>
3306  * \li Params: For parameters see #LFUN_PARAGRAPH_PARAMS
3307  * \li Origin: leeming, 30 Mar 2004
3308  * \endvar
3309  */
3310                 { LFUN_PARAGRAPH_PARAMS_APPLY, "paragraph-params-apply", Noop, Edit },
3311
3312 /*!
3313  * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_UP
3314  * \li Action: Move the cursor to the next paragraph (or beginning of the current one)
3315                in upward direction.
3316  * \li Syntax: paragraph-up
3317  * \li Origin: Asger, 1 Oct 1996
3318  * \endvar
3319  */
3320                 { LFUN_PARAGRAPH_UP, "paragraph-up", ReadOnly | NoUpdate, Edit },
3321
3322 /*!
3323  * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_UPDATE
3324  * \li Action: Updates the values inside the paragraph dialog from the paragraph.
3325  * \li Notion: This is an internal LFUN, not to be used by users. Called internally
3326                by #LFUN_DIALOG_UPDATE.
3327  * \li Origin: leeming, 13 Mar 2003
3328  * \endvar
3329  */
3330                 { LFUN_PARAGRAPH_UPDATE, "", Noop, Hidden },
3331
3332 /*!
3333  * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_SELECT
3334  * \li Action: Move cursor to beginning of current paragraph
3335                and select to the end in downward direction
3336  * \li Notion: This function is by default bound to triple mouse click
3337  * \li Syntax: paragraph-select
3338  * \li Origin: Kornel, 16 Apr 2019
3339  * \endvar
3340  */
3341                 { LFUN_PARAGRAPH_SELECT, "paragraph-select", ReadOnly, Edit },
3342
3343 /*!
3344  * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_UP_SELECT
3345  * \li Action: Move the cursor and select the text to the next paragraph (or
3346                beginning of the current one) in upward direction.
3347  * \li Syntax: paragraph-up-select
3348  * \li Origin: Asger, 1 Oct 1996
3349  * \endvar
3350  */
3351                 { LFUN_PARAGRAPH_UP_SELECT, "paragraph-up-select", ReadOnly, Edit },
3352
3353 /*!
3354  * \var lyx::FuncCode lyx::LFUN_PASTE
3355  * \li Action: Pastes material (text or picture) from the active clipboard.
3356  * \li Syntax: paste [<TYPE>|<NUM>]
3357  * \li Params: <TYPE>: emf|pdf|png|jpeg|linkback|wmf|latex|html \n
3358                <NUM>: number of the selection in the internal clipboard stack to be pasted.
3359  * \endvar
3360  */
3361                 { LFUN_PASTE, "paste", Noop, Edit },
3362
3363 /*!
3364  * \var lyx::FuncCode lyx::LFUN_PHANTOM_INSERT
3365  * \li Action: Inserts phantom on the current cursor position,
3366                move selection inside the inset.
3367  * \li Syntax: phantom-insert [<TYPE>]
3368  * \li Params: <TYPE>: <Phantom|HPhantom|VPhantom> default: Phantom
3369  * \li Origin: uwestoehr, 30 Jan 2009
3370  * \endvar
3371  */
3372                 { LFUN_PHANTOM_INSERT, "phantom-insert", Noop, Edit },
3373
3374 /*!
3375  * \var lyx::FuncCode lyx::LFUN_PREFERENCES_SAVE
3376  * \li Action: Save user preferences.
3377  * \li Syntax: preferences-save
3378  * \li Origin: Lgb, 27 Nov 1999
3379  * \endvar
3380  */
3381                 { LFUN_PREFERENCES_SAVE, "preferences-save", NoBuffer, System },
3382
3383 /*!
3384  * \var lyx::FuncCode lyx::LFUN_PREVIEW_INSERT
3385  * \li Action: Inserts a new preview inset.
3386  * \li Syntax: preview-insert
3387  * \li Origin: vfr, 28 Mar 2010
3388  * \endvar
3389  */
3390                 { LFUN_PREVIEW_INSERT, "preview-insert", Noop, Edit },
3391
3392 /*!
3393  * \var lyx::FuncCode lyx::LFUN_PRIMARY_SELECTION_PASTE
3394  * \li Action: Pastes the currently selected text.
3395  * \li Notion: Primary selection mechanism is linux-only thing.
3396  * \li Syntax: primary-selection-paste [<ARG>]
3397  * \li Params: <ARG>: "paragraph" will cause pasting as one paragraph, i.e. "Join lines".
3398  * \endvar
3399  */
3400                 { LFUN_PRIMARY_SELECTION_PASTE, "primary-selection-paste", Noop, Edit },
3401
3402 /*!
3403  * \var lyx::FuncCode lyx::LFUN_QUOTE_INSERT
3404  * \li Action: Inserts quotes according to the type and quote-language preference.
3405  * \li Notion: Currently 15 different quote styles are distinguished (see params).
3406  * \li Syntax: quote-insert [<LEVEL>] [<SIDE>] [<STYLE>]
3407  * \li Params: <LEVEL>: 'inner' for (i.e., secondary, usually single) quotes, otherwise
3408  *                       outer (i.e., primary, usually double) quotes will be used.\n
3409  *             <SIDE>:  'opening' for opening quotes, 'closing' for closing quotes,
3410  *                       otherwise the side will be guessed from the context.\n
3411  *             <STYLE>: 'british' for `British' quote style (with ``inner quotation'')\n
3412  *                      'cjk' for Chinese/Japanese/Korean corner bracket quotation marks\n
3413  *                      'cjk-angle' for Chinese/Japanese/Korean angle bracket quotation marks\n
3414  *                      'danish' for >>Danish<< quote style (with >inner quotation<)\n
3415  *                      'english' for ``English'' quote style (with `inner quotation')\n
3416  *                      'french' for <<french>> quote style (with ``inner quotation'')\n
3417  *                      'frenchin' for <<frenchin>> quote style (with <<inner quotation>>) ["in" = Imprimerie Nationale]\n
3418  *                      'german' for ,,German`` quote style (with ,inner quotation`)\n
3419  *                      'plain' for "Plain" quote style (with 'inner quotation')\n
3420  *                      'polish' for ,,Polish'' quote style (with ,inner quotation')\n
3421  *                      'swedish' for ''Swedish'' quote style (with 'inner quotation')\n
3422  *                      'swedishg' for >>swedishg>> quote style (with 'inner quotation') ["g" = Guillemets]\n
3423  *                      'swiss' for <<Swiss>> quote style (with <inner quotation>)\n
3424  *                      'russian' for <<Russian>> quote style (with ,,inner quotation``)\n
3425  *                      'dynamic' for Dynamic quotation marks which inherit the global
3426  *                                document style\n
3427  *                      If no quote style is specified, the document-wide will be used.
3428  * \endvar
3429  */
3430                 { LFUN_QUOTE_INSERT, "quote-insert", Noop, Edit },
3431
3432 /*!
3433  * \var lyx::FuncCode lyx::LFUN_RECONFIGURE
3434  * \li Action: Reconfigure the automatic settings.
3435  * \li Syntax: reconfigure
3436  * \li Origin: Asger, 14 Feb 1997
3437  * \endvar
3438  */
3439                 { LFUN_RECONFIGURE, "reconfigure", NoBuffer, System },
3440
3441 /*!
3442  * \var lyx::FuncCode lyx::LFUN_REDO
3443  * \li Action: Redoes the last thing undone.
3444  * \li Syntax: redo
3445  * \endvar
3446  */
3447                 { LFUN_REDO, "redo", ReadOnly, Edit },
3448
3449 /*!
3450  * \var lyx::FuncCode lyx::LFUN_REFERENCE_NEXT
3451  * \li Action: Go to the next label or cross-reference.
3452  * \li Syntax: reference-next
3453  * \li Origin: Dekel, 14 Jan 2001
3454  * \endvar
3455  */
3456                 { LFUN_REFERENCE_NEXT, "reference-next", ReadOnly, Edit },
3457
3458
3459 /*!
3460  * \var lyx::FuncCode lyx::LFUN_REGEXP_MODE
3461  * \li Action: Enters regexp mode (i.e., puts regexp insets on the current
3462                cursor position). Used by the advanced search dialog.
3463  * \li Notion: If there is any selected text, then it is moved inside the created
3464                regexp inset.
3465  * \li Syntax: regexp-mode [<ARG>]
3466  * \li Params: <ARG>: eventual argument (regular expression).
3467  * \li Origin: Tommaso, 4 Oct 2008
3468  * \endvar
3469  */
3470                 { LFUN_REGEXP_MODE, "regexp-mode", Noop, Math },
3471
3472 /*!
3473  * \var lyx::FuncCode lyx::LFUN_REPEAT
3474  * \li Action: Repeat the given command.
3475  * \li Notion: fails when the repeat count is greater than 10000.
3476  * \li Syntax: repeat <COUNT> <LFUN-COMMAND>
3477  * \li Origin: Andre, 27 Oct 2003
3478  * \endvar
3479  */
3480                 { LFUN_REPEAT, "repeat", NoBuffer, Edit },
3481
3482 /*!
3483  * \var lyx::FuncCode lyx::LFUN_SEARCH_IGNORE
3484  * \li Action: Enables/disables searching for features in findadv
3485  * \li Syntax: search-ignore <type> <value>
3486  * \li Params: <type>: language|color|sectioning|font|series|shape|family|markup|underline|strike|deleted
3487  * \li Params: <value>: true|false
3488  * \endvar
3489  */
3490                 { LFUN_SEARCH_IGNORE, "search-ignore", ReadOnly|NoBuffer|NoUpdate, System },
3491
3492 /*!
3493  * \var lyx::FuncCode lyx::LFUN_SCREEN_DOWN
3494  * \li Action: Moves the cursor one page in downward direction.
3495  * \li Syntax: screen-down
3496  * \endvar
3497  */
3498                 { LFUN_SCREEN_DOWN, "screen-down", ReadOnly, Edit },
3499
3500 /*!
3501  * \var lyx::FuncCode lyx::LFUN_SCREEN_DOWN_SELECT
3502  * \li Action: Moves the cursor one screen in downward direction adding the current
3503                position to the selection.
3504  * \li Syntax: screen-down-select
3505  * \endvar
3506  */
3507                 { LFUN_SCREEN_DOWN_SELECT, "screen-down-select", ReadOnly, Edit },
3508
3509 /*!
3510  * \var lyx::FuncCode lyx::LFUN_SCREEN_FONT_UPDATE
3511  * \li Action: Update fonts and its metrics.
3512  * \li Notion: Automatically called after zoom, dpi, font names, or norm change.
3513  * \li Syntax: screen-font-update
3514  * \li Origin: ARRae, 13 Aug 2000
3515  * \endvar
3516  */
3517                 { LFUN_SCREEN_FONT_UPDATE, "screen-font-update", NoBuffer, Layout },
3518
3519 /*!
3520  * \var lyx::FuncCode lyx::LFUN_SCREEN_RECENTER
3521  * \li Action: Recenters the screen on the current cursor position.
3522  * \li Syntax: screen-recenter
3523  * \endvar
3524  */
3525                 { LFUN_SCREEN_RECENTER, "screen-recenter", ReadOnly, Edit },
3526
3527
3528 /*!
3529  * \var lyx::FuncCode lyx::LFUN_SCREEN_SHOW_CURSOR
3530  * \li Action: Repositions the screen such that the cursor is visible.
3531  * \li Syntax: screen-show-cursor
3532  * \li Origin: vfr, 25 Mar 2009
3533  * \endvar
3534  */
3535                 { LFUN_SCREEN_SHOW_CURSOR, "screen-show-cursor", ReadOnly, Edit },
3536
3537
3538 /*!
3539  * \var lyx::FuncCode lyx::LFUN_SCREEN_UP
3540  * \li Action: Moves the cursor one page in upward direction.
3541  * \li Syntax: screen-up
3542  * \endvar
3543  */
3544                 { LFUN_SCREEN_UP, "screen-up", ReadOnly, Edit },
3545
3546 /*!
3547  * \var lyx::FuncCode lyx::LFUN_SCREEN_UP_SELECT
3548  * \li Action: Moves the cursor one page in upward direction adding the current
3549                position to the selection.
3550  * \li Syntax: screen-up-select
3551  * \endvar
3552  */
3553                 { LFUN_SCREEN_UP_SELECT, "screen-up-select", ReadOnly, Edit },
3554
3555 /*!
3556  * \var lyx::FuncCode lyx::LFUN_SCRIPT_INSERT
3557  * \li Action: Inserts a subscript or superscript inset.
3558  * \li Syntax: script-insert <TYPE>
3559  * \li Params: <TYPE>: subscript|superscript
3560  * \li Origin: Georg, 23 Nov 2010
3561  * \endvar
3562  */
3563                 { LFUN_SCRIPT_INSERT, "script-insert", Noop, Edit },
3564
3565 /*!
3566  * \var lyx::FuncCode lyx::LFUN_SCROLL
3567  * \li Action: Scroll the buffer view.
3568  * \li Notion: Only scrolls the screen up or down; does not move the cursor.
3569  * \li Syntax: scroll <TYPE> <QUANTITY>
3570  * \li Params: <TYPE>:  line|page\n
3571                <QUANTITY>: up|down|<number>
3572  * \li Origin: Abdel, Dec 27 2007
3573  * \endvar
3574  */
3575                 { LFUN_SCROLL, "scroll", ReadOnly, Edit },
3576
3577 /*!
3578  * \var lyx::FuncCode lyx::LFUN_SECTION_SELECT
3579  * \li Action: Select the whole section.
3580  * \li Notion: The cursor should be in a section heading
3581                before calling this lfun.
3582  * \li Syntax: section-select
3583  * \li Origin: vfr, 05 May 2009
3584  * \endvar
3585  */
3586                 { LFUN_SECTION_SELECT, "section-select", ReadOnly, Edit },
3587
3588
3589 /*!
3590  * \var lyx::FuncCode lyx::LFUN_SELECTION_PASTE
3591  * \li Action: Pastes the internal selection text in permanent selection.
3592  * \li Notion: Created in order to have middle mouse button pasting correct (bound to
3593                command-alternatives selection-paste ; primary-selection-paste paragraph).
3594  * \li Syntax: selection-paste
3595  * \li Origin: lasgouttes, 14 Jan 2009
3596  * \endvar
3597  */
3598                 { LFUN_SELECTION_PASTE, "selection-paste", Noop, Edit },
3599
3600 /*!
3601  * \var lyx::FuncCode lyx::LFUN_SELF_INSERT
3602  * \li Action: Inserts the given string (accordingly to the correct keymap).
3603  * \li Notion: Automatically replace the currently selected text. Depends on lyxrc
3604                settings "auto_region_delete".
3605  * \li Syntax: self-insert <STRING>
3606  * \endvar
3607  */
3608                 { LFUN_SELF_INSERT, "self-insert", SingleParUpdate, Hidden },
3609
3610 /*!
3611  * \var lyx::FuncCode lyx::LFUN_SEPARATOR_INSERT
3612  * \li Action: Inserts an environment separator or latex paragraph break.
3613  * \li Syntax: separator-insert [<ARG>]
3614  * \li Params: <ARG>: <plain|parbreak|latexpar> default: plain
3615  * \li Origin: ef, 2 May 2014
3616  * \endvar
3617  */
3618                 { LFUN_SEPARATOR_INSERT, "separator-insert", Noop, Edit },
3619
3620 /*!
3621  * \var lyx::FuncCode lyx::LFUN_SERVER_GET_FILENAME
3622  * \li Action: Returns path and file name of the currently edited document.
3623  * \li Syntax: server-get-filename
3624  * \endvar
3625  */
3626                 { LFUN_SERVER_GET_FILENAME, "server-get-filename", ReadOnly, System },
3627
3628 /*!
3629  * \var lyx::FuncCode lyx::LFUN_SERVER_GET_LAYOUT
3630  * \li Action: Returns the current layout (that is environment) name
3631                on the cursor position.
3632  * \li Syntax: server-get-layout
3633  * \endvar
3634  */
3635                 { LFUN_SERVER_GET_LAYOUT, "server-get-layout", ReadOnly, System },
3636
3637 /*!
3638  * \var lyx::FuncCode lyx::LFUN_SERVER_GET_STATISTICS
3639  * \li Action: Returns the statistics (number of words and characters)
3640                in the document or in the given selection.
3641  * \li Notion: Note that this function gives the number of words/chars written,
3642                not the number of characters which will be typeset.
3643  * \li Syntax: server-get-statistics [<TYPE>]
3644  * \li Params: <TYPE>: <words|chars|chars-space> The requested count; if not
3645                        specified, the three values are returned, separated
3646                        by a space.\n
3647                 words: count words.\n
3648                 chars: count characters.\n
3649                 chars-space: count characters and spaces.
3650  * \li Origin: brokenclock, Oct 10 2014
3651  * \endvar
3652  */
3653                 { LFUN_SERVER_GET_STATISTICS, "server-get-statistics", ReadOnly, System },
3654
3655 /*!
3656  * \var lyx::FuncCode lyx::LFUN_SERVER_GET_XY
3657  * \li Action: Returns the coordinates of cursor position in the editing area.
3658  * \li Syntax: server-get-xy
3659  * \endvar
3660  */
3661                 { LFUN_SERVER_GET_XY, "server-get-xy", ReadOnly, System },
3662
3663
3664 /*!
3665  * \var lyx::FuncCode lyx::LFUN_SERVER_GOTO_FILE_ROW
3666  * \li Action: Sets the cursor position in LyX based on the row number of generated TeX file.
3667  * \li Notion: This can be useful for DVI inverse-search or detection of the problematic
3668                line from LaTeX compilation. Note that before this function can be used
3669                export to LaTeX output must occur (in order to map the row numbers).
3670  * \li Syntax: server-goto-file-row <FILE[.ext]> <ROW_NUMBER>
3671  * \li Params: <FILE>: the path and filename. Environment variables are expanded in the path.
3672                        In case this LFUN does not work make sure you are giving correct
3673                        path to the file.\n
3674                        If the file is located inside LyX temporary directory it will be
3675                        mapped back into the appropriate opened buffer (e.g. for the case
3676                        of generated .tex file).\n
3677                  .ext: extensions will be automatically replaced by .lyx.\n
3678                  <ROW_NUMBER> The row number of the LaTeX file to which to go.
3679  * \li Sample: server-goto-file-row /home/user/example.lyx 41\n
3680                server-goto-file-row /tmp/lyx_tmpdir.XM3088/lyx_tmpbuf0/example.tex 41
3681  * \li Origin: Edmar, 23 Dec 1998
3682  * \endvar
3683  */
3684                 { LFUN_SERVER_GOTO_FILE_ROW, "server-goto-file-row", ReadOnly | NoBuffer, System },
3685
3686 /*!
3687  * \var lyx::FuncCode lyx::LFUN_SERVER_NOTIFY
3688  * \li Action: Sends notify message about the last key-sequence to client.
3689  * \li Notion: This can be used to grab last key-sequence used inside the LyX window.
3690                See also Debug extensions section in Additional features manual.
3691  * \li Syntax: server-notify
3692  * \endvar
3693  */
3694                 { LFUN_SERVER_NOTIFY, "server-notify", ReadOnly, System },
3695
3696 /*!
3697  * \var lyx::FuncCode lyx::LFUN_SERVER_SET_XY
3698  * \li Action: Sets the cursor position based on the editing area coordinates
3699                (similar to clicking on that point with left mouse button).
3700  * \li Syntax: server-set-xy <X> <Y>
3701  * \endvar
3702  */
3703                 { LFUN_SERVER_SET_XY, "server-set-xy", ReadOnly, System },
3704
3705 /*!
3706  * \var lyx::FuncCode lyx::LFUN_SET_COLOR
3707  * \li Action: Set the given LyX color to the color defined by the X11 name given,
3708  *             and optionally a specific color for dark mode.
3709  * \li Notion: A new color entry is created if the color is unknown.
3710                Color names can be stored as a part of user settings.
3711  * \li Syntax: set-color <LYX_NAME> <X11_NAME> [<X11_DARKNAME>]
3712  * \li Origin: SLior, 11 Jun 2000
3713  * \endvar
3714  */
3715                 { LFUN_SET_COLOR, "set-color", ReadOnly | NoBuffer, System },
3716
3717 /*!
3718  * \var lyx::FuncCode lyx::LFUN_GRAPHICS_SET_GROUP
3719  * \li Action: Set the group for the graphics inset on the cursor position.
3720  * \li Syntax: graphics-set-group [<GROUP>]
3721  * \li Params: <GROUP>: Id for an existing group. In case the Id is an empty string,
3722                         the graphics inset is removed from the current group.
3723  * \li Origin: sanda, 6 May 2008
3724  * \endvar
3725  */
3726                 { LFUN_GRAPHICS_SET_GROUP, "graphics-set-group", Noop, Edit },
3727
3728 /*!
3729  * \var lyx::FuncCode lyx::LFUN_GRAPHICS_UNIFY
3730  * \li Action: Set the same group for all graphics insets in the marked block.
3731  * \li Syntax: graphics-unify [<GROUP>]
3732  * \li Params: <GROUP>: Id for an existing group. In case the Id is an empty string,
3733                         the group Id from the first graphics inset will be used.
3734  * \li Origin: sanda, 7 Feb 2018
3735  * \endvar
3736  */
3737                 { LFUN_GRAPHICS_UNIFY, "graphics-unify", Noop, Edit },
3738
3739 /*!
3740  * \var lyx::FuncCode lyx::LFUN_GRAPHICS_RELOAD
3741  * \li Action: Reloads the image if necessary.
3742  * \li Syntax: graphics-reload
3743  * \li Origin: vfr, 10 Aug 2009
3744  * \endvar
3745  */
3746                 { LFUN_GRAPHICS_RELOAD, "graphics-reload", ReadOnly | AtPoint, Edit },
3747
3748 /*!
3749  * \var lyx::FuncCode lyx::LFUN_SPACE_INSERT
3750  * \li Action: Inserts one of horizontal space insets.
3751  * \li Syntax: space-insert <NAME> [<LEN>]
3752  * \li Params: <NAME>: normal, protected, visible, thin, quad, qquad, enspace,
3753                        enskip, negthinspace, negmedspace, negthickspace, hfill,
3754                        hfill*, dotfill, hrulefill, hspace, hspace* \n
3755                        Only in math mode: med and thick.\n
3756                <LEN>: length for custom spaces (hspace, hspace* for protected)
3757  * \li Origin: spitz, 20 May 2003, Mar 17 2008
3758  * \endvar
3759  */
3760                 { LFUN_SPACE_INSERT, "space-insert", Noop, Edit },
3761
3762 /*!
3763  * \var lyx::FuncCode lyx::LFUN_SPECIALCHAR_INSERT
3764  * \li Action: Inserts various characters into the document.
3765  * \li Syntax: specialchar-insert <CHAR>
3766  * \li Params: <CHAR>: hyphenation, allowbreak, ligature-break, slash,
3767                        nobreakdash, dots, end-of-sentence, menu-separator,
3768                        lyx, tex, latex, latex2e.
3769  * \li Origin: spitz, 6 Dec 2007
3770  * \endvar
3771  */
3772                 { LFUN_SPECIALCHAR_INSERT, "specialchar-insert", Noop, Edit },
3773
3774 /*!
3775  * \var lyx::FuncCode lyx::LFUN_SPELLING_ADD
3776  * \li Action: Add the word under the cursor to the respective
3777  *             spell checker dictionary.
3778  *             The default for the language is retrieved from the cursor position.
3779  * \li Syntax: spelling-add [<STRING>] [<LANG>]
3780  * \li Params: <WORD>: word to add
3781                <LANG>: language name (see file languages)
3782  * \li Origin: spitz, 18 Jan 2010
3783  * \endvar
3784  */
3785                 { LFUN_SPELLING_ADD, "spelling-add", ReadOnly, Edit },
3786
3787 /*!
3788  * \var lyx::FuncCode lyx::LFUN_SPELLING_CONTINUOUSLY
3789  * \li Action: Toggle continuous spell checking.
3790  * \li Syntax: spelling-continuously
3791  * \li Origin: vfr, 24 March 2013
3792  * \endvar
3793  */
3794                 { LFUN_SPELLING_CONTINUOUSLY, "spelling-continuously", ReadOnly, Edit },
3795
3796
3797 /*!
3798  * \var lyx::FuncCode lyx::LFUN_SPELLING_IGNORE
3799  * \li Action: Let the spell checker ignore the word under the cursor
3800  *             in the current session for the given language.
3801  *             The default for the language is retrieved from the cursor position.
3802  * \li Syntax: spelling-ignore [<WORD>] [<LANG>]
3803  * \li Params: <WORD>: word to ignore
3804                <LANG>: language name (see file languages)
3805  * \li Origin: spitz, 18 Jan 2010
3806  * \endvar
3807  */
3808                 { LFUN_SPELLING_IGNORE, "spelling-ignore", ReadOnly, Edit },
3809
3810 /*!
3811  * \var lyx::FuncCode lyx::LFUN_SPELLING_REMOVE
3812  * \li Action: Remove the word under the cursor from the respective
3813  *             spell checker dictionary.
3814  *             The default for the language is retrieved from the cursor position.
3815  * \li Syntax: spelling-remove [<STRING>] [<LANG>]
3816  * \li Params: <WORD>: word to remove
3817  *             <LANG>: language name (see file languages)
3818  * \li Origin: SWitt, 28 July 2010
3819  * \endvar
3820  */
3821                 { LFUN_SPELLING_REMOVE, "spelling-remove", ReadOnly, Edit },
3822
3823
3824 /*!
3825  * \var lyx::FuncCode lyx::LFUN_STATISTICS
3826  * \li Action: Count the statistics (number of words and characters)
3827                in the document or in the given selection and display it
3828                in a dialog box.
3829  * \li Notion: Note that this function gives the number of words/chars written,
3830                not the number of characters which will be typeset.
3831  * \li Syntax: statistics
3832  * \li Origin: lasgouttes, Jan 27 2004; sanda, Jan 8 2008
3833  * \endvar
3834  */
3835                 { LFUN_STATISTICS, "statistics", ReadOnly, System },
3836
3837 /*!
3838  * \var lyx::FuncCode lyx::LFUN_TABULAR_FEATURE
3839  * \li Action: Modify properties of tabulars and table-like math environments.
3840  * \li Syntax: tabular-feature <FEATURE> [<ARG>]
3841  * \li Params: Generally see #LFUN_INSET_INSERT for further details.\n
3842  *             <FEATURE>: append-row|append-column|delete-row|delete-column|copy-row|\n
3843                        copy-column|move-column-right|move-column-left|move-row-down|move-row-up|\n
3844                        set-line-top|set-line-bottom|set-line-left|set-line-right|\n
3845                        toggle-line-top|toggle-line-bottom|toggle-line-left|toggle-line-right|\n
3846                        set-ltrim-top|set-rtrim-top|set-ltrim-bottom|set-rtrim-bottom\n
3847                        toggle-ltrim-top|toggle-rtrim-top|toggle-ltrim-bottom|toggle-rtrim-bottom\n
3848                        align-left|align-right|align-center|align-block|align-decimal|set-decimal-point|\n
3849                        valign-top|valign-bottom|valign-middle|longtabular-align-left|\n
3850                        longtabular-align-center|longtabular-align-right|m-align-left|m-align-right|\n
3851                        m-align-center|m-valign-top|m-valign-bottom|m-valign-middle|multicolumn|\n
3852                        reset-formal-default|set-all-lines|unset-all-lines|toggle-longtabular|\n
3853                        set-longtabular|unset-longtabular|set-pwidth|\n
3854                        set-mpwidth|set-rotate-tabular|unset-rotate-tabular|toggle-rotate-tabular|\n
3855                        set-rotate-cell|unset-rotate-cell|toggle-rotate-cell|set-usebox|set-lthead|\n
3856                        unset-lthead|set-ltfirsthead|unset-ltfirsthead|set-ltfoot|unset-ltfoot|\n
3857                        set-ltlastfoot|unset-ltlastfoot|set-ltnewpage|toggle-ltcaption|\n
3858                        set-special-column|set-special-multicolumn|set-special-multirow|\n
3859                        toggle-booktabs|set-booktabs|unset-booktabs|set-top-space|set-bottom-space|\n
3860                        set-interline-space|set-border-lines|tabular-valign-top|\n
3861                        tabular-valign-middle|tabular-valign-bottom|set-tabular-width|\n
3862                        toggle-varwidth-column
3863                Various math-environment features are handled as well, e.g. add-vline-left/right for\n
3864                the Grid/Array environment.\n
3865                <ARG>: additional argument for some commands, use debug mode to explore its values.
3866  * \li Origin: gm, 10 Dec 2015
3867  * \endvar
3868  */
3869                 { LFUN_TABULAR_FEATURE, "tabular-feature", Noop, Edit },
3870
3871 /*!
3872  * \var lyx::FuncCode lyx::LFUN_TABULAR_INSERT
3873  * \li Action: Inserts table into the document.
3874  * \li Notion: See #LFUN_TABULAR_FEATURE for some more details
3875                about tabular modifications.
3876  * \li Syntax: tabular-insert [<ROWS> <COLUMNS>]
3877  * \li Params: In case no arguments are given show insert dialog.
3878  * \li Origin: Jug, 12 Apr 2000
3879  * \endvar
3880  */
3881                 { LFUN_TABULAR_INSERT, "tabular-insert", Noop, Edit },
3882
3883 /*!
3884  * \var lyx::FuncCode lyx::LFUN_TABULAR_STYLE_INSERT
3885  * \li Action: Inserts table of a given style into the document.
3886  * \li Notion: See #LFUN_TABULAR_FEATURE for some more details
3887                about tabular modifications.
3888  * \li Syntax: tabular-style-insert <style> <ROWS> <COLUMNS>
3889  * \li Params: Valid styles are the names of the files in lib/tabletemplates,
3890  *             minus _1x<n> and .lyx suffix.
3891  * \li Origin: spitz, 25 Mar 2019
3892  * \endvar
3893  */
3894                 { LFUN_TABULAR_STYLE_INSERT, "tabular-style-insert", Noop, Edit },
3895
3896 /*!
3897  * \var lyx::FuncCode lyx::LFUN_TAB_DELETE
3898  * \li Action: Delete a tab or up to an equivalent amount of spaces from
3899                a listings inset.
3900  * \li Notion: It also works on a selection - it removes a tab or spaces from the
3901                beginning of each line spanned by the selection. This is useful if
3902                you want to indent/unindent multiple lines in one action.
3903  * \li Syntax: tab-delete
3904  * \li Origin: vfr, Sep 30 2008
3905  * \endvar
3906  */
3907                 { LFUN_TAB_DELETE, "tab-delete", SingleParUpdate, Edit },
3908
3909 /*!
3910  * \var lyx::FuncCode lyx::LFUN_TAB_GROUP_CLOSE
3911  * \li Action: Close the current tab group.
3912  * \li Notion: This only closes the work areas, not the buffers themselves.
3913                The still opened buffers can be visualized in another tab group.
3914  * \li Syntax: tab-group-close
3915  * \li Origin: Abdel, 21 Feb 2008
3916  * \endvar
3917  */
3918                 { LFUN_TAB_GROUP_CLOSE, "tab-group-close", ReadOnly, Buffer },
3919
3920
3921 /*!
3922  * \var lyx::FuncCode lyx::LFUN_TAB_INSERT
3923  * \li Action: Insert a tab into a listings inset.
3924  * \li Notion: It also works on a selection.
3925  * \li Syntax: tab-insert
3926  * \li Origin: vfr, Sep 30 2008
3927  * \endvar
3928  */
3929                 { LFUN_TAB_INSERT, "tab-insert", SingleParUpdate, Edit },
3930
3931 /*!
3932  * \var lyx::FuncCode lyx::LFUN_TEXTCLASS_APPLY
3933  * \li Action: Sets the text class for the current buffer.
3934  * \li Syntax: textclass-apply <TEXTCLASS>
3935  * \li Params: <TEXTCLASS>: the textclass to set. Note that this must be
3936                    the filename, minus the ".layout" extension.
3937  * \endvar
3938  */
3939                 { LFUN_TEXTCLASS_APPLY, "textclass-apply", NoInternal, Layout },
3940
3941 /*!
3942  * \var lyx::FuncCode lyx::LFUN_TEXTCLASS_LOAD
3943  * \li Action: Loads information for a textclass from disk.
3944  * \li Syntax: textclass-load <TEXTCLASS>
3945  * \li Params: <TEXTCLASS>: the textclass to load. Note that this must be
3946                    the filename, minus the ".layout" extension.
3947  * \endvar
3948  */
3949                 { LFUN_TEXTCLASS_LOAD, "textclass-load", NoInternal, Layout },
3950
3951
3952 /*!
3953  * \var lyx::FuncCode lyx::LFUN_TEXTSTYLE_APPLY
3954  * \li Action: Apply last used text properties.
3955  * \li Syntax: textstyle-apply [<NUM>]
3956  * \li Params: <NUM>: number of the selection in the internal freefonts stack to be applied.
3957  * \li Notion: These properties are stored via #LFUN_TEXTSTYLE_UPDATE, which is
3958                automatically triggered when using Text Style dialog.
3959  * \li Syntax: textstyle-apply
3960  * \li Origin: leeming, 12 Mar 2003
3961  * \endvar
3962  */
3963                 { LFUN_TEXTSTYLE_APPLY, "textstyle-apply", Noop, Layout },
3964
3965 /*!
3966  * \var lyx::FuncCode lyx::LFUN_TEXTSTYLE_UPDATE
3967  * \li Action: Apply text style and update the settings to be used by #LFUN_TEXTSTYLE_APPLY.
3968  * \li Syntax: textstyle-update <FONT_INFO>
3969  * \li Params: <FONT_INFO>: specifies font attributes, e.g. family, series, shape,
3970                             size, emph, noun, underbar, number, color, language,
3971                             toggleall.\n
3972                             Use lyx -dbg action for exact syntax of text-style
3973                             dialog parameters.
3974  * \li Origin: leeming, 12 Mar 2003
3975  * \endvar
3976  */
3977                 { LFUN_TEXTSTYLE_UPDATE, "textstyle-update", Noop, Layout },
3978
3979 /*!
3980  * \var lyx::FuncCode lyx::LFUN_THESAURUS_ENTRY
3981  * \li Action: Look up thesaurus entries with respect to the word under the cursor.
3982  * \li Syntax: thesaurus-entry [<STRING>] [lang=<LANG>]
3983  * \li Params: <STRING>: word to look up
3984                <LANG>: language (see file languages)
3985  * \li Origin: Levon, 20 Jul 2001
3986  * \endvar
3987  */
3988                 { LFUN_THESAURUS_ENTRY, "thesaurus-entry", ReadOnly, Edit },
3989
3990 /*!
3991  * \var lyx::FuncCode lyx::LFUN_TOOLBAR_MOVABLE
3992  * \li Action: Toggles movability of a given toolbar between true/false.
3993  * \li Syntax: toolbar-movable <NAME>
3994  * \li Params: <NAME>: *|standard|extra|table|math|mathmacrotemplate|
3995                         minibuffer|review|view/update|math_panels|vcs|
3996                         view-others|update-others
3997 * \li Origin: daniel, 12 July 2016
3998 * \endvar
3999 */
4000                 { LFUN_TOOLBAR_MOVABLE, "toolbar-movable", NoBuffer, Buffer },
4001
4002 /*!
4003  * \var lyx::FuncCode lyx::LFUN_TOOLBAR_SET
4004  * \li Action: Sets visibility of a given toolbar to on, off, or auto.
4005  * \li Notion: Skipping "auto" when allowauto is false.
4006  * \li Syntax: toolbar-set <NAME> [on|off|auto]
4007  * \li Params: <NAME>: standard|extra|table|math|mathmacrotemplate|\n
4008                        minibuffer|review|view/update|math_panels|vcs|
4009                        view-others|update-others
4010  * \li Origin: spitz, 17 Dec 2020
4011  * \endvar
4012  */
4013                 { LFUN_TOOLBAR_SET, "toolbar-set", NoBuffer, Buffer },
4014
4015 /*!
4016  * \var lyx::FuncCode lyx::LFUN_TOOLBAR_TOGGLE
4017  * \li Action: Toggles visibility of a given toolbar between on/off/auto.
4018  * \li Notion: Skipping "auto" when allowauto is false.
4019  * \li Syntax: toolbar-toggle <NAME> [allowauto]
4020  * \li Params: <NAME>: standard|extra|table|math|mathmacrotemplate|\n
4021                        minibuffer|review|view/update|math_panels|vcs|
4022                        view-others|update-others
4023  * \li Origin: Edwin, 21 May 2007
4024  * \endvar
4025  */
4026                 { LFUN_TOOLBAR_TOGGLE, "toolbar-toggle", NoBuffer, Buffer },
4027
4028 /*!
4029  * \var lyx::FuncCode lyx::LFUN_UI_TOGGLE
4030  * \li Action: Various UI visibility-toggling actions.
4031  * \li Syntax: ui-toggle <statusbar|menubar|scrollbar|frame|fullscreen>
4032  * \li Params: statusbar  : Toggle visibility of the statusbar.\n
4033                menubar    : Toggle visibility of the menubar.\n
4034                scrollbar  : Toggle visibility of the scrollbar.\n
4035                frame      : Toggle visibility of the frames around editing window.\n
4036                fullscreen : Toggle fullscreen mode. This also covers calling the
4037                             previous functions. However #LFUN_TOOLBAR_TOGGLE for the
4038                             custom tweaks of the toolbars should be used.
4039  * \li Origin: sanda, 9 Feb 2007
4040  * \endvar
4041  */
4042                 { LFUN_UI_TOGGLE, "ui-toggle", NoBuffer, Buffer },
4043
4044
4045 /*!
4046  * \var lyx::FuncCode lyx::LFUN_UNDO
4047  * \li Action: Undoes the last edit.
4048  * \li Syntax: undo
4049  * \endvar
4050  */
4051                 { LFUN_UNDO, "undo", ReadOnly, Edit },
4052
4053 /*!
4054  * \var lyx::FuncCode lyx::LFUN_UNICODE_INSERT
4055  * \li Action: Inserts a single unicode character.
4056  * \li Syntax: unicode-insert <CHAR1> <CHAR2> ...
4057  * \li Params: <CHARn>: The character to insert, given as its code
4058                        point, in hexadecimal.
4059  * \li Sample: unicode-insert 0x0100 0x0259
4060  * \li Origin: Lgb, 22 Oct 2006
4061  * \endvar
4062  */
4063                 { LFUN_UNICODE_INSERT, "unicode-insert", Noop, Edit },
4064
4065 /*!
4066  * \var lyx::FuncCode lyx::LFUN_UP
4067  * \li Action: Moves the cursor one line in upward direction.
4068  * \li Syntax: up
4069  * \endvar
4070  */
4071                 { LFUN_UP, "up", ReadOnly | NoUpdate, Edit },
4072
4073 /*!
4074  * \var lyx::FuncCode lyx::LFUN_UP_SELECT
4075  * \li Action: Moves the cursor one line in upward direction adding the current
4076                position to the selection.
4077  * \li Syntax: up-select
4078  * \endvar
4079  */
4080                 { LFUN_UP_SELECT, "up-select", ReadOnly | SingleParUpdate, Edit },
4081
4082 /*!
4083  * \var lyx::FuncCode lyx::LFUN_VC_CHECK_IN
4084  * \li Action: Checks-in/commits the changes of the registered file to the repository.
4085  * \li Notion: In RCS case this also unlocks the file.
4086  * \li Syntax: vc-check-in
4087  * \li Origin: Lgb, 1 Jul 1997
4088  * \endvar
4089  */
4090                 { LFUN_VC_CHECK_IN, "vc-check-in", ReadOnly, System },
4091
4092 /*!
4093  * \var lyx::FuncCode lyx::LFUN_VC_CHECK_OUT
4094  * \li Action: Checks-out the document for edit (and locks it in some cases).
4095  * \li Syntax: vc-check-out
4096  * \li Origin: Lgb, 1 Jul 1997
4097  * \endvar
4098  */
4099                 { LFUN_VC_CHECK_OUT, "vc-check-out", ReadOnly, System },
4100
4101 /*!
4102  * \var lyx::FuncCode lyx::LFUN_VC_COMMAND
4103  * \li Action: Executes external command. This command is intended to support
4104                additional VCS commands.
4105  * \li Syntax: vc-command <FLAG> <PATH> <COMMAND>
4106  * \li Params:  <FLAG>: Flags for the command can be combined together.\n
4107                         U - dUmmy - no flags \n
4108                         D - Doc - need document loaded to proceed \n
4109                         I - dIrty - mark document dirty \n
4110                         R - Reload - ensure that the document is saved and reload it after command execution \n
4111                         M - Message - ask for input string (commit message)\n
4112                 <PATH>: path where to start. $$p will be replaced by the current document path.\n
4113                 <COMMAND>: command to execute. $$i/$$p/$$m will be replaced by the current
4114                            document(with absolute path)/path/message.
4115  * \li Sample: vc-command DR $$p "svn up"
4116  * \li Origin: sanda, 13 Jan 2009
4117  * \endvar
4118  */
4119                 { LFUN_VC_COMMAND, "vc-command", NoBuffer | ReadOnly, System },
4120
4121 /*!
4122  * \var lyx::FuncCode lyx::LFUN_VC_COMPARE
4123  * \li Action: Compares two revisions of the same file under version control.
4124  * \li Syntax: vc-compare [<REV1>] [<REV2>]
4125  * \li Params: Revision number either points directly to commit in history
4126                or if negative number -x it points to (last commit - x).\n
4127                In RCS we subtract only in the last number of revision specification.
4128                Special case "0" is reserved for the last committed revision.\n
4129                <REV1>: Older file.\n
4130                <REV2>: Newer file. Used only if REV1 > 0.\n
4131                If no parameter is given, interactive dialog will be shown.
4132  * \li Sample: Compare current document against last commit\n
4133                vc-compare 0\n
4134                Compare current document against current revision - 5 commits\n
4135                vc-compare -5\n
4136                Compare revisions 120 and 155\n
4137                vc-compare 120 155
4138  * \li Origin: sanda, 12 Feb 2010
4139  * \endvar
4140  */
4141                 { LFUN_VC_COMPARE, "vc-compare", ReadOnly, System },
4142
4143
4144 /*!
4145  * \var lyx::FuncCode lyx::LFUN_VC_COPY
4146  * \li Action: Copies the document to another name.
4147  * \li Notion: Copying with revision history is only supported by SVN.
4148                For RCS and CVS it is simulated by adding the document
4149                under a new name.
4150                Disabled if uncommitted changes exist.
4151  * \li Syntax: vc-copy <FILENAME>
4152  * \li Params: <FILENAME>: New name of the document.\n
4153  *             A file dialog is opened if no filename is given.
4154  * \li Origin: gb, 05 Feb 2013
4155  * \endvar
4156  */
4157                 { LFUN_VC_COPY, "vc-copy", ReadOnly, System },
4158
4159 /*!
4160  * \var lyx::FuncCode lyx::LFUN_VC_LOCKING_TOGGLE
4161  * \li Action: Toggles the locking property of the edited file.
4162  * \li Notion: This is currently implemented only for SVN.
4163  * \li Syntax: vc-locking-toggle
4164  * \li Origin: sanda, 25 Jun 2009
4165  * \endvar
4166  */
4167                 { LFUN_VC_LOCKING_TOGGLE, "vc-locking-toggle", ReadOnly, System },
4168
4169 /*!
4170  * \var lyx::FuncCode lyx::LFUN_VC_REGISTER
4171  * \li Action: Register the document as an file inside version control system.
4172  * \li Notion: File is registered inside cvs, svn or rcs repository acording to the existence
4173                of cvs/svn/rcs entries in the document's directory. \n
4174                See LyX Additional Features Manual (Version Control Chapter) for additional
4175                information.
4176  * \li Syntax: vc-register
4177  * \li Origin: Lgb, 1 Jul 1997
4178  * \endvar
4179  */
4180                 { LFUN_VC_REGISTER, "vc-register", ReadOnly, System },
4181
4182 /*!
4183  * \var lyx::FuncCode lyx::LFUN_VC_RENAME
4184  * \li Action: Renames the document to another name.
4185  * \li Notion: Renaming with revision history is only supported by SVN.
4186                For CVS it is simulated by adding the document under a new
4187                name and deleting the old one. For RCS it is not supported.
4188                Disabled if uncommitted changes exist.
4189  * \li Syntax: vc-rename <FILENAME>
4190  * \li Params: <FILENAME>: New name of the document.\n
4191  *             A file dialog is opened if no filename is given.
4192  * \li Origin: gb, 05 Feb 2013
4193  * \endvar
4194  */
4195                 { LFUN_VC_RENAME, "vc-rename", ReadOnly, System },
4196
4197 /*!
4198  * \var lyx::FuncCode lyx::LFUN_VC_REPO_UPDATE
4199  * \li Action: Update the local archive directory in which resides
4200                the current document with the remote repository.
4201  * \li Syntax: vc-repo-update
4202  * \li Origin: sanda, 16 Oct 2009
4203  * \endvar
4204  */
4205                 { LFUN_VC_REPO_UPDATE, "vc-repo-update", ReadOnly, System },
4206
4207 /*!
4208  * \var lyx::FuncCode lyx::LFUN_VC_REVERT
4209  * \li Action: Reverts the document to the last check-in/commit in VCS.
4210  * \li Syntax: vc-revert
4211  * \li Origin: Lgb, 1 Jul 1997
4212  * \endvar
4213  */
4214                 { LFUN_VC_REVERT, "vc-revert", ReadOnly, System },
4215
4216 /*!
4217  * \var lyx::FuncCode lyx::LFUN_VC_UNDO_LAST
4218  * \li Action: Undo last check-in.
4219  * \li Notion: This is currently implemented only for RCS.
4220  * \li Syntax: vc-check-out
4221  * \li Origin: Lgb, 1 Jul 1997
4222  * \endvar
4223  */
4224                 { LFUN_VC_UNDO_LAST, "vc-undo-last", ReadOnly, System },
4225
4226 /*!
4227  * \var lyx::FuncCode lyx::LFUN_VIEW_CLOSE
4228  * \li Action: Close the current document work area.
4229  * \li Notion: Close the current work area. If no other work areas are showing the buffer,
4230                then close the associated buffer as well.
4231  * \li Syntax: view-close
4232  * \li Origin: Tommaso, 15 Sep 2012
4233  * \endvar
4234  */
4235                 { LFUN_VIEW_CLOSE, "view-close", ReadOnly, Buffer },
4236
4237
4238 /*!
4239  * \var lyx::FuncCode lyx::LFUN_VIEW_SPLIT
4240  * \li Action: Creates another split view of current buffer.
4241  * \li Notion: All split views act in the same way independently.
4242  * \li Syntax: view-split <vertical|horizontal>
4243  * \li Params: horizontal : The work areas are laid out side by side.\n
4244                vertical   : The work areas laid out vertically.
4245  * \li Origin: Abdel, 20 Feb 2008
4246  * \endvar
4247  */
4248                 { LFUN_VIEW_SPLIT, "view-split", ReadOnly, Buffer },
4249
4250
4251 /*!
4252  * \var lyx::FuncCode lyx::LFUN_WINDOW_CLOSE
4253  * \li Action: Closes the current LyX window.
4254  * \li Syntax: window-close
4255  * \li Origin: Abdel, 23 Oct 2006
4256  * \endvar
4257  */
4258                 { LFUN_WINDOW_CLOSE, "window-close", NoBuffer, Buffer },
4259
4260
4261 /*!
4262  * \var lyx::FuncCode lyx::LFUN_WINDOW_NEW
4263  * \li Action: Creates new empty LyX window.
4264  * \li Notion: Already opened documents from the previous window can be found under View menu.
4265  * \li Syntax: window-new [<GEOMETRY>]
4266  * \li Params: <GEOMETRY>: pass the geometry of the window. This parameter is currently
4267                            accepted only on Windows platform.
4268  * \li Origin: Abdel, 21 Oct 2006
4269  * \endvar
4270  */
4271                 { LFUN_WINDOW_NEW, "window-new", NoBuffer, Buffer },
4272
4273 /*!
4274  * \var lyx::FuncCode lyx::LFUN_WINDOW_RAISE
4275  * \li Action: Raises the LyX window.
4276  * \li Notion: Brings the LyX window to the front. Such behavior is allowed
4277                on Windows only when no other application has focus.
4278                This action is used when LyX is in single instance mode.
4279  * \li Syntax: window-raise
4280  * \li Origin: forenr, 21 Apr 2020
4281  * \endvar
4282  */
4283                 { LFUN_WINDOW_RAISE, "window-raise", ReadOnly | NoBuffer, Hidden },
4284
4285 /*!
4286  * \var lyx::FuncCode lyx::LFUN_WORD_BACKWARD
4287  * \li Action: Moves the cursor to the logically previous beginning of a word.
4288  * \li Notion: This is not the action which should be bound to the arrow keys,
4289                because backwards may be left or right, depending on the
4290                language. The arrow keys should be bound to #LFUN_WORD_LEFT or
4291                #LFUN_WORD_RIGHT actions, which in turn may employ this one.
4292  * \li Syntax: word-backward
4293  * \endvar
4294  */
4295                 { LFUN_WORD_BACKWARD, "word-backward", ReadOnly | NoUpdate, Edit },
4296
4297 /*!
4298  * \var lyx::FuncCode lyx::LFUN_WORD_BACKWARD_SELECT
4299  * \li Action: Moves the cursor to the logically previous beginning of a word,
4300                adding the logically traversed text to the selection.
4301  * \li Notion: See also #LFUN_WORD_BACKWARD.
4302  * \li Syntax: word-backward-select
4303  * \endvar
4304  */
4305                 { LFUN_WORD_BACKWARD_SELECT, "word-backward-select", ReadOnly | SingleParUpdate, Edit },
4306
4307 /*!
4308  * \var lyx::FuncCode lyx::LFUN_WORD_CAPITALIZE
4309  * \li Action: Capitalizes the words in the selection (i.e. the first letters)
4310                or the first letter of word at cursor position.
4311  * \li Syntax: word-capitalize [<SEL_TYPE>]
4312  * \li Params: <SEL_TYPE>: if this is equal to "partial", then the
4313  *             default word starts at cursor position (emacs-style).
4314  *             Otherwise, the whole word is considered.
4315  * \endvar
4316  */
4317                 { LFUN_WORD_CAPITALIZE, "word-capitalize", Noop, Edit },
4318
4319 /*!
4320  * \var lyx::FuncCode lyx::LFUN_WORD_DELETE_BACKWARD
4321  * \li Action: Deletes characters to the beginning of the word (usually the "C+BackSpace" key).
4322  * \li Syntax: word-delete-backward [force]
4323  * \li Params: force: Delete big insets, do not only select them.
4324  * \endvar
4325  */
4326                 { LFUN_WORD_DELETE_BACKWARD, "word-delete-backward", Noop, Edit },
4327
4328 /*!
4329  * \var lyx::FuncCode lyx::LFUN_WORD_DELETE_FORWARD
4330  * \li Action: Deletes characters to the end of the word (usually the "C+Delete" key).
4331  * \li Syntax: word-delete-forward [force]
4332  * \li Params: force: Delete big insets, do not only select them.
4333  * \endvar
4334  */
4335                 { LFUN_WORD_DELETE_FORWARD, "word-delete-forward", Noop, Edit },
4336
4337 /*!
4338  * \var lyx::FuncCode lyx::LFUN_WORD_FIND
4339  * \li Action: Search for next occurrence of a string.
4340  * \li Syntax: word-find [<DATA>]
4341  * \li Params: <DATA>: data encoded from Find dialog (see #lyx::find2string()).
4342                        If no parameter is given, search with last find-dialog
4343                        data is used for search (i.e. find-next).
4344  * \li Origin: Andre, Jan 7 2004
4345  * \endvar
4346  */
4347                 { LFUN_WORD_FIND, "word-find", ReadOnly, Edit },
4348
4349 /*! 
4350  * \var lyx::FuncCode lyx::LFUN_SEARCH_STRING_SET
4351  * \li Action: Set search string buffer.
4352  * \li Syntax: search-string-set [<DATA>] 
4353  * \li Params: <DATA>: string to search for. If no parameter is given,
4354  *                     use (word under) selection.
4355  * \li Origin: stwitt, spitz, Feb 12 2021 
4356  * \endvar 
4357  */ 
4358                 { LFUN_SEARCH_STRING_SET, "search-string-set", ReadOnly, Edit }, 
4359
4360 /*!
4361  * \var lyx::FuncCode lyx::LFUN_WORD_FINDADV
4362  * \li Action: Search for next occurrence of a pattern.
4363  * \li Syntax: word-findadv [<DATA>]
4364  * \li Params: <DATA>: data encoded from FindAdv dialog (see #lyx::findadv2string()).
4365                        If no parameter is given, search with last find-dialog
4366                        data is used for search (i.e. find-next).
4367  * \li Origin: Tommaso, Nov 15 2007
4368  * \endvar
4369  */
4370                 { LFUN_WORD_FINDADV, "word-findadv", ReadOnly | NoBuffer, Edit },
4371
4372 /*!
4373  * \var lyx::FuncCode lyx::LFUN_WORD_FIND_BACKWARD
4374  * \li Action: Search for a given string in backward direction.
4375  * \li Notion: Case sensitive, match words. If no argument given, last search repeated.
4376  * \li Syntax: word-find-backward [<STRING>]
4377  * \li Origin: Etienne, 20 Feb 1998
4378  * \endvar
4379  */
4380                 { LFUN_WORD_FIND_BACKWARD, "word-find-backward", ReadOnly, Edit },
4381
4382 /*!
4383  * \var lyx::FuncCode lyx::LFUN_WORD_FIND_FORWARD
4384  * \li Action: Search for a given string in forward direction.
4385  * \li Notion: Case sensitive, match words. If no argument given, last search repeated.
4386  * \li Syntax: word-find-forward [<STRING>]
4387  * \li Origin: Etienne, 16 Feb 1998
4388  * \endvar
4389  */
4390                 { LFUN_WORD_FIND_FORWARD, "word-find-forward", ReadOnly, Edit },
4391
4392 /*!
4393  * \var lyx::FuncCode lyx::LFUN_WORD_FORWARD
4394  * \li Action: Moves the cursor to the logically next beginning of a word.
4395  * \li Notion: This is not the action which should be bound to the arrow keys,
4396                because forward may be left or right, depending on the language.
4397                The arrow keys should be bound to #LFUN_WORD_LEFT or
4398                #LFUN_WORD_RIGHT actions, which in turn may employ this one.
4399  * \li Syntax: word-forward
4400  * \endvar
4401  */
4402                 { LFUN_WORD_FORWARD, "word-forward", ReadOnly | NoUpdate, Edit },
4403
4404 /*!
4405  * \var lyx::FuncCode lyx::LFUN_WORD_FORWARD_SELECT
4406  * \li Action: Moves the cursor to the logically next beginning of a word,
4407                adding the logically traversed text to the selection.
4408  * \li Notion: See also #LFUN_WORD_FORWARD.
4409  * \li Syntax: word-forward-select
4410  * \endvar
4411  */
4412                 { LFUN_WORD_FORWARD_SELECT, "word-forward-select", ReadOnly | SingleParUpdate, Edit },
4413
4414 /*!
4415  * \var lyx::FuncCode lyx::LFUN_WORD_LEFT
4416  * \li Action: Moves the cursor to the next beginning of a word "on the left".
4417  * \li Notion: This is the action which should be taken when the (e.g., ctrl-)
4418                "left" key is pressed. Generally, it moves the cursor to the
4419                next beginning of a word on the left. However, in Bidi text this
4420                become slightly more complicated, and there are different modes
4421                of cursor movement. In "visual mode", this moves left, plain and
4422                simple. In "logical mode", movement is logically forward in RTL
4423                paragraphs, and logically backwards in LTR paragraphs.
4424  * \li Syntax: word-left
4425  * \li Origin: dov, 28 Oct 2007
4426  * \endvar
4427  */
4428                 { LFUN_WORD_LEFT, "word-left", ReadOnly | NoUpdate, Edit },
4429
4430 /*!
4431  * \var lyx::FuncCode lyx::LFUN_WORD_LEFT_SELECT
4432  * \li Action: Moves the cursor to the next beginning of a word "on the left",
4433                adding *logically* traversed text to the selection.
4434  * \li Notion: See also #LFUN_WORD_LEFT for exact details of the movement.
4435  * \li Syntax: word-left-select
4436  * \li Origin: dov, 28 Oct 2007
4437  * \endvar
4438  */
4439                 { LFUN_WORD_LEFT_SELECT, "word-left-select", ReadOnly | SingleParUpdate, Edit },
4440
4441 /*!
4442  * \var lyx::FuncCode lyx::LFUN_WORD_LOWCASE
4443  * \li Action: Change the words in the selection or word at cursor position
4444                to lower case.
4445  * \li Syntax: word-lowcase [<SEL_TYPE>]
4446  * \li Params: <SEL_TYPE>: if this is equal to "partial", then the
4447  *             default word starts at cursor position (emacs-style).
4448  *             Otherwise, the whole word is considered.
4449  * \endvar
4450  */
4451                 { LFUN_WORD_LOWCASE, "word-lowcase", Noop, Edit },
4452
4453 /*!
4454  * \var lyx::FuncCode lyx::LFUN_WORD_REPLACE
4455  * \li Action: Replace a string in the document.
4456  * \li Syntax: word-replace [<DATA>]
4457  * \li Params: <DATA>: data is of the form
4458                        "<replacestring> \n
4459                         <searchstring> \n
4460                         <casesensitive> <matchword> <all> <forward> <findnext>"
4461  * \li Origin: Andre, Jan 7 2004
4462  * \endvar
4463  */
4464                 { LFUN_WORD_REPLACE, "word-replace", Noop, Edit },
4465
4466 /*!
4467  * \var lyx::FuncCode lyx::LFUN_WORD_RIGHT
4468  * \li Action: Moves the cursor to the next beginning of a word "on the right".
4469  * \li Notion: This is the action which should be taken when the (e.g., ctrl-)
4470                "right" key is pressed. Generally, it moves the cursor to the
4471                next beginning of a word on the right. However, in Bidi text
4472                this become slightly more complicated, and there are different
4473                modes of cursor movement. In "visual mode", this moves right,
4474                plain and simple. In "logical mode", movement is logically
4475                forward in LTR paragraphs, and logically backwards in RTL
4476                paragraphs.
4477  * \li Syntax: word-right
4478  * \li Origin: dov, 28 Oct 2007
4479  * \endvar
4480  */
4481                 { LFUN_WORD_RIGHT, "word-right", ReadOnly | NoUpdate, Edit },
4482
4483 /*!
4484  * \var lyx::FuncCode lyx::LFUN_WORD_RIGHT_SELECT
4485  * \li Action: Moves the cursor to the next beginning of a word "on the right",
4486                adding *logically* traversed text to the selection.
4487  * \li Notion: See also #LFUN_WORD_RIGHT for exact details of the movement.
4488  * \li Syntax: word-right-select
4489  * \li Origin: dov, 28 Oct 2007
4490  * \endvar
4491  */
4492                 { LFUN_WORD_RIGHT_SELECT, "word-right-select", ReadOnly | SingleParUpdate, Edit },
4493
4494 /*!
4495  * \var lyx::FuncCode lyx::LFUN_WORD_SELECT
4496  * \li Action: Puts the word where the cursor stands into the selection.
4497  * \li Syntax: word-select
4498  * \li Origin: Andre, 11 Sep 2002
4499  * \endvar
4500  */
4501                 { LFUN_WORD_SELECT, "word-select", ReadOnly, Edit },
4502
4503 /*!
4504  * \var lyx::FuncCode lyx::LFUN_WORD_UPCASE
4505  * \li Action: Change the words in the selection or word at cursor position
4506                to upper case.
4507  * \li Syntax: word-upcase [<SEL_TYPE>]
4508  * \li Params: <SEL_TYPE>: if this is equal to "partial", then the
4509  *             default word starts at cursor position (emacs-style).
4510  *             Otherwise, the whole word is considered.
4511  * \endvar
4512  */
4513                 { LFUN_WORD_UPCASE, "word-upcase", Noop, Edit },
4514
4515 /*!
4516  * \var lyx::FuncCode lyx::LFUN_WRAP_INSERT
4517  * \li Action: Inserts floats wrapped by the text around.
4518  * \li Syntax: wrap-insert <TYPE>
4519  * \li Params: <TYPE>: table|figure
4520  * \li Origin: Dekel, 7 Apr 2002
4521  * \endvar
4522  */
4523                 { LFUN_WRAP_INSERT, "wrap-insert", Noop, Edit },
4524
4525                 { LFUN_NOACTION, "", Noop, Hidden }
4526 #ifndef DOXYGEN_SHOULD_SKIP_THIS
4527         };
4528
4529         for (int i = 0; items[i].action != LFUN_NOACTION; ++i)
4530                 newFunc(items[i].action, items[i].name, items[i].attrib, items[i].type);
4531
4532         init = true;
4533 }
4534 #endif
4535
4536 LyXAction::LyXAction()
4537 {
4538         init();
4539 }
4540
4541
4542 FuncRequest LyXAction::lookupFunc(string const & func_name) const
4543 {
4544         string const func2 = trim(func_name);
4545
4546         if (func2.empty())
4547                 return FuncRequest(LFUN_NOACTION);
4548
4549         string cmd;
4550         string const arg = split(func2, cmd, ' ');
4551
4552         FuncMap::const_iterator const fit = lyx_func_map.find(cmd);
4553
4554         return fit != lyx_func_map.end()
4555                         ? FuncRequest(fit->second, arg)
4556                         : FuncRequest(LFUN_UNKNOWN_ACTION);
4557 }
4558
4559
4560 string const LyXAction::getActionName(FuncCode action) const
4561 {
4562         InfoMap::const_iterator const it = lyx_info_map.find(action);
4563         return it != lyx_info_map.end() ? it->second.name : string();
4564 }
4565
4566
4567 LyXAction::FuncType LyXAction::getActionType(FuncCode action) const
4568 {
4569         InfoMap::const_iterator const it = lyx_info_map.find(action);
4570         return it != lyx_info_map.end() ? it->second.type : Hidden;
4571 }
4572
4573
4574 bool LyXAction::funcHasFlag(FuncCode action,
4575                             LyXAction::FuncAttribs flag) const
4576 {
4577         InfoMap::const_iterator ici = lyx_info_map.find(action);
4578
4579         if (ici == lyx_info_map.end()) {
4580                 LYXERR0("action: " << action << " is not known.");
4581                 LASSERT(false, return false);
4582         }
4583
4584         return ici->second.attrib & flag;
4585 }
4586
4587
4588 LyXAction::const_iterator LyXAction::begin() const
4589 {
4590         return lyx_func_map.begin();
4591 }
4592
4593
4594 LyXAction::const_iterator LyXAction::end() const
4595 {
4596         return lyx_func_map.end();
4597 }
4598
4599
4600 LyXErr & operator<<(LyXErr & l, FuncCode code)
4601 {
4602         if (l.enabled())
4603                 l.stream() << lyxaction.getActionName(code);
4604         return l;
4605 }
4606
4607 } // namespace lyx