]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCollapsable.h
InsetListings: change the interface of diaplay function and allow AlignLeft. Applied...
[lyx.git] / src / insets / InsetCollapsable.h
index d0fcb46df095131969d788eaffcea4e7761e6237..1ffd52a325c6ad1abd311124a28ba6ad73ea503a 100644 (file)
 #include "Inset.h"
 #include "InsetText.h"
 
-#include "box.h"
-#include "lyxfont.h"
+#include "Box.h"
+#include "Font.h"
 
 #include <string>
 
 namespace lyx {
 
-class LyXText;
+class Text;
 class Paragraph;
 class CursorSlice;
 
@@ -44,7 +44,9 @@ public:
        ///
        InsetCollapsable(InsetCollapsable const & rhs);
        ///
-       void read(Buffer const &, LyXLex &);
+       docstring name() const { return from_ascii("Collapsable"); }
+       ///
+       void read(Buffer const &, Lexer &);
        ///
        void write(Buffer const &, std::ostream &) const;
        ///
@@ -69,7 +71,7 @@ public:
        ///
        virtual void setButtonLabel() {}
        ///
-       void setLabelFont(LyXFont & f);
+       void setLabelFont(Font & f);
        ///
        bool isOpen() const { return status_ == Open || status_ == Inlined; }
        ///
@@ -79,23 +81,23 @@ public:
        ///
        bool allowSpellCheck() const { return true; }
        ///
-       bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
+       bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
        ///
-       void setStatus(LCursor & cur, CollapseStatus st);
+       void setStatus(Cursor & cur, CollapseStatus st);
        ///
        bool setMouseHover(bool mouse_hover);
 
 protected:
        ///
-       virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
+       virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
        ///
        Dimension dimensionCollapsed() const;
        ///
        Box const & buttonDim() const;
        ///
-       void edit(LCursor & cur, bool left);
+       void edit(Cursor & cur, bool left);
        ///
-       InsetBase * editXY(LCursor & cur, int x, int y);
+       Inset * editXY(Cursor & cur, int x, int y);
        ///
        void setInlined() { status_ = Inlined; }
        ///
@@ -103,7 +105,7 @@ protected:
 
 protected:
        ///
-       LyXFont labelfont_;
+       Font labelfont_;
        ///
        mutable Box button_dim;
        ///
@@ -126,7 +128,7 @@ private:
 };
 
 // A helper function that pushes the cursor out of the inset.
-void leaveInset(LCursor & cur, InsetBase const & in);
+void leaveInset(Cursor & cur, Inset const & in);
 
 } // namespace lyx