2002-05-30 07:09:54 +00:00
|
|
|
|
// -*- C++ -*-
|
2003-08-19 13:00:56 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file math_fontinset.h
|
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
|
*/
|
|
|
|
|
|
2002-05-30 07:09:54 +00:00
|
|
|
|
#ifndef MATH_FONTINSET_H
|
|
|
|
|
#define MATH_FONTINSET_H
|
|
|
|
|
|
|
|
|
|
#include "math_nestinset.h"
|
|
|
|
|
|
|
|
|
|
|
2002-07-17 10:25:33 +00:00
|
|
|
|
class latexkeys;
|
|
|
|
|
|
2003-08-19 13:00:56 +00:00
|
|
|
|
/// Inset for font changes
|
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
|
|
|
|
///
|
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
|
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
|
std::string name() const;
|
2002-08-01 15:53:46 +00:00
|
|
|
|
///
|
2003-06-02 10:03:27 +00:00
|
|
|
|
void metrics(MetricsInfo & mi, Dimension & dim) 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:
|
2004-11-23 23:04:52 +00:00
|
|
|
|
virtual std::auto_ptr<InsetBase> doClone() const;
|
2002-05-30 07:09:54 +00:00
|
|
|
|
/// 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
|