4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Abdelrazak Younes
11 * Full author contact details are available in file CREDITS.
18 #include "InsetCommand.h"
23 class InsetLine : public InsetCommand
26 InsetLine(Buffer * buf, InsetCommandParams const &);
28 /// InsetCommand inherited methods.
30 docstring screenLabel() const override;
31 static ParamInfo const & findInfo(std::string const &);
32 static std::string defaultCommand() { return "rule"; }
33 static bool isCompatibleCommand(std::string const & s)
34 { return s == "rule"; }
39 /// Inset inherited methods.
41 InsetCode lyxCode() const override { return LINE_CODE; }
42 void docbook(XMLStream &, OutputParams const &) const override;
43 docstring xhtml(XMLStream &, OutputParams const &) const override;
44 bool hasSettings() const override { return true; }
45 void metrics(MetricsInfo &, Dimension &) const override;
46 void draw(PainterInfo & pi, int x, int y) const override;
47 void latex(otexstream &, OutputParams const &) const override;
48 int plaintext(odocstringstream & ods, OutputParams const & op,
49 size_t max_length = INT_MAX) const override;
50 void doDispatch(Cursor & cur, FuncRequest & cmd) override;
51 bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override;
52 Inset * clone() const override { return new InsetLine(*this); }
55 /// cached line height and offset.
56 /// These value are independent of the BufferView size and thus
57 /// can be shared between views.
67 #endif // INSET_NEWLINE_H