X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathNest.h;h=408d13a05b5c70623dab04abd1ee0d12790a2f91;hb=11a6b3c4c7a031fd3776f53c9c43f62116933cea;hp=1ae230a2841a6772b205297a331d1b43a4857169;hpb=31059d1741933d95403e7f07ed033cae482f778b;p=lyx.git diff --git a/src/mathed/InsetMathNest.h b/src/mathed/InsetMathNest.h index 1ae230a284..408d13a05b 100644 --- a/src/mathed/InsetMathNest.h +++ b/src/mathed/InsetMathNest.h @@ -12,7 +12,7 @@ #ifndef MATH_NESTINSET_H #define MATH_NESTINSET_H -#include "InsetMathDim.h" +#include "InsetMath.h" namespace lyx { @@ -23,10 +23,12 @@ namespace lyx { single symbol. */ -class InsetMathNest : public InsetMathDim { +class InsetMathNest : public InsetMath { public: /// nestinsets have a fixed size to start with explicit InsetMathNest(idx_type ncells); + /// + virtual ~InsetMathNest() {} /// the size is usually some sort of convex hull of the cells /// hides inset::metrics() intentionally! @@ -46,23 +48,24 @@ public: void cursorPos(BufferView const & bv, CursorSlice const & sl, bool boundary, int & x, int & y) const; /// - void edit(Cursor & cur, bool left); + void edit(Cursor & cur, bool front, + EntryDirectionType entry_from = IGNORE_ENTRY_DIRECTION); /// - InsetBase * editXY(Cursor & cur, int x, int y); + Inset * editXY(Cursor & cur, int x, int y); - /// order of movement through the cells when pressing the left key - bool idxLeft(Cursor &) const; - /// order of movement through the cells when pressing the right key - bool idxRight(Cursor &) const; + /// order of movement through the cells when moving backwards + bool idxBackward(Cursor &) const; + /// order of movement through the cells when moving forward + bool idxForward(Cursor &) const; - /// move one physical cell up + /// move to next cell bool idxNext(Cursor &) const; - /// move one physical cell down + /// move to previous cell bool idxPrev(Cursor &) const; - /// target pos when we enter the inset from the left by pressing "Right" + /// target pos when we enter the inset while moving forward bool idxFirst(Cursor &) const; - /// target pos when we enter the inset from the right by pressing "Left" + /// target pos when we enter the inset while moving backwards bool idxLast(Cursor &) const; /// number of cells currently governed by us @@ -103,8 +106,17 @@ public: /// int latex(Buffer const &, odocstream & os, OutputParams const & runparams) const; + /// + bool setMouseHover(bool mouse_hover); + /// + bool mouseHovered() const { return mouse_hover_; } protected: + /// + InsetMathNest(InsetMathNest const & inset); + /// + InsetMathNest & operator=(InsetMathNest const &); + /// virtual void doDispatch(Cursor & cur, FuncRequest & cmd); /// do we want to handle this event? @@ -138,6 +150,9 @@ private: void lfunMouseRelease(Cursor &, FuncRequest &); /// void lfunMouseMotion(Cursor &, FuncRequest &); + /// Find a macro to fold or unfold, starting at searchCur and searchCur.nextInset() pointing to a macro + /// afterwards if found + bool findMacroToFoldUnfold(Cursor & searchCur, bool fold) const; protected: /// we store the cells in a vector @@ -146,6 +161,8 @@ protected: cells_type cells_; /// if the inset is locked, it can't be entered with the cursor bool lock_; + /// + bool mouse_hover_; };