]> git.lyx.org Git - lyx.git/blob - src/insets/insetparent.h
Make it compile when USE_BOOST_FORMAT is unset
[lyx.git] / src / insets / insetparent.h
1 // -*- C++ -*-
2 /**
3  * \file insetparent.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Alejandro Aguilar Sierra
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef INSET_PARENT_H
13 #define INSET_PARENT_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "insetcommand.h"
20
21 class Buffer;
22
23 /** Reference to the parent document.
24
25   Useful to load a parent document from a child document and to
26   share parent's properties between preambleless children.
27  */
28 class InsetParent : public InsetCommand {
29 public:
30         ///
31         InsetParent(InsetCommandParams const &, Buffer const &, bool same_id = false);
32         ///
33         virtual Inset * clone(Buffer const & buffer, bool same_id = false) const {
34                 return new InsetParent(params(), buffer, same_id);
35         }
36         ///
37         string const getScreenLabel(Buffer const *) const;
38         ///
39         EDITABLE editable() const { return IS_EDITABLE; }
40         ///
41         Inset::Code lyxCode() const { return Inset::PARENT_CODE; }
42         ///
43         void edit(BufferView *, int, int, mouse_button::state);
44         ///
45         void edit(BufferView * bv, bool front = true);
46         ///
47         int latex(Buffer const *, std::ostream &,
48                   bool fragile, bool free_spc) const;
49         ///
50         void setParent(string fn) { setContents(fn); }
51 };
52 #endif