2001-02-13 13:28:32 +00:00
|
|
|
// -*- C++ -*-
|
2001-07-27 10:08:04 +00:00
|
|
|
#ifndef MATH_SYMBOLINSET_H
|
|
|
|
#define MATH_SYMBOLINSET_H
|
2001-02-13 13:28:32 +00:00
|
|
|
|
2003-05-28 13:22:36 +00:00
|
|
|
#include "math_inset.h"
|
2001-02-13 13:28:32 +00:00
|
|
|
|
2001-07-26 14:37:09 +00:00
|
|
|
struct latexkeys;
|
|
|
|
|
2003-05-28 13:22:36 +00:00
|
|
|
|
2001-08-06 17:20:26 +00:00
|
|
|
// "normal" symbols that don't take limits and don't grow in displayed
|
|
|
|
// formulae
|
|
|
|
|
2003-05-28 13:22:36 +00:00
|
|
|
class MathSymbolInset : public MathInset {
|
2001-02-13 13:28:32 +00:00
|
|
|
public:
|
|
|
|
///
|
2003-06-28 01:23:11 +00:00
|
|
|
explicit MathSymbolInset(latexkeys const * l);
|
2001-02-13 13:28:32 +00:00
|
|
|
///
|
2003-06-28 01:23:11 +00:00
|
|
|
explicit MathSymbolInset(char const * name);
|
2001-11-08 12:06:56 +00:00
|
|
|
///
|
2003-06-28 01:23:11 +00:00
|
|
|
explicit MathSymbolInset(string const & name);
|
2001-12-05 08:04:20 +00:00
|
|
|
///
|
2003-06-16 11:49:38 +00:00
|
|
|
InsetBase * clone() const;
|
2001-02-13 13:28:32 +00:00
|
|
|
///
|
2003-06-02 10:03:27 +00:00
|
|
|
void metrics(MetricsInfo & mi, Dimension & dim) const;
|
2001-06-27 14:10:35 +00:00
|
|
|
///
|
2003-03-21 14:20:48 +00:00
|
|
|
void draw(PainterInfo &, int x, int y) const;
|
2001-08-09 08:53:16 +00:00
|
|
|
///
|
|
|
|
bool isRelOp() const;
|
2001-11-27 13:57:49 +00:00
|
|
|
/// do we take scripts?
|
2001-08-30 22:42:26 +00:00
|
|
|
bool isScriptable() const;
|
2001-11-27 13:57:49 +00:00
|
|
|
/// do we take \limits or \nolimits?
|
2001-09-11 10:58:17 +00:00
|
|
|
bool takesLimits() const;
|
2001-11-27 13:57:49 +00:00
|
|
|
/// identifies SymbolInset as such
|
|
|
|
MathSymbolInset const * asSymbolInset() const { return this; }
|
|
|
|
/// the LaTeX name of the symbol (without the backslash)
|
2001-11-16 12:00:27 +00:00
|
|
|
string name() const;
|
|
|
|
///
|
2002-08-09 10:22:35 +00:00
|
|
|
bool match(MathAtom const &) const;
|
2002-01-17 08:07:06 +00:00
|
|
|
/// request "external features"
|
|
|
|
void validate(LaTeXFeatures & features) const;
|
2001-08-03 17:55:10 +00:00
|
|
|
|
2001-11-09 14:23:44 +00:00
|
|
|
///
|
|
|
|
void normalize(NormalStream &) const;
|
2001-11-07 08:51:35 +00:00
|
|
|
///
|
2003-02-14 14:30:09 +00:00
|
|
|
void maple(MapleStream &) const;
|
2001-11-07 08:51:35 +00:00
|
|
|
///
|
2003-02-14 14:30:09 +00:00
|
|
|
void maxima(MaximaStream &) const;
|
2002-10-28 17:15:19 +00:00
|
|
|
///
|
2003-02-14 14:30:09 +00:00
|
|
|
void mathematica(MathematicaStream &) const;
|
2002-07-01 11:17:14 +00:00
|
|
|
///
|
2001-11-07 17:30:26 +00:00
|
|
|
void mathmlize(MathMLStream &) const;
|
2001-11-07 08:51:35 +00:00
|
|
|
///
|
2003-02-14 14:30:09 +00:00
|
|
|
void octave(OctaveStream &) const;
|
2001-11-09 14:23:44 +00:00
|
|
|
///
|
|
|
|
void write(WriteStream & os) const;
|
2002-01-16 14:24:38 +00:00
|
|
|
///
|
2003-01-07 11:24:43 +00:00
|
|
|
void infoize2(std::ostream & os) const;
|
2001-11-16 12:00:27 +00:00
|
|
|
|
2001-06-27 14:10:35 +00:00
|
|
|
private:
|
2001-02-13 13:28:32 +00:00
|
|
|
///
|
2001-07-26 14:37:09 +00:00
|
|
|
latexkeys const * sym_;
|
2001-08-30 22:42:26 +00:00
|
|
|
///
|
|
|
|
mutable int h_;
|
2001-10-22 15:37:49 +00:00
|
|
|
///
|
2002-05-30 07:09:54 +00:00
|
|
|
mutable bool scriptable_;
|
2001-02-13 13:28:32 +00:00
|
|
|
};
|
|
|
|
#endif
|