]> git.lyx.org Git - lyx.git/blob - src/insets/InsetVSpace.h
Do not check again and again for non existing files
[lyx.git] / src / insets / InsetVSpace.h
1 // -*- C++ -*-
2 /**
3  * \file InsetVSpace.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  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef INSET_VSPACE_H
13 #define INSET_VSPACE_H
14
15 #include "Inset.h"
16 #include "VSpace.h"
17
18
19 namespace lyx {
20
21 class InsetVSpace : public Inset
22 {
23 public:
24         ///
25         InsetVSpace() : Inset(0) {}
26         ///
27         InsetVSpace(VSpace const &);
28         /// How much?
29         VSpace const & space() const { return space_; }
30         ///
31         InsetCode lyxCode() const { return VSPACE_CODE; }
32         ///
33         bool hasSettings() const { return true; }
34         ///
35         bool clickable(BufferView const &, int, int) const { return true; }
36         ///
37         std::string contextMenuName() const;
38         ///
39         static void string2params(std::string const &, VSpace &);
40         ///
41         static std::string params2string(VSpace const &);
42 private:
43         ///
44         void metrics(MetricsInfo & mi, Dimension & dim) const;
45         ///
46         void draw(PainterInfo & pi, int x, int y) const;
47         ///
48         void latex(otexstream &, OutputParams const &) const;
49         ///
50         int plaintext(odocstringstream & ods, OutputParams const & op,
51                       size_t max_length = INT_MAX) const;
52         ///
53         int docbook(odocstream &, OutputParams const &) const;
54         /// Note that this returns the inset rather than writing it,
55         /// so it will actually be written after the present paragraph.
56         /// The normal case is that this inset will be on a line by
57         /// itself, and in that case the present paragraph will not,
58         /// in fact, appear at all.
59         docstring xhtml(XHTMLStream &, OutputParams const &) const;
60         ///
61         void read(Lexer & lex);
62         ///
63         void write(std::ostream & os) const;
64         ///
65         DisplayType display() const { return AlignCenter; }
66         ///
67         void doDispatch(Cursor & cur, FuncRequest & cmd);
68         ///
69         bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
70         ///
71         Inset * clone() const { return new InsetVSpace(*this); }
72         ///
73         docstring const label() const;
74
75         ///
76         VSpace space_;
77 };
78
79
80 } // namespace lyx
81
82 #endif