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"
27 Used for the various quotes. German, English, French, all either
29 class InsetQuotes : public InsetOld {
61 /** The constructor works like this:
63 \item fls <- french single quote left
64 \item grd <- german double quote right
69 InsetQuotes(std::string const & str = "eld");
70 /// Create the right quote inset after character c
71 InsetQuotes(lyx::char_type c, BufferParams const & params);
72 /// Direct access to inner/outer quotation marks
73 InsetQuotes(lyx::char_type c, quote_language l, quote_times t);
75 void metrics(MetricsInfo &, Dimension &) const;
77 void draw(PainterInfo & pi, int x, int y) const;
80 LyXFont const convertFont(LyXFont const & font) const;
83 void write(Buffer const &, std::ostream &) const;
85 void read(Buffer const &, LyXLex & lex);
87 int latex(Buffer const &, std::ostream &,
88 OutputParams const &) const;
90 int plaintext(Buffer const &, std::ostream &,
91 OutputParams const &) const;
93 int docbook(Buffer const &, std::ostream &,
94 OutputParams const &) const;
96 /// the string that is passed to the TOC
97 virtual int textString(Buffer const &, std::ostream & os,
98 OutputParams const &) const;
101 void validate(LaTeXFeatures &) const;
103 InsetBase::Code lyxCode() const;
104 // should this inset be handled like a normal character
105 bool isChar() const { return true; }
108 virtual std::auto_ptr<InsetBase> doClone() const;
111 quote_language language_;
117 /** The parameters of the constructor are the language, the
118 side and the multiplicity of the quote.
120 InsetQuotes(quote_language l, quote_side s, quote_times t);
121 /// Decide whether we need left or right quotation marks
122 void getPosition(lyx::char_type c);
124 void parseString(std::string const &);
126 std::string const dispString(Language const *) const;