]> git.lyx.org Git - lyx.git/blob - src/insets/insetline.h
Output docbook as utf8. Probably quite a bit more work needed, but then help form...
[lyx.git] / src / insets / insetline.h
1 // -*- C++ -*-
2 /**
3  * \file insetline.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 INSET_LINE_H
13 #define INSET_LINE_H
14
15
16 #include "inset.h"
17
18 class InsetLine : public InsetOld {
19 public:
20
21         InsetLine() {}
22
23         InsetBase::Code lyxCode() const { return InsetBase::LINE_CODE; }
24
25         void metrics(MetricsInfo &, Dimension &) const;
26
27         void draw(PainterInfo & pi, int x, int y) const;
28
29         int latex(Buffer const &, lyx::odocstream &,
30                           OutputParams const &) const;
31
32         int plaintext(Buffer const &, lyx::odocstream &,
33                   OutputParams const &) const;
34
35         int docbook(Buffer const &, lyx::odocstream &,
36                     OutputParams const &) const;
37
38         void read(Buffer const &, LyXLex & lex);
39
40         void write(Buffer const & buf, std::ostream & os) const;
41         /// We don't need \begin_inset and \end_inset
42         bool directWrite() const { return true; }
43
44         bool display() const { return true; }
45         ///
46         void validate(LaTeXFeatures & features) const;
47 private:
48         virtual std::auto_ptr<InsetBase> doClone() const
49         {
50                 return std::auto_ptr<InsetBase>(new InsetLine);
51         }
52 };
53
54 #endif // INSET_NEWLINE_H