2001-06-25 00:06:33 +00:00
|
|
|
// -*- C++ -*-
|
2003-08-19 13:00:56 +00:00
|
|
|
/**
|
2006-09-17 09:14:18 +00:00
|
|
|
* \file InsetMathSize.h
|
2003-08-19 13:00:56 +00:00
|
|
|
* 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
|
2003-08-19 13:00:56 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
#ifndef MATHSIZEINSET_H
|
|
|
|
#define MATHSIZEINSET_H
|
|
|
|
|
2020-12-02 20:34:28 +00:00
|
|
|
#include "FontEnums.h"
|
2006-09-17 09:14:18 +00:00
|
|
|
#include "InsetMathNest.h"
|
2001-06-25 00:06:33 +00:00
|
|
|
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
namespace lyx {
|
|
|
|
|
|
|
|
|
2001-08-10 13:50:42 +00:00
|
|
|
class latexkeys;
|
2020-10-14 12:58:18 +00:00
|
|
|
class MetricsInfo;
|
2001-08-10 13:50:42 +00:00
|
|
|
|
2003-08-19 13:00:56 +00:00
|
|
|
/// An inset for \scriptsize etc.
|
2006-09-16 18:11:38 +00:00
|
|
|
class InsetMathSize : public InsetMathNest {
|
2001-06-25 00:06:33 +00:00
|
|
|
public:
|
|
|
|
///
|
2009-11-08 11:45:46 +00:00
|
|
|
explicit InsetMathSize(Buffer * buf, latexkeys const * l);
|
2002-07-10 07:15:36 +00:00
|
|
|
/// we write extra braces in any case...
|
2020-10-01 07:42:11 +00:00
|
|
|
bool extraBraces() const override { return true; }
|
2001-06-25 00:06:33 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void metrics(MetricsInfo & mi, Dimension & dim) const override;
|
2001-06-25 00:06:33 +00:00
|
|
|
///
|
2020-10-03 12:42:14 +00:00
|
|
|
void draw(PainterInfo &, int x, int y) const override;
|
2002-02-14 13:25:26 +00:00
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void write(WriteStream & os) const override;
|
2001-06-25 00:06:33 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void normalize(NormalStream &) const override;
|
2002-07-10 06:52:05 +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 mathmlize(MathStream &) const override;
|
2010-01-21 20:48:12 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void htmlize(HtmlStream &) const override;
|
2010-03-31 20:37:23 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void validate(LaTeXFeatures &) const override;
|
2010-03-31 20:37:23 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
InsetCode lyxCode() const override { return MATH_SIZE_CODE; }
|
2009-07-16 19:00:24 +00:00
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
private:
|
2020-10-01 07:42:11 +00:00
|
|
|
Inset * clone() const override;
|
2002-03-21 17:42:56 +00:00
|
|
|
///
|
2001-08-10 13:50:42 +00:00
|
|
|
latexkeys const * key_;
|
2002-07-17 15:57:03 +00:00
|
|
|
///
|
2016-11-19 20:25:34 +00:00
|
|
|
MathStyle const style_;
|
2001-06-25 00:06:33 +00:00
|
|
|
};
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
} // namespace lyx
|
2001-06-25 00:06:33 +00:00
|
|
|
#endif
|