X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLyXAction.cpp;h=278cbc6d10bd9dab56109783085072105fd0e2fd;hb=74037183fef9e524c26fd6785bd2a391c4dcc271;hp=8f1204d40ce26b90eaaff4b448d0698de86c9a1e;hpb=a802034a4bd1bf501b63bf0e7cdf97d0a1d886ee;p=lyx.git diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index 8f1204d40c..278cbc6d10 100644 --- a/src/LyXAction.cpp +++ b/src/LyXAction.cpp @@ -3,10 +3,11 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author Lars Gullik Bjønnes + * \author Lars Gullik Bjønnes * \author Jean-Marc Lasgouttes * \author John Levon - * \author André Pönitz + * \author André Pönitz + * \author Pavel Sanda * * Full author contact details are available in file CREDITS. */ @@ -22,6 +23,8 @@ #include "support/lassert.h" +#include + using namespace std; using namespace lyx::support; @@ -44,15 +47,16 @@ namespace lyx { (May 19 1996, 12:04, RvdK) */ -/* LFUN documentation (a start at least, Chr 2007-08-12) +/* LFUN documentation * - * The documentation below is primarily notes about restrictions and - * oddities relating to the different LFUNs. + * The documentation below is primarily description of purpose and syntax + * relating to the different LFUNs. * - * Try to find an appropriate (thematical) place when adding the new LFUN. + * Try to find an appropriate (thematical) place when adding the new LFUN + * and don't forget to add doxygen commentary. * * Doxygen template below. Some notes: Parameters should be set in uppercase - * and put in , as so. + * and put in , [] means optional one. */ /*! @@ -196,7 +200,7 @@ void LyXAction::init() * \var lyx::FuncCode lyx::LFUN_ACCENT_TIE * \li Action: Adds a tie \htmlonly (a͡)\endhtmlonly over the next two character typed. - * \li Notion: the following char will finish the tie. + * \li Notion: The following char will finish the tie. * \li Syntax: accent-tie * \endvar */ @@ -313,7 +317,7 @@ void LyXAction::init() * \var lyx::FuncCode lyx::LFUN_OPTIONAL_INSERT * \li Action: Inserts an optional-argument (short title) inset. * \li Syntax: optional-insert - * \li Origin: Martin, 12 Aug 2002 + * \li Origin: vermeer, 12 Aug 2002 * \endvar */ { LFUN_OPTIONAL_INSERT, "optional-insert", Noop, Edit }, @@ -321,14 +325,14 @@ void LyXAction::init() * \var lyx::FuncCode lyx::LFUN_LINE_INSERT * \li Action: Inserts a horizontal line. * \li Syntax: line-insert - * \li Origin: poenitz, Oct 27 2003 + * \li Origin: Andre, Oct 27 2003 * \endvar */ { LFUN_LINE_INSERT, "line-insert", Noop, Edit }, /*! * \var lyx::FuncCode lyx::LFUN_NEWPAGE_INSERT * \li Action: Inserts a new page. - * \li Syntax: newpage-insert + * \li Syntax: newpage-insert * \li Params: : default: newpage * \li Origin: uwestoehr, 24 Nov 2007 * \endvar @@ -347,7 +351,8 @@ void LyXAction::init() * \li Action: Inserts a single unicode character. * \li Syntax: unicode-insert * \li Params: : The character to insert, given as its code - point, in hexadecimal, e.g.: unicode-insert 0x0100. + point, in hexadecimal. + * \li Sample: unicode-insert 0x0100 * \li Origin: Lgb, 22 Oct 2006 * \endvar */ @@ -360,13 +365,34 @@ void LyXAction::init() * \endvar */ { LFUN_LISTING_INSERT, "listing-insert", Noop, Edit }, +/*! + * \var lyx::FuncCode lyx::LFUN_TAB_INSERT + * \li Action: Insert a tab into a listings inset. + * \li Notion: It also works on a selection. + * \li Syntax: tab-insert + * \li Origin: vfvanravesteijn, Sep 30 2008 + * \endvar + */ + { LFUN_TAB_INSERT, "tab-insert", SingleParUpdate, Edit }, +/*! + * \var lyx::FuncCode lyx::LFUN_TAB_DELETE + * \li Action: Delete a tab or up to an equivalent amount of spaces from + a listings inset. + * \li Notion: It also works on a selection - it removes a tab or spaces from the + beginning of each line spanned by the selection. This is useful if + you want to indent/unindent multiple lines in one action. + * \li Syntax: tab-delete + * \li Origin: vfvanravesteijn, Sep 30 2008 + * \endvar + */ + { LFUN_TAB_DELETE, "tab-delete", SingleParUpdate, Edit }, /*! * \var lyx::FuncCode lyx::LFUN_QUOTE_INSERT * \li Action: Inserts quotes according to the type and quote-language preference. * \li Action: Currently English, Swedish, German, Polish, French, Danish quotes are distinguished. * \li Syntax: quote-insert [] - * \li Params: TYPE: 'single' for single quotes, otherwise double quotes will be used. + * \li Params: : 'single' for single quotes, otherwise double quotes will be used. * \endvar */ { LFUN_QUOTE_INSERT, "quote-insert", Noop, Edit }, @@ -377,7 +403,7 @@ void LyXAction::init() * \li Notion: Apart from lfun arguments you can use the following method: \n 1. input the type and argument of this inset, e.g. "menu paste", in the work area.\n - 2. select the text and run info-insert lfun.\n + 2. select the text and run info-insert lfun. * \li Syntax: info-insert * \li Params: : shortcut|lyxrc|package|textclass|menu|buffer \n : argument for a given type. Look into InsetInfo.h for detailed @@ -415,7 +441,7 @@ void LyXAction::init() course create some yourself. \n For dissolving the element see #LFUN_INSET_DISSOLVE. * \li Syntax: flex-insert - * \li Params: TYPE: CharStyle|Custom|Element|Standard + * \li Params: TYPE: CharStyle|Custom|Element|Standard \n Identifies whether this is a Character Style, a Custom Inset or an XML Element, and which dynamical sub-menu this flex inset is in on the LyX menu tree. @@ -489,7 +515,7 @@ void LyXAction::init() * \li Action: Inserts Index entry. * \li Notion: It automatically takes the word on the cursor position. * \li Syntax: index-insert - * \li Origin: Angus, 3 Aug 2000 + * \li Origin: leeming, 3 Aug 2000 * \endvar */ { LFUN_INDEX_INSERT, "index-insert", Noop, Edit }, @@ -542,7 +568,7 @@ void LyXAction::init() to a different type (target) fot the current document. * \li Syntax: notes-mutate * \li Params: : Note|Comment|Greyedout - * \li Origin: ps, 18 Jun 2008 + * \li Origin: sanda, 18 Jun 2008 * \endvar */ { LFUN_NOTES_MUTATE, "notes-mutate", Argument, Edit }, @@ -631,7 +657,7 @@ void LyXAction::init() * \li Syntax: scroll * \li Params: : line|page\n : up|down| - * \li Origin: Abdelrazak Younes, Dec 27 2007 + * \li Origin: Abdel, Dec 27 2007 * \endvar */ { LFUN_SCROLL, "scroll", ReadOnly, Edit }, @@ -803,24 +829,34 @@ void LyXAction::init() * \li Params: : data encoded from Find dialog (see #lyx::find2string()). If no parameter is given, search with last find-dialog data is used for search (i.e. find-next). - * \li Origin: poenitz, Jan 7 2004 + * \li Origin: Andre, Jan 7 2004 * \endvar */ { LFUN_WORD_FIND, "word-find", ReadOnly, Edit }, /*! - * \var lyx::FuncCode lyx::LFUN_WORD_FIND + * \var lyx::FuncCode lyx::LFUN_WORD_REPLACE * \li Action: Replace a string in the document. * \li Syntax: word-replace [] * \li Params: : data is of the form " \n \n " - * \li Origin: poenitz, Jan 7 2004 + * \li Origin: Andre, Jan 7 2004 * \endvar */ { LFUN_WORD_REPLACE, "word-replace", Noop, Edit }, /*! - * \var lyx::FuncCode lyx::LFUN_WORD_FORWARD + * \var lyx::FuncCode lyx::LFUN_WORD_FINDADV + * \li Action: Search for next occurence of a pattern. + * \li Syntax: word-findadv [] + * \li Params: : data encoded from FindAdv dialog (see #lyx::findadv2string()). + If no parameter is given, search with last find-dialog + data is used for search (i.e. find-next). + * \li Origin: Tommaso, Nov 15 2007 + * \endvar + */ + { LFUN_WORD_FINDADV, "word-findadv", ReadOnly, Edit }, +/*! \var lyx::FuncCode lyx::LFUN_WORD_FORWARD * \li Action: Moves the cursor to the logically next beginning of a word. * \li Notion: This is not the action which should be bound to the arrow keys, because forward may be left or right, depending on the language. @@ -894,7 +930,7 @@ void LyXAction::init() * \var lyx::FuncCode lyx::LFUN_WORD_SELECT * \li Action: Puts the word where the cursor stands into the selection. * \li Syntax: word-select - * \li Author: Andre, 11 Sep 2002 + * \li Origin: Andre, 11 Sep 2002 * \endvar */ { LFUN_WORD_SELECT, "word-select", ReadOnly, Edit }, @@ -925,7 +961,9 @@ void LyXAction::init() /*! * \var lyx::FuncCode lyx::LFUN_THESAURUS_ENTRY * \li Action: Look up thesaurus entries with respect to the word under the cursor. - * \li Syntax: thesaurus-entry + * \li Syntax: thesaurus-entry [] [lang=] + * \li Params: : word to look up + : language (see file languages) * \li Origin: Levon, 20 Jul 2001 * \endvar */ @@ -1057,7 +1095,7 @@ void LyXAction::init() * \var lyx::FuncCode lyx::LFUN_REPEAT * \li Action: Repeat the given command. * \li Syntax: repeat - * \li Author: poenitz, 27 Oct 2003 + * \li Origin: Andre, , 27 Oct 2003 * \endvar */ { LFUN_REPEAT, "repeat", NoBuffer, Edit }, @@ -1065,7 +1103,7 @@ void LyXAction::init() * \var lyx::FuncCode lyx::LFUN_CHARS_TRANSPOSE * \li Action: Transposes the character at the cursor with the one before it. * \li Syntax: chars-transpose - * \li Author: Lgb, 25 Apr 2001 + * \li Origin: Lgb, 25 Apr 2001 * \endvar */ { LFUN_CHARS_TRANSPOSE, "chars-transpose", Noop, Edit }, @@ -1089,11 +1127,19 @@ void LyXAction::init() /*! * \var lyx::FuncCode lyx::LFUN_FONT_BOLD - * \li Action: Toggles the bold font (selection-wise). + * \li Action: Toggles the bold font (selection-wise) using mathbf in math. * \li Syntax: font-bold * \endvar */ { LFUN_FONT_BOLD, "font-bold", Noop, Layout }, + +/*! + * \var lyx::FuncCode lyx::LFUN_FONT_BOLDSYMBOL + * \li Action: Toggles the bold font (selection-wise) using boldsymbol in math. + * \li Syntax: font-boldsymbol + * \endvar + */ + { LFUN_FONT_BOLDSYMBOL, "font-boldsymbol", Noop, Layout }, /*! * \var lyx::FuncCode lyx::LFUN_FONT_TYPEWRITER * \li Action: Toggles the typewriter family font (selection-wise). @@ -1163,7 +1209,7 @@ void LyXAction::init() * \var lyx::FuncCode lyx::LFUN_FONT_SIZE * \li Action: Sets font size according to lyx format string. * \li Syntax: font-size - * \li Params: : tiny|scriptsize|footnotesize|small|normal|large|larger| + * \li Params: : tiny|scriptsize|footnotesize|small|normal|large|larger|\n largest|huge|giant|increase|decrease|default * \endvar */ @@ -1340,7 +1386,7 @@ void LyXAction::init() * \var lyx::FuncCode lyx::LFUN_MARK_TOGGLE * \li Action: Toggle between #LFUN_MARK_ON and #LFUN_MARK_OFF . * \li Syntax: mark-toggle - * \li Origin: poenitz, May 5 2006 + * \li Origin: Andre, May 5 2006 * \endvar */ { LFUN_MARK_TOGGLE, "mark-toggle", ReadOnly, Edit }, @@ -1431,7 +1477,7 @@ void LyXAction::init() * \li Syntax: math-mutate * \li Params: : none|simple|equation|eqnarray|align|alignat|xalignat|xxalignat| multline|gather|flalign - * \li Origin: Andre', 23 May 2001 + * \li Origin: Andre, 23 May 2001 * \endvar */ { LFUN_MATH_MUTATE, "math-mutate", Noop, Math }, @@ -1443,7 +1489,7 @@ void LyXAction::init() * \li Params: : negative spaces: !|negmedspace|negthickspace \n positive spaces: ,|:|;|quad|qquad \n "," used by default. - * \li Origin: Andre', 25 Jul 2001; ps, 16 Jun 2008 + * \li Origin: Andre, 25 Jul 2001; sanda, 16 Jun 2008 * \endvar */ { LFUN_MATH_SPACE, "math-space", Noop, Math }, @@ -1497,7 +1543,7 @@ void LyXAction::init() * \li Params: : octave|maxima|maple|mathematica|script \n where "script" stands fot the external script (normalized expression will be passed) - * \li Origin: Andre', 24 Apr 2001 + * \li Origin: Andre, 24 Apr 2001 * \li Sample: math-extern maple simplify * \endvar */ @@ -1507,7 +1553,7 @@ void LyXAction::init() * \li Action: Changes arbitrarily the size used by math fonts inside a context. * \li Notion: Provides an interface to the LaTeX math mode font size commands. * \li Syntax: math-size