X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLyXAction.cpp;h=39cad0d0d4df4a83e38623a56dcacbf5cf449edb;hb=0c05432284f144bcb6c278a60d54d9bc777829e0;hp=3decef75e27eb4ff94c2f18a17d0f7e61380d7f1;hpb=8a6fa01d1420510d4562c93658b5444caac4d688;p=lyx.git diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index 3decef75e2..39cad0d0d4 100644 --- a/src/LyXAction.cpp +++ b/src/LyXAction.cpp @@ -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. @@ -742,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 */ @@ -1353,18 +1365,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 [] - * \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. - * \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. @@ -1513,11 +1513,11 @@ void LyXAction::init() /*! * \var lyx::FuncCode lyx::LFUN_ENVIRONMENT_SPLIT * \li Action: Splits the current environment with a Separator. - * \li Syntax: environment-split [outer|previous] + * \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 + 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 @@ -1853,15 +1853,6 @@ void LyXAction::init() */ { 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. @@ -1926,18 +1917,26 @@ 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|icon|buffer \n + * \li Params: : date|moddate|fixdate|time|modtime|fixtime|shortcut|shortcuts|lyxrc| + * lyxinfo|package|textclass|menu|l7n|icon|buffer|vcs \n : argument for a given type. Look into InsetInfo.h for detailed description. \n + date: current date (formatted and localized)\n + moddate: date of last modification (saving) (formatted and localized)\n + fixdate: a static date (formatted and localized)\n + time: current time (formatted and localized)\n + modtime: time of last modification (saving) (formatted and localized)\n + fixtime: a static time (formatted and localized)\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 + l7n: localizable string.\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" + buffer: "name"|"name-noext"|"path"|"class" + vcs: "tree-revision"|"revision"|"author"|"date"|"time" * \li Sample: command-sequence info-insert buffer path; info-insert buffer name * \li Origin: bpeng, 7 Oct 2007 * \endvar @@ -1959,8 +1958,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 @@ -1970,8 +1971,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 @@ -2019,6 +2022,11 @@ 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. @@ -2028,11 +2036,24 @@ void LyXAction::init() { 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 @@ -2041,9 +2062,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 @@ -2129,8 +2152,8 @@ void LyXAction::init() * \var lyx::FuncCode lyx::LFUN_INSET_SELECT_ALL * \li Action: Select all contents of an inset. * \li Notion: There are 3 successive levels: select current cell, - * select all cells of inset, select the inset from outside - * (in the enclosing inset). + * select all cells of inset, select the inset from outside + * (in the enclosing inset). * \li Syntax: inset-select-all * \li Origin: vfr, 22 Aug 2009; lasgouttes 1 Nov 2014 * \endvar @@ -2320,6 +2343,20 @@ void LyXAction::init() */ { LFUN_LAYOUT, "layout", Noop, Layout }, +/*! + * \var lyx::FuncCode lyx::LFUN_LAYOUT_TOGGLE + * \li Action: Toggles the layout (that is, environment) for the current paragraph. + * \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 Params: : the layout to toggle\n + ignorenests: If specified, nesting advices will be ignored. + * \li Origin: lasgouttes, 14 May 2018 + * \endvar + */ + { LFUN_LAYOUT_TOGGLE, "layout-toggle", Noop, Layout }, + /*! * \var lyx::FuncCode lyx::LFUN_LAYOUT_MODULES_CLEAR * \li Action: Clears the module list. @@ -2494,6 +2531,25 @@ void LyXAction::init() { LFUN_MARK_TOGGLE, "mark-toggle", ReadOnly, Edit }, +/*! + * \var lyx::FuncCode lyx::LFUN_MASTER_BUFFER_EXPORT + * \li Action: Exports the master buffer (document) to the given format. + * \li Syntax: master-buffer-export [] [] + * \li Params: is one of the formats which you can find in + Tools->Preferences->File formats->Format. + Usual format you will enter is "pdf2" (pdflatex), + "pdflatex" (plain tex for pdflatex) or "ps" for postscript.\n + Note that "custom" is not allowed in this case.\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: rkh, 18 April 2018 + * \endvar + */ + { LFUN_MASTER_BUFFER_EXPORT, "master-buffer-export", ReadOnly, Buffer }, + /*! * \var lyx::FuncCode lyx::LFUN_MASTER_BUFFER_UPDATE * \li Action: Update (export) the document built from the master buffer, @@ -3544,16 +3600,35 @@ void LyXAction::init() { LFUN_SET_COLOR, "set-color", ReadOnly | NoBuffer, System }, /*! - * \var lyx::FuncCode lyx::LFUN_SET_GRAPHICS_GROUP + * \var lyx::FuncCode lyx::LFUN_GRAPHICS_SET_GROUP * \li Action: Set the group for the graphics inset on the cursor position. - * \li Syntax: set-graphics-group [] + * \li Syntax: graphics-set-group [] * \li Params: : Id for an existing group. In case the Id is an empty string, the graphics inset is removed from the current group. * \li Origin: sanda, 6 May 2008 * \endvar */ - { LFUN_SET_GRAPHICS_GROUP, "set-graphics-group", Noop, Edit }, + { LFUN_GRAPHICS_SET_GROUP, "graphics-set-group", Noop, Edit }, +/*! + * \var lyx::FuncCode lyx::LFUN_GRAPHICS_UNIFY + * \li Action: Set the same group for all graphics insets in the marked block. + * \li Syntax: graphics-unify [] + * \li Params: : Id for an existing group. In case the Id is an empty string, + the group Id from the first graphics inset will be used. + * \li Origin: sanda, 7 Feb 2018 + * \endvar + */ + { LFUN_GRAPHICS_UNIFY, "graphics-unify", Noop, Edit }, + +/*! + * \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_SPACE_INSERT @@ -3664,7 +3739,8 @@ void LyXAction::init() 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 + tabular-valign-middle|tabular-valign-bottom|set-tabular-width|\n + toggle-varwidth-column 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. @@ -3757,7 +3833,7 @@ void LyXAction::init() * \var lyx::FuncCode lyx::LFUN_TEXTSTYLE_UPDATE * \li Action: Apply text style and update the settings to be used by #LFUN_TEXTSTYLE_APPLY. * \li Syntax: textstyle-update - * \li Params: : specifies font atributes, e.g. family, series, shape, + * \li Params: : specifies font attributes, e.g. family, series, shape, size, emph, noun, underbar, number, color, language, toggleall.\n Use lyx -dbg action for exact syntax of text-style @@ -3831,10 +3907,10 @@ void LyXAction::init() /*! * \var lyx::FuncCode lyx::LFUN_UNICODE_INSERT * \li Action: Inserts a single unicode character. - * \li Syntax: unicode-insert - * \li Params: : The character to insert, given as its code + * \li Syntax: unicode-insert ... + * \li Params: : The character to insert, given as its code point, in hexadecimal. - * \li Sample: unicode-insert 0x0100 + * \li Sample: unicode-insert 0x0100 0x0259 * \li Origin: Lgb, 22 Oct 2006 * \endvar */ @@ -4210,8 +4286,8 @@ void LyXAction::init() * \li Action: Replace a string in the document. * \li Syntax: word-replace [] * \li Params: : data is of the form - " \n - \n + " \n + \n " * \li Origin: Andre, Jan 7 2004 * \endvar