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
17 #include "support/docstring.h"
23 Used for the various quotes. German, English, French, all either
25 class InsetQuotes : public Inset
58 /** The constructor works like this:
60 \item fls <- french single quote left
61 \item grd <- german double quote right
65 explicit InsetQuotes(Buffer * buf, std::string const & str = "eld");
66 /// Create the right quote inset after character c
67 InsetQuotes(Buffer * buffer, char_type c);
68 /// Direct access to inner/outer quotation marks
69 InsetQuotes(Buffer * buf, char_type c, QuoteTimes t);
71 docstring name() const;
73 void metrics(MetricsInfo &, Dimension &) const;
75 void draw(PainterInfo & pi, int x, int y) const;
77 void write(std::ostream &) const;
79 void read(Lexer & lex);
81 int latex(odocstream &, OutputParams const &) const;
83 int plaintext(odocstream &, OutputParams const &) const;
85 int docbook(odocstream &, OutputParams const &) const;
87 docstring xhtml(XHTMLStream &, OutputParams const &) const;
89 /// the string that is passed to the TOC
90 void tocString(odocstream &) const;
93 void validate(LaTeXFeatures &) const;
95 InsetCode lyxCode() const { return QUOTE_CODE; }
96 /// should this inset be handled like a normal character
97 bool isChar() const { return true; }
101 Inset * clone() const { return new InsetQuotes(*this); }
103 /// Decide whether we need left or right quotation marks
104 void setSide(char_type c);
106 void parseString(std::string const &);
108 docstring displayString() const;
111 QuoteLanguage language_;