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) : Inset(0)
48 { params_.kind = par.kind; }
50 static void string2params(std::string const &, InsetNewlineParams &);
52 static std::string params2string(InsetNewlineParams const &);
55 InsetNewlineParams params() const { return params_; }
57 InsetCode lyxCode() const { return NEWLINE_CODE; }
59 void metrics(MetricsInfo &, Dimension &) const;
61 void draw(PainterInfo & pi, int x, int y) const;
63 int latex(otexstream &, OutputParams const &) const;
65 int plaintext(odocstream &, OutputParams const &) const;
67 int docbook(odocstream &, OutputParams const &) const;
69 docstring xhtml(XHTMLStream &, OutputParams const &) const;
71 void read(Lexer & lex);
73 void write(std::ostream & os) const;
74 /// is this equivalent to a space (which is BTW different from
75 /// a line separator)?
76 bool isSpace() const { return true; }
78 ColorCode ColorName() const;
80 docstring contextMenuName() const;
82 Inset * clone() const { return new InsetNewline(*this); }
84 void doDispatch(Cursor & cur, FuncRequest & cmd);
86 bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
89 InsetNewlineParams params_;
95 #endif // INSET_NEWLINE_H