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"
27 using frontend::Painter;
33 void InsetLine::read(Buffer const &, LyXLex &)
39 void InsetLine::write(Buffer const &, ostream & os) const
41 os << "\n\\lyxline\n";
45 void InsetLine::metrics(MetricsInfo & mi, Dimension & dim) const
49 dim.wid = mi.base.textwidth;
54 void InsetLine::draw(PainterInfo & pi, int x, int y) const
56 pi.pain.line(x, y, x + dim_.wid, y, LColor::topline, Painter::line_solid,
61 int InsetLine::latex(Buffer const &, odocstream & os,
62 OutputParams const & runparams) const
65 << from_ascii(runparams.local_font->latexSize()) << '}';
70 int InsetLine::plaintext(Buffer const &, odocstream & os,
71 OutputParams const &) const
73 os << "-------------------------------------------";
78 int InsetLine::docbook(Buffer const &, odocstream & os,
79 OutputParams const &) const
86 void InsetLine::validate(LaTeXFeatures & features) const
88 features.require("lyxline");