]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetText.h
pimpl not needed here
[lyx.git] / src / insets / InsetText.h
index 711e713cc2ebe225d9ba28cbfe3ade11232613a3..0f32ef062d491912b41e68ff7e1f58b51a50d059 100644 (file)
 #define INSETTEXT_H
 
 #include "Inset.h"
-#include "Font.h"
+
+#include "ColorCode.h"
 #include "Text.h"
 
 #include "support/types.h"
 
-#include "frontends/mouse_state.h"
-
-
 namespace lyx {
 
 class Buffer;
@@ -28,7 +26,6 @@ class BufferParams;
 class BufferView;
 class CursorSlice;
 class Dimension;
-class Color_color;
 class ParagraphList;
 class InsetTabular;
 
@@ -54,7 +51,7 @@ 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;
        ///
@@ -80,7 +77,7 @@ public:
        void cursorPos(BufferView const & bv, CursorSlice const & sl,
                bool boundary, int & x, int & y) const;
        ///
-       Code lyxCode() const { return TEXT_CODE; }
+       InsetCode lyxCode() const { return TEXT_CODE; }
        ///
        void setText(docstring const &, Font const &, bool trackChanges);
        ///
@@ -90,9 +87,9 @@ public:
        ///
        void setDrawFrame(bool);
        ///
-       Color_color frameColor() const;
+       ColorCode frameColor() const;
        ///
-       void setFrameColor(Color_color);
+       void setFrameColor(ColorCode);
        ///
        bool showInsetDialog(BufferView *) const;
        ///
@@ -127,12 +124,14 @@ public:
        ///
        ParagraphList const & paragraphs() const;
        ///
-       bool insetAllowed(Code) const { return true; }
+       bool insetAllowed(InsetCode) const { return true; }
        ///
        bool allowSpellCheck() const { return true; }
        /// should paragraph indendation be ommitted in any case?
        bool neverIndent(Buffer const &) const;
        ///
+       virtual bool allowMultiPar() const { return true; }
+       ///
        InsetText(InsetText const &);
 
        // Update the counters of this inset and of its contents
@@ -150,10 +149,8 @@ private:
 
        ///
        bool drawFrame_;
-       /** We store the Color::color value as an int to get Color.h out
-        *  of the header file.
-        */
-       int frame_color_;
+       ///
+       ColorCode frame_color_;
        ///
        mutable pit_type old_pit;