]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetcollapsable.h
Rename LatexRunParams::fragile as moving_arg.
[lyx.git] / src / insets / insetcollapsable.h
index c6932a02004a57be37c70d1b26483def770352ef..2b33a90c956abc508e02aa407bbd794dbdccd9df 100644 (file)
 #ifndef INSETCOLLAPSABLE_H
 #define INSETCOLLAPSABLE_H
 
-
 #include "inset.h"
 #include "insettext.h"
 #include "lyxfont.h"
+#include "funcrequest.h" // for adjustCommand
 #include "LColor.h"
 
 #include <boost/weak_ptr.hpp>
@@ -45,22 +45,14 @@ public:
        ///
        void write(Buffer const *, std::ostream &) const;
        ///
-       int ascent(BufferView *, LyXFont const &) const;
-       ///
-       int descent(BufferView *, LyXFont const &) const;
-       ///
-       int width(BufferView *, LyXFont const &) const;
+       void dimension(BufferView *, LyXFont const &, Dimension &) const;
        ///
-       void draw(BufferView *, const LyXFont &, int , float &) const;
+       void draw(BufferView *, const LyXFont &, int, float &) const;
        /// draw, either inlined (no button) or collapsed/open
        void draw(BufferView * bv, LyXFont const & f,
                  int baseline, float & x, bool inlined) const;
        ///
-       void update(BufferView *, bool =false);
-       ///
-       void edit(BufferView *, int, int, mouse_button::state);
-       ///
-       void edit(BufferView *, bool front = true);
+       void update(BufferView *, bool = false);
        ///
        EDITABLE editable() const;
        ///
@@ -88,7 +80,7 @@ public:
        RESULT localDispatch(FuncRequest const &);
        ///
        int latex(Buffer const *, std::ostream &,
-                 bool fragile, bool free_spc) const;
+                 LatexRunParams const &) const;
        ///
        int ascii(Buffer const *, std::ostream &, int) const;
        ///
@@ -97,14 +89,10 @@ public:
        int docbook(Buffer const *, std::ostream &, bool mixcont) const;
        ///
        void validate(LaTeXFeatures & features) const;
-       ///
+       /// FIXME, document
        void getCursorPos(BufferView *, int & x, int & y) const;
-       ///
-       void toggleInsetCursor(BufferView *);
-       ///
-       void showInsetCursor(BufferView *, bool show = true);
-       ///
-       void hideInsetCursor(BufferView *);
+       /// Get the absolute document x,y of the cursor
+       virtual void getCursor(BufferView &, int &, int &) const;
        ///
        void fitInsetCursor(BufferView * bv) const {
                inset.fitInsetCursor(bv);
@@ -146,9 +134,7 @@ public:
        ///
        Inset * getInsetFromID(int id) const;
        ///
-       Paragraph * firstParagraph() const;
-       ///
-       Paragraph * getFirstParagraph(int) const;
+       ParagraphList * getParagraphs(int) const;
        ///
        LyXCursor const & cursor(BufferView *) const;
        ///
@@ -191,13 +177,11 @@ protected:
        virtual BufferView * view() const;
 
        ///
-       int ascent_collapsed() const;
-       ///
-       int descent_collapsed() const;
+       void dimension_collapsed(Dimension &) const;
        ///
-       int width_collapsed() const;
+       int height_collapsed() const;
        ///
-       void draw_collapsed(Painter & pain, int , float &) const;
+       void draw_collapsed(Painter & pain, int, float &) const;
        ///
        int getMaxTextWidth(Painter & pain, UpdatableInset const *) const;
 
@@ -223,11 +207,9 @@ protected:
 
 private:
        ///
-       void lfunMousePress(FuncRequest const &);
-       ///
-       bool lfunMouseRelease(FuncRequest const &);
+       void lfunMouseRelease(FuncRequest const &);
        ///
-       void lfunMouseMotion(FuncRequest const &);
+       FuncRequest adjustCommand(FuncRequest const &);
 
        ///
        mutable string label;