2001-11-05 17:08:45 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
#ifndef MATH_STRINGINSET_H
|
|
|
|
|
#define MATH_STRINGINSET_H
|
|
|
|
|
|
|
|
|
|
#include "math_inset.h"
|
|
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
|
#pragma interface
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/** Some cllection of chars with similar properties
|
|
|
|
|
\author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
class MathStringInset : public MathInset {
|
|
|
|
|
public:
|
|
|
|
|
///
|
2001-11-09 16:27:44 +00:00
|
|
|
|
MathStringInset(string const & s, MathTextCodes t = LM_TC_TEXTRM);
|
2001-11-05 17:08:45 +00:00
|
|
|
|
///
|
|
|
|
|
MathInset * clone() const;
|
|
|
|
|
///
|
|
|
|
|
void metrics(MathMetricsInfo const & st) const;
|
|
|
|
|
///
|
|
|
|
|
void draw(Painter &, int x, int y) const;
|
|
|
|
|
///
|
|
|
|
|
int ascent() const;
|
|
|
|
|
///
|
|
|
|
|
int descent() const;
|
|
|
|
|
///
|
|
|
|
|
int width() const;
|
|
|
|
|
///
|
2001-11-09 12:01:10 +00:00
|
|
|
|
string str() const { return str_; }
|
|
|
|
|
///
|
|
|
|
|
MathStringInset * asStringInset() { return this; }
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
void normalize(NormalStream &) const;
|
|
|
|
|
///
|
2001-11-07 17:30:26 +00:00
|
|
|
|
void octavize(OctaveStream &) const;
|
2001-11-07 08:51:35 +00:00
|
|
|
|
///
|
2001-11-07 17:30:26 +00:00
|
|
|
|
void maplize(MapleStream &) const;
|
2001-11-07 08:51:35 +00:00
|
|
|
|
///
|
2001-11-07 17:30:26 +00:00
|
|
|
|
void mathmlize(MathMLStream &) const;
|
2001-11-09 12:01:10 +00:00
|
|
|
|
///
|
|
|
|
|
void write(WriteStream & os) const;
|
2001-11-05 17:08:45 +00:00
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
/// the string
|
|
|
|
|
string str_;
|
|
|
|
|
/// the font to be used on screen
|
|
|
|
|
MathTextCodes code_;
|
|
|
|
|
///
|
|
|
|
|
mutable MathMetricsInfo mi_;
|
|
|
|
|
};
|
|
|
|
|
#endif
|