mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-13 14:32:04 +00:00
4665fc9c30
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2232 a592a061-630c-0410-9148-cb99ea01b6c8
44 lines
687 B
C
44 lines
687 B
C
#ifdef __GNUG__
|
|
#pragma implementation
|
|
#endif
|
|
|
|
#include "math_scriptinset.h"
|
|
#include "support/LOstream.h"
|
|
|
|
|
|
MathScriptInset::MathScriptInset(bool up, bool down)
|
|
: MathUpDownInset(up, down)
|
|
{}
|
|
|
|
|
|
MathInset * MathScriptInset::clone() const
|
|
{
|
|
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 << "] ";
|
|
}
|
|
}
|
|
|
|
|
|
void MathScriptInset::idxDelete(int & idx, bool & popit, bool & deleteit)
|
|
{
|
|
if (idx == 0)
|
|
up(false);
|
|
else
|
|
down(false);
|
|
popit = true;
|
|
deleteit = !(up() || down());
|
|
}
|