]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetert.h
Don't remove cell selections after fontchange.
[lyx.git] / src / insets / insetert.h
index 3a87c1d430cd0095a35b93a432ad4df1f5618329..b42fa9e405680cfffd6b7427b6ec8e23a59812b7 100644 (file)
 /** A collapsable text inset for LaTeX insertions.
   
   To write full ert (including styles and other insets) in a given
-  space. 
+  space.
+
+  Note that collapsed_ encompasses both the inline and collapsed button
+  versions of this inset. 
 */
 class InsetERT : public InsetCollapsable {
 public:
@@ -68,7 +71,11 @@ public:
        ///
        SigC::Signal0<void> hideDialog;
        ///
-       void insetButtonRelease(BufferView * bv, int x, int y, int button);
+       void insetButtonPress(BufferView *, int x, int y, int button);
+       ///
+       bool insetButtonRelease(BufferView * bv, int x, int y, int button);
+       ///
+       void insetMotionNotify(BufferView *, int x, int y, int state);
        ///
        int latex(Buffer const *, std::ostream &, bool fragile,
                  bool free_spc) const;
@@ -93,11 +100,16 @@ public:
        ///
        bool isOpen() const { return status_ == Open || status_ == Inlined; }
        ///
+       bool inlined() const { return status_ == Inlined; }
+       ///
+       ERTStatus status() const { return status_; }
+       ///
        void open(BufferView *);
        ///
        void close(BufferView *) const;
        ///
-       bool inlined() const { return status_ == Inlined; }
+       bool allowSpellcheck() { return false; }
+       string const selectNextWordToSpellcheck(BufferView *, float &) const;
        ///
        int ascent(BufferView *, LyXFont const &) const;
        ///
@@ -106,12 +118,14 @@ public:
        int width(BufferView *, LyXFont const &) const;
        ///
        void draw(BufferView *, const LyXFont &, int , float &, bool) const;
-       ///
-       ERTStatus status() const { return status_; }
-       ///
+       /// set the status of the inset
        void status(BufferView *, ERTStatus const st) const;
        ///
        bool showInsetDialog(BufferView *) const;
+       ///
+       bool forceDefaultParagraphs(Inset const *) const {
+               return true;
+       }
 
 private:
        ///
@@ -122,6 +136,8 @@ private:
        void setButtonLabel() const;
        ///
        void set_latex_font(BufferView *);
+       /// update status on button
+       void updateStatus(BufferView *, bool = false) const;
 
        ///
        mutable ERTStatus status_;