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
19 #include "insetcommand.h"
23 /** Reference to the parent document.
25 Useful to load a parent document from a child document and to
26 share parent's properties between preambleless children.
28 class InsetParent : public InsetCommand {
31 InsetParent(InsetCommandParams const &, Buffer const &, bool same_id = false);
33 virtual Inset * clone(Buffer const & buffer, bool same_id = false) const {
34 return new InsetParent(params(), buffer, same_id);
37 string const getScreenLabel(Buffer const *) const;
39 EDITABLE editable() const { return IS_EDITABLE; }
41 Inset::Code lyxCode() const { return Inset::PARENT_CODE; }
43 void edit(BufferView *, int, int, mouse_button::state);
45 void edit(BufferView * bv, bool front = true);
47 int latex(Buffer const *, std::ostream &,
48 bool fragile, bool free_spc) const;
50 void setParent(string fn) { setContents(fn); }