]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetquotes.h
* src/LyXAction.C: mark goto-clear-bookmark as working without buffer
[lyx.git] / src / insets / insetquotes.h
index b0cb73ca94dde3616bf6487eb814e96aa7b8d7d6..cbd2f5dcbfcdff84687a51709ca9e19eb23e4f85 100644 (file)
@@ -6,7 +6,7 @@
  *
  * \author Jean-Marc Lasgouttes
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #ifndef INSET_QUOTES_H
 
 #include "inset.h"
 
+#include "support/types.h"
+
+
+namespace lyx {
+
 class BufferParams;
 class Language;
-
-struct LaTeXFeatures;
+class LaTeXFeatures;
 
 
 /** Quotes.
   Used for the various quotes. German, English, French, all either
   double or single **/
-class InsetQuotes : public Inset {
+class InsetQuotes : public InsetOld {
 public:
        ///
        enum quote_language {
@@ -64,13 +68,13 @@ public:
          \end{itemize}
          */
        explicit
-       InsetQuotes(string const & str = "eld");
+       InsetQuotes(std::string const & str = "eld");
        /// Create the right quote inset after character c
-       InsetQuotes(char c, BufferParams const & params);
-       ///
-       Inset * clone() const;
+       InsetQuotes(char_type c, BufferParams const & params);
+       /// Direct access to inner/outer quotation marks
+       InsetQuotes(char_type c, quote_language l, quote_times t);
        ///
-       void metrics(MetricsInfo &, Dimension &) const;
+       bool metrics(MetricsInfo &, Dimension &) const;
        ///
        void draw(PainterInfo & pi, int x, int y) const;
 #if 0
@@ -78,26 +82,29 @@ public:
        LyXFont const convertFont(LyXFont const & font) const;
 #endif
        ///
-       void write(Buffer const *, std::ostream &) const;
-       ///
-       void read(Buffer const *, LyXLex & lex);
+       void write(Buffer const &, std::ostream &) const;
        ///
-       int latex(Buffer const *, std::ostream &,
-                 LatexRunParams const &) const;
+       void read(Buffer const &, LyXLex & lex);
        ///
-       int ascii(Buffer const *, std::ostream &, int linelen) const;
+       int latex(Buffer const &, odocstream &, OutputParams const &) const;
        ///
-       int linuxdoc(Buffer const *, std::ostream &) const;
+       int plaintext(Buffer const &, odocstream &, OutputParams const &) const;
        ///
-       int docbook(Buffer const *, std::ostream &, bool mixcont) const;
+       int docbook(Buffer const &, odocstream &, OutputParams const &) const;
+
+       /// the string that is passed to the TOC
+       virtual void textString(Buffer const &, odocstream &) const;
+
        ///
        void validate(LaTeXFeatures &) const;
        ///
-       Inset::Code lyxCode() const;
-       // should this inset be handled like a normal charater
+       InsetBase::Code lyxCode() const;
+       // should this inset be handled like a normal character
        bool isChar() const { return true; }
 
 private:
+       virtual std::auto_ptr<InsetBase> doClone() const;
+
        ///
        quote_language language_;
        ///
@@ -109,9 +116,14 @@ private:
            side and the multiplicity of the quote.
         */
        InsetQuotes(quote_language l, quote_side s, quote_times t);
+       /// Decide whether we need left or right quotation marks
+       void getPosition(char_type c);
        ///
-       void parseString(string const &);
+       void parseString(std::string const &);
        ///
-       string const dispString(Language const *) const;
+       lyx::docstring const dispString(Language const *) const;
 };
+
+} // namespace lyx
+
 #endif