]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetText.h
* src/paragraph_funcs.cpp (breakParagraph): change parameter 'flag' to
[lyx.git] / src / insets / InsetText.h
index b0f60cb9e206441776a25bba867ffb7ccce823b5..673faf6a1b54f172cb0172fd49ff7884a3d781ef 100644 (file)
 #define INSETTEXT_H
 
 #include "Inset.h"
-#include "RowList_fwd.h"
 #include "Font.h"
 #include "Text.h"
 
 #include "support/types.h"
 
-#include "frontends/mouse_state.h"
-
-
 namespace lyx {
 
 class Buffer;
@@ -31,6 +27,7 @@ class CursorSlice;
 class Dimension;
 class Color_color;
 class ParagraphList;
+class InsetTabular;
 
 
 /**
@@ -44,6 +41,9 @@ public:
        ///
        InsetText();
 
+       ///
+       Dimension const dimension(BufferView const &) const;
+
        /// empty inset to empty par
        void clear();
        ///
@@ -51,13 +51,9 @@ public:
        ///
        void write(Buffer const & buf, std::ostream & os) const;
        ///
-       bool metrics(MetricsInfo & mi, Dimension & dim) const;
+       void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
        void draw(PainterInfo & pi, int x, int y) const;
-       /// draw inset selection
-       void drawSelection(PainterInfo & pi, int x, int y) const;
-       /// are we inside the area covered by the inset?
-       virtual bool covers(BufferView const & bv, int x, int y) const;
        ///
        virtual docstring const editMessage() const;
        ///
@@ -65,6 +61,8 @@ public:
        ///
        bool canTrackChanges() const { return true; }
        ///
+       InsetText * asTextInset() { return this; }
+       ///
        InsetText const * asTextInset() const { return this; }
        ///
        int latex(Buffer const &, odocstream &, OutputParams const &) const;
@@ -133,18 +131,17 @@ public:
        bool neverIndent(Buffer const &) const;
        ///
        InsetText(InsetText const &);
+
+       // Update the counters of this inset and of its contents
+       virtual void updateLabels(Buffer const &, ParIterator const &);
        ///
-       virtual bool wide() const { return wide_inset_; }
-       ///
-       void setWide(bool wide_inset) { wide_inset_ = wide_inset; }
+       virtual Inset * clone() const;
 
 protected:
        ///
        virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
 
 private:
-       ///
-       virtual std::auto_ptr<Inset> doClone() const;
        ///
        void init();
 
@@ -156,15 +153,10 @@ private:
        int frame_color_;
        ///
        mutable pit_type old_pit;
-       ///
-       bool wide_inset_;
+
 public:
        ///
        mutable Text text_;
-       ///
-       mutable Font font_;
-       ///
-       static int border_;
 };
 
 } // namespace lyx