2 /* This file is part of*
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1997-1999 LyX Team
9 * ====================================================== */
11 #ifndef INSET_PARENT_H
12 #define INSET_PARENT_H
18 #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 {
30 /// Non-standard LyX macro
31 InsetParent() : InsetCommand("lyxparent") {}
33 InsetParent(string const & fn, Buffer * owner = 0);
35 int Latex(ostream &, signed char fragile) const;
36 #ifndef USE_OSTREAM_ONLY
38 int Latex(string & file, signed char fragile) const;
41 Inset * Clone() const { return new InsetParent(getContents()); }
43 string getScreenLabel() const {
44 return string(_("Parent:")) + getContents();
47 void Edit(BufferView *, int, int, unsigned int);
49 EDITABLE Editable() const {
53 Inset::Code LyxCode() const { return Inset::PARENT_CODE; }
55 void setParent(string fn) { setContents(fn); }