]> git.lyx.org Git - lyx.git/blob - src/insets/insetnewline.h
Enable convertDefault.sh to run even if its executable bit is not set.
[lyx.git] / src / insets / insetnewline.h
1 // -*- C++ -*-
2 /**
3  * \file insetnewline.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef INSET_NEWLINE_H
13 #define INSET_NEWLINE_H
14
15
16 #include "inset.h"
17
18 class InsetNewline : public InsetOld {
19 public:
20
21         InsetNewline() {}
22
23         virtual std::auto_ptr<InsetBase> clone() const {
24                 return std::auto_ptr<InsetBase>(new InsetNewline);
25         }
26
27         InsetOld::Code lyxCode() const { return InsetOld::NEWLINE_CODE; }
28
29         void metrics(MetricsInfo &, Dimension &) const;
30
31         virtual void draw(PainterInfo & pi, int x, int y) const;
32
33         virtual int latex(Buffer const &, std::ostream &,
34                           LatexRunParams const &) const;
35
36         virtual int ascii(Buffer const &, std::ostream &, int linelen) const;
37
38         virtual int linuxdoc(Buffer const &, std::ostream &) const;
39
40         virtual int docbook(Buffer const &, std::ostream &, bool) const;
41
42         virtual void read(Buffer const &, LyXLex & lex);
43
44         virtual void write(Buffer const & buf, std::ostream & os) const;
45         /// We don't need \begin_inset and \end_inset
46         virtual bool directWrite() const { return true; }
47 };
48
49 #endif // INSET_NEWLINE_H