4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
12 #ifndef INSET_NEWLINE_H
13 #define INSET_NEWLINE_H
20 class InsetNewlineParams
23 /// The different kinds of spaces we support
31 InsetNewlineParams() : kind(NEWLINE) {}
33 void write(std::ostream & os) const;
35 void read(Lexer & lex);
41 class InsetNewline : public Inset
47 InsetNewline(InsetNewlineParams par) { params_.kind = par.kind; }
49 static void string2params(std::string const &, InsetNewlineParams &);
51 static std::string params2string(InsetNewlineParams const &);
54 InsetNewlineParams params() const { return params_; }
56 InsetCode lyxCode() const { return NEWLINE_CODE; }
58 void metrics(MetricsInfo &, Dimension &) const;
60 void draw(PainterInfo & pi, int x, int y) const;
62 int latex(odocstream &, OutputParams const &) const;
64 int plaintext(odocstream &, OutputParams const &) const;
66 int docbook(odocstream &, OutputParams const &) const;
68 void read(Lexer & lex);
70 void write(std::ostream & os) const;
71 /// is this equivalent to a space (which is BTW different from
72 /// a line separator)?
73 bool isSpace() const { return true; }
75 ColorCode ColorName() const;
77 docstring contextMenu(BufferView const & bv, int x, int y) const;
79 Inset * clone() const { return new InsetNewline(*this); }
81 void doDispatch(Cursor & cur, FuncRequest & cmd);
83 bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
86 InsetNewlineParams params_;
92 #endif // INSET_NEWLINE_H