X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetSpecialChar.h;h=a5761864d8ca1cce7d6461067312b98d7eb09574;hb=0c7bd9a57f2a308bb9659200eda3b7e45f8d5d3c;hp=967df46a9d0762c39bd81c393ce1e35aaea82f8d;hpb=c8d00ed1272cd489041bed2115081008b6a26489;p=lyx.git diff --git a/src/insets/InsetSpecialChar.h b/src/insets/InsetSpecialChar.h index 967df46a9d..a5761864d8 100644 --- a/src/insets/InsetSpecialChar.h +++ b/src/insets/InsetSpecialChar.h @@ -6,7 +6,7 @@ * * \author Asger Alstrup Nielsen * \author Jean-Marc Lasgouttes - * \author Lars Gullik Bjønnes + * \author Lars Gullik Bjønnes * * Full author contact details are available in file CREDITS. */ @@ -23,7 +23,7 @@ namespace lyx { class LaTeXFeatures; /// Used to insert special chars -class InsetSpecialChar : public InsetOld { +class InsetSpecialChar : public Inset { public: /// The different kinds of special chars we support @@ -38,50 +38,62 @@ public: END_OF_SENTENCE, /// Menu separator MENU_SEPARATOR, + /// breakable slash + SLASH, + /// protected dash + NOBREAKDASH, + /// LyX logo + PHRASE_LYX, + /// TeX logo + PHRASE_TEX, + /// LaTeX2e logo + PHRASE_LATEX2E, + /// LaTeX logo + PHRASE_LATEX }; /// - InsetSpecialChar() {} + InsetSpecialChar() : Inset(0), kind_(HYPHENATION) {} /// - explicit - InsetSpecialChar(Kind k); + explicit InsetSpecialChar(Kind k); /// Kind kind() const; /// - bool metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const; /// void draw(PainterInfo & pi, int x, int y) const; /// - void write(Buffer const &, std::ostream &) const; + void write(std::ostream &) const; /// Will not be used when lyxf3 - void read(Buffer const &, LyXLex & lex); + void read(Lexer & lex); /// - int latex(Buffer const &, odocstream &, - OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const; /// - int plaintext(Buffer const &, odocstream &, - OutputParams const &) const; + int plaintext(odocstringstream & ods, OutputParams const & op, + size_t max_length = INT_MAX) const; /// - int docbook(Buffer const &, odocstream &, - OutputParams const &) const; - /// the string that is passed to the TOC - virtual int textString(Buffer const &, odocstream &, - OutputParams const &) const; + int docbook(odocstream &, OutputParams const &) const; /// - InsetBase::Code lyxCode() const { return InsetBase::SPECIALCHAR_CODE; } + docstring xhtml(XHTMLStream &, OutputParams const &) const; + /// + void toString(odocstream &) const; + /// + void forOutliner(docstring &, size_t const, bool const) const; + /// + InsetCode lyxCode() const { return SPECIALCHAR_CODE; } /// We don't need \begin_inset and \end_inset bool directWrite() const { return true; } /// void validate(LaTeXFeatures &) const; - // should this inset be handled like a normal charater - bool isChar() const; + /// should this inset be handled like a normal character? + bool isChar() const { return true; } /// is this equivalent to a letter? bool isLetter() const; - // should we break lines after this inset? + /// should we break lines after this inset? bool isLineSeparator() const; private: - virtual std::auto_ptr doClone() const; + Inset * clone() const { return new InsetSpecialChar(*this); } /// And which kind is this? Kind kind_;