2008-09-04 22:24:07 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file InsetMathEnsureMath.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
2008-11-14 15:58:50 +00:00
|
|
|
* \author André Pönitz
|
2008-09-04 22:24:07 +00:00
|
|
|
* \author Enrico Forestieri
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MATH_ENSUREMATHINSET_H
|
|
|
|
#define MATH_ENSUREMATHINSET_H
|
|
|
|
|
|
|
|
#include "InsetMathNest.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
|
|
|
|
|
|
|
/// Inset for ensuring math mode
|
|
|
|
class InsetMathEnsureMath : public InsetMathNest {
|
|
|
|
public:
|
2019-09-15 21:56:17 +00:00
|
|
|
explicit InsetMathEnsureMath(Buffer * buf);
|
2008-09-04 22:24:07 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
mode_type currentMode() const override { return MATH_MODE; }
|
2008-09-04 22:24:07 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void metrics(MetricsInfo & mi, Dimension & dim) const override;
|
2008-09-04 22:24:07 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void draw(PainterInfo & pi, int x, int y) const override;
|
2008-09-04 22:24:07 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override;
|
2008-09-04 22:24:07 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void drawT(TextPainter & pi, int x, int y) const override;
|
2008-09-04 22:24:07 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void write(WriteStream & os) const override;
|
2008-09-04 22:24:07 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void mathmlize(MathStream &) const override;
|
2009-12-26 15:01:03 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void htmlize(HtmlStream &) const override;
|
2011-04-01 21:18:37 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void infoize(odocstream & os) const override;
|
2009-07-16 19:00:24 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void validate(LaTeXFeatures & features) const override;
|
2011-04-01 22:34:40 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
InsetCode lyxCode() const override { return MATH_ENSUREMATH_CODE; }
|
2008-09-04 22:24:07 +00:00
|
|
|
private:
|
2020-10-01 07:42:11 +00:00
|
|
|
Inset * clone() const override;
|
2008-09-04 22:24:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
|
|
#endif
|