2 /* This file is part of*
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1997-2000 LyX Team
9 * ====================================================== */
11 #ifndef INSET_PARENT_H
12 #define INSET_PARENT_H
18 #include "insetcommand.h"
25 /** Reference to the parent document.
27 Useful to load a parent document from a child document and to
28 share parent's properties between preambleless children.
30 class InsetParent : public InsetCommand {
32 /// Non-standard LyX macro
33 InsetParent() : InsetCommand("lyxparent") {}
35 InsetParent(string const & fn, Buffer * owner = 0);
37 int Latex(ostream &, signed char fragile, bool free_spc) const;
39 Inset * Clone() const { return new InsetParent(getContents()); }
41 string getScreenLabel() const {
42 return string(_("Parent:")) + getContents();
45 void Edit(BufferView *, int, int, unsigned int);
47 EDITABLE Editable() const {
51 Inset::Code LyxCode() const { return Inset::PARENT_CODE; }
53 void setParent(string fn) { setContents(fn); }