2002-05-30 07:09:54 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
#ifndef MATH_FONTINSET_H
|
|
|
|
|
#define MATH_FONTINSET_H
|
|
|
|
|
|
|
|
|
|
#include "math_nestinset.h"
|
|
|
|
|
|
|
|
|
|
|
2002-07-17 10:25:33 +00:00
|
|
|
|
/** Inset for font changes
|
2002-09-11 08:26:02 +00:00
|
|
|
|
* \author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS
|
2002-05-30 07:09:54 +00:00
|
|
|
|
*/
|
|
|
|
|
|
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-10-29 08:23:32 +00:00
|
|
|
|
///
|
|
|
|
|
MathFontInset * asFontInset() { return this; }
|
|
|
|
|
///
|
|
|
|
|
MathFontInset const * asFontInset() const { return this; }
|
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-08-01 15:53:46 +00:00
|
|
|
|
string name() const;
|
|
|
|
|
///
|
2003-05-28 13:22:36 +00:00
|
|
|
|
Dimension metrics(MetricsInfo & mi) const;
|
2002-05-30 07:09:54 +00:00
|
|
|
|
///
|
2003-03-21 14:20:48 +00:00
|
|
|
|
void draw(PainterInfo & pi, int x, int y) const;
|
2002-05-30 07:09:54 +00:00
|
|
|
|
///
|
2003-05-28 13:22:36 +00:00
|
|
|
|
void metricsT(TextMetricsInfo const & mi, Dimension & dim) 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 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
|