]> git.lyx.org Git - lyx.git/blob - src/insets/InsetLine.h
93518da85297ff1a651341a13ed7323a03ce8c30
[lyx.git] / src / insets / InsetLine.h
1 // -*- C++ -*-
2 /**
3  * \file InsetLine.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  * \author Uwe Stöhr
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef INSET_LINE_H
14 #define INSET_LINE_H
15
16
17 #include "InsetCommand.h"
18
19
20 namespace lyx {
21
22 class LaTeXFeatures;
23
24 class InsetLine : public InsetCommand {
25 public:
26         ///
27         InsetLine(Buffer * buf, InsetCommandParams const &);
28         ///
29         int docbook(odocstream &, OutputParams const &) const;
30         /// Does nothing at the moment.
31         docstring xhtml(XHTMLStream &, OutputParams const &) const;
32         ///
33         InsetCode lyxCode() const { return LINE_CODE; }
34         ///
35         bool hasSettings() const { return true; }
36         ///
37         docstring screenLabel() const;
38         ///
39         static ParamInfo const & findInfo(std::string const &);
40         ///
41         static std::string defaultCommand() { return "rule"; };
42         ///
43         static bool isCompatibleCommand(std::string const & s)
44                 { return s == "rule"; }
45         ///
46         Dimension const dimension(BufferView const &) const;
47
48 private:
49         ///
50         void metrics(MetricsInfo &, Dimension &) const;
51         ///
52         void draw(PainterInfo & pi, int x, int y) const;
53         ///
54         int latex(odocstream &, OutputParams const &) const;
55         ///
56         int plaintext(odocstream &, OutputParams const &) const;
57         ///
58         void doDispatch(Cursor & cur, FuncRequest & cmd);
59         ///
60         bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
61         ///
62         Inset * clone() const { return new InsetLine(*this); }
63         ///
64         mutable int height_;
65         mutable int offset_;
66 };
67
68
69 } // namespace lyx
70
71 #endif // INSET_NEWLINE_H