]> git.lyx.org Git - lyx.git/blob - src/insets/insetfloat.h
Make it compile when USE_BOOST_FORMAT is unset
[lyx.git] / src / insets / insetfloat.h
1 // -*- C++ -*-
2 /**
3  * \file insetfloat.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Jürgen Vigna
8  * \author Lars Gullik Bjønnes
9  *
10  * Full author contact details are available in file CREDITS
11  */
12
13 #ifndef InsetFloat_H
14 #define InsetFloat_H
15
16 #ifdef __GNUG__
17 #pragma interface
18 #endif
19
20 #include "insetcollapsable.h"
21 #include "toc.h"
22
23 #include <boost/signals/signal0.hpp>
24
25 class Painter;
26
27 /** The float inset
28
29 */
30 class InsetFloat : public InsetCollapsable {
31 public:
32         ///
33         InsetFloat(BufferParams const &, string const &);
34         ///
35         InsetFloat(InsetFloat const &, bool same_id = false);
36         ///
37         ~InsetFloat();
38         ///
39         void write(Buffer const * buf, std::ostream & os) const;
40         ///
41         void read(Buffer const * buf, LyXLex & lex);
42         ///
43         void validate(LaTeXFeatures & features) const;
44         ///
45         Inset * clone(Buffer const &, bool same_id = false) const;
46         ///
47         Inset::Code lyxCode() const { return Inset::FLOAT_CODE; }
48         ///
49         int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
50         ///
51         int docbook(Buffer const *, std::ostream &, bool mixcont) const;
52         ///
53         string const editMessage() const;
54         ///
55         bool insetAllowed(Inset::Code) const;
56         /** returns true if, when outputing LaTeX, font changes should
57             be closed before generating this inset. This is needed for
58             insets that may contain several paragraphs */
59         bool noFontChange() const { return true; }
60         ///
61         string const & type() const;
62         ///
63         void placement(string const & p);
64         ///
65         string const & placement() const;
66         ///
67         void wide(bool w, BufferParams const &);
68         ///
69         bool wide() const;
70         ///
71         void addToToc(toc::TocList &, Buffer const *) const;
72         ///
73         bool  showInsetDialog(BufferView *) const;
74         ///
75         boost::signal0<void> hideDialog;
76 private:
77         ///
78         string floatType_;
79         ///
80         string floatPlacement_;
81         ///
82         bool wide_;
83 };
84
85 #endif