4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Jean-Marc Lasgouttes
9 * Full author contact details are available in file CREDITS.
12 #ifndef INSET_QUOTES_H
13 #define INSET_QUOTES_H
18 #include "support/types.h"
29 Used for the various quotes. German, English, French, all either
31 class InsetQuotes : public Inset {
63 /** The constructor works like this:
65 \item fls <- french single quote left
66 \item grd <- german double quote right
70 explicit InsetQuotes(std::string const & str = "eld");
71 /// Create the right quote inset after character c
72 InsetQuotes(Buffer const & buffer, char_type c);
73 /// Direct access to inner/outer quotation marks
74 InsetQuotes(char_type c, quote_language l, quote_times t);
76 docstring name() const;
78 void metrics(MetricsInfo &, Dimension &) const;
80 void draw(PainterInfo & pi, int x, int y) const;
82 void write(std::ostream &) const;
84 void read(Lexer & lex);
86 int latex(odocstream &, OutputParams const &) const;
88 int plaintext(odocstream &, OutputParams const &) const;
90 int docbook(odocstream &, OutputParams const &) const;
92 /// the string that is passed to the TOC
93 void textString(odocstream &) const;
96 void validate(LaTeXFeatures &) const;
98 InsetCode lyxCode() const { return QUOTE_CODE; }
99 /// should this inset be handled like a normal character
100 bool isChar() const { return true; }
104 Inset * clone() const { return new InsetQuotes(*this); }
107 quote_language language_;
113 /** The parameters of the constructor are the language, the
114 side and the multiplicity of the quote.
116 InsetQuotes(quote_language l, quote_side s, quote_times t);
117 /// Decide whether we need left or right quotation marks
118 void getPosition(char_type c);
120 void parseString(std::string const &);
122 docstring dispString() const;