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