// return MathAtom(new MathMacro(s,
// MacroTable::localMacros().get(s).numargs()));
- lyxerr << "creating unknown inset '" << s << "'" << endl;
+ //lyxerr << "creating unknown inset '" << s << "'" << endl;
return MathAtom(new MathUnknownInset(s));
}
}
-void MathNestInset::lfunMouseRelease(LCursor & cur, FuncRequest & cmd)
-{
- //lyxerr << "lfunMouseRelease: buttons: " << cmd.button() << endl;
-
- if (cmd.button() == mouse_button::button1) {
- // try to dispatch to enclosed insets first
- //cur.bv().stuffClipboard(cur.grabSelection());
- return;
- }
-
- if (cmd.button() == mouse_button::button2) {
- MathArray ar;
- asArray(cur.bv().getClipboard(), ar);
- cur.clearSelection();
- cur.setScreenPos(cmd.x, cmd.y);
- cur.insert(ar);
- cur.bv().update();
- return;
- }
-
- if (cmd.button() == mouse_button::button3) {
- // try to dispatch to enclosed insets first
- cur.bv().owner()->getDialogs().show("mathpanel");
- return;
- }
-
- cur.undispatched();
-}
-
-
void MathNestInset::lfunMousePress(LCursor & cur, FuncRequest & cmd)
{
lyxerr << "lfunMousePress: buttons: " << cmd.button() << endl;
}
+void MathNestInset::lfunMouseRelease(LCursor & cur, FuncRequest & cmd)
+{
+ lyxerr << "lfunMouseRelease: buttons: " << cmd.button() << endl;
+
+ if (cmd.button() == mouse_button::button1) {
+ // try to dispatch to enclosed insets first
+ //cur.bv().stuffClipboard(cur.grabSelection());
+ return;
+ }
+
+ if (cmd.button() == mouse_button::button2) {
+ MathArray ar;
+ asArray(cur.bv().getClipboard(), ar);
+ cur.clearSelection();
+ cur.setScreenPos(cmd.x, cmd.y);
+ cur.insert(ar);
+ cur.bv().update();
+ return;
+ }
+
+ if (cmd.button() == mouse_button::button3) {
+ // try to dispatch to enclosed insets first
+ cur.bv().owner()->getDialogs().show("mathpanel");
+ return;
+ }
+
+ cur.undispatched();
+}
+
+
bool MathNestInset::interpret(LCursor & cur, char c)
{
lyxerr << "interpret 2: '" << c << "'" << endl;