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
|
|
|
|
|
2021-01-06 01:07:25 +00:00
|
|
|
#include "InsetMathGrid.h"
|
2008-09-04 22:24:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
|
|
|
|
|
|
|
/// Inset for ensuring math mode
|
2021-01-06 01:07:25 +00:00
|
|
|
class InsetMathEnsureMath : public InsetMathGrid {
|
2008-09-04 22:24:07 +00:00
|
|
|
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
|
|
|
///
|
2021-01-06 10:57:22 +00:00
|
|
|
void addRow(row_type) override {}
|
2021-01-06 01:07:25 +00:00
|
|
|
///
|
2021-01-06 10:57:22 +00:00
|
|
|
void delRow(row_type) override {}
|
2021-01-06 01:07:25 +00:00
|
|
|
///
|
2021-01-06 10:57:22 +00:00
|
|
|
void swapRow(row_type) override {}
|
2021-01-06 01:07:25 +00:00
|
|
|
///
|
2021-01-06 10:57:22 +00:00
|
|
|
void addCol(col_type) override {}
|
2021-01-06 01:07:25 +00:00
|
|
|
///
|
2021-01-06 10:57:22 +00:00
|
|
|
void delCol(col_type) override {}
|
2021-01-06 01:07:25 +00:00
|
|
|
///
|
2022-07-25 20:02:59 +00:00
|
|
|
void eol(TeXMathStream &, row_type, bool, bool, bool) const override {}
|
2021-01-06 01:07:25 +00:00
|
|
|
///
|
2021-01-06 10:57:22 +00:00
|
|
|
docstring eocString(col_type, col_type) const override
|
2021-01-06 01:07:25 +00:00
|
|
|
{ return docstring(); }
|
|
|
|
///
|
2020-12-26 19:04:36 +00:00
|
|
|
void write(TeXMathStream & os) const override;
|
2008-09-04 22:24:07 +00:00
|
|
|
///
|
2020-12-26 19:02:46 +00:00
|
|
|
void mathmlize(MathMLStream &) 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
|