2001-02-28 11:56:36 +00:00
|
|
|
// -*- C++ -*-
|
2001-02-13 13:28:32 +00:00
|
|
|
#ifndef MATH_FUNCINSET_H
|
|
|
|
#define MATH_FUNCINSET_H
|
|
|
|
|
2001-08-03 17:55:10 +00:00
|
|
|
#include "math_diminset.h"
|
2001-02-13 19:10:18 +00:00
|
|
|
#include "math_defs.h"
|
2001-02-13 13:28:32 +00:00
|
|
|
|
2001-02-28 11:56:36 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2001-02-13 13:28:32 +00:00
|
|
|
/**
|
|
|
|
Functions or LaTeX names for objects that I don't know how to draw.
|
|
|
|
*/
|
2001-08-03 17:55:10 +00:00
|
|
|
class MathFuncInset : public MathDimInset {
|
2001-02-13 13:28:32 +00:00
|
|
|
public:
|
|
|
|
///
|
2001-07-26 13:52:47 +00:00
|
|
|
explicit MathFuncInset(string const & nm);
|
2001-02-13 13:28:32 +00:00
|
|
|
///
|
2001-08-03 17:55:10 +00:00
|
|
|
MathInset * clone() const;
|
|
|
|
///
|
2001-10-19 11:25:48 +00:00
|
|
|
void metrics(MathMetricsInfo const & st) const;
|
2001-02-13 13:28:32 +00:00
|
|
|
///
|
2001-08-06 17:20:26 +00:00
|
|
|
void draw(Painter &, int x, int y) const;
|
2001-02-13 13:28:32 +00:00
|
|
|
///
|
2001-08-08 17:26:30 +00:00
|
|
|
string const & name() const;
|
2001-11-09 10:44:24 +00:00
|
|
|
/// identifies FuncInsets
|
|
|
|
MathFuncInset * asFuncInset() { return this; }
|
2001-08-08 17:26:30 +00:00
|
|
|
///
|
2001-11-07 17:36:03 +00:00
|
|
|
void setName(string const &);
|
2001-11-16 12:00:27 +00:00
|
|
|
///
|
|
|
|
bool match(MathInset * p) const;
|
2001-11-09 10:44:24 +00:00
|
|
|
|
|
|
|
///
|
|
|
|
void normalize(NormalStream &) const;
|
2001-11-07 11:14:59 +00:00
|
|
|
///
|
2001-11-07 17:36:03 +00:00
|
|
|
void maplize(MapleStream &) const;
|
|
|
|
///
|
|
|
|
void mathmlize(MathMLStream &) const;
|
|
|
|
///
|
|
|
|
void octavize(OctaveStream &) const;
|
2001-11-09 10:44:24 +00:00
|
|
|
///
|
|
|
|
void write(WriteStream &) const;
|
2001-08-08 17:26:30 +00:00
|
|
|
private:
|
|
|
|
///
|
|
|
|
string name_;
|
2001-10-22 15:37:49 +00:00
|
|
|
///
|
|
|
|
mutable MathMetricsInfo mi_;
|
2001-02-13 13:28:32 +00:00
|
|
|
};
|
|
|
|
#endif
|