lyx_mirror/src/mathed/math_arrayinset.C
André Pönitz cbf29c8fdc new hierarchy for frac-like things
'native' \stackrel support
remove MathInset::name_ member (sizeof(MathInset) == 20 on IA32 now);


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2457 a592a061-630c-0410-9148-cb99ea01b6c8
2001-08-08 17:26:30 +00:00

40 lines
673 B
C

#ifdef __GNUG__
#pragma implementation
#endif
#include "math_arrayinset.h"
#include "support/LOstream.h"
MathArrayInset::MathArrayInset(int m, int n)
: MathGridInset(m, n)
{}
MathInset * MathArrayInset::clone() const
{
return new MathArrayInset(*this);
}
void MathArrayInset::write(std::ostream & os, bool fragile) const
{
if (fragile)
os << "\\protect";
os << "\\begin{array}";
if (v_align_ == 't' || v_align_ == 'b')
os << '[' << char(v_align_) << ']';
os << '{';
for (int col = 0; col < ncols(); ++col)
os << colinfo_[col].h_align_;
os << "}\n";
MathGridInset::write(os, fragile);
if (fragile)
os << "\\protect";
os << "\\end{array}\n";
}