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);
//header_ = layout->latexheader;
//footer_ = layout->latexfooter;
+ header_ = "\\begin{" + name + "}";
+ footer_ = "\\end{" + name + "}";
}
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_)
{}
void InsetEnvironment::write(Buffer const * buf, ostream & os) const
{
- os << "Environment" << getInsetName() << "\"\n";
- InsetCollapsable::write(buf, os);
+ os << "Environment " << getInsetName() << "\n";
+ InsetText::write(buf, os);
}
void InsetEnvironment::read(Buffer const * buf, LyXLex & lex)
{
- InsetCollapsable::read(buf, lex);
+ InsetText::read(buf, lex);
}
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;
}