]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insettabular.h
Clean up InsetGraphics::Cache and rename as GraphicsInset.
[lyx.git] / src / insets / insettabular.h
index 5ab939c34d6f2f1f25bf985dff7c20c9d609e482..49fec77faedc3c0968a44244281f6665bc4a2193 100644 (file)
 #ifndef INSETTABULAR_H
 #define INSETTABULAR_H
 
-
 #include "inset.h"
 #include "tabular.h"
 #include "LString.h"
 #include "lyxcursor.h"
 #include "FuncStatus.h"
+#include "frontends/mouse_state.h"
 
 #include <boost/scoped_ptr.hpp>
 #include <boost/weak_ptr.hpp>
@@ -76,31 +76,23 @@ public:
        ///
        InsetTabular(Buffer const &, int rows = 1, int columns = 1);
        ///
-       InsetTabular(InsetTabular const &, Buffer const &, bool same_id = false);
+       InsetTabular(InsetTabular const &);
        ///
        ~InsetTabular();
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const;
+       Inset * clone() const;
        ///
        void read(Buffer const *, LyXLex &);
        ///
        void write(Buffer const *, std::ostream &) const;
        ///
-       int ascent(BufferView *, LyXFont const &) const;
-       ///
-       int descent(BufferView *, LyXFont const &) const;
+       void metrics(MetricsInfo &, Dimension &) const;
        ///
-       int width(BufferView *, LyXFont const & f) const;
-       ///
-       void draw(BufferView *, const LyXFont &, int , float &) const;
+       void draw(PainterInfo & pi, int x, int y) const;
        ///
        void update(BufferView *, bool = false);
        ///
        string const editMessage() const;
-       ///
-       void edit(BufferView *, int x, int y, mouse_button::state);
-       ///
-       void edit(BufferView * bv, bool front = true);
        //
        void insetUnlock(BufferView *);
        ///
@@ -133,7 +125,8 @@ public:
        ///
        RESULT localDispatch(FuncRequest const &);
        ///
-       int latex(Buffer const *, std::ostream &, bool, bool) const;
+       int latex(Buffer const *, std::ostream &,
+                 LatexRunParams const &) const;
        ///
        int ascii(Buffer const *, std::ostream &, int linelen) const;
        ///
@@ -144,10 +137,10 @@ public:
        void validate(LaTeXFeatures & features) const;
        ///
        Inset::Code lyxCode() const { return Inset::TABULAR_CODE; }
-       ///
+       /// FIXME, document
        void getCursorPos(BufferView *, int & x, int & y) const;
-       ///
-       void toggleInsetCursor(BufferView *);
+       /// Get the absolute document x,y of the cursor
+       virtual void getCursor(BufferView &, int &, int &) const;
        ///
        bool tabularFeatures(BufferView * bv, string const & what);
        ///
@@ -161,8 +154,6 @@ public:
        ///
        int getMaxWidth(BufferView *, UpdatableInset const *) const;
        ///
-       Buffer * bufferOwner() const { return const_cast<Buffer *>(buffer); }
-       ///
        LyXText * getLyXText(BufferView const *,
                             bool const recursive = false) const;
        ///
@@ -195,9 +186,7 @@ public:
        ///
        Inset * getInsetFromID(int id) const;
        ///
-       Paragraph * firstParagraph() const;
-       ///
-       Paragraph * getFirstParagraph(int) const;
+       ParagraphList * getParagraphs(int) const;
        ///
        LyXCursor const & cursor(BufferView *) const;
        ///
@@ -239,6 +228,10 @@ public:
 
        ///
        virtual BufferView * view() const;
+
+       /// set the owning buffer
+       void buffer(Buffer * b);
+
 private:
        ///
        void lfunMousePress(FuncRequest const &);
@@ -259,10 +252,6 @@ private:
        void drawCellSelection(Painter &, int x, int baseline,
                               int row, int column, int cell) const;
        ///
-       void showInsetCursor(BufferView *, bool show=true);
-       ///
-       void hideInsetCursor(BufferView *);
-       ///
        void fitInsetCursor(BufferView *) const;
        ///
        void setPos(BufferView *, int x, int y) const;
@@ -330,7 +319,7 @@ private:
        ///
        InsetText * old_locking_inset;
        ///
-       Buffer const * buffer;
+       Buffer const * buffer_;
        ///
        mutable LyXCursor cursor_;
        ///