X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetquotes.h;h=c88dfeb8bfb0ed703617de97e493ca94e88a8106;hb=10ba1b8918e7da14334bb5573ce2a707671c8b51;hp=5d5a10463ad6a22098cf8c1149a4b25c194fc6c0;hpb=3b9620ae6ddbda098402d3169b465f529455217e;p=lyx.git diff --git a/src/insets/insetquotes.h b/src/insets/insetquotes.h index 5d5a10463a..c88dfeb8bf 100644 --- a/src/insets/insetquotes.h +++ b/src/insets/insetquotes.h @@ -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 @@ -22,10 +22,9 @@ struct 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 { @@ -65,45 +64,45 @@ 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); - - /// - int ascent(BufferView *, LyXFont const &) const; + /// Direct access to inner/outer quotation marks + InsetQuotes(char c, quote_language l, quote_times t); /// - int descent(BufferView *, LyXFont const &) const; + void metrics(MetricsInfo &, Dimension &) const; /// - int width(BufferView *, LyXFont const &) const; - /// - void draw(BufferView *, LyXFont const &, int, float &) const; + void draw(PainterInfo & pi, int x, int y) const; #if 0 /// LyXFont const convertFont(LyXFont const & font) const; #endif /// - void write(Buffer const *, std::ostream &) const; + void write(Buffer const &, std::ostream &) const; /// - void read(Buffer const *, LyXLex & lex); + void read(Buffer const &, LyXLex & lex); /// - int latex(Buffer const *, std::ostream &, - bool fragile, bool free_spc) const; + int latex(Buffer const &, std::ostream &, + OutputParams const &) const; /// - int ascii(Buffer const *, std::ostream &, int linelen) const; + int plaintext(Buffer const &, std::ostream &, + OutputParams const &) const; /// - int linuxdoc(Buffer const *, std::ostream &) const; + int linuxdoc(Buffer const &, std::ostream &, + OutputParams const &) const; /// - int docbook(Buffer const *, std::ostream &, bool mixcont) const; + int docbook(Buffer const &, std::ostream &, + OutputParams const &) const; /// void validate(LaTeXFeatures &) const; /// - virtual Inset * clone(Buffer const &, bool same_id = false) const; - /// - Inset::Code lyxCode() const; - // should this inset be handled like a normal charater + InsetOld::Code lyxCode() const; + // should this inset be handled like a normal character bool isChar() const { return true; } private: + virtual std::auto_ptr doClone() const; + /// quote_language language_; /// @@ -115,9 +114,11 @@ 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 c); /// - void parseString(string const &); + void parseString(std::string const &); /// - string const dispString(Language const *) const; + std::string const dispString(Language const *) const; }; #endif