]> git.lyx.org Git - features.git/blobdiff - src/LyXAction.cpp
Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got every...
[features.git] / src / LyXAction.cpp
index df80519fbad9d7c0da4edd078250532cb9a75a2d..48d1a808aed6891f0ef128aa2e6887cc078151f1 100644 (file)
@@ -20,7 +20,7 @@
 #include "support/debug.h"
 #include "support/lstrings.h"
 
-#include <boost/assert.hpp>
+#include "support/assert.h"
 
 using namespace std;
 using namespace lyx::support;
@@ -325,6 +325,21 @@ void LyXAction::init()
  */
                { LFUN_LISTING_INSERT, "listing-insert", Noop, Edit },
                { LFUN_QUOTE_INSERT, "quote-insert", Noop, Edit },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_INFO_INSERT
+ * \li Action: Displays shortcuts, lyxrc, package and textclass availability and menu
+               information in a non-editable boxed InsetText.
+ * \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
+ * \li Syntax: info-insert <TYPE> <ARG>
+ * \li Params: <TYPE>: shortcut|lyxrc|package|textclass|menu|buffer \n
+               <ARG>: argument for a given type. Look into InsetInfo.h for detailed
+                     description.
+ * \li Origin: bpeng, 7 Oct 2007
+ * \endvar
+ */
                { LFUN_INFO_INSERT, "info-insert", Noop, Edit },
                { LFUN_BRANCH_INSERT, "branch-insert", Noop, Edit },
                { LFUN_BOX_INSERT, "box-insert", Noop, Edit },
@@ -523,8 +538,10 @@ void LyXAction::init()
 /*!
  * \var lyx::FuncCode lyx::LFUN_WORD_FIND
  * \li Action: Search for next occurence of a string.
- * \li Syntax: word-find <DATA>
+ * \li Syntax: word-find [<DATA>]
  * \li Params: <DATA>: 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
  * \endvar
  */
@@ -928,10 +945,41 @@ void LyXAction::init()
  */
                { LFUN_PARAGRAPH_MOVE_UP, "paragraph-move-up", Noop, Edit },
 
-               { LFUN_PARAGRAPH_SPACING, "paragraph-spacing", Noop, Edit },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_UP
+ * \li Action: Move the cursor to the next paragraph (or begining of the current one)
+               in upward direction.
+ * \li Syntax: paragraph-up
+ * \li Origin: Asger, 1 Oct 1996
+ * \endvar
+ */
                { LFUN_PARAGRAPH_UP, "paragraph-up", ReadOnly | NoUpdate, Edit },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_UP_SELECT
+ * \li Action: Move the cursor and select the text to the next paragraph (or
+               begining of the current one) in upward direction.
+ * \li Syntax: paragraph-up-select
+ * \li Origin: Asger, 1 Oct 1996
+ * \endvar
+ */
                { LFUN_PARAGRAPH_UP_SELECT, "paragraph-up-select", ReadOnly, Edit },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_DOWN
+ * \li Action: Move the cursor to the next paragraph (or begining of the current one)
+               in downward direction.
+ * \li Syntax: paragraph-down
+ * \li Origin: Asger, 1 Oct 1996
+ * \endvar
+ */
                { LFUN_PARAGRAPH_DOWN, "paragraph-down", ReadOnly | NoUpdate, Edit },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_DOWN_SELECT
+ * \li Action: Move the cursor and select the text to the next paragraph (or
+               begining of the current one) in downward direction.
+ * \li Syntax: paragraph-down-select
+ * \li Origin: Asger, 1 Oct 1996
+ * \endvar
+ */
                { LFUN_PARAGRAPH_DOWN_SELECT, "paragraph-down-select", ReadOnly, Edit },
 /*!
  * \var lyx::FuncCode lyx::LFUN_PARAGRAPH_GOTO
@@ -949,6 +997,7 @@ void LyXAction::init()
  * \li Syntax: break-paragraph
  * \endvar
  */
+               { LFUN_PARAGRAPH_SPACING, "paragraph-spacing", Noop, Edit },
                { LFUN_BREAK_PARAGRAPH, "break-paragraph", Noop, Edit },
 /*!
  * \var lyx::FuncCode lyx::LFUN_BREAK_PARAGRAPH_SKIP
@@ -1065,6 +1114,18 @@ void LyXAction::init()
  * \endvar
  */
                { LFUN_INSET_APPLY, "inset-apply", Noop, Edit },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_INSET_DISSOLVE
+ * \li Action: Dissolve the current inset into text.
+ * \li Syntax: inset-dissolve [<INSET>]
+ * \li Params: <INSET>: this can be used to make sure the right kind of inset
+                        is dissolved. For example "dissolve" 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 Author: JSpitz, 7 Aug 2006
+ * \endvar
+ */
                { LFUN_INSET_DISSOLVE, "inset-dissolve", Noop, Edit },
 /*!
  * \var lyx::FuncCode lyx::LFUN_INSET_INSERT
@@ -1127,10 +1188,23 @@ void LyXAction::init()
  * \li Notion: Used for label, floats, listings, box, branch, external, wrap
                bibtex, ert, command, graphics, note, space, vspace, tabular,
                bibitem, inlude, ref insets.
- * \li Syntax: next-inset-toggle
+ * \li Syntax: next-inset-toggle <ARG>
+ * \li Params: <ARG>: these are passed as arguments to #LFUN_INSET_TOGGLE .
+ * \li Origin: leeming, 30 Mar 2004
  * \endvar
  */
                { LFUN_NEXT_INSET_TOGGLE, "next-inset-toggle", ReadOnly, Edit },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_INSET_TOGGLE
+ * \li Action: Toggles the collapsable inset we are currently in.
+ * \li Syntax: inset-toggle [<ARG>]
+ * \li Params: <ARG>: <open|close|toggle|assign>. \n
+               open/close/toggle are for collapsable insets. close can be currently used
+               by #LFUN_NEXT_INSET_TOGGLE. toggle is used when no argument is given.\n
+               assign is for branch inset.
+ * \li Origin: lasgouttes, 19 Jul 2001
+ * \endvar
+ */
                { LFUN_INSET_TOGGLE, "inset-toggle", ReadOnly, Hidden },
 /*!
  * \var lyx::FuncCode lyx::LFUN_ALL_INSETS_TOGGLE
@@ -1138,7 +1212,8 @@ void LyXAction::init()
  * \li Notion: Used for box, branch, ert, float, listings, note, tabular, wrap insets.
  * \li Syntax: all-insets-toggle <STATE> <INSET>
  * \li Params: <STATE>: <toggle|open|close> default: toggle \n
- *             <INSET>: <box|branch|ert|float|listings|note|tabular|wrap> default: all insets \n
+               <INSET>: <box|branch|ert|float|listings|note|tabular|wrap> default: all insets \n
+ * \li Origin: leeming, 30 Mar 2004
  * \endvar
  */
                { LFUN_ALL_INSETS_TOGGLE, "all-insets-toggle", ReadOnly, Edit },
@@ -1262,6 +1337,13 @@ void LyXAction::init()
  * \endvar
  */
                { LFUN_TOOLBAR_TOGGLE, "toolbar-toggle", NoBuffer, Buffer },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_MENU_OPEN
+ * \li Action: Opens the menu given by its name.
+ * \li Syntax: menu-open <NAME>
+ * \li Params: <NAME>: menu name. See various .inc files in lib/ui for candidates.
+ * \endvar
+ */
                { LFUN_MENU_OPEN, "menu-open", NoBuffer, Buffer },
 /*!
  * \var lyx::FuncCode lyx::LFUN_UI_TOGGLE
@@ -1279,7 +1361,24 @@ void LyXAction::init()
  */
                { LFUN_UI_TOGGLE, "ui-toggle", NoBuffer, Buffer },
 
+/*!
+ * \var lyx::FuncCode lyx::WINDOW_NEW
+ * \li Action: Creates new empty LyX window.
+ * \li Notion: Already opened documents from the previous window can be found under View menu.
+ * \li Syntax: window-new [<GEOMETRY>]
+ * \li Params: <GEOMETRY>: pass the geometry of the window. This parameter is currently 
+                           accepted only on Windows platform.
+ * \li Origin: Abdel, 21 Oct 2006
+ * \endvar
+ */
                { LFUN_WINDOW_NEW, "window-new", NoBuffer, Buffer },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_WINDOW_CLOSE
+ * \li Action: Closes the current LyX window.
+ * \li Syntax: window-close
+ * \li Origin: Abdel, 23 Oct 2006
+ * \endvar
+ */
                { LFUN_WINDOW_CLOSE, "window-close", NoBuffer, Buffer },
 
 /*!
@@ -1353,7 +1452,23 @@ void LyXAction::init()
  * \endvar
  */
                { LFUN_BUFFER_AUTO_SAVE, "buffer-auto-save", Noop, Buffer },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_BUFFER_CHILD_OPEN
+ * \li Action: Loads the given child document.
+ * \li Notion: The current document is treated as a parent.
+ * \li Syntax: buffer-child-open <FILE>
+ * \li Params: <FILE>: Filename of the child. The directory of the parent is assumed by default.
+ * \li Origin: Ale, 28 May 1997
+ * \endvar
+ */
                { LFUN_BUFFER_CHILD_OPEN, "buffer-child-open", ReadOnly, Buffer },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_BUFFER_CHKTEX
+ * \li Action: Runs chktex for the current document.
+ * \li Syntax: buffer-chktex
+ * \li Origin: Asger, 30 Oct 1997
+ * \endvar
+ */
                { LFUN_BUFFER_CHKTEX, "buffer-chktex", ReadOnly, Buffer },
 /*!
  * \var lyx::FuncCode lyx::LFUN_BUFFER_TOGGLE_COMPRESSION
@@ -1363,14 +1478,6 @@ void LyXAction::init()
  * \endvar
  */
                { LFUN_BUFFER_TOGGLE_COMPRESSION, "buffer-toggle-compression", Noop, Buffer },
-/*!
- * \var lyx::FuncCode lyx::LFUN_BUFFER_TOGGLE_EMBEDDING
- * \li Action: Toggles the embeddding feature on/off.
- * \li Syntax: buffer-toggle-embedding
- * \li Origin: bpeng, 21 Oct 2007
- * \endvar
- */
-               { LFUN_BUFFER_TOGGLE_EMBEDDING, "buffer-toggle-embedding", Noop, Buffer },
 /*!
  * \var lyx::FuncCode lyx::LFUN_BUFFER_CLOSE
  * \li Action: Closes the current buffer.
@@ -1535,12 +1642,71 @@ void LyXAction::init()
  * \endvar
  */
                { LFUN_BUFFER_WRITE_ALL, "buffer-write-all", ReadOnly, Buffer },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_BUFFER_NEXT
+ * \li Action: Switch to the next opened document.
+ * \li Notion: Note that this does not necessarily mean next in tabbar
+               (for full list see View menu).
+ * \li Syntax: buffer-next
+ * \endvar
+ */
                { LFUN_BUFFER_NEXT, "buffer-next", ReadOnly, Buffer },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_BUFFER_PREVIOUS
+ * \li Action: Switch to the previous opened document.
+ * \li Syntax: buffer-previous
+ * \endvar
+ */
                { 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 a master is not found, it updates the
+                current buffer.
+ * \li Syntax: master-buffer-update
+ * \li Author: Tommaso, 20 Sep 2007
+ * \endvar
+ */
                { 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 a master is not found, it previews the
+              current buffer.
+ * \li Syntax: master-buffer-view
+ * \li Author: Tommaso, 20 Sep 2007
+ * \endvar
+ */
                { LFUN_MASTER_BUFFER_VIEW, "master-buffer-view", ReadOnly, Buffer },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_BUFFER_LANGUAGE
+ * \li Action: Set language of the current document.
+ * \li Syntax: buffer-language <LANG>
+ * \li Params: <LANG>: language name. See lib/languages for list.
+ * \li Author: leeming, 30 Mar 2004
+ * \endvar
+ */
                { LFUN_BUFFER_LANGUAGE, "buffer-language", Noop, Buffer },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_BUFFER_SAVE_AS_DEFAULT
+ * \li Action: Save the current document settings as default.
+ * \li Notion: The file will will be saved into ~/.lyx/templates/defaults.lyx .
+ * \li Syntax: buffer-save-as-default [<ARGS>]
+ * \li Params: <ARGS>: contains the particular settings to be saved. They obey the syntax
+                       you can find in document header of usual .lyx file.
+ * \li Author: leeming, 30 Mar 2004
+ * \endvar
+ */
                { LFUN_BUFFER_SAVE_AS_DEFAULT, "buffer-save-as-default", Noop, Buffer },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_BUFFER_PARAMS_APPLY
+ * \li Action: Apply the given settings to the current document.
+ * \li Syntax: buffer-params-apply [<ARGS>]
+ * \li Params: <ARGS>: contains the particular settings to be saved. They obey the syntax
+                       you can find in document header of usual .lyx file.
+ * \li Author: leeming, 30 Mar 2004
+ * \endvar
+ */
                { LFUN_BUFFER_PARAMS_APPLY, "buffer-params-apply", Noop, Buffer },
 
 /*!
@@ -1770,7 +1936,7 @@ bool LyXAction::funcHasFlag(FuncCode action,
 
        if (ici == lyx_info_map.end()) {
                LYXERR0("action: " << action << " is not known.");
-               BOOST_ASSERT(false);
+               LASSERT(false, /**/);
        }
 
        return ici->second.attrib & flag;