2002-05-30 07:09:54 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
#ifndef MATH_FONTINSET_H
|
|
|
|
|
#define MATH_FONTINSET_H
|
|
|
|
|
|
|
|
|
|
#include "math_nestinset.h"
|
|
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
|
#pragma interface
|
|
|
|
|
#endif
|
|
|
|
|
|
2002-07-17 10:25:33 +00:00
|
|
|
|
/** Inset for font changes
|
2002-05-30 07:09:54 +00:00
|
|
|
|
\author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
*/
|
|
|
|
|
|
2002-07-17 10:25:33 +00:00
|
|
|
|
class latexkeys;
|
|
|
|
|
|
2002-05-30 07:09:54 +00:00
|
|
|
|
class MathFontInset : public MathNestInset {
|
|
|
|
|
public:
|
|
|
|
|
///
|
2002-07-17 10:25:33 +00:00
|
|
|
|
explicit MathFontInset(latexkeys const * key);
|
2002-05-30 07:09:54 +00:00
|
|
|
|
///
|
|
|
|
|
MathInset * clone() const;
|
2002-07-18 11:02:33 +00:00
|
|
|
|
/// are we in math mode, text mode, or unsure?
|
|
|
|
|
mode_type currentMode() const;
|
2002-05-30 07:09:54 +00:00
|
|
|
|
///
|
2002-06-04 09:06:04 +00:00
|
|
|
|
void metrics(MathMetricsInfo & mi) const;
|
2002-05-30 07:09:54 +00:00
|
|
|
|
///
|
2002-06-04 09:06:04 +00:00
|
|
|
|
void draw(MathPainterInfo & pi, int x, int y) const;
|
2002-05-30 07:09:54 +00:00
|
|
|
|
///
|
2002-06-04 09:06:04 +00:00
|
|
|
|
void metricsT(TextMetricsInfo const & mi) const;
|
2002-05-30 07:09:54 +00:00
|
|
|
|
///
|
2002-06-04 09:06:04 +00:00
|
|
|
|
void drawT(TextPainter & pi, int x, int y) const;
|
2002-05-30 07:09:54 +00:00
|
|
|
|
///
|
|
|
|
|
void write(WriteStream & os) const;
|
|
|
|
|
///
|
|
|
|
|
void normalize(NormalStream &) const;
|
|
|
|
|
///
|
|
|
|
|
void validate(LaTeXFeatures & features) const;
|
|
|
|
|
///
|
|
|
|
|
void infoize(std::ostream & os) const;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
/// the font to be used on screen
|
2002-07-17 10:25:33 +00:00
|
|
|
|
latexkeys const * key_;
|
2002-05-30 07:09:54 +00:00
|
|
|
|
};
|
|
|
|
|
#endif
|