]> git.lyx.org Git - lyx.git/blobdiff - src/LyXAction.cpp
More requires --> required, for C++2a.
[lyx.git] / src / LyXAction.cpp
index 4f424883f7a7e207932cbbe015bd0f05f842654e..a9789ad29037467c94d4ea959fe06c618a77134b 100644 (file)
@@ -332,6 +332,20 @@ void LyXAction::init()
                { LFUN_BIBTEX_DATABASE_DEL, "bibtex-database-del", Noop, Edit },
 
 
+/*!
+ * \var lyx::FuncCode lyx::LFUN_BIDI
+ * \li Action: Helper function for bidirectional toolbar icons
+ * \li Notion: In a text, the function is marked as `unknown' when the
+               current direction does not correspond to DIRECTION (ltr
+               or rtl). Otherwise the function behaves exactly as
+               ACTION. The result is that ACTION will be associated to
+               a different icon depending on text direction.
+ * \li Syntax: bidi <DIRECTION> <ACTION>
+ * \li Origin: JMarc, 21 July 2019
+ * \endvar
+ */
+               { LFUN_BIDI, "bidi", Noop, System },
+
 /*!
  * \var lyx::FuncCode lyx::LFUN_BOOKMARK_CLEAR
  * \li Action: Clears the list of saved bookmarks.
@@ -714,8 +728,11 @@ void LyXAction::init()
  * \li Action: Creates a new buffer (that is, document) from a template.
  * \li Notion: Path for new files and templates can be set in Preferences dialog.
                Template will be asked for via Open-dialog.
- * \li Syntax: buffer-new-template [<FILE>]
- * \li Params: <FILE>: filename of created file with absolute path.
+ * \li Syntax: buffer-new-template [<FILE>] [<TEMPLATE FILE>]
+ * \li Params: <FILE>: filename of created file with absolute path. If empty
+ *                     or "newfile", a file with appropriate name is generated.
+ *             <TEMPLATE FILE>: filename of template with absolute path. If empty,
+ *                              a dialog is opened to select the new file.
  * \endvar
  */
                { LFUN_BUFFER_NEW_TEMPLATE,"buffer-new-template", NoBuffer, Buffer },
@@ -760,6 +777,15 @@ void LyXAction::init()
  */
                { LFUN_BUFFER_RELOAD, "buffer-reload", ReadOnly, Buffer },
 
+/*!
+ * \var lyx::FuncCode lyx::LFUN_BUFFER_RESET_EXPORT
+ * \li Action: Removes the auxiliary file before next export to assure export is done afresh.
+ * \li Syntax: buffer-reset-export
+ * \li Origin: spitz, 27 Dec 2019
+ * \endvar
+ */
+               { LFUN_BUFFER_RESET_EXPORT, "buffer-reset-export", ReadOnly, Buffer },
+
 /*!
  * \var lyx::FuncCode lyx::LFUN_BUFFER_SAVE_AS_DEFAULT
  * \li Action: Save the current document settings as default.
@@ -890,6 +916,17 @@ void LyXAction::init()
  */
                { LFUN_BUFFER_WRITE_AS, "buffer-write-as", ReadOnly, Buffer },
 
+/*!
+ * \var lyx::FuncCode lyx::LFUN_BUFFER_WRITE_AS_TEMPLATE
+ * \li Action: Rename and save current buffer in the local templates directory.
+ * \li Syntax: buffer-write-as-template <FILENAME>
+ * \li Params: <FILENAME>: New name of the buffer/file. A relative path
+              is with respect to the original location of the buffer/file.
+ * \endvar
+ */
+               { LFUN_BUFFER_WRITE_AS_TEMPLATE, "buffer-write-as-template", ReadOnly, Buffer },
+
+
 /*!
  * \var lyx::FuncCode lyx::LFUN_BUFFER_EXTERNAL_MODIFICATION_CLEAR
  * \li Action: Clear the external modification flag on the current buffer.
@@ -1365,19 +1402,6 @@ void LyXAction::init()
  */
                { LFUN_CUT, "cut", Noop, Edit },
 
-/*!
- * \var lyx::FuncCode lyx::LFUN_DATE_INSERT
- * \li Action: Inserts the current date.
- * \li Syntax: date-insert [<ARG>]
- * \li Params: <ARG>: Format of date. The default value (%x) can be set
-                      in Preferences->Output->General->Date format. For
-                      possible formats see the manual page of the
-                      strftime function.
- * \li Origin: jdblair, 31 Jan 2000
- * \endvar
- */
-               { LFUN_DATE_INSERT, "date-insert", Noop, Edit },
-
 /*!
  * \var lyx::FuncCode lyx::LFUN_DEBUG_LEVEL_SET
  * \li Action: Set debug output level.
@@ -1516,8 +1540,7 @@ void LyXAction::init()
 /*!
  * \var lyx::FuncCode lyx::LFUN_DROP_LAYOUTS_CHOICE
  * \li Action: Displays list of layout choices.
- * \li Notion: In the current (as of 2007) Qt4 frontend, this LFUN opens the
-               dropbox allowing for choice of layout.
+ * \li Notion: This LFUN opens the dropbox allowing for choice of layout.
  * \li Syntax: drop-layouts-choice
  * \endvar
  */
@@ -1530,7 +1553,7 @@ void LyXAction::init()
  * \li Params: outer:    If this is given, LyX will split the outermost environment in
                          the current nesting hierarchy.\n
                previous: If this is given, LyX will split the environment in the previous
-                         paragraph (is there is one).\n
+                         paragraph (if there is one).\n
                before:   If this is given, the new environment will be appended rather than
                          prepended.
  * \li Origin: spitz, 23 Dec 2012
@@ -1570,8 +1593,10 @@ void LyXAction::init()
 /*!
  * \var lyx::FuncCode lyx::LFUN_FILE_INSERT
  * \li Action: Inserts another LyX file.
- * \li Syntax: file-insert [<FILE>]
+ * \li Syntax: file-insert [<FILE>] [ignorelang]
  * \li Params: <FILE>: Filename to be inserted.
+ *             ignorelang: If given, the (main) language of the inserted file
+ *             is ignored (the context language is used).
  * \endvar
  */
                { LFUN_FILE_INSERT, "file-insert", Noop, Edit },
@@ -1898,6 +1923,19 @@ void LyXAction::init()
  */
                { LFUN_ICON_SIZE, "icon-size", NoBuffer, Buffer },
 
+
+/*!
+ * \var lyx::FuncCode lyx::LFUN_IF_RELATIVES
+ * \li Action: Helper function for master-related actions
+ * \li Notion: In a buffer, the function will be disabled if the buffer
+ *             has no master or children. It thus allows to enable
+ *             actions only in documents with master/children
+ * \li Syntax: ifrelatives <ACTION>
+ * \li Origin: spitz, 2 January 2020
+ * \endvar
+ */
+               { LFUN_IF_RELATIVES, "ifrelatives", Noop, Buffer },
+
 /*!
  * \var lyx::FuncCode lyx::LFUN_INDEX_INSERT
  * \li Action: Inserts Index entry.
@@ -2286,7 +2324,7 @@ void LyXAction::init()
 
 
 /*!
- * \var lyx::FuncCode lyx::LFUN_LABEL_COPY_AS_REF
+ * \var lyx::FuncCode lyx::LFUN_LABEL_COPY_AS_REFERENCE
  * \li Action: Copies the label at the cursor as a cross-reference to be pasted elsewhere.
  * \li Syntax: copy-label-as-reference <LABEL>
  * \li Params: <LABEL>: The label to copy (for multi-line math)
@@ -2562,6 +2600,26 @@ void LyXAction::init()
  * \endvar
  */
                { LFUN_MASTER_BUFFER_EXPORT, "master-buffer-export", ReadOnly, Buffer },
+               
+/*!
+ * \var lyx::FuncCode lyx::LFUN_MASTER_BUFFER_FORALL
+ * \li Action: Applies a command to a buffer and all it children, starting from the master.
+ * \li Syntax: master-buffer-forall <LFUN-COMMAND>
+ * \li Params: <LFUN-COMMAND>: The command to be applied to the buffers.
+ * \li Sample: Close all Notes in buffers: \n
+              master-buffer-forall inset-forall Note inset-toggle close \n
+              Toggle change tracking on buffers: \n
+              master-buffer-forall changes-track \n
+              Toggle read-only for buffers: \n
+              master-buffer-forall buffer-toggle-read-only \n
+              Show statistics for individual buffers: \n
+              master-buffer-forall statistics \n
+              Activate the branch named "Solutions" in buffers: \n
+              master-buffer-forall branch-activate Solutions \n
+ * \li Origin: spitz, 31 Dec 2019
+ * \endvar
+ */
+               { LFUN_MASTER_BUFFER_FORALL, "master-buffer-forall", ReadOnly | Argument, Buffer },
 
 /*!
  * \var lyx::FuncCode lyx::LFUN_MASTER_BUFFER_UPDATE
@@ -2599,7 +2657,7 @@ void LyXAction::init()
  * \li Syntax: math-matrix <COLS> <ROWS> [<DECORATION>]
  * \li Params: <DECORATION>: Decoration determines the LaTeX name of the matrix
                              that should be created. Possible values include
-                             pmatrix, bmatrix, Bmatrix, vmatrix, Vmatrix and
+                             pmatrix, bmatrix, Bmatrix, vmatrix, Vmatrix, smallmatrix, and
                              matrix. The default is 'matrix'.
  * \li Sample: math-ams-matrix 3 3 bmatrix
  * \endvar
@@ -3248,6 +3306,16 @@ void LyXAction::init()
  */
                { LFUN_PARAGRAPH_UPDATE, "", Noop, Hidden },
 
+/*!
+ * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_SELECT
+ * \li Action: Move cursor to beginning of current paragraph
+               and select to the end in downward direction
+ * \li Notion: This function is by default bound to triple mouse click
+ * \li Syntax: paragraph-select
+ * \li Origin: Kornel, 16 Apr 2019
+ * \endvar
+ */
+               { LFUN_PARAGRAPH_SELECT, "paragraph-select", ReadOnly, Edit },
 
 /*!
  * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_UP_SELECT
@@ -3388,6 +3456,16 @@ void LyXAction::init()
  */
                { LFUN_REPEAT, "repeat", NoBuffer, Edit },
 
+/*!
+ * \var lyx::FuncCode lyx::LFUN_SEARCH_IGNORE
+ * \li Action: Enables/disables searching for features in findadv
+ * \li Syntax: search-ignore <type> <value>
+ * \li Params: <type>: language|color|sectioning|font|series|shape|family|markup|underline|strike
+ * \li Params: <value>: true|false
+ * \endvar
+ */
+               { LFUN_SEARCH_IGNORE, "search-ignore", ReadOnly|NoBuffer|NoUpdate, System },
+
 /*!
  * \var lyx::FuncCode lyx::LFUN_SCREEN_DOWN
  * \li Action: Moves the cursor one page in downward direction.
@@ -3739,12 +3817,16 @@ void LyXAction::init()
  * \li Params: Generally see #LFUN_INSET_INSERT for further details.\n
  *             <FEATURE>: append-row|append-column|delete-row|delete-column|copy-row|\n
                        copy-column|move-column-right|move-column-left|move-row-down|move-row-up|\n
+                       set-line-top|set-line-bottom|set-line-left|set-line-right|\n
                        toggle-line-top|toggle-line-bottom|toggle-line-left|toggle-line-right|\n
+                       set-ltrim-top|set-rtrim-top|set-ltrim-bottom|set-rtrim-bottom\n
+                       toggle-ltrim-top|toggle-rtrim-top|toggle-ltrim-bottom|toggle-rtrim-bottom\n
                        align-left|align-right|align-center|align-block|align-decimal|set-decimal-point|\n
                        valign-top|valign-bottom|valign-middle|longtabular-align-left|\n
                        longtabular-align-center|longtabular-align-right|m-align-left|m-align-right|\n
                        m-align-center|m-valign-top|m-valign-bottom|m-valign-middle|multicolumn|\n
-                       set-all-lines|unset-all-lines|toggle-longtabular|set-longtabular|unset-longtabular|set-pwidth|\n
+                       reset-formal-default|set-all-lines|unset-all-lines|toggle-longtabular|\n
+                       set-longtabular|unset-longtabular|set-pwidth|\n
                        set-mpwidth|set-rotate-tabular|unset-rotate-tabular|toggle-rotate-tabular|\n
                        set-rotate-cell|unset-rotate-cell|toggle-rotate-cell|set-usebox|set-lthead|\n
                        unset-lthead|set-ltfirsthead|unset-ltfirsthead|set-ltfoot|unset-ltfoot|\n
@@ -3774,6 +3856,18 @@ void LyXAction::init()
  */
                { LFUN_TABULAR_INSERT, "tabular-insert", Noop, Edit },
 
+/*!
+ * \var lyx::FuncCode lyx::LFUN_TABULAR_STYLE_INSERT
+ * \li Action: Inserts table of a given style into the document.
+ * \li Notion: See #LFUN_TABULAR_FEATURE for some more details
+              about tabular modifications.
+ * \li Syntax: tabular-style-insert <style> <ROWS> <COLUMNS>
+ * \li Params: Valid styles are the names of the files in lib/tabletemplates,
+ *             minus _1x<n> and .lyx suffix.
+ * \li Origin: spitz, 25 Mar 2019
+ * \endvar
+ */
+               { LFUN_TABULAR_STYLE_INSERT, "tabular-style-insert", Noop, Edit },
 
 /*!
  * \var lyx::FuncCode lyx::LFUN_TAB_DELETE
@@ -3833,8 +3927,10 @@ void LyXAction::init()
 
 /*!
  * \var lyx::FuncCode lyx::LFUN_TEXTSTYLE_APPLY
- * \li Action: Toggle user-defined (=last-time used) text style.
- * \li Notion: This style is set via #LFUN_TEXTSTYLE_UPDATE, which is
+ * \li Action: Apply last used text properties.
+ * \li Syntax: textstyle-apply [<NUM>]
+ * \li Params: <NUM>: number of the selection in the internal freefonts stack to be applied.
+ * \li Notion: These properties are stored via #LFUN_TEXTSTYLE_UPDATE, which is
                automatically triggered when using Text Style dialog.
  * \li Syntax: textstyle-apply
  * \li Origin: leeming, 12 Mar 2003