mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
Add virtual bool Inset::clickable(..) to be used to change the cursor.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35804 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
72569c42ba
commit
72a93582b0
@ -335,6 +335,8 @@ public:
|
||||
/// FIXME: merge with editable()
|
||||
// true for InsetTabular & InsetText
|
||||
virtual bool isActive() const { return nargs() > 0; }
|
||||
/// can we click at the specified position ?
|
||||
virtual bool clickable(int x, int y) const { return false; }
|
||||
|
||||
/// does this contain text that can be change track marked in DVI?
|
||||
virtual bool canTrackChanges() const { return false; }
|
||||
|
@ -411,6 +411,13 @@ bool InsetCollapsable::hitButton(FuncRequest const & cmd) const
|
||||
}
|
||||
|
||||
|
||||
bool InsetCollapsable::clickable(int x, int y) const
|
||||
{
|
||||
FuncRequest cmd(LFUN_NOACTION, x, y, mouse_button::none);
|
||||
return hitButton(cmd);
|
||||
}
|
||||
|
||||
|
||||
docstring const InsetCollapsable::getNewLabel(docstring const & l) const
|
||||
{
|
||||
docstring label;
|
||||
|
@ -68,6 +68,8 @@ public:
|
||||
bool editable() const;
|
||||
///
|
||||
bool hasSettings() const { return true; }
|
||||
///
|
||||
bool clickable(int x, int y) const;
|
||||
/// can we go further down on mouse click?
|
||||
bool descendable(BufferView const & bv) const;
|
||||
///
|
||||
|
@ -99,6 +99,8 @@ private:
|
||||
///
|
||||
InsetCode lyxCode() const { return NO_CODE; }
|
||||
///
|
||||
bool clickable(int x, int y) const { return hasSettings(); }
|
||||
///
|
||||
RenderButton & button() const { return button_; }
|
||||
///
|
||||
bool setMouseHover(BufferView const * bv, bool mouse_hover) const;
|
||||
|
@ -115,7 +115,8 @@ public:
|
||||
docstring contextMenu(BufferView const & bv, int x, int y) const;
|
||||
///
|
||||
bool setMouseHover(BufferView const * bv, bool mouse_hover);
|
||||
|
||||
///
|
||||
bool clickable(int x, int y) const { return true; }
|
||||
private:
|
||||
///
|
||||
InsetExternal(InsetExternal const &);
|
||||
|
@ -51,6 +51,8 @@ public:
|
||||
bool setParams(InsetGraphicsParams const & params);
|
||||
|
||||
InsetGraphicsParams getParams() const { return params_;}
|
||||
///
|
||||
bool clickable(int x, int y) const { return true; }
|
||||
|
||||
private:
|
||||
///
|
||||
|
@ -147,6 +147,8 @@ public:
|
||||
bool isSpace() const { return true; }
|
||||
///
|
||||
docstring contextMenu(BufferView const & bv, int x, int y) const;
|
||||
///
|
||||
bool clickable(int x, int y) const { return true; }
|
||||
protected:
|
||||
///
|
||||
Inset * clone() const { return new InsetSpace(*this); }
|
||||
|
@ -37,6 +37,8 @@ public:
|
||||
static void string2params(std::string const &, VSpace &);
|
||||
///
|
||||
static std::string params2string(VSpace const &);
|
||||
///
|
||||
bool clickable(int x, int y) const { return true; }
|
||||
private:
|
||||
///
|
||||
void metrics(MetricsInfo & mi, Dimension & dim) const;
|
||||
|
Loading…
Reference in New Issue
Block a user