#include "LyXAction.h"
-#include "debug.h"
+#include "support/debug.h"
#include "FuncRequest.h"
#include "support/lstrings.h"
#include <boost/assert.hpp>
+using namespace std;
+using namespace lyx::support;
namespace lyx {
-using support::split;
-using support::trim;
-
-using std::endl;
-using std::string;
-using std::ostream;
-
-
/*
NAMING RULES FOR USER-COMMANDS
Here's the set of rules to apply when a new command name is introduced:
{ LFUN_BOOKMARK_GOTO, "bookmark-goto", NoBuffer, Edit },
{ LFUN_BOOKMARK_SAVE, "bookmark-save", ReadOnly, Edit },
{ LFUN_BOOKMARK_CLEAR, "bookmark-clear", NoBuffer, Edit },
- { LFUN_BREAK_LINE, "break-line", Noop, Edit },
{ LFUN_BREAK_PARAGRAPH, "break-paragraph", Noop, Edit },
{ LFUN_BREAK_PARAGRAPH_SKIP, "break-paragraph-skip", Noop, Edit },
{ LFUN_BUILD_PROGRAM, "build-program", ReadOnly, Buffer },
{ LFUN_CANCEL, "cancel", NoBuffer, System },
{ LFUN_CAPTION_INSERT, "caption-insert", Noop, Edit },
{ LFUN_CHAR_BACKWARD, "char-backward", ReadOnly | NoUpdate, Edit },
- { LFUN_CHAR_BACKWARD_SELECT, "backward-select", ReadOnly | SingleParUpdate, Edit },
+ { LFUN_CHAR_BACKWARD_SELECT, "char-backward-select", ReadOnly | SingleParUpdate, Edit },
{ LFUN_CHAR_DELETE_BACKWARD, "delete-backward", SingleParUpdate, Edit },
{ LFUN_CHAR_DELETE_FORWARD, "delete-forward", SingleParUpdate, Edit },
{ LFUN_CHAR_FORWARD, "char-forward", ReadOnly | NoUpdate, Edit },
- { LFUN_CHAR_FORWARD_SELECT, "forward-select", ReadOnly | SingleParUpdate, Edit },
+ { LFUN_CHAR_FORWARD_SELECT, "char-forward-select", ReadOnly | SingleParUpdate, Edit },
+ { LFUN_CHAR_LEFT, "char-left", ReadOnly | NoUpdate, Edit },
+ { LFUN_CHAR_LEFT_SELECT, "char-left-select", ReadOnly | SingleParUpdate, Edit },
+ { LFUN_CHAR_RIGHT, "char-right", ReadOnly | NoUpdate, Edit },
+ { LFUN_CHAR_RIGHT_SELECT, "char-right-select", ReadOnly | SingleParUpdate, Edit },
{ LFUN_CLIPBOARD_PASTE, "clipboard-paste", Noop, Edit },
{ LFUN_COMMAND_EXECUTE, "command-execute", NoBuffer, Edit },
{ LFUN_COMMAND_PREFIX, "command-prefix", NoBuffer, Hidden },
{ LFUN_DELETE_FORWARD_SKIP, "delete-forward-skip", Noop, Edit },
{ LFUN_DEPTH_DECREMENT, "depth-decrement", Noop, Edit },
{ LFUN_DEPTH_INCREMENT, "depth-increment", Noop, Edit },
- { LFUN_DOTS_INSERT, "dots-insert", Noop, Edit },
{ LFUN_DOWN, "down", ReadOnly | NoUpdate, Edit },
{ LFUN_DOWN_SELECT, "down-select", ReadOnly | SingleParUpdate, Edit },
{ LFUN_DROP_LAYOUTS_CHOICE, "drop-layouts-choice", ReadOnly, Layout },
- { LFUN_END_OF_SENTENCE_PERIOD_INSERT, "end-of-sentence-period-insert", Noop, Edit },
{ LFUN_ENVIRONMENT_INSERT, "environment-insert", Noop, Edit },
{ LFUN_ERROR_NEXT, "error-next", ReadOnly, Edit },
{ LFUN_ERT_INSERT, "ert-insert", Noop, Edit },
{ LFUN_FOOTNOTE_INSERT, "footnote-insert", Noop, Edit },
{ LFUN_HFILL_INSERT, "hfill-insert", Noop, Edit },
{ LFUN_HELP_OPEN, "help-open", NoBuffer | Argument, Buffer },
- { LFUN_HYPHENATION_POINT_INSERT, "hyphenation-point-insert", Noop, Edit },
- { LFUN_LIGATURE_BREAK_INSERT, "ligature-break-insert", Noop, Edit },
{ LFUN_INDEX_INSERT, "index-insert", Noop, Edit },
{ LFUN_INDEX_PRINT, "index-print", Noop, Edit },
{ LFUN_KEYMAP_OFF, "keymap-off", ReadOnly, Edit },
{ LFUN_BIBTEX_DATABASE_ADD, "bibtex-database-add", Noop, Edit },
{ LFUN_BIBTEX_DATABASE_DEL, "bibtex-database-del", Noop, Edit },
{ LFUN_LINE_INSERT, "line-insert", Noop, Edit },
+ { LFUN_NEWPAGE_INSERT, "newpage-insert", Noop, Edit },
{ LFUN_PAGEBREAK_INSERT, "pagebreak-insert", Noop, Edit },
{ LFUN_LANGUAGE, "language", Noop, Edit },
{ LFUN_LAYOUT, "layout", Noop, Layout },
{ LFUN_LAYOUT_TABULAR, "layout-tabular", Noop, Layout },
{ LFUN_LINE_BEGIN, "line-begin", ReadOnly | NoUpdate, Edit },
{ LFUN_LINE_BEGIN_SELECT, "line-begin-select", ReadOnly | SingleParUpdate, Edit },
+ { LFUN_LINE_BREAK, "line-break", Noop, Edit },
{ LFUN_LINE_DELETE, "line-delete-forward", Noop, Edit }, // there is no line-delete-backward
{ LFUN_LINE_END, "line-end", ReadOnly | NoUpdate, Edit },
{ LFUN_LINE_END_SELECT, "line-end-select", ReadOnly | SingleParUpdate, Edit },
{ LFUN_MATH_DELIM, "math-delim", Noop, Math },
{ LFUN_MATH_BIGDELIM, "math-bigdelim", Noop, Math },
{ LFUN_MATH_DISPLAY, "math-display", Noop, Math },
- { LFUN_MATH_INSERT, "math-insert", Noop, Edit },
+ { LFUN_MATH_INSERT, "math-insert", Noop, Math },
{ LFUN_MATH_SUBSCRIPT, "math-subscript", Noop, Math },
{ LFUN_MATH_SUPERSCRIPT, "math-superscript", Noop, Math },
{ LFUN_MATH_LIMITS, "math-limits", Noop, Math },
{ LFUN_MATH_NUMBER, "math-number", Noop, Math },
{ LFUN_MATH_EXTERN, "math-extern", Noop, Math },
{ LFUN_MATH_SIZE, "math-size", Noop, Math },
+ { LFUN_MATH_MACRO_UNFOLD, "math-macro-unfold", ReadOnly | SingleParUpdate, Math },
+ { LFUN_MATH_MACRO_FOLD, "math-macro-fold", ReadOnly | SingleParUpdate, Math },
+ { LFUN_MATH_MACRO_ADD_PARAM, "math-macro-add-param", Noop, Math },
+ { LFUN_MATH_MACRO_REMOVE_PARAM, "math-macro-remove-param", Noop, Math },
+ { LFUN_MATH_MACRO_APPEND_GREEDY_PARAM, "math-macro-append-greedy-param", Noop, Math },
+ { LFUN_MATH_MACRO_REMOVE_GREEDY_PARAM, "math-macro-remove-greedy-param", Noop, Math },
+ { LFUN_MATH_MACRO_MAKE_OPTIONAL, "math-macro-make-optional", Noop, Math },
+ { LFUN_MATH_MACRO_MAKE_NONOPTIONAL, "math-macro-make-nonoptional", Noop, Math },
+ { LFUN_MATH_MACRO_ADD_OPTIONAL_PARAM, "math-macro-add-optional-param", Noop, Math },
+ { LFUN_MATH_MACRO_REMOVE_OPTIONAL_PARAM, "math-macro-remove-optional-param", Noop, Math },
+ { LFUN_MATH_MACRO_ADD_GREEDY_OPTIONAL_PARAM, "math-macro-add-greedy-optional-param", Noop, Math },
+ { LFUN_IN_MATHMACROTEMPLATE, "in-mathmacrotemplate", Noop, Math },
{ LFUN_MENU_OPEN, "menu-open", NoBuffer, Buffer },
- { LFUN_MENU_SEPARATOR_INSERT, "menu-separator-insert", Noop, Edit },
{ LFUN_META_PREFIX, "meta-prefix", NoBuffer, System },
- { LFUN_BRANCH_INSERT, "branch-insert", Noop, Edit },
- { LFUN_FLEX_INSERT, "flex-insert", Noop, Edit },
+ { LFUN_NEW_LINE, "new-line", Noop, Edit },
+ { LFUN_NEXT_INSET_TOGGLE, "next-inset-toggle", ReadOnly, Edit },
{ LFUN_NOTE_INSERT, "note-insert", Noop, Edit },
- { LFUN_BOX_INSERT, "box-insert", Noop, Edit },
{ LFUN_NOTE_NEXT, "note-next", ReadOnly, Edit },
+ { LFUN_BRANCH_INSERT, "branch-insert", Noop, Edit },
+ { LFUN_BOX_INSERT, "box-insert", Noop, Edit },
+ { LFUN_FLEX_INSERT, "flex-insert", Noop, Edit },
{ LFUN_INSET_TOGGLE, "", ReadOnly, Hidden },
- { LFUN_NEXT_INSET_TOGGLE, "next-inset-toggle", ReadOnly, Edit },
{ LFUN_ALL_INSETS_TOGGLE, "all-insets-toggle", ReadOnly, Edit },
{ LFUN_PARAGRAPH_DOWN, "paragraph-down", ReadOnly | NoUpdate, Edit },
{ LFUN_PARAGRAPH_DOWN_SELECT, "paragraph-down-select", ReadOnly, Edit },
{ LFUN_SCREEN_DOWN, "screen-down", ReadOnly, Edit },
{ LFUN_SCREEN_DOWN_SELECT, "screen-down-select", ReadOnly, Edit },
{ LFUN_SCREEN_FONT_UPDATE, "screen-font-update", NoBuffer, Layout },
+ { LFUN_SCROLL, "scroll", ReadOnly, Edit },
{ LFUN_SCREEN_RECENTER, "screen-recenter", ReadOnly, Edit },
{ LFUN_SCREEN_UP, "screen-up", ReadOnly, Edit },
{ LFUN_SCREEN_UP_SELECT, "screen-up-select", ReadOnly, Edit },
{ LFUN_SELF_INSERT, "self-insert", SingleParUpdate, Hidden },
{ LFUN_SPACE_INSERT, "space-insert", Noop, Edit },
+ { LFUN_SPECIALCHAR_INSERT, "specialchar-insert", Noop, Edit },
{ LFUN_SERVER_CHAR_AFTER, "server-char-after", ReadOnly, System },
{ LFUN_SERVER_GET_FONT, "server-get-font", ReadOnly, System },
{ LFUN_SERVER_GET_LAYOUT, "server-get-layout", ReadOnly, System },
{ LFUN_WORD_FIND_FORWARD, "word-find-forward", ReadOnly, Edit },
{ LFUN_WORD_FORWARD, "word-forward", ReadOnly | NoUpdate, Edit },
{ LFUN_WORD_FORWARD_SELECT, "word-forward-select", ReadOnly | SingleParUpdate, Edit },
+ { LFUN_WORD_LEFT, "word-left", ReadOnly | NoUpdate, Edit },
+ { LFUN_WORD_LEFT_SELECT, "word-left-select", ReadOnly | SingleParUpdate, Edit },
{ LFUN_WORD_LOWCASE, "word-lowcase", Noop, Edit },
+ { LFUN_WORD_RIGHT, "word-right", ReadOnly | NoUpdate, Edit },
+ { LFUN_WORD_RIGHT_SELECT, "word-right-select", ReadOnly | SingleParUpdate, Edit },
{ LFUN_WORD_SELECT, "word-select", ReadOnly, Edit },
{ LFUN_WORD_UPCASE, "word-upcase", Noop, Edit },
{ LFUN_MESSAGE, "message", NoBuffer, System },
{ LFUN_INSET_REFRESH, "", Noop, Hidden },
{ LFUN_BUFFER_NEXT, "buffer-next", ReadOnly, Buffer },
{ LFUN_BUFFER_PREVIOUS, "buffer-previous", ReadOnly, Buffer },
- { LFUN_WORDS_COUNT, "words-count", ReadOnly, System },
+ { LFUN_STATISTICS, "statistics", ReadOnly, System },
+ { LFUN_FINISHED_FORWARD, "", ReadOnly, Hidden },
+ { LFUN_FINISHED_BACKWARD, "", ReadOnly, Hidden },
{ LFUN_FINISHED_RIGHT, "", ReadOnly, Hidden },
{ LFUN_FINISHED_LEFT, "", ReadOnly, Hidden },
{ LFUN_MOUSE_PRESS, "", ReadOnly, Hidden },
info_map::const_iterator ici = lyx_info_map.find(action);
if (ici == lyx_info_map.end()) {
- lyxerr << "action: " << action << " is not known." << endl;
+ LYXERR0("action: " << action << " is not known.");
BOOST_ASSERT(false);
}
}
-ostream & operator<<(ostream & o, kb_action action)
-{
- return o << int(action);
-}
-
-
} // namespace lyx