]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetText.h
This should be the last of the commits refactoring the InsetLayout code.
[lyx.git] / src / insets / InsetText.h
index 2e0aa579febf38feac7633d644372e8c4c3e60f2..ccb7301474e953025e62e096d8528bcb35f96388 100644 (file)
@@ -13,7 +13,8 @@
 #define INSETTEXT_H
 
 #include "Inset.h"
-#include "Font.h"
+
+#include "ColorCode.h"
 #include "Text.h"
 
 #include "support/types.h"
@@ -25,7 +26,6 @@ class BufferParams;
 class BufferView;
 class CursorSlice;
 class Dimension;
-class Color_color;
 class ParagraphList;
 class InsetTabular;
 
@@ -40,6 +40,8 @@ public:
        explicit InsetText(BufferParams const &);
        ///
        InsetText();
+       ///
+       InsetText(InsetText const &);
 
        ///
        Dimension const dimension(BufferView const &) const;
@@ -61,9 +63,9 @@ public:
        ///
        bool canTrackChanges() const { return true; }
        ///
-       InsetText * asTextInset() { return this; }
+       InsetText * asInsetText() { return this; }
        ///
-       InsetText const * asTextInset() const { return this; }
+       InsetText const * asInsetText() const { return this; }
        ///
        int latex(Buffer const &, odocstream &, OutputParams const &) const;
        ///
@@ -87,9 +89,9 @@ public:
        ///
        void setDrawFrame(bool);
        ///
-       Color_color frameColor() const;
+       ColorCode frameColor() const;
        ///
-       void setFrameColor(Color_color);
+       void setFrameColor(ColorCode);
        ///
        bool showInsetDialog(BufferView *) const;
        ///
@@ -113,7 +115,7 @@ public:
        void addPreview(graphics::PreviewLoader &) const;
 
        ///
-       void edit(Cursor & cur, bool left);
+       void edit(Cursor & cur, bool front, EntryDirection entry_from);
        ///
        Inset * editXY(Cursor & cur, int x, int y);
 
@@ -130,31 +132,47 @@ public:
        /// should paragraph indendation be ommitted in any case?
        bool neverIndent(Buffer const &) const;
        ///
-       virtual bool allowMultiPar() const { return true; }
+       virtual bool isMacroScope(Buffer const &) const { return true; }
        ///
-       InsetText(InsetText const &);
+       virtual bool allowMultiPar() const { return true; }
 
        // Update the counters of this inset and of its contents
        virtual void updateLabels(Buffer const &, ParIterator const &);
        ///
        virtual Inset * clone() const;
 
+       ///
+       bool completionSupported(Cursor const &) const;
+       ///
+       bool inlineCompletionSupported(Cursor const & cur) const;
+       ///
+       bool automaticInlineCompletion() const;
+       ///
+       bool automaticPopupCompletion() const;
+       ///
+       CompletionList const * completionList(Cursor const & cur) const;
+       ///
+       docstring completionPrefix(Cursor const & cur) const;
+       ///
+       bool insertCompletion(Cursor & cur, docstring const & s, bool finished);
+       ///
+       void completionPosAndDim(Cursor const &, int & x, int & y, Dimension & dim) const;
+
 protected:
        ///
        virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
 
 private:
        ///
-       void init();
-
+       void setParagraphOwner();
        ///
        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;
+       ///
+       docstring previousWord(Buffer const & buffer, CursorSlice const & sl) const;
 
 public:
        ///