X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmathed%2Fmath_nestinset.h;h=dda150a6dbd282394c9db5e78100b38163bc496e;hb=2c30e9b17afc036515a3d23fb657c4f55815d7c5;hp=77ce4d5e56d122eb7c3974fc12988af320f4c663;hpb=6af06846fd8b037e2b7e60b2f4838c64da602555;p=lyx.git diff --git a/src/mathed/math_nestinset.h b/src/mathed/math_nestinset.h index 77ce4d5e56..dda150a6db 100644 --- a/src/mathed/math_nestinset.h +++ b/src/mathed/math_nestinset.h @@ -32,16 +32,16 @@ public: void draw(PainterInfo & pi, int x, int y) const; /// draw selection background void drawSelection(PainterInfo & pi, int x, int y) const; - /// appends itself with macro arguments substituted - void substitute(MathMacro const & macro); /// identifies NestInsets MathNestInset * asNestInset() { return this; } /// identifies NestInsets MathNestInset const * asNestInset() const { return this; } /// get cursor position - void getCursorPos(CursorSlice const & cur, int & x, int & y) const; + void cursorPos(CursorSlice const & sl, bool boundary, int & x, int & y) const; /// - void edit(LCursor & cur, int, int); + void edit(LCursor & cur, bool left); + /// + InsetBase * editXY(LCursor & cur, int x, int y); /// order of movement through the cells when pressing the left key bool idxLeft(LCursor &) const; @@ -58,11 +58,6 @@ public: /// target pos when we enter the inset from the right by pressing "Left" bool idxLast(LCursor &) const; - /// where should we go if we press home? - bool idxHome(LCursor &) const; - /// where should we go if we press end? - bool idxEnd(LCursor &) const; - /// number of cells currently governed by us idx_type nargs() const; /// access to the lock @@ -70,7 +65,7 @@ public: /// access to the lock void lock(bool); /// get notification when the cursor leaves this inset - void notifyCursorLeaves(idx_type); + void notifyCursorLeaves(LCursor & cur); /// direct access to the cell MathArray & cell(idx_type); @@ -96,21 +91,45 @@ public: void write(WriteStream & os) const; /// writes [, name(), and args in [] void normalize(NormalStream & os) const; + /// + int latex(Buffer const &, std::ostream & os, + OutputParams const & runparams) const; + protected: /// - DispatchResult priv_dispatch(LCursor & cur, FuncRequest const & cmd); + virtual void doDispatch(LCursor & cur, FuncRequest & cmd); + /// do we want to handle this event? + bool getStatus(LCursor & cur, FuncRequest const & cmd, + FuncStatus & status) const; /// void handleFont(LCursor & cur, std::string const & arg, std::string const & font); /// void handleFont2(LCursor & cur, std::string const & arg); + /// + bool interpret(LCursor & cur, char c); + /// + bool script(LCursor & cur, bool); + + +private: + /// lfun handler + void lfunMousePress(LCursor &, FuncRequest &); + /// + void lfunMouseRelease(LCursor &, FuncRequest &); + /// + void lfunMouseMotion(LCursor &, FuncRequest &); + +protected: /// we store the cells in a vector typedef std::vector cells_type; /// thusly: cells_type cells_; /// if the inset is locked, it can't be entered with the cursor bool lock_; + /// + std::string safe_; }; #endif