]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetcollapsable.h
move inset related stuff from src/graphics to src/inset/
[lyx.git] / src / insets / insetcollapsable.h
index 06cb34f34235bcdfc2a4fdf8c3959b9084d2a6fa..d3dc3945ef5ca0ac356855ac53c3d1690d1c5748 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *
  *           Copyright 2000-2001 The LyX Team.
@@ -28,7 +28,7 @@ class Paragraph;
 class LyXCursor;
 
 /** A collapsable text inset
-  
+
 */
 class InsetCollapsable : public UpdatableInset {
 public:
@@ -42,7 +42,7 @@ public:
        ///
        static int const TEXT_TO_BOTTOM_OFFSET = 2;
        /// inset is initially collapsed if bool = true
-       InsetCollapsable(bool = false);
+       InsetCollapsable(BufferParams const &, bool = false);
        ///
        InsetCollapsable(InsetCollapsable const & in, bool same_id = false);
        ///
@@ -58,9 +58,9 @@ public:
        ///
        void draw(BufferView *, const LyXFont &, int , float &, bool) const;
        ///
-       void update(BufferView *, LyXFont const &, bool =false); 
+       void update(BufferView *, LyXFont const &, bool =false);
        ///
-       void edit(BufferView *, int, int, unsigned int);
+       void edit(BufferView *, int, int, mouse_button::state);
        ///
        void edit(BufferView *, bool front = true);
        ///
@@ -87,27 +87,25 @@ public:
        ///
        bool updateInsetInInset(BufferView *, Inset *);
        ///
-       unsigned int insetInInsetY();
-       ///
-       void insetButtonRelease(BufferView *, int, int, int);
+       int insetInInsetY() const;
        ///
-       void insetButtonPress(BufferView *, int, int, int);
+       bool insetButtonRelease(BufferView *, int, int, mouse_button::state);
        ///
-       void insetMotionNotify(BufferView *, int, int, int);
+       void insetButtonPress(BufferView *, int, int, mouse_button::state);
        ///
-       void insetKeyPress(XKeyEvent *);
+       void insetMotionNotify(BufferView *, int, int, mouse_button::state);
        ///
        UpdatableInset::RESULT localDispatch(BufferView *, kb_action,
-                                            string const &);
+                                            string const &);
        ///
        int latex(Buffer const *, std::ostream &,
                  bool fragile, bool free_spc) const;
        ///
-       int ascii(Buffer const *, std::ostream &, int) const { return 0; }
+       int ascii(Buffer const *, std::ostream &, int) const;
        ///
-       int linuxdoc(Buffer const *, std::ostream &) const { return 0; }
+       int linuxdoc(Buffer const *, std::ostream &) const;
        ///
-       int docbook(Buffer const *, std::ostream &) const { return 0; }
+       int docbook(Buffer const *, std::ostream &) const;
        ///
        void validate(LaTeXFeatures & features) const;
        ///
@@ -127,7 +125,7 @@ public:
        UpdatableInset * getFirstLockingInsetOfType(Inset::Code);
        ///
        void setFont(BufferView *, LyXFont const &, bool toggleall = false,
-                 bool selectall = false);
+                bool selectall = false);
        ///
        void setLabel(string const & l) const;
        ///
@@ -136,8 +134,10 @@ public:
        ///
        void setAutoCollapse(bool f) { autocollapse = f; }
 #endif
+#if 0
        ///
        int getMaxWidth(BufferView *, UpdatableInset const *) const;
+#endif
        ///
        LyXText * getLyXText(BufferView const *, bool const recursive) const;
        ///
@@ -186,9 +186,9 @@ public:
        }
        ///
        bool searchForward(BufferView * bv, string const & str,
-                          bool const & cs = true, bool const & mw = false);
+                          bool = true, bool = false);
        bool searchBackward(BufferView * bv, string const & str,
-                           bool const & cs = true, bool const & mw = false);
+                           bool = true, bool = false);
 
 protected:
        ///
@@ -201,7 +201,7 @@ protected:
        void draw_collapsed(Painter & pain, int , float &) const;
        ///
        int getMaxTextWidth(Painter & pain, UpdatableInset const *) const;
-       
+
        ///
        mutable bool collapsed_;
        ///