X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLyXAction.cpp;h=92da4d7293a1f2a26964278692498f6deba1daaf;hb=04c0cce43e255eaf1350ceddee2b03585310bfdc;hp=6089e5e8d9167638c5b9b907dc6f3f8ca1482c1e;hpb=fe09ddf1b9c7ccbc0ba86b35f9a1bfe93791d639;p=lyx.git diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index 6089e5e8d9..92da4d7293 100644 --- a/src/LyXAction.cpp +++ b/src/LyXAction.cpp @@ -332,20 +332,6 @@ 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 - * \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. @@ -1062,7 +1048,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 @@ -1253,6 +1239,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 @@ -1475,7 +1473,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 @@ -2227,6 +2225,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, @@ -2388,9 +2400,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 }, @@ -2401,9 +2413,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 */ @@ -3461,7 +3473,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 * \li Params: : true|false * \endvar */ @@ -3682,10 +3694,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 */ @@ -3976,6 +3989,19 @@ void LyXAction::init() */ { LFUN_TOOLBAR_MOVABLE, "toolbar-movable", NoBuffer, Buffer }, +/*! + * \var lyx::FuncCode lyx::LFUN_TOOLBAR_SET + * \li Action: Sets visibility of a given toolbar to on, off, or auto. + * \li Notion: Skipping "auto" when allowauto is false. + * \li Syntax: toolbar-set [on|off|auto] + * \li Params: : standard|extra|table|math|mathmacrotemplate|\n + minibuffer|review|view/update|math_panels|vcs| + view-others|update-others + * \li Origin: spitz, 17 Dec 2020 + * \endvar + */ + { LFUN_TOOLBAR_SET, "toolbar-set", NoBuffer, Buffer }, + /*! * \var lyx::FuncCode lyx::LFUN_TOOLBAR_TOGGLE * \li Action: Toggles visibility of a given toolbar between on/off/auto. @@ -4234,6 +4260,18 @@ void LyXAction::init() */ { LFUN_WINDOW_NEW, "window-new", NoBuffer, Buffer }, +/*! + * \var lyx::FuncCode lyx::LFUN_WINDOW_RAISE + * \li Action: Raises the LyX window. + * \li Notion: Brings the LyX window to the front. Such behavior is allowed + on Windows only when no other application has focus. + This action is used when LyX is in single instance mode. + * \li Syntax: window-raise + * \li Origin: forenr, 21 Apr 2020 + * \endvar + */ + { LFUN_WINDOW_RAISE, "window-raise", ReadOnly | NoBuffer, Hidden }, + /*! * \var lyx::FuncCode lyx::LFUN_WORD_BACKWARD * \li Action: Moves the cursor to the logically previous beginning of a word. @@ -4480,9 +4518,9 @@ LyXAction::LyXAction() } -FuncRequest LyXAction::lookupFunc(string const & func) const +FuncRequest LyXAction::lookupFunc(string const & func_name) const { - string const func2 = trim(func); + string const func2 = trim(func_name); if (func2.empty()) return FuncRequest(LFUN_NOACTION); @@ -4526,13 +4564,13 @@ bool LyXAction::funcHasFlag(FuncCode action, } -LyXAction::const_iterator LyXAction::func_begin() const +LyXAction::const_iterator LyXAction::begin() const { return lyx_func_map.begin(); } -LyXAction::const_iterator LyXAction::func_end() const +LyXAction::const_iterator LyXAction::end() const { return lyx_func_map.end(); }