]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetCollapsable.h
* Lazy MathData to avoid unneeded interpretation of macro definitions
[features.git] / src / insets / InsetCollapsable.h
index dbc88341d6f194943404f71903f2fe38e9b2f6ed..1b6cbc3c45edf1ea30dba459d737ba19781795ef 100644 (file)
@@ -15,8 +15,8 @@
 #define INSETCOLLAPSABLE_H
 
 #include "Inset.h"
+#include "InsetLayout.h"
 #include "InsetText.h"
-#include "TextClass.h"
 
 #include "Box.h"
 
@@ -76,6 +76,8 @@ public:
        /// can we go further down on mouse click?
        bool descendable() const;
        ///
+       bool isMacroScope(Buffer const & buf) const;
+       ///
        void setLabel(docstring const & l);
        ///
        virtual void setButtonLabel() {}
@@ -147,15 +149,13 @@ public:
        virtual bool isFreeSpacing() const { return layout_->freespacing; }
        /// Don't eliminate empty paragraphs
        virtual bool allowEmpty() const { return layout_->keepempty; }
+       /// Force inset into LTR environment if surroundings are RTL?
+       virtual bool forceLTR() const { return layout_->forceltr; }
 
 protected:
        ///
        virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
        ///
-       Dimension dimensionCollapsed() const;
-       ///
-       Box const & buttonDim() const;
-       ///
        void edit(Cursor & cur, bool left);
        ///
        Inset * editXY(Cursor & cur, int x, int y);
@@ -165,20 +165,16 @@ protected:
        virtual void resetParagraphsFont();
 
 protected:
-       ///
-       mutable Box button_dim;
-       ///
-       mutable int topx;
-       ///
-       mutable int topbaseline;
        ///
        InsetLayout const * layout_;
-       ///
-       CollapseStatus internalStatus() const { return status_; }
 private:
+       ///
+       Dimension dimensionCollapsed() const;
        ///
        docstring labelstring_;
        ///
+       mutable Box button_dim;
+       ///
        mutable CollapseStatus status_;
        /// a substatus of the Open status, determined automatically in metrics
        mutable bool openinlined_;
@@ -188,9 +184,6 @@ private:
        bool mouse_hover_;
 };
 
-// A helper function that pushes the cursor out of the inset.
-void leaveInset(Cursor & cur, Inset const & in);
-
 } // namespace lyx
 
 #endif