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 InsetOld {
63 /** The constructor works like this:
65 \item fls <- french single quote left
66 \item grd <- german double quote right
71 InsetQuotes(std::string const & str = "eld");
72 /// Create the right quote inset after character c
73 InsetQuotes(char_type c, BufferParams const & params);
74 /// Direct access to inner/outer quotation marks
75 InsetQuotes(char_type c, quote_language l, quote_times t);
77 bool metrics(MetricsInfo &, Dimension &) const;
79 void draw(PainterInfo & pi, int x, int y) const;
82 LyXFont const convertFont(LyXFont const & font) const;
85 void write(Buffer const &, std::ostream &) const;
87 void read(Buffer const &, LyXLex & lex);
89 int latex(Buffer const &, odocstream &, OutputParams const &) const;
91 int plaintext(Buffer const &, odocstream &, OutputParams const &) const;
93 int docbook(Buffer const &, odocstream &, OutputParams const &) const;
95 /// the string that is passed to the TOC
96 virtual int textString(Buffer const &, odocstream &,
97 OutputParams const &) const;
100 void validate(LaTeXFeatures &) const;
102 InsetBase::Code lyxCode() const;
103 // should this inset be handled like a normal character
104 bool isChar() const { return true; }
107 virtual std::auto_ptr<InsetBase> doClone() const;
110 quote_language language_;
116 /** The parameters of the constructor are the language, the
117 side and the multiplicity of the quote.
119 InsetQuotes(quote_language l, quote_side s, quote_times t);
120 /// Decide whether we need left or right quotation marks
121 void getPosition(char_type c);
123 void parseString(std::string const &);
125 lyx::docstring const dispString(Language const *) const;