]> git.lyx.org Git - lyx.git/blob - src/insets/InsetVSpace.h
faf8095639bb3206b238b5162e0e03fceca1ea1e
[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
16 #include "Inset.h"
17 #include "VSpace.h"
18 #include "MailInset.h"
19
20
21 namespace lyx {
22
23 class InsetVSpace : public Inset {
24 public:
25         ///
26         InsetVSpace() {}
27         ///
28         InsetVSpace(VSpace const &);
29         ///
30         ~InsetVSpace();
31         ///
32         void metrics(MetricsInfo & mi, Dimension & dim) const;
33         ///
34         void draw(PainterInfo & pi, int x, int y) const;
35         ///
36         int latex(odocstream &, OutputParams const &) const;
37         ///
38         int plaintext(odocstream &, OutputParams const &) const;
39         ///
40         int docbook(odocstream &, OutputParams const &) const;
41         ///
42         void read(Lexer & lex);
43         ///
44         void write(std::ostream & os) const;
45         ///
46         DisplayType display() const { return AlignCenter; }
47         /// How much?
48         VSpace const & space() const { return space_; }
49
50 protected:
51         ///
52         void doDispatch(Cursor & cur, FuncRequest & cmd);
53
54 private:
55         virtual Inset * clone() const;
56         ///
57         docstring const label() const;
58
59         ///
60         VSpace space_;
61 };
62
63
64 class InsetVSpaceMailer : public MailInset {
65 public:
66         ///
67         InsetVSpaceMailer(InsetVSpace & inset);
68         ///
69         virtual Inset & inset() const { return inset_; }
70         ///
71         virtual std::string const & name() const { return name_; }
72         ///
73         virtual std::string const inset2string(Buffer const &) const;
74         ///
75         static void string2params(std::string const &, VSpace &);
76         ///
77         static std::string const params2string(VSpace const &);
78 private:
79         ///
80         static std::string const name_;
81         ///
82         InsetVSpace & inset_;
83 };
84
85
86 } // namespace lyx
87
88 #endif