]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insettext.h
Clean up InsetGraphics::Cache and rename as GraphicsInset.
[lyx.git] / src / insets / insettext.h
index 82d9dbbb644c577d999d8e44bdba76f8cfe2553b..52f76e7e2c9c7f05b2a8360c47f0d6f72aa02d49 100644 (file)
@@ -17,6 +17,7 @@
 #include "LColor.h"
 #include "ParagraphList.h"
 #include "RowList.h"
+#include "dimension.h"
 #include "frontends/mouse_state.h"
 
 #include "support/types.h"
@@ -72,11 +73,11 @@ public:
        InsetText(BufferParams const &);
        ///
        explicit
-       InsetText(InsetText const &, bool same_id = false);
+       InsetText(InsetText const &);
        ///
        ~InsetText();
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const;
+       Inset * clone() const;
        ///
        InsetText & operator=(InsetText const & it);
        /// empty inset to empty par, or just mark as erased
@@ -86,11 +87,11 @@ public:
        ///
        void write(Buffer const *, std::ostream &) const;
        ///
-       void dimension(BufferView *, LyXFont const &, Dimension &) const;
+       void metrics(MetricsInfo &, Dimension &) const;
        ///
        int textWidth(BufferView *, bool fordraw = false) const;
        ///
-       void draw(BufferView *, LyXFont const &, int , float &) const;
+       void draw(PainterInfo & pi, int x, int y) const;
        ///
        void update(BufferView *, bool = false);
        ///
@@ -112,7 +113,7 @@ public:
        RESULT localDispatch(FuncRequest const &);
        ///
        int latex(Buffer const *, std::ostream &,
-                 bool fragile, bool free_spc) const;
+                 LatexRunParams const &) const;
        ///
        int ascii(Buffer const *, std::ostream &, int linelen) const;
        ///
@@ -146,11 +147,11 @@ public:
        ///
        int getMaxWidth(BufferView *, UpdatableInset const *) const;
        ///
-       void init(InsetText const * ins = 0, bool same_id = false);
+       void init(InsetText const * ins);
        ///
        void writeParagraphData(Buffer const *, std::ostream &) const;
        ///
-       void setParagraphData(ParagraphList const &, bool same_id = false);
+       void setParagraphData(ParagraphList const &);
        ///
        void setText(string const &, LyXFont const &);
        ///
@@ -195,8 +196,6 @@ public:
        ///
        LyXCursor const & cursor(BufferView *) const;
        ///
-       void paragraph(Paragraph *);
-       ///
        bool allowSpellcheck() const { return true; }
        ///
        WordLangTuple const
@@ -347,11 +346,7 @@ private:
        ///
        mutable bool locked;
        ///
-       mutable int insetAscent;
-       ///
-       mutable int insetDescent;
-       ///
-       mutable int insetWidth;
+       mutable Dimension dim_;
        ///
        mutable int top_y;
        ///
@@ -382,9 +377,9 @@ private:
        mutable boost::shared_ptr<LyXText> cached_text;
        ///
        struct save_state {
-               Paragraph * lpar;
-               Paragraph * selstartpar;
-               Paragraph * selendpar;
+               ParagraphList::iterator lpar;
+               ParagraphList::iterator selstartpar;
+               ParagraphList::iterator selendpar;
                lyx::pos_type pos;
                lyx::pos_type selstartpos;
                lyx::pos_type selendpos;