2001-08-06 06:23:09 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
#ifndef MATH_CHARINSET_H
|
|
|
|
|
#define MATH_CHARINSET_H
|
|
|
|
|
|
2002-02-15 17:14:36 +00:00
|
|
|
|
#include "math_diminset.h"
|
2001-08-06 06:23:09 +00:00
|
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
|
#pragma interface
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/** The base character inset.
|
|
|
|
|
\author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
*/
|
|
|
|
|
|
2002-02-15 17:14:36 +00:00
|
|
|
|
class MathCharInset : public MathDimInset {
|
2001-08-06 06:23:09 +00:00
|
|
|
|
public:
|
2001-08-17 09:48:24 +00:00
|
|
|
|
///
|
|
|
|
|
explicit MathCharInset(char c);
|
2001-08-06 06:23:09 +00:00
|
|
|
|
///
|
|
|
|
|
MathInset * clone() const;
|
|
|
|
|
///
|
2002-05-30 07:09:54 +00:00
|
|
|
|
void metrics(MathMetricsInfo & st) const;
|
2001-08-06 17:20:26 +00:00
|
|
|
|
///
|
2002-05-30 07:09:54 +00:00
|
|
|
|
void draw(MathPainterInfo &, int x, int y) const;
|
2001-08-06 06:23:09 +00:00
|
|
|
|
///
|
2002-03-21 06:57:13 +00:00
|
|
|
|
void metricsT(TextMetricsInfo const & st) const;
|
2002-03-19 16:55:58 +00:00
|
|
|
|
///
|
2002-03-21 06:57:13 +00:00
|
|
|
|
void drawT(TextPainter &, int x, int y) const;
|
2002-03-19 16:55:58 +00:00
|
|
|
|
///
|
2001-11-09 08:35:57 +00:00
|
|
|
|
void write(WriteStream & os) const;
|
2001-08-06 06:23:09 +00:00
|
|
|
|
///
|
2002-06-18 15:44:30 +00:00
|
|
|
|
void normalize(NormalStream & ns) const;
|
|
|
|
|
///
|
|
|
|
|
void octavize(OctaveStream & os) const;
|
2001-08-06 06:23:09 +00:00
|
|
|
|
/// identifies Charinsets
|
2001-08-17 13:18:10 +00:00
|
|
|
|
MathCharInset const * asCharInset() const { return this; }
|
2001-08-06 06:23:09 +00:00
|
|
|
|
///
|
|
|
|
|
char getChar() const { return char_; }
|
2001-08-09 08:53:16 +00:00
|
|
|
|
///
|
|
|
|
|
bool isRelOp() const;
|
2001-08-10 13:17:39 +00:00
|
|
|
|
///
|
2001-11-16 09:55:37 +00:00
|
|
|
|
bool match(MathInset *) const;
|
2001-08-06 06:23:09 +00:00
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
/// the character
|
|
|
|
|
char char_;
|
|
|
|
|
};
|
|
|
|
|
#endif
|