]> git.lyx.org Git - lyx.git/blobdiff - src/LyXAction.cpp
LFUN_TOGGLE_CURSOR_FOLLOWS_SCROLLBAR -> LFUN_CURSOR_FOLLOWS_SCROLLBAR_TOGGLE.
[lyx.git] / src / LyXAction.cpp
index d6ce73deb14265d0932f4190ddff7b657296dabd..3deb55bb892c9f92afd74f5fdbbd614479e24aae 100644 (file)
@@ -15,9 +15,9 @@
 
 #include "LyXAction.h"
 
-#include "support/debug.h"
 #include "FuncRequest.h"
 
+#include "support/debug.h"
 #include "support/lstrings.h"
 
 #include <boost/assert.hpp>
@@ -358,6 +358,24 @@ void LyXAction::init()
                { LFUN_INFO_INSERT, "info-insert", Noop, Edit },
                { LFUN_BRANCH_INSERT, "branch-insert", Noop, Edit },
                { LFUN_BOX_INSERT, "box-insert", Noop, Edit },
+/*!
+ * \var lyx::kb_action lyx::LFUN_FLEX_INSERT
+ * \li Action: Inserts CharStyle, Custom inset or XML short element.
+ * \li Notion: Look into the Customization manual for more information about
+               these elements.\n
+              For dissolving the element see #LFUN_INSET_DISSOLVE.
+ * \li Syntax: flex-insert <TYPE:Name>
+ * \li Params: TYPE: CharStyle|Custom|Element|Standard
+                    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. 
+                    If Standard (currently unused): none of these.
+              Name: This name must be defined either in your layout file
+                    or imported by some module. The definition is\n
+                    InsetLayout <TYPE:Name>
+ * \li Sample: flex-insert CharStyle:Code
+ * \endvar
+ */
                { LFUN_FLEX_INSERT, "flex-insert", Noop, Edit },
                { LFUN_SELF_INSERT, "self-insert", SingleParUpdate, Hidden },
                { LFUN_SPACE_INSERT, "space-insert", Noop, Edit },
@@ -370,7 +388,6 @@ void LyXAction::init()
 
 #if 0
                { LFUN_LIST_INSERT, "list-insert", Noop, Edit },
-               { LFUN_THEOREM_INSERT, "theorem-insert", Noop, Edit },
 #endif
 
                { LFUN_DELETE_BACKWARD_SKIP, "delete-backward-skip", Noop, Edit },
@@ -750,7 +767,7 @@ void LyXAction::init()
                { LFUN_MATH_NUMBER_LINE_TOGGLE, "math-number-line-toggle", Noop, Math },
 /*!
  * \var lyx::kb_action lyx::LFUN_MATH_NUMBER_TOGGLE
- * \li Action: Toggles numbering of the current formula.
+ * \li Action: Toggles numbering/labeling of the current formula.
  * \li Notion: Must be in display formula mode.
  * \li Syntax: math-number-toggle
  * \li Origin: Alejandro 4 Jun 1996
@@ -965,13 +982,51 @@ void LyXAction::init()
                { LFUN_ALL_CHANGES_ACCEPT, "all-changes-accept", Noop, Edit },
                { LFUN_ALL_CHANGES_REJECT, "all-changes-reject", Noop, Edit },
 
+/*!
+ * \var lyx::kb_action lyx::LFUN_INSET_APPLY
+ * \li Action: Apply data for an inset.
+ * \li Notion: LFUN_INSET_APPLY is sent from the dialogs when the data should
+               be applied. This is either changed to #LFUN_INSET_MODIFY or
+               #LFUN_INSET_INSERT depending on the context where it is called.
+ * \li Syntax: inset-apply <ARGS>
+ * \li Params: See #LFUN_INSET_INSERT .
+ * \endvar
+ */
                { LFUN_INSET_APPLY, "inset-apply", Noop, Edit },
                { LFUN_INSET_DISSOLVE, "inset-dissolve", Noop, Edit },
+/*!
+ * \var lyx::kb_action lyx::LFUN_INSET_INSERT
+ * \li Action: Insert new inset (type given by the parameters).
+ * \li Syntax: inset-insert <INSET> <ARGS>
+ * \li Params: <INSET>: <bibitem|bibtex|cite|ert|listings|external|graphics|
+                         hyperlink|include|index|label|nomencl|vspace|ref|toc>\n
+               <ARGS>: depends on the given inset. Use "lyx -dbg action" to
+                      explore.
+ * \li Sample: inset-insert ref LatexCommand <Format> reference "<label name>"\end_inset \n
+               where <label name> is the name of the referenced label and
+              <Format> is one of the following: \n
+              ref -- <reference> \n
+              eqref -- (<reference>) \n
+              pageref -- <page> \n
+               vpageref -- on <page> \n
+              vref -- <reference> on <page> \n
+               prettyref -- Formatted reference
+ * \endvar
+ */
                { LFUN_INSET_INSERT, "inset-insert", Noop, Edit },
+/*!
+ * \var lyx::kb_action lyx::LFUN_INSET_MODIFY
+ * \li Action: Modify existing inset.
+ * \li Notion: Used for label, floats, listings, box, branch, external, wrap
+               bibtex, ert, command, grahocs, note, vspace, tabular, bibitem,
+              inlude, ref insets.
+ * \li Syntax: inset-modify <INSET> <ARGS>
+ * \li Params: See #LFUN_INSET_INSERT for further details.
+ * \endvar
+ */
                { LFUN_INSET_MODIFY, "", Noop, Hidden },
                { LFUN_INSET_DIALOG_UPDATE, "", Noop, Hidden },
                { LFUN_INSET_SETTINGS, "inset-settings", ReadOnly, Edit },
-               { LFUN_INSET_REFRESH, "", Noop, Hidden },
                { LFUN_NEXT_INSET_TOGGLE, "next-inset-toggle", ReadOnly, Edit },
                { LFUN_INSET_TOGGLE, "", ReadOnly, Hidden },
                { LFUN_ALL_INSETS_TOGGLE, "all-insets-toggle", ReadOnly, Edit },
@@ -1104,27 +1159,46 @@ void LyXAction::init()
                { LFUN_TOOLBAR_TOGGLE, "toolbar-toggle", NoBuffer, Buffer },
                { LFUN_MENU_OPEN, "menu-open", NoBuffer, Buffer },
 /*!
- * \var lyx::kb_action lyx::LFUN_MENUBAR_TOGGLE
- * \li Action: Toggles visibility of the main menu.
- * \li Notion: This can be used for the fullscreen mode.
- * \li Syntax: menubar-toggle
- * \li Origin: ps, 6 Feb 2008
+ * \var lyx::kb_action lyx::LFUN_UI_TOGGLE
+ * \li Action: Various UI visibility-toggling actions.
+ * \li Syntax: ui-toggle <statusbar|menubar|frame|fullscreen>
+ * \li Params: statusbar  : Toggle visibility of the statusbar.\n
+               menubar    : Toggle visibility of the menubar.\n
+              scrollbar  : Toggle visibility of the scrollbar.\n
+              frame      : Toggle visibility of the frames around editing window.\n
+              fullscreen : Toggle fullscreen mode. This also covers calling the
+                           previous functions. However #LFUN_TOOLBAR_TOGGLE for the
+                           custom tweaks of the toolbars should be used.
+ * \li Origin: ps, 9 Feb 2007
  * \endvar
  */
-               { LFUN_MENUBAR_TOGGLE, "menubar-toggle", NoBuffer, Buffer },
-/*!
- * \var lyx::kb_action lyx::LFUN_STATUSBAR_TOGGLE
- * \li Action: Toggles visibility of the main menu.
- * \li Notion: This can be used for the fullscreen mode.
- * \li Syntax: statusbar-toggle
- * \li Origin: ps, 6 Feb 2008
- * \endvar
- */
-               { LFUN_STATUSBAR_TOGGLE, "statusbar-toggle", NoBuffer, Buffer },
+               { LFUN_UI_TOGGLE, "ui-toggle", NoBuffer, Buffer },
 
                { LFUN_WINDOW_NEW, "window-new", NoBuffer, Buffer },
                { LFUN_WINDOW_CLOSE, "window-close", NoBuffer, Buffer },
 
+/*!
+ * \var lyx::kb_action lyx::LFUN_SPLIT_VIEW
+ * \li Action: Creates another split view of current buffer.
+ * \li Notion: All split views act in the same way indpendently.
+ * \li Syntax: split-view <vertical|horizontal>
+ * \li Params: horizontal : The work areas are laid out side by side.\n
+               vertical   : The work areas laid out vertically.\n
+ * \li Origin: abdel, 20 Feb 2008
+ * \endvar
+ */
+               { LFUN_SPLIT_VIEW, "split-view", ReadOnly, Buffer },
+
+/*!
+ * \var lyx::kb_action lyx::LFUN_CLOSE_TAB_GROUP
+ * \li Action: Close the current tab group.
+ * \li Notion: This only closes the work areas, not the buffer themselves.
+               The still opened buffers can be visualized in another tab group.
+ * \li Syntax: close-tab-group
+ * \li Origin: abdel, 21 Feb 2008
+ * \endvar
+ */
+               { LFUN_CLOSE_TAB_GROUP, "close-tab-group", ReadOnly, Buffer },
                { LFUN_DIALOG_SHOW, "dialog-show", NoBuffer, Edit },
                { LFUN_DIALOG_SHOW_NEW_INSET, "dialog-show-new-inset", Noop, Edit },
                { LFUN_DIALOG_UPDATE, "dialog-update", NoBuffer, Edit },
@@ -1152,6 +1226,13 @@ void LyXAction::init()
                { LFUN_SERVER_GET_LAYOUT, "server-get-layout", ReadOnly, System },
                { LFUN_SERVER_GET_NAME, "server-get-name", ReadOnly, System },
                { LFUN_SERVER_GET_XY, "server-get-xy", ReadOnly, System },
+/*!
+ * \var lyx::kb_action lyx::LFUN_SERVER_GOTO_FILE_ROW
+ * \li Action: Sets the cursor position based on the row number of generated TeX file.
+ * \li Syntax: server-goto-file-row <FILE_NAME> <ROW_NUMBER>
+ * \li Origin: Edmar, 23 Dec 1998
+ * \endvar
+ */
                { LFUN_SERVER_GOTO_FILE_ROW, "server-goto-file-row", ReadOnly, System },
                { LFUN_SERVER_NOTIFY, "server-notify", ReadOnly, System },
                { LFUN_SERVER_SET_XY, "server-set-xy", ReadOnly, System },
@@ -1190,11 +1271,25 @@ void LyXAction::init()
                        "pdflatex" (plain tex for pdflatex) or "ps" for postscript.\n
                        In case of "custom" you will be asked for a format you
                        want to start from and for the command that you want to
-                       apply to this format.
+                       apply to this format. Internally the control is then passed
+                       to #LFUN_BUFFER_EXPORT_CUSTOM.
  * \li Origin: Lgb, 29 Jul 1997
  * \endvar
  */
                { LFUN_BUFFER_EXPORT, "buffer-export", ReadOnly, Buffer },
+/*!
+ * \var lyx::kb_action lyx::LFUN_BUFFER_EXPORT_CUSTOM
+ * \li Action: Exports the current buffer (document) from the given format using
+               the given command on it.
+ * \li Syntax: buffer-export-custom <FORMAT> <COMMAND>
+ * \li Params: <FORMAT> format to start from (LyX will care to produce such
+                        intermediate file).\n
+               <COMMAND> this command will be launched on the file. Note that you can
+              use "$$FName" string to qualify the intermediate file.
+ * \li Sample: buffer-export-custom dvi dvips -f $$FName -o myfile.ps
+ * \li Origin: leeming, 27 Mar 2004
+ * \endvar
+ */
                { LFUN_BUFFER_EXPORT_CUSTOM, "buffer-export-custom", ReadOnly, Buffer },
 /*!
  * \var lyx::kb_action lyx::LFUN_BUFFER_PRINT
@@ -1223,15 +1318,41 @@ void LyXAction::init()
 /*!
  * \var lyx::kb_action lyx::LFUN_BUFFER_NEW
  * \li Action: Creates a new buffer (that is, document).
- * \li Syntax: buffer-new
+ * \li Notion: Implicit path can be set in Preferences dialog.
+ * \li Syntax: buffer-new [<FILE>]
+ * \li Params: <FILE>: filename of created file with absolute path.
  * \endvar
  */
                { LFUN_BUFFER_NEW, "buffer-new", NoBuffer, Buffer },
+/*!
+ * \var lyx::kb_action lyx::LFUN_BUFFER_NEW_TEMPLATE
+ * \li Action: Creates a new buffer (that is, document) from a template.
+ * \li Notion: Path for new files and templates can be set in Preferences dialog.
+               Template will be asked for via Open-dialog.
+ * \li Syntax: buffer-new-template [<FILE>]
+ * \li Params: <FILE>: filename of created file with absolute path.
+ * \endvar
+ */
                { LFUN_BUFFER_NEW_TEMPLATE,"buffer-new-template", NoBuffer, Buffer },
                { LFUN_BUFFER_RELOAD, "buffer-reload", ReadOnly, Buffer },
+/*!
+ * \var lyx::kb_action lyx::LFUN_BUFFER_SWITCH
+ * \li Action: Switch to the given buffer.
+ * \li Notion: This is useful also in case you need simultaneously more views of the edited
+               document in different LyX windows.
+ * \li Syntax: buffer-new-template <BUFFER>
+ * \li Params: <BUFFER>: already opened document which is to be shown.
+ * \endvar
+ */
                { LFUN_BUFFER_SWITCH, "buffer-switch", NoBuffer | ReadOnly, Buffer },
+/*!
+ * \var lyx::kb_action lyx::LFUN_BUFFER_TOGGLE_READ_ONLY
+ * \li Action: Toggle editing mode of the current document between read/write and read-only.
+ * \li Syntax: buffer-toggle-read-only
+ * \li Origin: Lgb, 27 May 1997
+ * \endvar
+ */
                { LFUN_BUFFER_TOGGLE_READ_ONLY, "buffer-toggle-read-only", ReadOnly, Buffer },
-               { LFUN_BUFFER_UPDATE, "buffer-update", ReadOnly, Buffer },
 /*!
  * \var lyx::kb_action lyx::LFUN_BUFFER_VIEW
  * \li Action: Displays current buffer in chosen format.
@@ -1245,6 +1366,22 @@ void LyXAction::init()
  * \endvar
  */
                { LFUN_BUFFER_VIEW, "buffer-view", ReadOnly, Buffer },
+/*!
+ * \var lyx::kb_action lyx::LFUN_BUFFER_UPDATE
+ * \li Action: Exports the current document and put the result into the
+               temporary directory.
+ * \li Notion: In case you are already viewing the exported document (see #LFUN_BUFFER_VIEW)
+               the output will be rewriten - updated. This is useful in case your viewer
+              is able to detect such changes (e.g. ghostview for postscript).
+ * \li Syntax: buffer-update <FORMAT>
+ * \li Params: <FORMAT>: The format to display, where this is one of the
+                         formats defined (in the current GUI) in the
+                         Tools>Preferences>File Formats dialog.
+ * \li Origin: Dekel, 5 Aug 2000
+ * \endvar
+ */
+               { LFUN_BUFFER_UPDATE, "buffer-update", ReadOnly, Buffer },
+
 /*!
  * \var lyx::kb_action lyx::LFUN_BUFFER_WRITE
  * \li Action: Saves the current buffer.
@@ -1273,10 +1410,39 @@ void LyXAction::init()
                { LFUN_BUFFER_SAVE_AS_DEFAULT, "buffer-save-as-default", Noop, Buffer },
                { LFUN_BUFFER_PARAMS_APPLY, "buffer-params-apply", Noop, Buffer },
 
+/*!
+ * \var lyx::kb_action lyx::LFUN_FILE_INSERT
+ * \li Action: Inserts another LyX file.
+ * \li Syntax: file-insert [<FILE>]
+ * \li Params: <FILE>: Filename to be inserted.
+ * \endvar
+ */
                { LFUN_FILE_INSERT, "file-insert", Noop, Edit },
+/*!
+ * \var lyx::kb_action lyx::LFUN_FILE_INSERT_PLAINTEXT
+ * \li Action: Inserts plain text file.
+ * \li Syntax: file-insert-plaintext [<FILE>]
+ * \li Params: <FILE>: Filename to be inserted.
+ * \li Origin: CFO-G, 19 Nov 1997
+ * \endvar
+ */
                { LFUN_FILE_INSERT_PLAINTEXT, "file-insert-plaintext", Noop, Edit },
+/*!
+ * \var lyx::kb_action lyx::LFUN_FILE_INSERT_PLAINTEXT_PARA
+ * \li Action: Inserts plain text file as paragraph (i.e. join lines).
+ * \li Syntax: file-insert-plaintext-para [<FILE>]
+ * \li Params: <FILE>: Filename to be inserted.
+ * \li Origin: Levon, 14 Feb 2001
+ * \endvar
+ */
                { LFUN_FILE_INSERT_PLAINTEXT_PARA, "file-insert-plaintext-para", Noop, Edit },
-               { LFUN_FILE_NEW, "file-new", NoBuffer, Buffer },
+/*!
+ * \var lyx::kb_action lyx::LFUN_FILE_OPEN
+ * \li Action: Open LyX document.
+ * \li Syntax: file-open [<FILE>]
+ * \li Params: <FILE>: Filename to be opened.
+ * \endvar
+ */
                { LFUN_FILE_OPEN, "file-open", NoBuffer, Buffer },
 
 
@@ -1361,14 +1527,14 @@ void LyXAction::init()
  */
                { LFUN_LYXRC_APPLY, "lyxrc-apply", NoBuffer, System },
 /*!
- * \var lyx::kb_action lyx::LFUN_TOGGLE_CURSOR_FOLLOWS_SCROLLBAR
+ * \var lyx::kb_action lyx::LFUN_CURSOR_FOLLOWS_SCROLLBAR_TOGGLE
  * \li Action: Determine whether keep cursor inside the editing window regardless
                the scrollbar movement.
  * \li Syntax: toggle-cursor-follows-scrollbar
  * \li Origin: ARRae, 2 Dec 1997
  * \endvar
  */
-               { LFUN_TOGGLE_CURSOR_FOLLOWS_SCROLLBAR, "toggle-cursor-follows-scrollbar", ReadOnly, System },
+               { LFUN_CURSOR_FOLLOWS_SCROLLBAR_TOGGLE, "cursor-follows-scrollbar-toggle", ReadOnly, System },
 /*!
  * \var lyx::kb_action lyx::LFUN_SET_COLOR
  * \li Action: Set the given LyX color to the color defined by the X11 name given.
@@ -1390,6 +1556,30 @@ void LyXAction::init()
  * \endvar
  */
                { LFUN_STATISTICS, "statistics", ReadOnly, System },
+/*!
+ * \var lyx::kb_action lyx::LFUN_COMPLETION_INLINE
+ * \li Action: Show the inline completion at the cursor position.
+ * \li Syntax: completion-inline
+ * \li Origin: sts, Feb 19 2008
+ * \endvar
+ */
+               { LFUN_COMPLETION_INLINE, "completion-inline", ReadOnly | NoUpdate, Edit },
+/*!
+ * \var lyx::kb_action lyx::LFUN_COMPLETION_POPUP
+ * \li Action: Show the completion popup at the cursor position.
+ * \li Syntax: completion-popup
+ * \li Origin: sts, Feb 19 2008
+ * \endvar
+ */
+               { LFUN_COMPLETION_POPUP, "completion-popup", ReadOnly | NoUpdate, Edit },
+/*!
+ * \var lyx::kb_action lyx::LFUN_COMPLETION_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_NOACTION, "", Noop, Hidden }
 #ifndef DOXYGEN_SHOULD_SKIP_THIS