X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_gridinset.h;h=7b0b329552cf40efaeb3b22545c92c69f01e50be;hb=701b99ecd70ac472aa53c8b2317af44def4f9670;hp=45c722d5501fceaa2b8126f3e5a7e0ad8f98108a;hpb=44cd0fc9a1687cc63911c7f98d978594458e7813;p=lyx.git diff --git a/src/mathed/math_gridinset.h b/src/mathed/math_gridinset.h index 45c722d550..7b0b329552 100644 --- a/src/mathed/math_gridinset.h +++ b/src/mathed/math_gridinset.h @@ -20,7 +20,6 @@ * This is the base to all grid-like editable math objects */ class MathGridInset : public MathNestInset { - public: /// additional per-cell information @@ -94,8 +93,6 @@ public: /// Ensures that the dialog is closed. ~MathGridInset(); /// - virtual std::auto_ptr clone() const; - /// void metrics(MetricsInfo & mi) const; /// void metrics(MetricsInfo & mi, Dimension &) const; @@ -135,9 +132,6 @@ public: MathGridInset * asGridInset() { return this; } /// identifies GridInset MathGridInset const * asGridInset() const { return this; } - /// local dispatcher - dispatch_result dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos); - /// col_type ncols() const; /// @@ -148,19 +142,15 @@ public: row_type row(idx_type idx) const; /// - bool idxUpDown(idx_type & idx, pos_type & pos, bool up, int targetx) const; + bool idxUpDown(LCursor &, bool up) const; /// - bool idxLeft(idx_type & idx, pos_type & pos) const; + bool idxLeft(LCursor &) const; /// - bool idxRight(idx_type & idx, pos_type & pos) const; + bool idxRight(LCursor &) const; /// - bool idxFirst(idx_type & idx, pos_type & pos) const; + bool idxFirst(LCursor &) const; /// - bool idxLast(idx_type & idx, pos_type & pos) const; - /// - bool idxHome(idx_type & idx, pos_type & pos) const; - /// - bool idxEnd(idx_type & idx, pos_type & pos) const; + bool idxLast(LCursor &) const; /// bool idxDelete(idx_type & idx); /// pulls cell after pressing erase @@ -218,6 +208,10 @@ public: //void octave(OctaveStream &) const; protected: + virtual void doDispatch(LCursor & cur, FuncRequest & cmd); + /// + bool getStatus(LCursor & cur, FuncRequest const & cmd, + FuncStatus & flag) const; /// returns x offset of cell compared to inset int cellXOffset(idx_type idx) const; /// returns y offset of cell compared to inset @@ -229,7 +223,7 @@ protected: /// extract number of columns from alignment string col_type guessColumns(std::string const & halign) const; /// splits cells and shifts right part to the next cell - void splitCell(idx_type &, pos_type & pos); + void splitCell(LCursor & cur); public: /// row info @@ -240,6 +234,8 @@ public: std::vector cellinfo_; /// char v_align_; // add approp. type +private: + virtual std::auto_ptr doClone() const; }; #endif