2001-06-25 00:06:33 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
#ifndef MATH_SCRIPTINSET_H
|
|
|
|
|
#define MATH_SCRIPTINSET_H
|
|
|
|
|
|
|
|
|
|
#include "math_inset.h"
|
|
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
|
#pragma interface
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/** Inset for super- and subscripts
|
|
|
|
|
\author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
class MathScriptInset : public MathInset {
|
|
|
|
|
public:
|
|
|
|
|
///
|
|
|
|
|
MathScriptInset();
|
|
|
|
|
///
|
|
|
|
|
MathScriptInset(bool up, bool down);
|
|
|
|
|
///
|
|
|
|
|
MathInset * Clone() const;
|
|
|
|
|
///
|
|
|
|
|
void Write(std::ostream &, bool fragile) const;
|
|
|
|
|
///
|
|
|
|
|
void WriteNormal(std::ostream &) const;
|
|
|
|
|
///
|
|
|
|
|
void Metrics(MathStyles st);
|
|
|
|
|
///
|
|
|
|
|
void draw(Painter &, int x, int baseline);
|
|
|
|
|
///
|
|
|
|
|
bool idxUp(int & idx, int & pos) const;
|
|
|
|
|
///
|
|
|
|
|
bool idxDown(int & idx, int & pos) const;
|
|
|
|
|
///
|
|
|
|
|
bool idxLeft(int & idx, int & pos) const;
|
|
|
|
|
///
|
|
|
|
|
bool idxRight(int & idx, int & pos) const;
|
|
|
|
|
///
|
|
|
|
|
bool idxFirst(int & idx, int & pos) const;
|
|
|
|
|
///
|
2001-06-27 14:10:35 +00:00
|
|
|
|
bool idxFirstUp(int & idx, int & pos) const;
|
|
|
|
|
///
|
|
|
|
|
bool idxFirstDown(int & idx, int & pos) const;
|
|
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
|
bool idxLast(int & idx, int & pos) const;
|
|
|
|
|
///
|
2001-06-27 14:10:35 +00:00
|
|
|
|
bool idxLastUp(int & idx, int & pos) const;
|
|
|
|
|
///
|
|
|
|
|
bool idxLastDown(int & idx, int & pos) const;
|
|
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
|
bool up() const;
|
|
|
|
|
///
|
|
|
|
|
bool down() const;
|
|
|
|
|
///
|
|
|
|
|
void up(bool);
|
|
|
|
|
///
|
|
|
|
|
void down(bool);
|
2001-06-27 14:10:35 +00:00
|
|
|
|
///
|
|
|
|
|
bool isActive() const { return false; }
|
|
|
|
|
/// Identifies ScriptInsets
|
|
|
|
|
bool isScriptInset() const { return true; }
|
|
|
|
|
///
|
|
|
|
|
bool idxDelete(int idx);
|
2001-06-25 00:06:33 +00:00
|
|
|
|
private:
|
|
|
|
|
///
|
|
|
|
|
bool up_;
|
|
|
|
|
///
|
|
|
|
|
bool down_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|