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"
20 #include "outputparams.h"
22 #include "frontends/Painter.h"
28 void InsetLine::read(Buffer const &, LyXLex &)
34 void InsetLine::write(Buffer const &, ostream & os) const
36 os << "\n\\lyxline\n";
40 void InsetLine::metrics(MetricsInfo & mi, Dimension & dim) const
44 dim.wid = mi.base.textwidth;
49 void InsetLine::draw(PainterInfo & pi, int x, int y) const
51 pi.pain.line(x, y, x + dim_.wid, y, LColor::topline, Painter::line_solid,
56 int InsetLine::latex(Buffer const &, ostream & os,
57 OutputParams const & runparams) const
59 os << "\\lyxline{\\" << runparams.local_font->latexSize() << '}';
64 int InsetLine::plaintext(Buffer const &, ostream & os,
65 OutputParams const &) const
67 os << "-------------------------------------------";
72 int InsetLine::linuxdoc(Buffer const &, std::ostream & os,
73 OutputParams const &) const
80 int InsetLine::docbook(Buffer const &, std::ostream & os,
81 OutputParams const &) const
88 void InsetLine::validate(LaTeXFeatures & features) const
90 features.require("lyxline");