]> git.lyx.org Git - lyx.git/blob - src/mathed/math_unknowninset.h
the clone auto_ptr patch
[lyx.git] / src / mathed / math_unknowninset.h
1 // -*- C++ -*-
2 #ifndef MATH_UNKNOWNINSET_H
3 #define MATH_UNKNOWNINSET_H
4
5 #include "math_diminset.h"
6
7 /**
8  Unknowntions or LaTeX names for objects that we really don't know
9  */
10 class MathUnknownInset : public MathDimInset {
11 public:
12         ///
13         explicit MathUnknownInset(string const & name,
14                 bool final = true, bool black = false);
15         ///
16         virtual std::auto_ptr<InsetBase> clone() const;
17         ///
18         void metrics(MetricsInfo & mi, Dimension & dim) const;
19         ///
20         void draw(PainterInfo & pi, int x, int y) const;
21         ///
22         void setName(string const & name);
23         ///
24         string name() const;
25         /// identifies UnknownInsets
26         MathUnknownInset const * asUnknownInset() const { return this; }
27         /// identifies UnknownInsets
28         MathUnknownInset * asUnknownInset() { return this; }
29         ///
30         bool match(MathAtom const & at) const;
31
32         ///
33         void normalize(NormalStream &) const;
34         ///
35         void maple(MapleStream &) const;
36         ///
37         void mathematica(MathematicaStream &) const;
38         ///
39         void mathmlize(MathMLStream &) const;
40         ///
41         void octave(OctaveStream &) const;
42         ///
43         void finalize();
44         ///
45         bool final() const;
46 private:
47         ///
48         string name_;
49         /// are we finished creating the name?
50         bool final_;
51         ///
52         bool black_;
53 };
54 #endif