]> git.lyx.org Git - lyx.git/blob - src/insets/InsetVSpace.h
move the validation code from InsetFlex to InsetCollapsable
[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() {}
26         ///
27         InsetVSpace(VSpace const &);
28         ///
29         ~InsetVSpace();
30         /// How much?
31         VSpace const & space() const { return space_; }
32         ///
33         InsetCode lyxCode() const { return VSPACE_CODE; }
34         ///
35         void edit(Cursor & cur, bool front,
36                 EntryDirection entry_from = ENTRY_DIRECTION_IGNORE);
37         ///
38         EDITABLE editable() const { return IS_EDITABLE; }
39         ///
40         docstring contextMenu(BufferView const & bv, int x, int y) const;
41         ///
42         static void string2params(std::string const &, VSpace &);
43         ///
44         static std::string params2string(VSpace const &);
45 private:
46         ///
47         void metrics(MetricsInfo & mi, Dimension & dim) const;
48         ///
49         void draw(PainterInfo & pi, int x, int y) const;
50         ///
51         int latex(odocstream &, OutputParams const &) const;
52         ///
53         int plaintext(odocstream &, OutputParams const &) const;
54         ///
55         int docbook(odocstream &, OutputParams const &) const;
56         ///
57         void read(Lexer & lex);
58         ///
59         void write(std::ostream & os) const;
60         ///
61         DisplayType display() const { return AlignCenter; }
62         ///
63         void doDispatch(Cursor & cur, FuncRequest & cmd);
64         ///
65         bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
66         ///
67         Inset * clone() const { return new InsetVSpace(*this); }
68         ///
69         docstring const label() const;
70
71         ///
72         VSpace space_;
73 };
74
75
76 } // namespace lyx
77
78 #endif