]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathUnknown.h
Fix formatFPnumber with negative doubles.
[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 /// LaTeX names for objects that we really don't know
21 class InsetMathUnknown : public InsetMath {
22 public:
23         ///
24         explicit InsetMathUnknown(docstring const & name,
25                 docstring const & selection = empty_docstring(),
26                 bool final = true, bool black = false);
27         ///
28         void metrics(MetricsInfo & mi, Dimension & dim) const;
29         ///
30         void draw(PainterInfo & pi, int x, int y) const;
31         ///
32         void setName(docstring const & name);
33         ///
34         docstring name() const;
35
36         ///
37         docstring const & selection() const { return selection_; }
38         
39         /// identifies UnknownInsets
40         InsetMathUnknown const * asUnknownInset() const { return this; }
41         /// identifies UnknownInsets
42         InsetMathUnknown * asUnknownInset() { return this; }
43
44         ///
45         void normalize(NormalStream &) const;
46         ///
47         void maple(MapleStream &) const;
48         ///
49         void mathematica(MathematicaStream &) const;
50         ///
51         void mathmlize(MathStream &) const;
52         ///
53         void htmlize(HtmlStream &) const;
54         ///
55         void octave(OctaveStream &) const;
56         ///
57         void finalize();
58         ///
59         bool final() const;
60         ///
61         int kerning(BufferView const *) const { return kerning_; }
62         ///
63         InsetCode lyxCode() const { return MATH_UNKNOWN_CODE; }
64
65 private:
66         ///
67         Inset * clone() const { return new InsetMathUnknown(*this); }
68
69         ///
70         docstring name_;
71         /// are we finished creating the name?
72         bool final_;
73         ///
74         bool black_;
75         ///
76         mutable int kerning_;
77         /// the selection which was replaced by this
78         docstring selection_;
79 };
80
81 } // namespace lyx
82
83 #endif