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"
25 class InsetLine : public InsetCommand
28 InsetLine(Buffer * buf, InsetCommandParams const &);
30 /// InsetCommand inherited methods.
32 docstring screenLabel() const;
34 static ParamInfo const & findInfo(std::string const &);
36 static std::string defaultCommand() { return "rule"; };
38 static bool isCompatibleCommand(std::string const & s)
39 { return s == "rule"; }
44 /// Inset inherited methods.
46 InsetCode lyxCode() const { return LINE_CODE; }
48 Dimension const dimension(BufferView const &) const;
50 int docbook(odocstream &, OutputParams const &) const;
51 /// Does nothing at the moment.
52 docstring xhtml(XHTMLStream &, OutputParams const &) const;
54 bool hasSettings() const { return true; }
56 void metrics(MetricsInfo &, Dimension &) const;
58 void draw(PainterInfo & pi, int x, int y) const;
60 int latex(odocstream &, OutputParams const &) const;
62 int plaintext(odocstream &, OutputParams const &) const;
64 void doDispatch(Cursor & cur, FuncRequest & cmd);
66 bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
68 Inset * clone() const { return new InsetLine(*this); }
71 /// cached line height and offset.
72 /// These value are independent of the BufferView size and thus
73 /// can be shared between views.
83 #endif // INSET_NEWLINE_H