- return lfunMouseRelease(cmd);
- return DispatchResult(true, true);
-
- case LFUN_INSET_TOGGLE:
- if (inset.text_.toggleInset())
- return DispatchResult(true, true);
- close();
- return DispatchResult(false, FINISHED_RIGHT);
-
- default:
- return inset.dispatch(adjustCommand(cmd));
- }
- //lyxerr << "InsetCollapsable::priv_dispatch (end)" << endl;
-}
-
-
-void InsetCollapsable::validate(LaTeXFeatures & features) const
-{
- inset.validate(features);
-}
-
-
-void InsetCollapsable::getCursorPos(int & x, int & y) const
-{
- inset.getCursorPos(x, y);
- if (status_ != Inlined)
- y += - ascent() + height_collapsed() + inset.ascent();
-}
-
-
-void InsetCollapsable::getLabelList(Buffer const & buffer,
- std::vector<string> & list) const
-{
- inset.getLabelList(buffer, list);
-}
-
-
-int InsetCollapsable::scroll(bool recursive) const
-{
- int sx = UpdatableInset::scroll(false);
-
- if (recursive)
- sx += inset.scroll(false);
-
- return sx;
-}
-
+ cur.noUpdate();
+ cur.dispatched();
+ break;
+ }
+ if (status() == Inlined)
+ InsetText::doDispatch(cur, cmd);
+ else if (status() == Open && !hitButton(cmd))
+ InsetText::doDispatch(cur, cmd);
+ else
+ cur.undispatched();
+ break;
+
+ case LFUN_MOUSE_MOTION:
+ case LFUN_MOUSE_DOUBLE:
+ case LFUN_MOUSE_TRIPLE:
+ if (status_ == Inlined)
+ InsetText::doDispatch(cur, cmd);
+ else if (status() && !hitButton(cmd))
+ InsetText::doDispatch(cur, cmd);
+ else
+ cur.undispatched();
+ break;
+
+ case LFUN_MOUSE_RELEASE:
+ if (cmd.button() == mouse_button::button3) {
+ // Open the Inset configuration dialog
+ showInsetDialog(&cur.bv());
+ break;
+ }