2 /* This file is part of*
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1997-2001 LyX Team
9 * ====================================================== */
11 #ifndef INSET_PARENT_H
12 #define INSET_PARENT_H
18 #include "insetcommand.h"
22 /** Reference to the parent document.
24 Useful to load a parent document from a child document and to
25 share parent's properties between preambleless children.
27 class InsetParent : public InsetCommand {
30 InsetParent(InsetCommandParams const &, Buffer const &, bool same_id = false);
32 virtual Inset * clone(Buffer const & buffer, bool same_id = false) const {
33 return new InsetParent(params(), buffer, same_id);
36 string const getScreenLabel(Buffer const *) const;
38 EDITABLE editable() const { return IS_EDITABLE; }
40 Inset::Code lyxCode() const { return Inset::PARENT_CODE; }
42 void edit(BufferView *, int, int, unsigned int);
44 void edit(BufferView * bv, bool front = true);
46 int latex(Buffer const *, std::ostream &,
47 bool fragile, bool free_spc) const;
49 void setParent(string fn) { setContents(fn); }