]> git.lyx.org Git - lyx.git/blob - src/insets/insetparent.h
The markDirty() and fitCursor() changes
[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
16 #include "insetcommand.h"
17
18 class Buffer;
19
20 /** Reference to the parent document.
21
22   Useful to load a parent document from a child document and to
23   share parent's properties between preambleless children.
24  */
25 class InsetParent : public InsetCommand {
26 public:
27         ///
28         InsetParent(InsetCommandParams const &, Buffer const &, bool same_id = false);
29         ///
30         virtual Inset * clone(Buffer const & buffer, bool same_id = false) const {
31                 return new InsetParent(params(), buffer, same_id);
32         }
33         ///
34         string const getScreenLabel(Buffer const *) const;
35         ///
36         EDITABLE editable() const { return IS_EDITABLE; }
37         ///
38         Inset::Code lyxCode() const { return Inset::PARENT_CODE; }
39         ///
40         void edit(BufferView *, int, int, mouse_button::state);
41         ///
42         void edit(BufferView * bv, bool front = true);
43         ///
44         int latex(Buffer const *, std::ostream &,
45                   bool fragile, bool free_spc) const;
46         ///
47         void setParent(string fn) { setContents(fn); }
48 };
49 #endif