void Inset::doDispatch(Cursor & cur, FuncRequest &cmd)
{
switch (cmd.action) {
void Inset::doDispatch(Cursor & cur, FuncRequest &cmd)
{
switch (cmd.action) {
+ case LFUN_MOUSE_RELEASE:
+ // if the derived inset did not explicitly handle mouse_release,
+ // we assume we request the settings dialog
+ if (!cur.selection() && cmd.button() == mouse_button::button1) {
+ FuncRequest tmpcmd(LFUN_INSET_SETTINGS);
+ dispatch(cur, tmpcmd);
+ }
+ break;
+
case LFUN_INSET_SETTINGS:
showInsetDialog(&cur.bv());
cur.dispatched();
break;
case LFUN_INSET_SETTINGS:
showInsetDialog(&cur.bv());
cur.dispatched();
break;
default:
cur.noUpdate();
cur.undispatched();
default:
cur.noUpdate();
cur.undispatched();
- case LFUN_MOUSE_RELEASE: {
- if (!cur.selection() && cmd.button() != mouse_button::button3)
- edit(cur, true);
- break;
- }
-
default:
Inset::doDispatch(cur, cmd);
break;
default:
Inset::doDispatch(cur, cmd);
break;
-void InsetCommand::edit(Cursor & cur, bool, EntryDirection)
-{
- showInsetDialog(&cur.bv());
-}
-
-
bool InsetCommand::showInsetDialog(BufferView * bv) const
{
if (!mailer_name_.empty())
bool InsetCommand::showInsetDialog(BufferView * bv) const
{
if (!mailer_name_.empty())
///
InsetCode lyxCode() const { return NO_CODE; }
///
///
InsetCode lyxCode() const { return NO_CODE; }
///
- void edit(Cursor & cur, bool front,
- EntryDirection entry_from = ENTRY_DIRECTION_IGNORE);
- ///
RenderButton & button() const { return button_; }
///
bool setMouseHover(bool mouse_hover);
RenderButton & button() const { return button_; }
///
bool setMouseHover(bool mouse_hover);
params2string(params(), cur.bv().buffer()));
break;
params2string(params(), cur.bv().buffer()));
break;
- case LFUN_MOUSE_RELEASE:
- if (!cur.selection() && cmd.button() == mouse_button::button1)
- cur.bv().showDialog("external",
- params2string(params(), cur.bv().buffer()),
- this);
- break;
-
default:
Inset::doDispatch(cur, cmd);
}
default:
Inset::doDispatch(cur, cmd);
}
-void InsetExternal::edit(Cursor & cur, bool, EntryDirection)
-{
- showInsetDialog(&cur.bv());
-}
-
-
bool InsetExternal::showInsetDialog(BufferView * bv) const
{
bv->showDialog("external", params2string(params(), bv->buffer()),
bool InsetExternal::showInsetDialog(BufferView * bv) const
{
bv->showDialog("external", params2string(params(), bv->buffer()),
///
void addPreview(graphics::PreviewLoader &) const;
///
///
void addPreview(graphics::PreviewLoader &) const;
///
- void edit(Cursor & cur, bool front, EntryDirection entry_from);
- ///
bool showInsetDialog(BufferView * bv) const;
///
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
bool showInsetDialog(BufferView * bv) const;
///
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
cur.bv().updateDialog("graphics", params2string(params(), buffer()));
break;
cur.bv().updateDialog("graphics", params2string(params(), buffer()));
break;
- case LFUN_MOUSE_RELEASE:
- if (!cur.selection() && cmd.button() == mouse_button::button1)
- cur.bv().showDialog("graphics", params2string(params(), buffer()), this);
- break;
-
default:
Inset::doDispatch(cur, cmd);
break;
default:
Inset::doDispatch(cur, cmd);
break;
-void InsetGraphics::edit(Cursor & cur, bool, EntryDirection)
-{
- showInsetDialog(&cur.bv());
-}
-
-
bool InsetGraphics::showInsetDialog(BufferView * bv) const
{
bv->showDialog("graphics", params2string(params(), bv->buffer()),
bool InsetGraphics::showInsetDialog(BufferView * bv) const
{
bv->showDialog("graphics", params2string(params(), bv->buffer()),
///
void draw(PainterInfo & pi, int x, int y) const;
///
///
void draw(PainterInfo & pi, int x, int y) const;
///
- void edit(Cursor & cur, bool front, EntryDirection entry_from);
- ///
bool showInsetDialog(BufferView * bv) const;
///
void editGraphics(InsetGraphicsParams const &, Buffer const &) const;
bool showInsetDialog(BufferView * bv) const;
///
void editGraphics(InsetGraphicsParams const &, Buffer const &) const;
cur.bv().updateDialog("space", params2string(params()));
break;
cur.bv().updateDialog("space", params2string(params()));
break;
- case LFUN_MOUSE_RELEASE:
- if (!cur.selection() && cmd.button() == mouse_button::button1)
- cur.bv().showDialog("space", params2string(params()), this);
- break;
-
default:
Inset::doDispatch(cur, cmd);
break;
default:
Inset::doDispatch(cur, cmd);
break;
-void InsetSpace::edit(Cursor & cur, bool, EntryDirection)
-{
- showInsetDialog(&cur.bv());
-}
-
-
bool InsetSpace::showInsetDialog(BufferView * bv) const
{
bv->showDialog("space", params2string(params()),
bool InsetSpace::showInsetDialog(BufferView * bv) const
{
bv->showDialog("space", params2string(params()),
/// the string that is passed to the TOC
void tocString(odocstream &) const;
///
/// the string that is passed to the TOC
void tocString(odocstream &) const;
///
- void edit(Cursor & cur, bool front,
- EntryDirection entry_from = ENTRY_DIRECTION_IGNORE);
- ///
EDITABLE editable() const { return IS_EDITABLE; }
///
InsetCode lyxCode() const { return SPACE_CODE; }
EDITABLE editable() const { return IS_EDITABLE; }
///
InsetCode lyxCode() const { return SPACE_CODE; }
- case LFUN_MOUSE_RELEASE:
- if (!cur.selection() && cmd.button() == mouse_button::button1)
- cur.bv().showDialog("vspace", params2string(space()),
- const_cast<InsetVSpace *>(this));
- break;
-
default:
Inset::doDispatch(cur, cmd);
break;
default:
Inset::doDispatch(cur, cmd);
break;
-void InsetVSpace::edit(Cursor & cur, bool, EntryDirection)
-{
- showInsetDialog(&cur.bv());
-}
-
-
bool InsetVSpace::showInsetDialog(BufferView * bv) const
{
bv->showDialog("vspace", params2string(space()),
bool InsetVSpace::showInsetDialog(BufferView * bv) const
{
bv->showDialog("vspace", params2string(space()),
///
InsetCode lyxCode() const { return VSPACE_CODE; }
///
///
InsetCode lyxCode() const { return VSPACE_CODE; }
///
- void edit(Cursor & cur, bool front,
- EntryDirection entry_from = ENTRY_DIRECTION_IGNORE);
- ///
EDITABLE editable() const { return IS_EDITABLE; }
///
docstring contextMenu(BufferView const & bv, int x, int y) const;
EDITABLE editable() const { return IS_EDITABLE; }
///
docstring contextMenu(BufferView const & bv, int x, int y) const;