mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
d5eb253d6a
perhaps fix for g++3.0 compile problem git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2486 a592a061-630c-0410-9148-cb99ea01b6c8
52 lines
882 B
C
52 lines
882 B
C
#ifdef __GNUG__
|
|
#pragma implementation
|
|
#endif
|
|
|
|
#include "math_sizeinset.h"
|
|
#include "math_parser.h"
|
|
#include "support/LOstream.h"
|
|
|
|
|
|
MathSizeInset::MathSizeInset(latexkeys const * l)
|
|
: MathNestInset(1), key_(l)
|
|
{}
|
|
|
|
|
|
MathInset * MathSizeInset::clone() const
|
|
{
|
|
return new MathSizeInset(*this);
|
|
}
|
|
|
|
|
|
void MathSizeInset::draw(Painter & pain, int x, int y) const
|
|
{
|
|
xo(x);
|
|
yo(y);
|
|
xcell(0).draw(pain, x, y);
|
|
}
|
|
|
|
|
|
void MathSizeInset::metrics(MathStyles /* st */) const
|
|
{
|
|
xcell(0).metrics(MathStyles(key_->id));
|
|
ascent_ = xcell(0).ascent_;
|
|
descent_ = xcell(0).descent_;
|
|
width_ = xcell(0).width_;
|
|
}
|
|
|
|
|
|
void MathSizeInset::write(std::ostream & os, bool fragile) const
|
|
{
|
|
os << "{\\" << key_->name << " ";
|
|
cell(0).write(os, fragile);
|
|
os << "}";
|
|
}
|
|
|
|
|
|
void MathSizeInset::writeNormal(std::ostream & os) const
|
|
{
|
|
os << "[" << key_->name << " ";
|
|
cell(0).writeNormal(os);
|
|
os << "]";
|
|
}
|