]> git.lyx.org Git - features.git/blobdiff - src/insets/insetert.h
several changes and some new insets, read the Changelog
[features.git] / src / insets / insetert.h
index 76bf3179290043ab6f3fed9ca23d4ca6a12aa131..1a2c53d02e18c87dea6ce55543b70a33820d98a8 100644 (file)
@@ -4,7 +4,7 @@
  * 
  *           LyX, The Document Processor
  *
- *           Copyright (C) 1998 The LyX Team.
+ *           Copyright 1998 The LyX Team.
  *
  *======================================================
  */
@@ -18,7 +18,7 @@
 #pragma interface
 #endif
 
-#include "insettext.h"
+#include "insetcollapsable.h"
 
 class Painter;
 
@@ -27,60 +27,25 @@ class Painter;
   To write full ert (including styles and other insets) in a given
   space. 
 */
-class InsetERT : public InsetText {
+class InsetERT : public InsetCollapsable {
 public:
-    ///
-    InsetERT(Buffer *);
-    ///
-    //     InsetERT(InsetERT const &, Buffer *);
-    ///
-    ~InsetERT() {}
-    ///
-    InsetERT * Clone() const;
-    ///
-    //    void Read(LyXLex &);
-    ///
-    void Write(ostream &) const;
-    ///
-    int ascent(Painter &, LyXFont const &) const;
-    ///
-    int descent(Painter &, LyXFont const &) const;
-    ///
-    int width(Painter &, LyXFont const & f) const;
-    ///
-    void draw(Painter & pain, const LyXFont &, int , float &) const;
-    ///
-    //LString EditMessage() const;
-    ///
-    void InsetButtonRelease(BufferView *, int, int, int);
-    ///
-    void InsetButtonPress(BufferView *, int, int, int);
-    ///
-    void InsetMotionNotify(BufferView *, int, int, int);
-    ///
-    void Edit(BufferView *, int, int, unsigned int);
-    ///
-    void InsetUnlock(BufferView *);
-    ///
-    bool InsertInset(Inset *);
-    ///
-    void SetFont(LyXFont const &, bool toggleall);
-
-protected:
-    ///
-    int ascent_closed(Painter &, LyXFont const &) const;
-    ///
-    int descent_closed(Painter &, LyXFont const &) const;
-    ///
-    int width_closed(Painter &, LyXFont const & f) const;
-    ///
-    void draw_closed(Painter & pain, const LyXFont &, int , float &) const;
-
-private:
-    ///
-    bool
-        closed,
-       nomotion;
+       ///
+       InsetERT();
+       ///
+       ~InsetERT() {}
+       ///
+       void Write(Buffer const * buf, ostream & os) const;
+       ///
+       Inset * Clone() const;
+       ///
+       char const * EditMessage() const;
+       ///
+       bool InsertInset(BufferView *, Inset *);
+       ///
+       void SetFont(BufferView *, LyXFont const &, bool toggleall = false);
+       ///
+       void Edit(BufferView *, int, int, unsigned int);
+       ///
 };
 
 #endif