int const y = d->mouse_position_cache_.y_;
Inset const * covering_inset = getCoveringInset(buffer_.text(), x, y);
- d->clickable_inset_ = covering_inset && covering_inset->clickable(x, y);
+ d->clickable_inset_ = covering_inset && covering_inset->clickable(*this, x, y);
if (covering_inset == d->last_inset_)
// Same inset, no need to do anything...
// 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
- && clickable(cmd.x(), cmd.y()) && hasSettings()) {
+ && clickable(cur.bv(), cmd.x(), cmd.y()) && hasSettings()) {
FuncRequest tmpcmd(LFUN_INSET_SETTINGS);
dispatch(cur, tmpcmd);
}
// true for InsetTabular & InsetText
virtual bool isActive() const { return nargs() > 0; }
/// can we click at the specified position ?
- virtual bool clickable(int, int) const { return false; }
+ virtual bool clickable(BufferView const &, int, int) const { return false; }
/// Move one cell backwards
virtual bool allowsCaptionVariation(std::string const &) const { return false; }
}
-bool InsetCollapsable::clickable(int x, int y) const
+bool InsetCollapsable::clickable(BufferView const &, int x, int y) const
{
FuncRequest cmd(LFUN_NOACTION, x, y, mouse_button::none);
return hitButton(cmd);
///
bool hasSettings() const { return true; }
///
- bool clickable(int x, int y) const;
+ bool clickable(BufferView const &, int x, int y) const;
/// can we go further down on mouse click?
bool descendable(BufferView const & bv) const;
///
void InsetCommand::metrics(MetricsInfo & mi, Dimension & dim) const
{
- button_.update(screenLabel(), editable() || clickable(0, 0));
+ button_.update(screenLabel(), editable() || clickable(*mi.base.bv, 0, 0));
button_.metrics(mi, dim);
}
///
bool setMouseHover(BufferView const * bv, bool mouse_hover) const;
///
- bool clickable(int, int) const { return hasSettings(); }
+ bool clickable(BufferView const &, int, int) const { return hasSettings(); }
//@}
protected:
///
bool setMouseHover(BufferView const * bv, bool mouse_hover) const;
///
- bool clickable(int, int) const { return true; }
+ bool clickable(BufferView const &, int, int) const { return true; }
///
void addToToc(DocIterator const & di, bool output_active,
UpdateType utype) const;
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
///
- bool clickable(int, int) const { return true; }
+ bool clickable(BufferView const &, int, int) const { return true; }
///
void validate(LaTeXFeatures & features) const;
//@}
InsetGraphicsParams getParams() const { return params_;}
///
- bool clickable(int, int) const { return true; }
+ bool clickable(BufferView const &, int, int) const { return true; }
private:
///
///
bool hasSettings() const { return true; }
///
- bool clickable(int, int) const { return true; }
+ bool clickable(BufferView const &, int, int) const { return true; }
///
InsetCode lyxCode() const { return SPACE_CODE; }
/// does this inset try to use all available space (like \\hfill does)?
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
///
- bool clickable(int, int) const { return true; }
+ bool clickable(BufferView const &, int, int) const { return true; }
//@}
/// \name Static public methods obligated for InsetCommand derived classes
///
bool hasSettings() const { return true; }
///
- bool clickable(int, int) const { return true; }
+ bool clickable(BufferView const &, int, int) const { return true; }
///
std::string contextMenuName() const;
///