]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCollapsable.h
Inset::addToToc(): change signature. Use DocIterator instead of ParConstIterator...
[lyx.git] / src / insets / InsetCollapsable.h
index 0085431dc97ccee56e7a1f1ee7213bb55ce57521..c5b9975f33fe561e19aeb9ec96e585644b9f8b5b 100644 (file)
 #include "Box.h"
 #include "TextClass.h"
 
-#include <string>
-
 namespace lyx {
 
 class CursorSlice;
-class FontInfo;
 class InsetLayout;
-class Paragraph;
-class Text;
 
 namespace frontend { class Painter; }
 
@@ -38,8 +33,7 @@ namespace frontend { class Painter; }
 class InsetCollapsable : public InsetText {
 public:
        ///
-       InsetCollapsable(Buffer const &,
-               CollapseStatus status = Inset::Open, DocumentClass * tc = 0);
+       InsetCollapsable(Buffer const &, CollapseStatus status = Inset::Open);
        ///
        InsetCollapsable(InsetCollapsable const & rhs);
        ///
@@ -51,7 +45,7 @@ public:
        ///
        docstring name() const { return from_ascii("Collapsable"); }
        ///
-       InsetLayout const & getLayout(BufferParams const &) const { return *layout_; } 
+       InsetLayout const & getLayout(BufferParams const &) const { return *layout_; }
        ///
        InsetLayout const & getLayout() const { return *layout_; } 
        ///
@@ -83,8 +77,6 @@ public:
        /// can we go further down on mouse click?
        bool descendable() const;
        ///
-       bool isMacroScope() const;
-       ///
        void setLabel(docstring const & l);
        ///
        virtual void setButtonLabel() {}
@@ -126,8 +118,8 @@ public:
        /// (status_), autoOpen_ and openinlined_, and of
        /// course decoration().
        Geometry geometry() const;
-       ///
-       bool allowSpellCheck() const { return true; }
+       /// Allow spellchecking, except for insets with latex_language
+       bool allowSpellCheck() const { return !forceLTR(); }
        ///
        bool allowMultiPar() const;
        ///
@@ -137,13 +129,13 @@ public:
        ///
        bool setMouseHover(bool mouse_hover);
        ///
-       virtual ColorCode backgroundColor() const {return layout_->bgcolor(); }
+       ColorCode backgroundColor() const { return layout_->bgcolor(); }
        ///
        int latex(odocstream &, OutputParams const &) const;
        ///
        void validate(LaTeXFeatures &) const;
        ///
-       virtual InsetCode lyxCode() const { return COLLAPSABLE_CODE; }
+       InsetCode lyxCode() const { return COLLAPSABLE_CODE; }
 
        /// Allow multiple blanks
        virtual bool isFreeSpacing() const { return layout_->isFreeSpacing(); }
@@ -156,9 +148,11 @@ public:
        /// Is this inset's layout defined in the document's textclass?
        /// May be wrong after textclass change or paste from another document
        bool undefined() const;
+       ///
+       virtual docstring contextMenu(BufferView const & bv, int x, int y) const;
 protected:
        ///
-       virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
+       void doDispatch(Cursor & cur, FuncRequest & cmd);
        ///
        void edit(Cursor & cur, bool front, 
                EntryDirection entry_from = ENTRY_DIRECTION_IGNORE);