mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
85a5ea7bfc
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2150 a592a061-630c-0410-9148-cb99ea01b6c8
73 lines
1.3 KiB
C++
73 lines
1.3 KiB
C++
// -*- 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é Pö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;
|
|
///
|
|
bool idxFirstUp(int & idx, int & pos) const;
|
|
///
|
|
bool idxFirstDown(int & idx, int & pos) const;
|
|
///
|
|
bool idxLast(int & idx, int & pos) const;
|
|
///
|
|
bool idxLastUp(int & idx, int & pos) const;
|
|
///
|
|
bool idxLastDown(int & idx, int & pos) const;
|
|
///
|
|
bool up() const;
|
|
///
|
|
bool down() const;
|
|
///
|
|
void up(bool);
|
|
///
|
|
void down(bool);
|
|
///
|
|
bool isActive() const { return false; }
|
|
/// Identifies ScriptInsets
|
|
bool isScriptInset() const { return true; }
|
|
///
|
|
bool idxDelete(int idx);
|
|
private:
|
|
///
|
|
bool up_;
|
|
///
|
|
bool down_;
|
|
};
|
|
|
|
#endif
|