]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathUnknown.h
Change the interface to a paragraph's layout. We still store a LayoutPtr, but now...
[lyx.git] / src / mathed / InsetMathUnknown.h
1 // -*- C++ -*-
2 /**
3  * \file InsetMathUnknown.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef MATH_UNKNOWNINSET_H
13 #define MATH_UNKNOWNINSET_H
14
15 #include "InsetMath.h"
16
17
18 namespace lyx {
19
20
21 /// LaTeX names for objects that we really don't know
22 class InsetMathUnknown : public InsetMath {
23 public:
24         ///
25         explicit InsetMathUnknown(docstring const & name,
26                 docstring const & selection = docstring(),
27                 bool final = true, bool black = false);
28         ///
29         void metrics(MetricsInfo & mi, Dimension & dim) const;
30         ///
31         void draw(PainterInfo & pi, int x, int y) const;
32         ///
33         void setName(docstring const & name);
34         ///
35         docstring name() const;
36
37         ///
38         docstring const & selection() const { return selection_; }
39         
40         /// identifies UnknownInsets
41         InsetMathUnknown const * asUnknownInset() const { return this; }
42         /// identifies UnknownInsets
43         InsetMathUnknown * asUnknownInset() { return this; }
44
45         ///
46         void normalize(NormalStream &) const;
47         ///
48         void maple(MapleStream &) const;
49         ///
50         void mathematica(MathematicaStream &) const;
51         ///
52         void mathmlize(MathStream &) const;
53         ///
54         void octave(OctaveStream &) const;
55         ///
56         void finalize();
57         ///
58         bool final() const;
59         ///
60         int kerning(BufferView const *) const { return kerning_; }
61
62 private:
63         virtual Inset * clone() const;
64         ///
65         docstring name_;
66         /// are we finished creating the name?
67         bool final_;
68         ///
69         bool black_;
70         ///
71         mutable int kerning_;
72         /// the selection which was replaced by this
73         docstring selection_;
74 };
75
76
77 } // namespace lyx
78 #endif