X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLyXAction.cpp;h=73fe5cc44d568f74abeb3b1bbdd53cbf28ed0231;hb=79cf3f5ec1088e7de988e889247ec300d42fb70b;hp=9171e1c8b831cc08345ac320f08e8d1616a74f11;hpb=2fbd9f640516dc8f69ec8b685903fbc2ad2f5311;p=lyx.git diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index 9171e1c8b8..73fe5cc44d 100644 --- a/src/LyXAction.cpp +++ b/src/LyXAction.cpp @@ -52,7 +52,7 @@ namespace lyx { * The documentation below primarily describes the purpose and syntax * of the various LFUNs. * - * The list is alphabetized. Try to keep it that way, and don't forget to add + * The list is alphabetized. Try to keep it that way, and don't forget to add * doxygen commentary. This allows the file LFUNs.lyx to be auto-generated. * (If you should want to do that, see the gen_lfuns.py script, which is in * the development/tools/ directory.) @@ -486,6 +486,17 @@ void LyXAction::init() { LFUN_BRANCH_MASTER_DEACTIVATE, "branch-master-deactivate", AtPoint, Buffer }, +/*! + * \var lyx::FuncCode lyx::LFUN_BUFFER_ANONYMIZE + * \li Action: For debug purposes only. Convert all [a-zA-Z0-1] characters to + single character. Useful when submitting docs to list or bugzilla. + * \li Syntax: buffer-anonymize + * \li Origin: sanda, Feb 1 2018 + * \endvar + */ + { LFUN_BUFFER_ANONYMIZE, "buffer-anonymize", Noop, Edit }, + + /*! * \var lyx::FuncCode lyx::LFUN_BUFFER_AUTO_SAVE * \li Action: Saves the current buffer to a temporary file. @@ -574,7 +585,7 @@ void LyXAction::init() /*! * \var lyx::FuncCode lyx::LFUN_BUFFER_EXPORT * \li Action: Exports the current buffer (document) to the given format. - * \li Syntax: buffer-export [] + * \li Syntax: buffer-export [] [] * \li Params: is either "custom" or one of the formats which you can find in Tools->Preferences->File formats->Format. Usual format you will enter is "pdf2" (pdflatex), @@ -582,10 +593,12 @@ void LyXAction::init() In case of "custom" you will be asked for a format you want to start from and for the command that you want to apply to this format. Internally the control is then passed - to #LFUN_BUFFER_EXPORT_CUSTOM. - If present, this argument provides the export destination - filename. Its containing folder will also be the destination - folder, where all the needed external files will be copied. + to #LFUN_BUFFER_EXPORT_CUSTOM.\n + If absent or "default", then the default output format of the + document is used.\n + If present, this argument provides the export destination + filename. Its containing folder will also be the destination + folder, where all the needed external files will be copied. * \li Origin: Lgb, 29 Jul 1997 * \endvar */ @@ -630,17 +643,17 @@ void LyXAction::init() * \li Syntax: buffer-forall * \li Params: : The command to be applied to the buffers. * \li Sample: Close all Notes in buffers: \n - buffer-forall inset-forall Note inset-toggle close \n + buffer-forall inset-forall Note inset-toggle close \n Toggle change tracking on buffers: \n - buffer-forall changes-track \n + buffer-forall changes-track \n Toggle read-only for buffers: \n - buffer-forall buffer-toggle-read-only \n + buffer-forall buffer-toggle-read-only \n Show statistics for individual buffers: \n - buffer-forall statistics \n + buffer-forall statistics \n Activate the branch named "Solutions" in buffers: \n - buffer-forall branch-activate Solutions \n + buffer-forall branch-activate Solutions \n Export buffers to PDF (pdflatex): \n - buffer-forall buffer-export pdf2 \n + buffer-forall buffer-export pdf2 \n * \li Origin: skostysh, 20 Jul 2012 * \endvar */ @@ -740,7 +753,8 @@ void LyXAction::init() /*! * \var lyx::FuncCode lyx::LFUN_BUFFER_RELOAD * \li Action: Reverts opened document. - * \li Syntax: buffer-reload + * \li Syntax: buffer-reload [dump] + * \li Params: dump: do not ask for any confirmation, just reload. All changes will be lost. * \li Origin: Asger, 2 Feb 1997 * \endvar */ @@ -876,11 +890,33 @@ void LyXAction::init() */ { LFUN_BUFFER_WRITE_AS, "buffer-write-as", ReadOnly, Buffer }, +/*! + * \var lyx::FuncCode lyx::LFUN_BUFFER_EXTERNAL_MODIFICATION_CLEAR + * \li Action: Clear the external modification flag on the current buffer. + * \li Syntax: buffer-external-modification-clear + * \li Origin: gm, 2 March 2017 + * \endvar + */ + { LFUN_BUFFER_EXTERNAL_MODIFICATION_CLEAR, + "buffer-external-modification-clear", ReadOnly, Buffer }, + +/*! +* \var lyx::FuncCode lyx::LFUN_BUFFER_ZOOM +* \li Action: Sets the zoom of the screen fonts. +* \li Syntax: buffer-zoom [] +* \li Params: : The target zoom value in %; +* the default is the default zoom as saved in preferences. +* \li Origin: daniel, 28 Oct 2016 +* \endvar +*/ + { LFUN_BUFFER_ZOOM, "buffer-zoom", ReadOnly, Buffer }, + /*! * \var lyx::FuncCode lyx::LFUN_BUFFER_ZOOM_IN * \li Action: Increases the zoom of the screen fonts. * \li Syntax: buffer-zoom-in [] - * \li Params: : The zoom in % points (neg. or pos.), the default is 20. + * \li Params: : The zoom value addition in % (neg. or pos.); + * the default is 10% of the default zoom as saved in preferences. * \li Origin: vfr, 30 Mar 2009 * \endvar */ @@ -891,7 +927,8 @@ void LyXAction::init() * \var lyx::FuncCode lyx::LFUN_BUFFER_ZOOM_OUT * \li Action: Decreases the zoom of the screen fonts. * \li Syntax: buffer-zoom-out [] - * \li Params: : The zoom in % points (neg. or pos.), the default is -20. + * \li Params: : The zoom value abstraction in % (neg. or pos.); + * the default is 10% of the default zoom as saved in preferences. * \li Origin: vfr, 30 Mar 2009 * \endvar */ @@ -993,7 +1030,7 @@ void LyXAction::init() * \var lyx::FuncCode lyx::LFUN_CHANGES_OUTPUT * \li Action: Toggles showing of change tracking in typeset output. * \li Syntax: changes-output - * \li Origin: jspitzm, 21 Jan 2005 + * \li Origin: spitz, 21 Jan 2005 * \endvar */ { LFUN_CHANGES_OUTPUT, "changes-output", Noop, Edit }, @@ -1080,7 +1117,8 @@ void LyXAction::init() /*! * \var lyx::FuncCode lyx::LFUN_CHAR_DELETE_BACKWARD * \li Action: Deletes one character in the backward direction (usually the "BackSpace" key). - * \li Syntax: char-delete-backward + * \li Syntax: char-delete-backward [force] + * \li Params: force: Delete big insets, do not only select them. * \endvar */ { LFUN_CHAR_DELETE_BACKWARD, "char-delete-backward", SingleParUpdate, Edit }, @@ -1088,7 +1126,8 @@ void LyXAction::init() /*! * \var lyx::FuncCode lyx::LFUN_CHAR_DELETE_FORWARD * \li Action: Deletes one character in the backward direction (usually the "Delete" key). - * \li Syntax: char-delete-forward + * \li Syntax: char-delete-forward [force] + * \li Params: force: Delete big insets, do not only select them. * \endvar */ { LFUN_CHAR_DELETE_FORWARD, "char-delete-forward", SingleParUpdate, Edit }, @@ -1331,8 +1370,9 @@ void LyXAction::init() * \li Action: Inserts the current date. * \li Syntax: date-insert [] * \li Params: : Format of date. The default value (%x) can be set - in Preferences->Date format. For possible formats - see manual page of strftime function. + in Preferences->Output->General->Date format. For + possible formats see the manual page of the + strftime function. * \li Origin: jdblair, 31 Jan 2000 * \endvar */ @@ -1371,6 +1411,19 @@ void LyXAction::init() { LFUN_DEPTH_INCREMENT, "depth-increment", Noop, Edit }, +/*! + * \var lyx::FuncCode lyx::LFUN_DEVEL_MODE_TOGGLE + * \li Action: toggle a mode where more information is given in UI + * \li Syntax: devel-mode-toggle + * \li Notion: in so called "devel" mode, the information given in the + * status bar is more precise, and the help documents are + * open in editing mode. + * \li Origin: lasgouttes, 23 Jul 2017 + * \endvar + */ + { LFUN_DEVEL_MODE_TOGGLE, "devel-mode-toggle", NoBuffer, System }, + + /*! * \var lyx::FuncCode lyx::LFUN_DIALOG_DISCONNECT_INSET * \li Action: Closes opened connection to opened inset. @@ -1427,7 +1480,7 @@ void LyXAction::init() * \li Notion: Internally uses #LFUN_DIALOG_SHOW , #LFUN_DIALOG_HIDE . * \li Syntax: dialog-toggle [] * \li Params: See #LFUN_DIALOG_SHOW . - * \li Origin: JSpitzm, 30 Apr 2007 + * \li Origin: spitz, 30 Apr 2007 * \endvar */ { LFUN_DIALOG_TOGGLE, "dialog-toggle", NoBuffer, Edit }, @@ -1473,9 +1526,13 @@ void LyXAction::init() /*! * \var lyx::FuncCode lyx::LFUN_ENVIRONMENT_SPLIT * \li Action: Splits the current environment with a Separator. - * \li Syntax: environment-split [outer] - * \li Params: outer: If this is given, LyX will split the outermost environment in - * the current nesting hierarchy. + * \li Syntax: environment-split [before|outer|previous] + * \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 + before: If this is given, the new environment will be appended rather than + prepended. * \li Origin: spitz, 23 Dec 2012 * \endvar */ @@ -1501,6 +1558,15 @@ void LyXAction::init() */ { LFUN_ESCAPE, "escape", ReadOnly, Edit }, +/*! + * \var lyx::FuncCode lyx::LFUN_EXPORT_CANCEL + * \li Action: Cancel background export process. + * \li Syntax: export-cancel + * \li Origin: rgh, 10 December 2017 + * \endvar + */ + { LFUN_EXPORT_CANCEL, "export-cancel", ReadOnly | NoUpdate | NoInternal, Edit }, + /*! * \var lyx::FuncCode lyx::LFUN_FILE_INSERT * \li Action: Inserts another LyX file. @@ -1735,6 +1801,15 @@ void LyXAction::init() */ { LFUN_FONT_STRIKEOUT, "font-strikeout", Noop, Layout }, +/*! + * \var lyx::FuncCode lyx::LFUN_FONT_CROSSOUT + * \li Action: Toggles xout (cross-through) in the font (selection-wise). + * \li Syntax: font-crossout + * \li Origin: uwestoehr, 4 April 2017 + * \endvar + */ + { LFUN_FONT_CROSSOUT, "font-crossout", Noop, Layout }, + /*! * \var lyx::FuncCode lyx::LFUN_FONT_TYPEWRITER * \li Action: Toggles the typewriter family font (selection-wise). @@ -1784,22 +1859,13 @@ void LyXAction::init() number in LyX window. * \li Notion: The external program used for forward search call can be specified in LyX Output preferences. See Additional manual for details of these - settings. + settings. * \li Syntax: forward-search * \li Origin: sanda, 14 Apr 2010 * \endvar */ { LFUN_FORWARD_SEARCH, "forward-search", ReadOnly, System }, -/*! - * \var lyx::FuncCode lyx::LFUN_GRAPHICS_RELOAD - * \li Action: Reloads the image if necessary. - * \li Syntax: graphics-reload - * \li Origin: vfr, 10 Aug 2009 - * \endvar - */ - { LFUN_GRAPHICS_RELOAD, "graphics-reload", ReadOnly | AtPoint, Edit }, - /*! * \var lyx::FuncCode lyx::LFUN_HELP_OPEN * \li Action: Open the given help file according to the language setting. @@ -1864,17 +1930,17 @@ void LyXAction::init() the work area.\n 2. select the text and run info-insert lfun. * \li Syntax: info-insert - * \li Params: : shortcut[s]|lyxrc|lyxinfo|package|textclass|menu|buffer \n + * \li Params: : shortcut[s]|lyxrc|lyxinfo|package|textclass|menu|icon|buffer \n : argument for a given type. Look into InsetInfo.h for detailed description. \n - shortcut[s]: name of lfun (e.g math-insert \alpha) \n - lyxrc: name of rc_entry (e.g. bind_file) \n - lyxinfo: "version" - used version of LyX \n - package: name of latex package (e.g. listings) \n - textclass: name of textclass (e.g. article) \n - menu: name of lfun used in menu \n - icon: icon of lfun used in toolbar or direct icon name\n - buffer: "name"|"path"|"class"|"vcs-tree-revision"| + shortcut[s]: name of lfun (e.g math-insert \alpha) \n + lyxrc: name of rc_entry (e.g. bind_file) \n + lyxinfo: "version" - used version of LyX \n + package: name of latex package (e.g. listings) \n + textclass: name of textclass (e.g. article) \n + menu: name of lfun used in menu \n + icon: icon of lfun used in toolbar or direct icon name\n + buffer: "name"|"path"|"class"|"vcs-tree-revision"| "vcs-revision"|"vcs-author"|"vcs-date"|"vcs-time" * \li Sample: command-sequence info-insert buffer path; info-insert buffer name * \li Origin: bpeng, 7 Oct 2007 @@ -1897,8 +1963,10 @@ void LyXAction::init() /*! * \var lyx::FuncCode lyx::LFUN_INSET_BEGIN * \li Action: Move the cursor to the beginning of the current inset - if it is not already there, or at the beginning of the - enclosing inset otherwise + if it is not already there. If the cursor is already at + the beginning of the current inset, move it to the + beginning of the enclosing inset or the main work area, + respectively, if there is no enclosing inset. * \li Syntax: inset-begin * \li Origin: lasgouttes, 16 Mar 2009 * \endvar @@ -1908,8 +1976,10 @@ void LyXAction::init() /*! * \var lyx::FuncCode lyx::LFUN_INSET_BEGIN_SELECT * \li Action: Move the cursor to the beginning of the current inset - if it is not already there, or at the beginning of the - enclosing inset otherwise (adding the + if it is not already there. If the cursor is already at + the beginning of the current inset, move it to the + beginning of the enclosing inset or the main work area, + respectively, if there is no enclosing inset (adding the traversed text to the selection). * \li Syntax: inset-begin-select * \li Origin: lasgouttes, 16 Mar 2009 @@ -1957,20 +2027,38 @@ void LyXAction::init() * \var lyx::FuncCode lyx::LFUN_INSET_EDIT * \li Action: Edit the inset at cursor with an external application, if one is attributed. + If the inset is file based, the referenced file is edited. + Otherwise, the inset contents is written to a temporary file, + the inset is locked, and the temporary file is edited. + In this case, #LFUN_INSET_END_EDIT must be called to overtake + the changes and unlock the inset after editing is finished. * \li Syntax: inset-edit [] * \li Params: : Parameters for the inset. \n Currently only the filename will be considered. - * \li Origin: JSpitzm, 27 Apr 2006 + * \li Origin: spitz, 27 Apr 2006 * \endvar */ { LFUN_INSET_EDIT, "inset-edit", ReadOnly | AtPoint, Edit }, + /*! + * \var lyx::FuncCode lyx::LFUN_INSET_END_EDIT + * \li Action: End editing the inset at cursor with an external application. + * This replaces the inset contents with the contents of the + * temporary file, deletes the file and unlocks the inset. + * \li Syntax: inset-end-edit + * \li Origin: gb, 11 Oct 2015 + * \endvar + */ + { LFUN_INSET_END_EDIT, "inset-end-edit", ReadOnly | AtPoint, Edit }, + /*! * \var lyx::FuncCode lyx::LFUN_INSET_END - * \li Action: Move the cursor to the end of the current inset - if it is not already there, or at the end of the - enclosing inset otherwise + * \li Action: Move the cursor to the end of the current inset if it + is not already there. If the cursor is already at the + end of the current inset, move it to the end of the + enclosing inset or the main work area, respectively, if + there is no enclosing inset. * \li Syntax: inset-end * \li Origin: lasgouttes, 16 Mar 2009 * \endvar @@ -1979,9 +2067,11 @@ void LyXAction::init() /*! * \var lyx::FuncCode lyx::LFUN_INSET_END_SELECT - * \li Action: Move the cursor to the end of the current inset - if it is not already there, or at the end of the - enclosing inset otherwise (adding the + * \li Action: Move the cursor to the end of the current inset if it + is not already there. If the cursor is already at the + end of the current inset, move it to the end of the + enclosing inset or the main work area, respectively, if + there is no enclosing inset (adding the traversed text to the selection). * \li Syntax: inset-end-select * \li Origin: lasgouttes, 16 Mar 2009 @@ -2008,13 +2098,13 @@ void LyXAction::init() matches all note insets, while "Note:Note" only matches LyX yellow note insets. * \li Sample: Remove all index insets: \n - inset-forall Index char-delete-forward \n + inset-forall Index char-delete-forward force \n Close all Notes (also works for a particular branch, for example): \n - inset-forall Note inset-toggle close \n + inset-forall Note inset-toggle close \n Transform all yellow notes to comments \n - inset-forall Note:Note inset-modify note Note Comment \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 - inset-forall Note char-backward + inset-forall Note char-backward * \li Origin: lasgouttes, 27 Nov 2009 * \endvar */ @@ -2026,7 +2116,7 @@ void LyXAction::init() * \li Action: Insert new inset (type given by the parameters). * \li Syntax: inset-insert * \li Params: : \n + hyperlink|include|index|label|line|nomencl|vspace|ref|toc|script>\n : depends on the given inset. Use "lyx -dbg action" to explore. * \li Sample: inset-insert ref LatexCommand reference "