X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLyXAction.cpp;h=992b47a4412e34367fe921143a6553c97b592a64;hb=c69da75dfca389b219e269f9d5668215f398c24b;hp=92734a202a5d4e9d97f73cef0e130abde9671362;hpb=ebc409264980a2e582d4d7ac6f23678d4f7b55ae;p=features.git diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index 92734a202a..992b47a441 100644 --- a/src/LyXAction.cpp +++ b/src/LyXAction.cpp @@ -452,6 +452,15 @@ void LyXAction::init() */ { LFUN_BRANCH_INSERT, "branch-insert", Noop, Edit }, +/*! + * \var lyx::FuncCode lyx::LFUN_BRANCH_SYNC_ALL + * \li Action: Open/close all insets of selected branch (depending on its activation status). + * \li Syntax: branch-sync-all + * \li Origin: sanda, 15 April 2022 + * \endvar + */ + { LFUN_BRANCH_SYNC_ALL, "branch-sync-all", AtPoint, Buffer }, + /*! * \var lyx::FuncCode lyx::LFUN_BRANCH_INVERT * \li Action: Toggles inversion status of branch inset. @@ -642,7 +651,7 @@ void LyXAction::init() visible in any window. * \li Syntax: buffer-forall * \li Params: : The command to be applied to the buffers. - * \li Sample: Close all Notes in buffers: \n + * \li Sample: Close all Notes in all buffers: \n buffer-forall inset-forall Note inset-toggle close \n Toggle change tracking on buffers: \n buffer-forall changes-track \n @@ -763,6 +772,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. @@ -869,7 +887,8 @@ void LyXAction::init() * \li Notion: Saves the current buffer to disk, using the filename that is already associated with the buffer, asking for one if none is yet assigned. - * \li Syntax: buffer-write + * \li Syntax: buffer-write [force] + * \li Params: force: write even if buffer is clean. * \endvar */ { LFUN_BUFFER_WRITE, "buffer-write", ReadOnly, Buffer }, @@ -1038,7 +1057,7 @@ void LyXAction::init() * \li Origin: Levon, 16 Oct 2002 * \endvar */ - { LFUN_CHANGES_MERGE, "changes-merge", Noop, Edit }, + { LFUN_CHANGES_MERGE, "changes-merge", ReadOnly, Edit }, /*! * \var lyx::FuncCode lyx::LFUN_CHANGES_OUTPUT @@ -1229,6 +1248,18 @@ void LyXAction::init() * \endvar */ { LFUN_CITATION_INSERT, "citation-insert", Noop, Edit }, +/*! + * \var lyx::FuncCode lyx::LFUN_CITATION_OPEN + * \li Action: Opens the corresponding pdf/url for a given citation inset. + * \li Syntax: citation-open [EXTERNAL] TARGET + * \li Params: : URL (https:,file:) of the document. \n + : Use external executable script for finding target \n + and launching viewer. In this case TARGET consists of author and year \n + and will be passed as an input argument to the script. + * \li Origin: Sanda, 16 Aug 2020 + * \endvar + */ + { LFUN_CITATION_OPEN, "citation-open", ReadOnly | NoUpdate | Argument, Edit }, /*! * \var lyx::FuncCode lyx::LFUN_CLIPBOARD_PASTE @@ -1451,7 +1482,7 @@ void LyXAction::init() * \li Action: Shows hidden dialog or creates new one for a given function/inset settings etc. * \li Syntax: dialog-show [] * \li Params: : aboutlyx|bibitem|bibtex|box|branch|changes|character|citation|\n - compare|document|errorlist|ert|external|file|findreplace|findreplaceadv|float|\n + compare|counter|document|errorlist|ert|external|file|findreplace|findreplaceadv|float|\n graphics|href|include|index|index_print|info|label|line|listings|log|mathdelimiter|\n mathmatrix|mathspace|nomenclature|nomencl_print|note|paragraph|phantom|prefs|\n print|ref|sendto|space|spellchecker|symbols|tabular|tabularcreate|\n @@ -1517,8 +1548,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 */ @@ -1571,8 +1601,10 @@ void LyXAction::init() /*! * \var lyx::FuncCode lyx::LFUN_FILE_INSERT * \li Action: Inserts another LyX file. - * \li Syntax: file-insert [] + * \li Syntax: file-insert [] [ignorelang] * \li Params: : 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 }, @@ -1645,6 +1677,22 @@ void LyXAction::init() */ { LFUN_FINISHED_RIGHT, "", ReadOnly, Hidden }, +/*! + * \var lyx::FuncCode lyx::LFUN_FINISHED_UP + * \li Action: Moves the cursor out of the current slice, going up. + * \li Notion: See also #LFUN_FINISHED_DOWN. + * \endvar + */ + { LFUN_FINISHED_UP, "", ReadOnly, Hidden }, + +/*! + * \var lyx::FuncCode lyx::LFUN_FINISHED_DOWN + * \li Action: Moves the cursor out of the current slice, going down. + * \li Notion: See also #LFUN_FINISHED_DOWN. + * \endvar + */ + { LFUN_FINISHED_DOWN, "", ReadOnly, Hidden }, + /*! * \var lyx::FuncCode lyx::LFUN_FLEX_INSERT * \li Action: Inserts CharStyle, Custom inset or XML short element. @@ -1811,6 +1859,15 @@ void LyXAction::init() */ { LFUN_FONT_CROSSOUT, "font-crossout", Noop, Layout }, +/*! + * \var lyx::FuncCode lyx::LFUN_FONT_NO_SPELLCHECK + * \li Action: Toggles nospellcheck status in the font (selection-wise). + * \li Syntax: font-nospellcheck + * \li Origin: spitz, 5 March 2021 + * \endvar + */ + { LFUN_FONT_NO_SPELLCHECK, "font-nospellcheck", Noop, Layout }, + /*! * \var lyx::FuncCode lyx::LFUN_FONT_TYPEWRITER * \li Action: Toggles the typewriter family font (selection-wise). @@ -1877,6 +1934,16 @@ void LyXAction::init() */ { LFUN_HELP_OPEN, "help-open", NoBuffer | Argument, Buffer }, +/*! + * \var lyx::FuncCode lyx::LFUN_LYXFILES_OPEN + * \li Action: Open lyxfiles (templates/examples). Create a view if he have none. + * \li Syntax: lyxfiles-open [] + * \li Params: : templates or examples. Default is templates. + * \li Origin: spitz, 10 Feb 2021 + * \endvar + */ + { LFUN_LYXFILES_OPEN, "lyxfiles-open", NoBuffer | Argument, Buffer }, + /*! * \var lyx::FuncCode lyx::LFUN_HREF_INSERT * \li Action: Inserts hyperlinks into the document (clickable in pdf output). @@ -1899,6 +1966,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 + * \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. @@ -2108,8 +2188,10 @@ void LyXAction::init() yellow note insets. * \li Sample: Remove all index insets: \n inset-forall Index char-delete-forward force \n - Close all Notes (also works for a particular branch, for example): \n + Close all Notes: \n inset-forall Note inset-toggle close \n + Open all branch insets of branch "myBranch": \n + inset-forall Branch:myBranch inset-toggle open \n Transform all yellow notes to comments \n inset-forall Note:Note inset-modify note Note Comment \n Try to put LyX in an infinite loop if there is at least a Note: \n @@ -2189,6 +2271,20 @@ void LyXAction::init() */ { LFUN_INSET_SETTINGS, "inset-settings", ReadOnly | AtPoint, Edit }, +/*! + * \var lyx::FuncCode lyx::LFUN_INSET_SPLIT + * \li Action: Splits the current inset into two at current position. + * \li Syntax: inset-split [] + * \li Params: : this can be used to make sure the right kind of inset + is dissolved. For example "split" entry in the charstyles + sub-menu should only dissolve the charstyle inset, even if the + cursor is inside several nested insets of different type.\n + For values see #lyx::InsetLayout::lyxtype_ . + * \li Origin: spitz, 22 Dec 2020 + * \endvar + */ + { LFUN_INSET_SPLIT, "inset-split", AtPoint, Edit }, + /*! * \var lyx::FuncCode lyx::LFUN_INSET_TOGGLE * \li Action: Toggles the collapsible inset at cursor position, @@ -2350,9 +2446,9 @@ void LyXAction::init() /*! * \var lyx::FuncCode lyx::LFUN_LAYOUT * \li Action: Sets the layout (that is, environment) for the current paragraph. - * \li Syntax: layout [ignorenests] + * \li Syntax: layout [ignoreautonests] * \li Params: : the layout to use\n - ignorenests: If specified, nesting advices will be ignored. + ignoreautonests: If specified, nesting advices will be ignored. * \endvar */ { LFUN_LAYOUT, "layout", Noop, Layout }, @@ -2363,9 +2459,9 @@ void LyXAction::init() * \li Notion: Contrary to `layout', this function resets the current * (or selection) layout to the standard layout it already has the * correct layout. Useful for toolbar icons. - * \li Syntax: layout-toggle [ignorenests] + * \li Syntax: layout-toggle [ignoreautonests] * \li Params: : the layout to toggle\n - ignorenests: If specified, nesting advices will be ignored. + ignoreautonests: If specified, nesting advices will be ignored. * \li Origin: lasgouttes, 14 May 2018 * \endvar */ @@ -2563,6 +2659,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 + * \li Params: : 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 @@ -2600,7 +2716,7 @@ void LyXAction::init() * \li Syntax: math-matrix [] * \li Params: : 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 @@ -3249,6 +3365,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 @@ -3302,7 +3428,7 @@ void LyXAction::init() /*! * \var lyx::FuncCode lyx::LFUN_PRIMARY_SELECTION_PASTE * \li Action: Pastes the currently selected text. - * \li Notion: Primary selection mechanism is linux-only thing. + * \li Notion: Primary selection mechanism is X11/Wayland-only thing. * \li Syntax: primary-selection-paste [] * \li Params: : "paragraph" will cause pasting as one paragraph, i.e. "Join lines". * \endvar @@ -3393,7 +3519,7 @@ void LyXAction::init() * \var lyx::FuncCode lyx::LFUN_SEARCH_IGNORE * \li Action: Enables/disables searching for features in findadv * \li Syntax: search-ignore - * \li Params: : language|color|sectioning|font|series|shape|family|markup|underline|strike + * \li Params: : language|color|sectioning|font|series|shape|family|markup|underline|strike|deleted|non-output-content\n * \li Params: : true|false * \endvar */ @@ -3614,10 +3740,11 @@ void LyXAction::init() /*! * \var lyx::FuncCode lyx::LFUN_SET_COLOR - * \li Action: Set the given LyX color to the color defined by the X11 name given. + * \li Action: Set the given LyX color to the color defined by the X11 name given, + * and optionally a specific color for dark mode. * \li Notion: A new color entry is created if the color is unknown. Color names can be stored as a part of user settings. - * \li Syntax: set-color + * \li Syntax: set-color [] * \li Origin: SLior, 11 Jun 2000 * \endvar */ @@ -3693,6 +3820,32 @@ void LyXAction::init() */ { LFUN_SPELLING_ADD, "spelling-add", ReadOnly, Edit }, +/*! + * \var lyx::FuncCode lyx::LFUN_SPELLING_ADD_LOCAL + * \li Action: Add the word under the cursor to the document's local + * spell checker dictionary. + * The default for the language is retrieved from the cursor position. + * \li Syntax: spelling-add-local [] [] + * \li Params: : word to add + : language name (see file languages) + * \li Origin: spitz, 6 Mar 2021 + * \endvar + */ + { LFUN_SPELLING_ADD_LOCAL, "spelling-add-local", Noop, Edit }, + +/*! + * \var lyx::FuncCode lyx::LFUN_SPELLING_REMOVE_LOCAL + * \li Action: Remove the word under the cursor from the document's local + * spell checker dictionary. + * The default for the language is retrieved from the cursor position. + * \li Syntax: spelling-remove-local [] [] + * \li Params: : word to remove + : language name (see file languages) + * \li Origin: spitz, 7 Mar 2021 + * \endvar + */ + { LFUN_SPELLING_REMOVE_LOCAL, "spelling-remove-local", Noop, Edit }, + /*! * \var lyx::FuncCode lyx::LFUN_SPELLING_CONTINUOUSLY * \li Action: Toggle continuous spell checking. @@ -3750,21 +3903,25 @@ void LyXAction::init() * \li Params: Generally see #LFUN_INSET_INSERT for further details.\n * : 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|toggle-all-lines|unset-all-lines|\n + toggle-longtabular|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 set-ltlastfoot|unset-ltlastfoot|set-ltnewpage|toggle-ltcaption|\n set-special-column|set-special-multicolumn|set-special-multirow|\n toggle-booktabs|set-booktabs|unset-booktabs|set-top-space|set-bottom-space|\n - set-interline-space|set-border-lines|tabular-valign-top|\n - tabular-valign-middle|tabular-valign-bottom|set-tabular-width|\n - toggle-varwidth-column + set-interline-space|tabular-valign-top|tabular-valign-middle|\n + tabular-valign-bottom|set-tabular-width|toggle-varwidth-column|\n + set-border-lines|toggle-border-lines|set-inner-lines|toggle-inner-lines Various math-environment features are handled as well, e.g. add-vline-left/right for\n the Grid/Array environment.\n : additional argument for some commands, use debug mode to explore its values. @@ -3785,6 +3942,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