]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetcollapsable.h
Enable the external inset to handle unknown templates gracefully.
[lyx.git] / src / insets / insetcollapsable.h
index 577111f21a285c4b0d9eb41e0b44c3629b6fc7fb..f6b8c70cd3a5f8642dbf1c823936e64c9bc1e8f7 100644 (file)
@@ -37,26 +37,21 @@ public:
        ///
        static int const TEXT_TO_BOTTOM_OFFSET = 2;
        /// inset is initially collapsed if bool = true
-       InsetCollapsable(BufferParams const &, bool = false);
+       InsetCollapsable(BufferParams const &, bool collapsed = false);
        ///
-       InsetCollapsable(InsetCollapsable const & in, bool same_id = false);
+       InsetCollapsable(InsetCollapsable const & in);
        ///
        void read(Buffer const *, LyXLex &);
        ///
        void write(Buffer const *, std::ostream &) const;
        ///
-       int ascent(BufferView *, LyXFont const &) const;
+       void metrics(MetricsInfo &, Dimension &) const;
        ///
-       int descent(BufferView *, LyXFont const &) const;
-       ///
-       int width(BufferView *, LyXFont const &) const;
-       ///
-       void draw(BufferView *, const LyXFont &, int , float &) const;
+       void draw(PainterInfo & pi, int x, int y) const;
        /// draw, either inlined (no button) or collapsed/open
-       void draw(BufferView * bv, LyXFont const & f,
-                 int baseline, float & x, bool inlined) const;
+       void draw(PainterInfo & pi, int x, int y, bool inlined) const;
        ///
-       void update(BufferView *, bool =false);
+       void update(BufferView *, bool = false);
        ///
        EDITABLE editable() const;
        ///
@@ -84,7 +79,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;
        ///
@@ -160,9 +155,9 @@ public:
        void toggleSelection(BufferView * bv, bool kill_selection) {
                inset.toggleSelection(bv, kill_selection);
        }
+
        void markErased();
+
        bool nextChange(BufferView * bv, lyx::pos_type & length);
 
        ///
@@ -181,13 +176,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(PainterInfo & pi, int x, int y) const;
        ///
        int getMaxTextWidth(Painter & pain, UpdatableInset const *) const;