X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetNewline.h;h=7e5ee37bbf8cfe88c46abf6bd45cbf8b69d5ce07;hb=c3a8b3a566e9e90f9ade72acbc723232d721d0b1;hp=a03da2d1970aa418f0532737ab675ba58d0e2dee;hpb=f7b1c86393d890d5d473279d88e26bb78f8c1275;p=lyx.git diff --git a/src/insets/InsetNewline.h b/src/insets/InsetNewline.h index a03da2d197..7e5ee37bbf 100644 --- a/src/insets/InsetNewline.h +++ b/src/insets/InsetNewline.h @@ -14,6 +14,7 @@ #include "Inset.h" +#include "support/gettext.h" namespace lyx { @@ -37,12 +38,21 @@ public: virtual void read(Buffer const &, Lexer & lex); - virtual void write(Buffer const & buf, std::ostream & os) const; + virtual void write(Buffer const &, std::ostream & os) const; /// We don't need \begin_inset and \end_inset virtual bool directWrite() const { return true; } /// is this equivalent to a space (which is BTW different from // a line separator)? bool isSpace() const; + + virtual docstring insetLabel() const { return docstring(); } + + virtual std::string getLyXName() const { return "\\newline"; } + + virtual std::string getCmdName() const { return "\\\\"; } + + virtual ColorCode ColorName() const { return Color_eolmarker; } + private: virtual Inset * clone() const { @@ -50,6 +60,25 @@ private: } }; +class InsetLinebreak : public InsetNewline { +public: + InsetLinebreak() {} + + docstring insetLabel() const { return _("line break"); } + + std::string getLyXName() const { return "\\linebreak"; } + + std::string getCmdName() const { return "\\linebreak{}"; } + + ColorCode ColorName() const { return Color_pagebreak; } + +private: + virtual Inset * clone() const + { + return new InsetLinebreak; + } +}; + } // namespace lyx