3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "insetline.h"
18 #include "metricsinfo.h"
19 #include "LaTeXFeatures.h"
21 #include "frontends/Painter.h"
27 void InsetLine::read(Buffer const &, LyXLex &)
33 void InsetLine::write(Buffer const &, ostream & os) const
35 os << "\n\\lyxline\n";
39 void InsetLine::metrics(MetricsInfo & mi, Dimension & dim) const
43 dim.wid = mi.base.textwidth;
48 void InsetLine::draw(PainterInfo & pi, int x, int y) const
50 pi.pain.line(x, y, x + dim_.wid, y, LColor::topline, Painter::line_solid,
55 int InsetLine::latex(Buffer const &, ostream & os,
56 OutputParams const & runparams) const
58 os << "\\lyxline{\\" << runparams.local_font->latexSize() << '}';
63 int InsetLine::plaintext(Buffer const &, ostream & os,
64 OutputParams const &) const
66 os << "-------------------------------------------";
71 int InsetLine::linuxdoc(Buffer const &, std::ostream & os,
72 OutputParams const &) const
79 int InsetLine::docbook(Buffer const &, std::ostream & os,
80 OutputParams const &) const
87 void InsetLine::validate(LaTeXFeatures & features) const
89 features.require("lyxline");