X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetLine.h;h=f518297445dd1b70d0145246c1a215fe1dc15b24;hb=50060053e36b3e9dfe03bc33ed3abac1eacc54b0;hp=93518da85297ff1a651341a13ed7323a03ce8c30;hpb=08453ceba449ca2de26a5adcf79d38af034bb076;p=lyx.git diff --git a/src/insets/InsetLine.h b/src/insets/InsetLine.h index 93518da852..f518297445 100644 --- a/src/insets/InsetLine.h +++ b/src/insets/InsetLine.h @@ -4,6 +4,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * + * \author Abdelrazak Younes * \author André Pönitz * \author Uwe Stöhr * @@ -21,48 +22,46 @@ namespace lyx { class LaTeXFeatures; -class InsetLine : public InsetCommand { +class InsetLine : public InsetCommand +{ public: - /// InsetLine(Buffer * buf, InsetCommandParams const &); - /// - int docbook(odocstream &, OutputParams const &) const; - /// Does nothing at the moment. - docstring xhtml(XHTMLStream &, OutputParams const &) const; - /// - InsetCode lyxCode() const { return LINE_CODE; } - /// - bool hasSettings() const { return true; } - /// + + /// InsetCommand inherited methods. + //@{ docstring screenLabel() const; - /// static ParamInfo const & findInfo(std::string const &); - /// - static std::string defaultCommand() { return "rule"; }; - /// + static std::string defaultCommand() { return "rule"; } static bool isCompatibleCommand(std::string const & s) - { return s == "rule"; } - /// - Dimension const dimension(BufferView const &) const; + { return s == "rule"; } + //@} private: - /// + + /// Inset inherited methods. + //@{ + InsetCode lyxCode() const { return LINE_CODE; } + int docbook(odocstream &, OutputParams const &) const; + /// Does nothing at the moment. + docstring xhtml(XHTMLStream &, OutputParams const &) const; + bool hasSettings() const { return true; } void metrics(MetricsInfo &, Dimension &) const; - /// void draw(PainterInfo & pi, int x, int y) const; - /// - int latex(odocstream &, OutputParams const &) const; - /// - int plaintext(odocstream &, OutputParams const &) const; - /// + void latex(otexstream &, OutputParams const &) const; + int plaintext(odocstringstream & ods, OutputParams const & op, + size_t max_length = INT_MAX) const; void doDispatch(Cursor & cur, FuncRequest & cmd); - /// bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const; - /// Inset * clone() const { return new InsetLine(*this); } - /// + //@} + + /// cached line height and offset. + /// These value are independent of the BufferView size and thus + /// can be shared between views. + //@{ mutable int height_; mutable int offset_; + //@} };