]> git.lyx.org Git - lyx.git/blobdiff - src/LyXAction.cpp
Add comment.
[lyx.git] / src / LyXAction.cpp
index 49bd65a6edd743f290fcbee1657e1722c730876a..5b355243ba5562684f59d3532ec4b1de5308d6b7 100644 (file)
@@ -319,7 +319,8 @@ void LyXAction::init()
 /*!
  * \var lyx::FuncCode lyx::LFUN_ARGUMENT_INSERT
  * \li Action: Inserts an argument (short title) inset.
- * \li Syntax: argument-insert
+ * \li Syntax: argument-insert <argument nr>
+ * \li Params: <argument nr>: see layout declarations
  * \li Origin: vermeer, 12 Aug 2002
  * \endvar
  */
@@ -485,14 +486,14 @@ void LyXAction::init()
  */
                { LFUN_SPACE_INSERT, "space-insert", Noop, Edit },
 /*!
- * \var lyx::FuncCode lyx::LFUN_HYPERLINK_INSERT
+ * \var lyx::FuncCode lyx::LFUN_HREF_INSERT
  * \li Action: Inserts hyperlinks into the document (clickable in pdf output).
  * \li Notion: Hyperlink target can be set via selection + hyperlink-insert function.
  * \li Syntax: href-insert [<TARGET>]
  * \li Origin: CFO-G, 21 Nov 1997
  * \endvar
  */
-               { LFUN_HYPERLINK_INSERT, "href-insert", Noop, Edit },
+               { LFUN_HREF_INSERT, "href-insert", Noop, Edit },
 /*!
  * \var lyx::FuncCode lyx::LFUN_SPECIALCHAR_INSERT
  * \li Action: Inserts various characters into the document.
@@ -549,7 +550,7 @@ void LyXAction::init()
  * \li Origin: spitz, 05 Mar 2012
  * \endvar
  */
-        { LFUN_IPA_INSERT, "ipa-insert", Noop, Edit },
+               { LFUN_IPA_INSERT, "ipa-insert", Noop, Edit },
 /*!
  * \var lyx::FuncCode lyx::LFUN_IN_IPA
  * \li Action: Only active in IPA inset.
@@ -1044,6 +1045,16 @@ void LyXAction::init()
  * \endvar
  */
                { LFUN_SPELLING_REMOVE, "spelling-remove", ReadOnly, Edit },
+
+/*!
+ * \var lyx::FuncCode lyx::LFUN_SPELLING_CONTINUOUSLY
+ * \li Action: Toggle continuous spell checking.
+ * \li Syntax: spelling-continuously
+ * \li Origin: vfr, 24 March 2013
+ * \endvar
+ */
+               { LFUN_SPELLING_CONTINUOUSLY, "spelling-continuously", ReadOnly, Edit },
+
 /*!
  * \var lyx::FuncCode lyx::LFUN_THESAURUS_ENTRY
  * \li Action: Look up thesaurus entries with respect to the word under the cursor.
@@ -1179,13 +1190,13 @@ void LyXAction::init()
  */
                { LFUN_LINE_END_SELECT, "line-end-select", ReadOnly | SingleParUpdate, Edit },
 /*!
- * \var lyx::FuncCode lyx::LFUN_LINE_DELETE
+ * \var lyx::FuncCode lyx::LFUN_LINE_DELETE_FORWARD
  * \li Action: Deletes the letters to the end of the (screen) line or
                deletes the selection.
  * \li Syntax: line-delete-forward
  * \endvar
  */
-               { LFUN_LINE_DELETE, "line-delete-forward", Noop, Edit }, // there is no line-delete-backward
+               { LFUN_LINE_DELETE_FORWARD, "line-delete-forward", Noop, Edit }, // there is no line-delete-backward
 /*!
  * \var lyx::FuncCode lyx::LFUN_COPY
  * \li Action: Copies the current selection to the clipboard.
@@ -1204,14 +1215,21 @@ void LyXAction::init()
  * \var lyx::FuncCode lyx::LFUN_PASTE
  * \li Action: Pastes material (text or picture) from the active clipboard.
  * \li Syntax: paste [<TYPE>|<NUM>]
- * \li Params: <TYPE>: emf|pdf|png|jpeg|linkback|wmf \n
+ * \li Params: <TYPE>: emf|pdf|png|jpeg|linkback|wmf|latex|html \n
                <NUM>: number of the selection in the internal clipboard stack to be pasted.
  * \endvar
  */
                { LFUN_PASTE, "paste", Noop, Edit },
 /*!
  * \var lyx::FuncCode lyx::LFUN_CLIPBOARD_PASTE
- * \li Action: Pastes text from the active clipboard.
+ * \li Action: Pastes text from the active clipboard (retains formatting if the
+               clipboard contains formatted text). Pastes plain text if plain text is
+               on the clipboard, but tries to interpret it in special ways for certain
+               insets, e.g. converting csv data to rows and columns if the paste happens
+               in a tabular inset.
+ * \li Notion: Historically, LFUN_CLIPBOARD_PASTE was introduced as a counterpart of
+               LFUN_PRIMARY_SELECTION_PASTE: It behaved exactly the same, but the source
+               is the clipboard, not the selection.
  * \li Syntax: clipboard-paste [<ARG>]
  * \li Params: <ARG>: "paragraph" will cause pasting as one paragraph, i.e. "Join lines".
  * \li Origin: Georg, 10 Jul 2006
@@ -1239,7 +1257,11 @@ void LyXAction::init()
                { LFUN_SELECTION_PASTE, "selection-paste", Noop, Edit },
 /*!
  * \var lyx::FuncCode lyx::LFUN_CLIPBOARD_PASTE_SIMPLE
- * \li Action: Pastes simple unformatted text from the active clipboard.
+ * \li Action: Pastes plain text from the active clipboard even if formatted
+               LyX content is in the clipboard. Pastes plain text if plain text
+               is on the clipboard, without trying to interpret it in special
+               ways for certain insets, e.g. converting csv data to rows and
+               columns if the paste happens in a tabular inset.
  * \li Syntax: clipboard-paste-simple [<ARG>]
  * \li Params: <ARG>: "paragraph" will cause pasting as one paragraph, i.e. "Join lines".
  * \endvar
@@ -1323,21 +1345,21 @@ void LyXAction::init()
  */
                { LFUN_FONT_UNDERLINE, "font-underline", Noop, Layout },
 /*!
- * \var lyx::FuncCode lyx::LFUN_FONT_UULINE
+ * \var lyx::FuncCode lyx::LFUN_FONT_UNDERUNDERLINE
  * \li Action: Toggles double underline in the font (selection-wise).
  * \li Syntax: font-underunderline
  * \li Origin: sanda, 5 May 2009
  * \endvar
  */
-               { LFUN_FONT_UULINE, "font-underunderline", Noop, Layout },
+               { LFUN_FONT_UNDERUNDERLINE, "font-underunderline", Noop, Layout },
 /*!
- * \var lyx::FuncCode lyx::LFUN_FONT_UWAVE
+ * \var lyx::FuncCode lyx::LFUN_FONT_UNDERWAVE
  * \li Action: Toggles wavy underline in the font (selection-wise).
  * \li Syntax: font-underwave
  * \li Origin: sanda, 5 May 2009
  * \endvar
  */
-               { LFUN_FONT_UWAVE, "font-underwave", Noop, Layout },
+               { LFUN_FONT_UNDERWAVE, "font-underwave", Noop, Layout },
 /*!
  * \var lyx::FuncCode lyx::LFUN_FONT_STRIKEOUT
  * \li Action: Toggles strikeout (strike-through) in the font (selection-wise).
@@ -1710,10 +1732,12 @@ void LyXAction::init()
                { LFUN_MATH_MATRIX, "math-matrix", Noop, Math },
 /*!
  * \var lyx::FuncCode lyx::LFUN_MATH_AMS_MATRIX
- * \li Action: Inserts a matrix.
+ * \li Action: Inserts an extended matrix as provided by the amsmath package.
  * \li Syntax: math-matrix <COLS> <ROWS> [<DECORATION>]
  * \li Params: <DECORATION>: Decoration determines the LaTeX name of the matrix
-                             that should be created.
+                             that should be created. Possible values include
+                             pmatrix, bmatrix, Bmatrix, vmatrix, Vmatrix and
+                             matrix. The default is 'matrix'.
  * \li Sample: math-ams-matrix 3 3 bmatrix
  * \endvar
  */
@@ -2145,6 +2169,34 @@ void LyXAction::init()
  * \endvar
  */
                { LFUN_VC_REGISTER, "vc-register", ReadOnly, System },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_VC_RENAME
+ * \li Action: Renames the document to another name.
+ * \li Notion: Renaming with revision history is only supported by SVN.
+               For CVS it is simulated by adding the document under a new
+               name and deleting the old one. For RCS it is not supported.
+               Disabled if uncommitted changes exist.
+ * \li Syntax: vc-rename <FILENAME> 
+ * \li Params: <FILENAME>: New name of the document.\n
+ *             A file dialog is opened if no filename is given.
+ * \li Origin: gb, 05 Feb 2013
+ * \endvar
+ */
+               { LFUN_VC_RENAME, "vc-rename", ReadOnly, System },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_VC_COPY
+ * \li Action: Copies the document to another name.
+ * \li Notion: Copying with revision history is only supported by SVN.
+               For RCS and CVS it is simulated by adding the document
+               under a new name.
+               Disabled if uncommitted changes exist.
+ * \li Syntax: vc-copy <FILENAME> 
+ * \li Params: <FILENAME>: New name of the document.\n
+ *             A file dialog is opened if no filename is given.
+ * \li Origin: gb, 05 Feb 2013
+ * \endvar
+ */
+               { LFUN_VC_COPY, "vc-copy", ReadOnly, System },
 /*!
  * \var lyx::FuncCode lyx::LFUN_VC_CHECK_IN
  * \li Action: Checks-in/commits the changes of the registered file to the repository.
@@ -2248,7 +2300,7 @@ void LyXAction::init()
                { LFUN_CHANGES_TRACK, "changes-track", Noop, Edit },
 /*!
  * \var lyx::FuncCode lyx::LFUN_CHANGES_OUTPUT
- * \li Action: Toggles showing of change tracking in typesetted output.
+ * \li Action: Toggles showing of change tracking in typeset output.
  * \li Syntax: changes-output
  * \li Origin: jspitzm, 21 Jan 2005
  * \endvar
@@ -2371,21 +2423,22 @@ void LyXAction::init()
  * \li Params: Generally see #LFUN_INSET_INSERT for further details.\n
                In case that <INSET> is "tabular" various math-environment features
                are handled as well, e.g. add-vline-left/right for the Grid/Array environment.\n
-               <FEATURE>: append-row|append-column|delete-row|delete-column|copy-row|copy-column|
-                       toggle-line-top|toggle-line-bottom|toggle-line-left|toggle-line-right|
-                       align-left|align-right|align-center|align-block|align-decimal|set-decimal-point|
-                       valign-top|valign-bottom|valign-middle|longtabular-align-left|
-                       longtabular-align-center|longtabular-align-right|m-align-left|m-align-right|
-                       m-align-center|m-valign-top|m-valign-bottom|m-valign-middle|multicolumn|
-                       set-all-lines|unset-all-lines|set-longtabular|unset-longtabular|set-pwidth|
-                       set-mpwidth|set-rotate-tabular|unset-rotate-tabular|toggle-rotate-tabular|
-                       set-rotate-cell|unset-rotate-cell|toggle-rotate-cell|set-usebox|set-lthead|
-                       unset-lthead|set-ltfirsthead|unset-ltfirsthead|set-ltfoot|unset-ltfoot|
-                       set-ltlastfoot|unset-ltlastfoot|set-ltnewpage|toggle-ltcaption|
-                       set-special-column|set-special-multicolumn|set-special-multirow|
-                       set-booktabs|unset-booktabs|set-top-space|set-bottom-space|
-                       set-interline-space|set-border-lines|tabular-valign-top|
-                       tabular-valign-middle|tabular-valign-bottom|set-tabular-width \n
+               <FEATURE>: 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
+                       toggle-line-top|toggle-line-bottom|toggle-line-left|toggle-line-right|\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|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
+                       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
                <ARG>: additional argument for some commands, use debug mode to explore its values.
  * \li Sample: inset-modify note Note Comment \n
               inset-modify changetype Ovalbox
@@ -2446,7 +2499,7 @@ 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 delete-char-forward \n
+                  inset-forall Index char-delete-forward \n
                Close all Notes (also works for a particular branch, for example): \n
                   inset-forall Note inset-toggle close \n
                Transform all yellow notes to comments \n
@@ -3035,8 +3088,15 @@ void LyXAction::init()
                { LFUN_BUFFER_EXPORT_CUSTOM, "buffer-export-custom", ReadOnly, Buffer },
 /*!
  * \var lyx::FuncCode lyx::LFUN_BUFFER_EXPORT_AS
- * \li Action: Pops up a dialog for exporting the current buffer.
- * \li Syntax: buffer-export-as
+ * \li Action: Opens a dialog for exporting the current buffer.
+ * \li Syntax: buffer-export-as [<FORMAT>]
+ * \li Params: <FORMAT> is the export format initially selected in the dialog.
+ *                      You can pass any of the formats which you can find in
+ *                      Tools->Preferences->File formats->Format, provided it
+ *                      has the "document" flag set. If no format is specified
+ *                      the dialog will start with the default output format of
+ *                      the current document.
+ * \li Sample: buffer-export-as pdf2
  * \li Origin: tommaso, 6 Oct 2011
  * \endvar
  */
@@ -3212,8 +3272,8 @@ void LyXAction::init()
                { LFUN_BUFFER_PREVIOUS, "buffer-previous", ReadOnly, Buffer },
 /*!
  * \var lyx::FuncCode lyx::LFUN_MASTER_BUFFER_UPDATE
- * \li Action: When run from a child document, this updates (exports) document built
-               from the master buffer, if available.
+ * \li Action: Update (export) the document built from the master buffer,
+               if the current buffer is part of a master/child document.
  * \li Syntax: master-buffer-update [<FORMAT>]
  * \li Params: <FORMAT>: The format to display, where this is one of the
                          formats defined (in the current GUI) in the
@@ -3226,8 +3286,8 @@ void LyXAction::init()
                { LFUN_MASTER_BUFFER_UPDATE, "master-buffer-update", ReadOnly, Buffer },
 /*!
  * \var lyx::FuncCode lyx::LFUN_MASTER_BUFFER_VIEW
- * \li Action: When run from a child document, this command shows a preview built
-               from the master buffer, if available.
+ * \li Action: Show a preview built from the master buffer, if available.
+               if the current buffer is part of a master/child document.
  * \li Syntax: master-buffer-view [<FORMAT>]
  * \li Params: <FORMAT>: The format to display, where this is one of the
                          formats defined (in the current GUI) in the
@@ -3325,7 +3385,7 @@ void LyXAction::init()
 /*!
  * \var lyx::FuncCode lyx::LFUN_META_PREFIX
  * \li Action: Simulate halting Meta key (Alt key on PCs).
- * \li Notion: Used for buffer editation not for GUI control.
+ * \li Notion: Used for buffer edition not for GUI control.
  * \li Syntax: meta-prefix
  * \endvar
  */
@@ -3473,13 +3533,13 @@ void LyXAction::init()
  */
                { LFUN_COMPLETION_POPUP, "completion-popup", ReadOnly | NoUpdate, Edit },
 /*!
- * \var lyx::FuncCode lyx::LFUN_COMPLETION_COMPLETE
+ * \var lyx::FuncCode lyx::LFUN_COMPLETE
  * \li Action: Try to complete the word or command at the cursor position.
  * \li Syntax: complete
  * \li Origin: sts, Feb 19 2008
  * \endvar
  */
-               { LFUN_COMPLETION_COMPLETE, "complete", SingleParUpdate, Edit },
+               { LFUN_COMPLETE, "complete", SingleParUpdate, Edit },
 
 /*!
  * \var lyx::FuncCode lyx::LFUN_COMPLETION_CANCEL
@@ -3583,17 +3643,17 @@ void LyXAction::init()
  * \li Origin: sts, 16 Nov 2008
  * \endvar
  */
-               { LFUN_LABEL_COPY_AS_REF, "copy-label-as-reference",
+               { LFUN_LABEL_COPY_AS_REFERENCE, "label-copy-as-reference",
                        ReadOnly | NoUpdate | AtPoint, Edit },
 
 /*!
- * \var lyx::FuncCode lyx::LFUN_LABEL_INSERT_AS_REF
- * \li Action: Inserts the label as a cross-reference at the position of the cursor.
+ * \var lyx::FuncCode lyx::LFUN_LABEL_INSERT_AS_REFERENCE
+ * \li Action: Inserts the label (in ToC pane) as a cross-reference at the position of the cursor.
  * \li Syntax: label-insert-as-reference
  * \li Origin: vfr, 7 Apr 2009
  * \endvar
  */
-               { LFUN_LABEL_INSERT_AS_REF, "label-insert-as-reference", Noop, Edit},
+               { LFUN_LABEL_INSERT_AS_REFERENCE, "label-insert-as-reference", Noop, Edit},
 
 /*!
  * \var lyx::FuncCode lyx::LFUN_BUFFER_ZOOM_IN
@@ -3625,6 +3685,17 @@ void LyXAction::init()
  */
                { LFUN_INSET_COPY_AS, "inset-copy-as", ReadOnly | NoUpdate | AtPoint, Edit },
 
+/*!
+ * \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 Origin: spitz, 23 Dec 2012
+ * \endvar
+ */
+               { LFUN_ENVIRONMENT_SPLIT, "environment-split", Noop, Layout },
+
                { LFUN_NOACTION, "", Noop, Hidden }
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
        };
@@ -3681,7 +3752,7 @@ bool LyXAction::funcHasFlag(FuncCode action,
 
        if (ici == lyx_info_map.end()) {
                LYXERR0("action: " << action << " is not known.");
-               LASSERT(false, /**/);
+               LASSERT(false, return false);
        }
 
        return ici->second.attrib & flag;