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
25 Used for the various quotes. German, English, French, all either
27 class InsetQuotes : public InsetOld {
59 /** The constructor works like this:
61 \item fls <- french single quote left
62 \item grd <- german double quote right
67 InsetQuotes(std::string const & str = "eld");
68 /// Create the right quote inset after character c
69 InsetQuotes(char c, BufferParams const & params);
70 /// Direct access to inner/outer quotation marks
71 InsetQuotes(char c, quote_language l, quote_times t);
73 void metrics(MetricsInfo &, Dimension &) const;
75 void draw(PainterInfo & pi, int x, int y) const;
78 LyXFont const convertFont(LyXFont const & font) const;
81 void write(Buffer const &, std::ostream &) const;
83 void read(Buffer const &, LyXLex & lex);
85 int latex(Buffer const &, std::ostream &,
86 OutputParams const &) const;
88 int plaintext(Buffer const &, std::ostream &,
89 OutputParams const &) const;
91 int linuxdoc(Buffer const &, std::ostream &,
92 OutputParams const &) const;
94 int docbook(Buffer const &, std::ostream &,
95 OutputParams const &) const;
97 void validate(LaTeXFeatures &) const;
99 InsetBase::Code lyxCode() const;
100 // should this inset be handled like a normal character
101 bool isChar() const { return true; }
104 virtual std::auto_ptr<InsetBase> doClone() const;
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 c);
120 void parseString(std::string const &);
122 std::string const dispString(Language const *) const;