#include "math_data.h"
#include "math_mathmlstream.h"
#include "math_streamstr.h"
+#include "dispatchresult.h"
#include "debug.h"
#include "funcrequest.h"
#include "LColor.h"
}
-dispatch_result MathGridInset::dispatch
- (FuncRequest const & cmd, idx_type & idx, pos_type & pos)
+DispatchResult MathGridInset::priv_dispatch(FuncRequest const & cmd,
+ idx_type & idx, pos_type & pos)
{
switch (cmd.action) {
case LFUN_MOUSE_RELEASE:
//if (cmd.button() == mouse_button::button3) {
// GridInsetMailer(*this).showDialog();
- // return DISPATCHED;
+ // return DispatchResult(true, true);
//}
- return UNDISPATCHED;
+ return DispatchResult(false);
case LFUN_INSET_DIALOG_UPDATE:
GridInsetMailer(*this).updateDialog(cmd.view());
- return UNDISPATCHED;
+ return DispatchResult(false);
// insert file functions
case LFUN_DELETE_LINE_FORWARD:
idx = nargs() - 1;
if (pos > cell(idx).size())
pos = cell(idx).size();
- return DISPATCHED_POP;
+ return DispatchResult(true, FINISHED);
case LFUN_CELL_SPLIT:
//recordUndo(bv, Undo::ATOMIC);
splitCell(idx, pos);
- return DISPATCHED_POP;
+ return DispatchResult(true, FINISHED);
case LFUN_BREAKLINE: {
//recordUndo(bv, Undo::INSERT);
pos = cell(idx).size();
//mathcursor->normalize();
- return DISPATCHED_POP;
+ return DispatchResult(true, FINISHED);
}
case LFUN_TABULAR_FEATURE: {
else if (s == "swap-column")
swapCol(col(idx));
else
- return UNDISPATCHED;
- lyxerr << "returning DISPATCHED_POP" << endl;
- return DISPATCHED_POP;
+ return DispatchResult(false);
+ lyxerr << "returning DispatchResult(true, FINISHED)" << endl;
+ return DispatchResult(true, FINISHED);
}
case LFUN_PASTE: {
for (col_type c = 0; c < grid.ncols(); ++c)
cell(i).append(grid.cell(grid.index(r, c)));
}
- return DISPATCHED_POP;
+ return DispatchResult(true, FINISHED);
}
default: