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 dispatch_result localDispatch(FuncRequest const & cmd);
36 string const getScreenLabel(Buffer const *) const;
38 EDITABLE editable() const { return IS_EDITABLE; }
40 Inset::Code lyxCode() const { return Inset::PARENT_CODE; }
42 int latex(Buffer const *, std::ostream &,
43 bool fragile, bool free_spc) const;
45 void setParent(string const & fn) { setContents(fn); }