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