#include "support/path.h"
#include "support/lyxfunctional.h"
-#include <boost/tuple/tuple.hpp>
-
#include <ctime>
#include <clocale>
#include <cstdlib>
extern void ShowLatexLog();
-/* === globals =========================================================== */
-
-
LyXFunc::LyXFunc(LyXView * o)
: owner(o),
keyseq(toplevel_keymap.get(), toplevel_keymap.get()),
FuncStatus LyXFunc::getStatus(int ac) const
{
- kb_action action;
- string arg;
- boost::tie(action, arg) = lyxaction.retrieveActionArg(ac);
- return getStatus(FuncRequest(view(), action, arg));
+ return getStatus(lyxaction.retrieveActionArg(ac));
}
disable = !IsFileReadable(buf->getLogName().second);
break;
case LFUN_MATH_VALIGN:
- if (mathcursor && mathcursor->formula()->hullType() != "simple") {
+ if (mathcursor) {
char align = mathcursor->valign();
if (align == '\0') {
disable = true;
break;
case LFUN_MATH_HALIGN:
- if (mathcursor && mathcursor->formula()->hullType() != "simple") {
+ if (mathcursor) {
char align = mathcursor->halign();
if (align == '\0') {
disable = true;
break;
case LFUN_MATH_MUTATE:
- if (tli && (tli->lyxCode() == Inset::MATH_CODE))
- flag.setOnOff(mathcursor->formula()->hullType() == ev.argument);
+ if (mathcursor)
+ //flag.setOnOff(mathcursor->formula()->hullType() == ev.argument);
+ flag.setOnOff(false);
else
disable = true;
break;
case LFUN_MATH_LIMITS:
case LFUN_MATH_NONUMBER:
case LFUN_MATH_NUMBER:
+ case LFUN_MATH_EXTERN:
disable = !mathcursor;
break;
case LFUN_MATH_ROW_DELETE:
case LFUN_MATH_COLUMN_INSERT:
case LFUN_MATH_COLUMN_DELETE:
- disable = !mathcursor || !mathcursor->halign() ||
- mathcursor->formula()->hullType() == "simple";
+ disable = !mathcursor || !mathcursor->halign();
break;
default:
void LyXFunc::dispatch(int ac, bool verbose)
{
- kb_action action;
- string arg;
- boost::tie(action, arg) = lyxaction.retrieveActionArg(ac);
- dispatch(FuncRequest(view(), action, arg), verbose);
+ dispatch(lyxaction.retrieveActionArg(ac), verbose);
}
}
if (view()->available() && view()->theLockingInset()) {
- UpdatableInset::RESULT result;
+ Inset::RESULT result;
if ((action > 1) || ((action == LFUN_UNKNOWN_ACTION) &&
(!keyseq.deleted())))
{
BufferView * LyXFunc::view() const
{
+ lyx::Assert(owner);
return owner->view().get();
}