4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Asger Alstrup Nielsen
8 * \author Jean-Marc Lasgouttes
9 * \author Lars Gullik Bjønnes
10 * \author Jürgen Spitzmüller
12 * Full author contact details are available in file CREDITS.
26 /// Used to insert different kinds of spaces
27 class InsetSpace : public Inset {
30 /// The different kinds of spaces we support
32 /// Normal space ('\ ')
34 /// Protected (no break) space ('~')
42 /// \enspace (0.5em unbreakable)
44 /// \enspace (0.5em breakable)
46 /// Negative thin space ('\negthinspace')
59 void metrics(MetricsInfo &, Dimension &) const;
61 Dimension const dimension(BufferView const &) const { return dim_; };
63 void draw(PainterInfo & pi, int x, int y) const;
65 void write(Buffer const &, std::ostream &) const;
66 /// Will not be used when lyxf3
67 void read(Buffer const &, Lexer & lex);
69 int latex(Buffer const &, odocstream &,
70 OutputParams const &) const;
72 int plaintext(Buffer const &, odocstream &,
73 OutputParams const &) const;
75 int docbook(Buffer const &, odocstream &,
76 OutputParams const &) const;
77 /// the string that is passed to the TOC
78 virtual int textString(Buffer const &, odocstream &,
79 OutputParams const &) const;
81 Inset::Code lyxCode() const { return Inset::SPACE_CODE; }
82 /// We don't need \begin_inset and \end_inset
83 bool directWrite() const { return true; }
85 // should this inset be handled like a normal charater
87 /// is this equivalent to a letter?
88 bool isLetter() const;
89 /// is this equivalent to a space (which is BTW different from
93 virtual Inset * clone() const;
95 /// And which kind is this?
98 mutable Dimension dim_;
104 #endif // INSET_SPACE_H