]> git.lyx.org Git - features.git/blobdiff - src/insets/insetert.h
skak support, John's ERT fixes, loclae blunder fix
[features.git] / src / insets / insetert.h
index 655953f502043956b724b2f164eafdfd72ee26c2..4c63335f8b865f23c33db166ccf459cea604bd95 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:
@@ -93,6 +96,10 @@ 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;
@@ -100,8 +107,6 @@ public:
        bool allowSpellcheck() { return false; }
        string const selectNextWordToSpellcheck(BufferView *, float &) const;
        ///
-       bool inlined() const { return status_ == Inlined; }
-       ///
        int ascent(BufferView *, LyXFont const &) const;
        ///
        int descent(BufferView *, LyXFont const &) const;
@@ -109,9 +114,7 @@ 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;
@@ -125,6 +128,8 @@ private:
        void setButtonLabel() const;
        ///
        void set_latex_font(BufferView *);
+       /// update status on button
+       void updateStatus(BufferView *, bool = false) const;
 
        ///
        mutable ERTStatus status_;