4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Alejandro Aguilar Sierra
9 * Full author contact details are available in file CREDITS
12 #ifndef INSET_PARENT_H
13 #define INSET_PARENT_H
16 #include "insetcommand.h"
20 /** Reference to the parent document.
22 Useful to load a parent document from a child document and to
23 share parent's properties between preambleless children.
25 class InsetParent : public InsetCommand {
28 InsetParent(InsetCommandParams const &, Buffer const &, bool same_id = false);
30 virtual Inset * clone(Buffer const & buffer, bool same_id = false) const {
31 return new InsetParent(params(), buffer, same_id);
34 string const getScreenLabel(Buffer const *) const;
36 EDITABLE editable() const { return IS_EDITABLE; }
38 Inset::Code lyxCode() const { return Inset::PARENT_CODE; }
40 void edit(BufferView *, int, int, mouse_button::state);
42 void edit(BufferView * bv, bool front = true);
44 int latex(Buffer const *, std::ostream &,
45 bool fragile, bool free_spc) const;
47 void setParent(string fn) { setContents(fn); }