mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-04 06:15:59 +00:00
* src/insets/InsetSpace.{cpp, h}:
- this inset is now editable. Mark as such and add an editable method (allows for opening the inset dialog with "next-inset-toggle". - implement context menu (no actual menu yet). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23907 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
4219c529c2
commit
48778460a0
@ -142,6 +142,12 @@ void InsetSpace::doDispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void InsetSpace::edit(Cursor & cur, bool, EntryDirection)
|
||||||
|
{
|
||||||
|
InsetSpaceMailer(*this).showDialog(&cur.bv());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetSpace::metrics(MetricsInfo & mi, Dimension & dim) const
|
void InsetSpace::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||||
{
|
{
|
||||||
if (isStretchableSpace()) {
|
if (isStretchableSpace()) {
|
||||||
@ -497,6 +503,12 @@ bool InsetSpace::isStretchableSpace() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
docstring InsetSpace::contextMenu(BufferView const &, int, int) const
|
||||||
|
{
|
||||||
|
return from_ascii("context-space");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
string const InsetSpaceMailer::name_ = "space";
|
string const InsetSpaceMailer::name_ = "space";
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,6 +106,11 @@ public:
|
|||||||
/// the string that is passed to the TOC
|
/// the string that is passed to the TOC
|
||||||
void textString(odocstream &) const;
|
void textString(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; }
|
InsetCode lyxCode() const { return SPACE_CODE; }
|
||||||
/// is this an expandible space (rubber length)?
|
/// is this an expandible space (rubber length)?
|
||||||
bool isStretchableSpace() const;
|
bool isStretchableSpace() const;
|
||||||
@ -117,6 +122,8 @@ public:
|
|||||||
/// is this equivalent to a space (which is BTW different from
|
/// is this equivalent to a space (which is BTW different from
|
||||||
// a line separator)?
|
// a line separator)?
|
||||||
bool isSpace() const { return true; }
|
bool isSpace() const { return true; }
|
||||||
|
///
|
||||||
|
virtual docstring contextMenu(BufferView const & bv, int x, int y) const;
|
||||||
private:
|
private:
|
||||||
virtual Inset * clone() const { return new InsetSpace(*this); }
|
virtual Inset * clone() const { return new InsetSpace(*this); }
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user