#include "gettext.h"
#include "support/lstrings.h"
-#include <boost/tuple/tuple.hpp>
-
using std::ostream;
using std::endl;
using std::pair;
{ LFUN_UMLAUT, "accent-umlaut", "", Noop },
{ LFUN_UNDERBAR, "accent-underbar", "", Noop },
{ LFUN_UNDERDOT, "accent-underdot", "", Noop },
- { LFUN_VECTOR, "accent-vector", "", Noop },
{ LFUN_APPENDIX, "appendix", N_("Insert appendix"), Noop },
{ LFUN_APROPOS, "apropos", N_("Describe command"),
NoBuffer|ReadOnly },
{ LFUN_FILE_INSERT_ASCII, "file-insert-ascii", _("Insert ASCII files as lines"), Noop },
{ LFUN_FILE_INSERT_ASCII_PARA, "file-insert-ascii-para", _("Insert ASCII file as a paragraph"), Noop },
{ LFUN_FILE_NEW, "file-new", "", NoBuffer },
- { LFUN_FILE_OPEN, "file-open", _("Open a file"), NoBuffer },
+ { LFUN_FILE_OPEN, "file-open", N_("Open a file"), NoBuffer },
{ LFUN_MENUSEARCH, "find-replace", N_("Find & Replace"),
ReadOnly },
- { LFUN_INSET_FLOAT, "float-insert", "Insert a Float", Noop },
+ { LFUN_INSET_FLOAT, "float-insert", N_("Insert a Float"), Noop },
{ LFUN_INSET_WIDE_FLOAT, "float-wide-insert",
- "Insert a wide Float", Noop },
+ N_("Insert a wide Float"), Noop },
+ { LFUN_INSET_WRAP, "wrap-insert", N_("Insert a Wrap"), Noop },
{ LFUN_BOLD, "font-bold", N_("Toggle bold"), Noop },
{ LFUN_CODE, "font-code", N_("Toggle code style"), Noop },
{ LFUN_DEFAULT, "font-default", N_("Default font style"),
ReadOnly },
{ LFUN_INSERT_LABEL, "label-insert", N_("Insert Label"),
Noop },
+ { LFUN_INSET_OPTARG, "optional-insert", N_("Insert Optional Argument"),
+ Noop },
{ LFUN_LANGUAGE, "language", N_("Change language"), Noop },
{ LFUN_LATEX_LOG, "latex-view-log", N_("View LaTeX log"),
ReadOnly },
#endif
{ LFUN_QUIT, "lyx-quit", N_("Exit"), NoBuffer },
{ LFUN_INSET_MARGINAL, "marginalnote-insert",
- N_("Insert Marginalnote"), Noop },
+ N_("Insert margin note"), Noop },
{ LFUN_MARK_OFF, "mark-off", "", ReadOnly },
{ LFUN_MARK_ON, "mark-on", "", ReadOnly },
{ LFUN_SETMARK, "mark-toggle", "", ReadOnly },
- { LFUN_MATH, "math", "", Noop },
{ LFUN_MATH_DELIM, "math-delim", "", Noop },
{ LFUN_MATH_DISPLAY, "math-display", "", Noop },
{ LFUN_GREEK, "math-greek", N_("Math Greek"), Noop },
{ LFUN_GREEK_TOGGLE, "math-greek-toggle", "", Noop },
{ LFUN_INSERT_MATH, "math-insert",
N_("Insert math symbol"), Noop },
- { LFUN_SUBSCRIPT, "math-subscript", "", Noop },
- { LFUN_SUPERSCRIPT, "math-superscript", "", Noop },
+ { LFUN_SUBSCRIPT, "math-subscript", N_("Add subscript"), Noop },
+ { LFUN_SUPERSCRIPT, "math-superscript", N_("Add superscript"), Noop },
{ LFUN_MATH_LIMITS, "math-limits", "", Noop },
{ LFUN_MATH_MACRO, "math-macro", "", Noop },
{ LFUN_MATH_MUTATE, "math-mutate", "", Noop },
{ LFUN_MATH_NONUMBER, "math-nonumber", "", Noop },
{ LFUN_MATH_NUMBER, "math-number", "", Noop },
{ LFUN_MATH_EXTERN, "math-extern", "", Noop },
- { LFUN_MATH_VALIGN, "math-valign", "", Noop },
- { LFUN_MATH_HALIGN, "math-halign", "", Noop },
- { LFUN_MATH_ROW_INSERT, "math-row-insert", "", Noop },
- { LFUN_MATH_ROW_DELETE, "math-row-delete", "", Noop },
- { LFUN_MATH_COLUMN_INSERT, "math-column-insert", "", Noop },
- { LFUN_MATH_COLUMN_DELETE, "math-column-delete", "", Noop },
{ LFUN_MATH_PANEL, "math-panel", "", Noop },
{ LFUN_MATH_SIZE, "math-size", "", Noop },
{ LFUN_MENU_OPEN_BY_NAME, "menu-open", "", NoBuffer },
{ LFUN_WORDRIGHT, "word-forward", "", ReadOnly },
{ LFUN_WORDRIGHTSEL, "word-forward-select", "", ReadOnly },
{ LFUN_LOWCASE_WORD, "word-lowcase", "", Noop },
+ { LFUN_WORDSEL, "word-select", "", ReadOnly },
{ LFUN_UPCASE_WORD, "word-upcase", "", Noop },
{ LFUN_MESSAGE, "message",
N_("Show message in minibuffer"), NoBuffer },
static unsigned int pseudo_counter = LFUN_LASTACTION;
// Create new pseudo action.
- lyx_pseudo_map[++pseudo_counter] = FuncRequest(action, arg);
+ lyx_pseudo_map[++pseudo_counter] = FuncRequest(0, action, arg);
// First ensure that the action is in lyx_arg_map;
lyx_arg_map[action];
}
-pair<kb_action, string> LyXAction::retrieveActionArg(int pseudo) const
+FuncRequest LyXAction::retrieveActionArg(int pseudo) const
{
if (!isPseudoAction(pseudo))
- return make_pair(static_cast<kb_action>(pseudo), string());
+ return FuncRequest(static_cast<kb_action>(pseudo));
pseudo_map::const_iterator pit = lyx_pseudo_map.find(pseudo);
lyxerr[Debug::ACTION] << "Found the pseudoaction: ["
<< pit->second.action << '|'
<< pit->second.argument << "]\n";
- return make_pair(pit->second.action, pit->second.argument);
+ return pit->second;
} else {
lyxerr << "Lyx Error: Unrecognized pseudo-action "
<< pseudo << endl;
- return make_pair(LFUN_UNKNOWN_ACTION, string());
+ return FuncRequest(LFUN_UNKNOWN_ACTION);
}
}
string const LyXAction::getActionName(int action) const
{
- kb_action ac;
- string arg;
- boost::tie(ac, arg) = retrieveActionArg(action);
-
- if (!arg.empty())
- arg.insert(0, " ");
-
- info_map::const_iterator iit = lyx_info_map.find(ac);
-
- if (iit != lyx_info_map.end()) {
- string ret(iit->second.name);
- ret += arg;
- return ret;
- } else
- return string();
+ FuncRequest ev = retrieveActionArg(action);
+ if (!ev.argument.empty())
+ ev.argument.insert(string::size_type(0), 1, ' ');
+
+ info_map::const_iterator const it = lyx_info_map.find(ev.action);
+
+ if (it != lyx_info_map.end())
+ return it->second.name + ev.argument;
+ return string();
}
string const LyXAction::helpText(int pseudoaction) const
{
- kb_action action;
- string arg;
- boost::tie(action, arg) = retrieveActionArg(pseudoaction);
+ FuncRequest ev = retrieveActionArg(pseudoaction);
string help;
-
- info_map::const_iterator ici = lyx_info_map.find(action);
+
+ info_map::const_iterator ici = lyx_info_map.find(ev.action);
if (ici != lyx_info_map.end()) {
if (lyxerr.debugging(Debug::ACTION)) {
- lyxerr << "Action: " << action << '\n';
+ lyxerr << "Action: " << ev.action << '\n';
lyxerr << " name: "
<< ici->second.name << '\n';
lyxerr << " attrib: "
if (help.empty()) {
help = _("No description available!");
- } else if (!arg.empty()) {
+ } else if (!ev.argument.empty()) {
help += ' ';
- help += arg;
+ help += ev.argument;
}
return help;