]> git.lyx.org Git - features.git/commitdiff
base insetenv directly on InsetText instead of using InsetCollapsable
authorAndré Pönitz <poenitz@gmx.net>
Fri, 25 Apr 2003 15:28:41 +0000 (15:28 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Fri, 25 Apr 2003 15:28:41 +0000 (15:28 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6856 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/insetenv.C
src/insets/insetenv.h

index 24d2d9fa5eb7357d0481069947f8e7fb27dd5136..58e9fe2aa549ece56277895da5cef739ea79cc7f 100644 (file)
@@ -1,3 +1,8 @@
+
+2003-04-25 André Pönitz <poenitz@gmx.net>
+
+       * insetenv.C: derive from InsetText instead of InsetCollapsable
+
 2003-04-24  Lars Gullik Bjønnes  <larsbj@gullik.net>
 
        * insetexternal.C (string2params): dont do anything if the string
index a81cc7d4da2a62faef7bbe86e11a7b86af5468aa..52e478f35abd47d00b3b75b35b4dbeb349452f5c 100644 (file)
@@ -26,10 +26,12 @@ using std::endl;
 
 InsetEnvironment::InsetEnvironment
                (BufferParams const & bp, string const & name)
-       : InsetCollapsable(bp)
+       : InsetText(bp)
 {
-       setLabel(name);
+       //setLabel(name);
        setInsetName(name);
+       autoBreakRows = true;
+       drawFrame_ = ALWAYS;
        // needs more stuff in lyxlayout. coming in later patches.
        //LyXTextClass const & tc = bp.getLyXTextClass();
        //LyXLayout_ptr const & layout = tc.getEnv(name);
@@ -41,7 +43,7 @@ InsetEnvironment::InsetEnvironment
 
 
 InsetEnvironment::InsetEnvironment(InsetEnvironment const & in, bool same_id)
-       : InsetCollapsable(in, same_id), header_(in.header_), footer_(in.footer_)
+       : InsetText(in, same_id), header_(in.header_), footer_(in.footer_)
 {}
 
 
@@ -54,13 +56,13 @@ Inset * InsetEnvironment::clone(Buffer const &, bool same_id) const
 void InsetEnvironment::write(Buffer const * buf, ostream & os) const
 {
        os << "Environment " << getInsetName() << "\n";
-       InsetCollapsable::write(buf, os);
+       InsetText::write(buf, os);
 }
 
 
 void InsetEnvironment::read(Buffer const * buf, LyXLex & lex)
 {
-       InsetCollapsable::read(buf, lex);
+       InsetText::read(buf, lex);
 }
 
 
@@ -74,7 +76,7 @@ int InsetEnvironment::latex(Buffer const * buf,
                         ostream & os, bool fragile, bool fp) const
 {
        os << header_;
-       int i = inset.latex(buf, os, fragile, fp);
+       int i = InsetText::latex(buf, os, fragile, fp);
        os << footer_;
        return i;
 }
index 9eb4db19547e17fcfc70ce978f7af74e790a7b65..2f67c2f0a76cd49fc9d4636925f20c9c1b12701b 100644 (file)
 #ifndef INSETENVIRONMENT_H
 #define INSETENVIRONMENT_H
 
-#include "insetcollapsable.h"
+#include "insettext.h"
 
-
-class InsetEnvironment : public InsetCollapsable {
+class InsetEnvironment : public InsetText {
 public:
        ///
        InsetEnvironment(BufferParams const &, string const & name);
@@ -34,6 +33,10 @@ public:
        ///
        string const editMessage() const;
        ///
+       Inset::EDITABLE editable() const { return HIGHLY_EDITABLE; }
+       ///
+       bool isTextInset() const { return true; }
+       ///
        bool needFullRow() const { return true; }
        /** returns true if, when outputing LaTeX, font changes should
             be closed before generating this inset. This is needed for