]> git.lyx.org Git - lyx.git/blob - src/insets/insetvspace.h
move space above/below from Paragraph into a separate vspace inset.
[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 class InsetVSpace : public InsetOld {
21 public:
22         ///
23         InsetVSpace() {}
24         ///
25         InsetVSpace(VSpace const &);
26         ///
27         std::auto_ptr<InsetBase> clone() const;
28         ///
29         void metrics(MetricsInfo & mi, Dimension & dim) const;
30         ///
31         void draw(PainterInfo & pi, int x, int y) const;
32         ///
33         int latex(Buffer const &, std::ostream &,
34                   OutputParams const &) const;
35         ///
36         int plaintext(Buffer const &, std::ostream &,
37             OutputParams const &) const;
38         ///
39         int linuxdoc(Buffer const &, std::ostream &,
40             OutputParams const &) const;
41         ///
42         int docbook(Buffer const &, std::ostream &,
43             OutputParams const &) const;
44         ///
45         void read(Buffer const &, LyXLex & lex);
46         ///
47         void write(Buffer const & buf, std::ostream & os) const;
48         ///
49         bool display() const { return true; }
50
51 public:
52         /// how much
53         VSpace space_;
54 };
55
56
57 class InsetVSpaceMailer : public MailInset {
58 public:
59         ///
60         InsetVSpaceMailer(InsetVSpace & inset);
61         ///
62         virtual InsetBase & inset() const { return inset_; }
63         ///
64         virtual std::string const & name() const { return name_; }
65         ///
66         virtual std::string const inset2string(Buffer const &) const;
67         ///
68         static void string2params(std::string const &, VSpace &);
69         ///
70         static std::string const params2string(VSpace const &);
71 private:
72         ///
73         static std::string const name_;
74         ///
75         InsetVSpace & inset_;
76 };
77
78 #endif