]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insettabular.h
changelogs
[lyx.git] / src / insets / insettabular.h
index ec48c8ae6b2a864b2f346c06c53a4df3d1cfd18b..b6a6f93970afbe7cb5beb1799c06f86e05c2b3eb 100644 (file)
@@ -50,12 +50,8 @@ public:
        ///
        InsetTabular(Buffer const &, int rows = 1, int columns = 1);
        ///
-       InsetTabular(InsetTabular const &);
-       ///
        ~InsetTabular();
        ///
-       virtual std::auto_ptr<InsetBase> clone() const;
-       ///
        void read(Buffer const &, LyXLex &);
        ///
        void write(Buffer const &, std::ostream &) const;
@@ -66,7 +62,7 @@ public:
        ///
        std::string const editMessage() const;
        ///
-       bool insetAllowed(InsetOld::Code) const { return true; }
+       bool insetAllowed(InsetBase::Code) const { return true; }
        ///
        bool isTextInset() const { return true; }
        /** returns true if, when outputing LaTeX, font changes should
@@ -90,7 +86,7 @@ public:
        ///
        void validate(LaTeXFeatures & features) const;
        ///
-       Code lyxCode() const { return InsetOld::TABULAR_CODE; }
+       Code lyxCode() const { return InsetBase::TABULAR_CODE; }
        /// get the absolute screen x,y of the cursor
        void getCursorPos(LCursor const & cur, int & x, int & y) const;
        ///
@@ -107,9 +103,9 @@ public:
        /// number of cells
        size_t nargs() const;
        ///
-       InsetText const & cell(int) const;
+       boost::shared_ptr<InsetText const> cell(int) const;
        ///
-       InsetText & cell(int);
+       boost::shared_ptr<InsetText> cell(int);
        ///
        LyXText * getText(int) const;
 
@@ -141,11 +137,15 @@ public:
        mutable LyXTabular tabular;
 
 protected:
-       ///
-       void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+       InsetTabular(InsetTabular const &);
+
+       virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
+
        ///
        bool getStatus(LCursor & cur, FuncRequest const & cmd, FuncStatus &) const;
 private:
+       virtual std::auto_ptr<InsetBase> doClone() const;
+
        ///
        void drawCellLines(Painter &, int x, int baseline,
                int row, int cell) const;