2001-06-25 00:06:33 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "math_scriptinset.h"
|
|
|
|
#include "support/LOstream.h"
|
|
|
|
|
|
|
|
|
|
|
|
MathScriptInset::MathScriptInset(bool up, bool down)
|
2001-07-12 07:18:29 +00:00
|
|
|
: MathUpDownInset(up, down)
|
2001-06-25 00:06:33 +00:00
|
|
|
{}
|
|
|
|
|
|
|
|
|
2001-06-28 10:25:20 +00:00
|
|
|
MathInset * MathScriptInset::clone() const
|
2001-06-25 00:06:33 +00:00
|
|
|
{
|
|
|
|
return new MathScriptInset(*this);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MathScriptInset::WriteNormal(std::ostream & os) const
|
|
|
|
{
|
|
|
|
if (up()) {
|
|
|
|
os << "[superscript ";
|
|
|
|
cell(0).WriteNormal(os);
|
|
|
|
os << "] ";
|
|
|
|
}
|
|
|
|
if (down()) {
|
|
|
|
os << "[subscript ";
|
|
|
|
cell(1).WriteNormal(os);
|
|
|
|
os << "] ";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-06-27 14:10:35 +00:00
|
|
|
|
2001-07-09 16:59:57 +00:00
|
|
|
void MathScriptInset::idxDelete(int & idx, bool & popit, bool & deleteit)
|
2001-06-27 14:10:35 +00:00
|
|
|
{
|
2001-07-09 16:59:57 +00:00
|
|
|
if (idx == 0)
|
2001-06-27 14:10:35 +00:00
|
|
|
up(false);
|
2001-07-09 16:59:57 +00:00
|
|
|
else
|
2001-06-27 14:10:35 +00:00
|
|
|
down(false);
|
2001-07-09 16:59:57 +00:00
|
|
|
popit = true;
|
|
|
|
deleteit = !(up() || down());
|
2001-06-27 14:10:35 +00:00
|
|
|
}
|