2 /* This file is part of*
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright (C) 1997-1998 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 fn, Buffer* owner=0);
36 int Latex(FILE *file, signed char fragile);
38 int Latex(string &file, signed char fragile);
40 Inset* Clone() { return new InsetParent(getContents()); }
42 string getScreenLabel() const { return string(_("Parent:"))+getContents(); }
46 unsigned char Editable() const {
50 Inset::Code LyxCode() const { return Inset::PARENT_CODE; }
52 void setParent(string fn) { setContents(fn); }