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"
20 // Created by asierra 970813
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 {
29 /// Non-standard LyX macro
30 InsetParent() : InsetCommand("lyxparent") {}
32 InsetParent(string const & fn, Buffer * owner = 0);
34 int Latex(ostream &, signed char fragile) const;
36 int Latex(string & file, signed char fragile) const;
38 Inset * Clone() const { return new InsetParent(getContents()); }
40 string getScreenLabel() const {
41 return string(_("Parent:")) + getContents();
44 void Edit(BufferView *, int, int);
46 unsigned char Editable() const {
50 Inset::Code LyxCode() const { return Inset::PARENT_CODE; }
52 void setParent(string fn) { setContents(fn); }