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 &);
32 Inset * Clone(Buffer const & buffer) const {
33 return new InsetParent(params(), buffer);
36 string const getScreenLabel() 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 int Latex(Buffer const *, std::ostream &,
45 bool fragile, bool free_spc) const;
47 void setParent(string fn) { setContents(fn); }