]> git.lyx.org Git - lyx.git/blob - src/insets/insetparent.h
2dafd19f66c287261c7cdad283827f74273bd3c5
[lyx.git] / src / insets / insetparent.h
1 // -*- C++ -*-
2 /* This file is part of*
3  * ======================================================
4  *
5  *           LyX, The Document Processor
6  *       
7  *          Copyright (C) 1997-1998 LyX Team
8  * 
9  *======================================================*/
10
11 #ifndef _INSET_PARENT_H
12 #define _INSET_PARENT_H
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "insetcommand.h"
19 #include "gettext.h"
20 // Created by asierra 970813
21
22 /** Reference to the parent document.
23
24   Useful to load a parent document from a child document and to
25   share parent's properties between preambleless children. 
26  */
27 class InsetParent: public InsetCommand {
28 public:
29         /// Non-standard LyX macro
30         InsetParent(): InsetCommand("lyxparent") { }
31         ///
32         InsetParent(string fn, Buffer* owner=0);
33         ///
34         ~InsetParent() {}
35         /// 
36         int Latex(FILE *file, signed char fragile);
37         ///
38         int Latex(string &file, signed char fragile);
39         ///
40         Inset* Clone() { return new InsetParent(getContents()); }
41         ///
42         string getScreenLabel() const { return string(_("Parent:"))+getContents(); }
43         ///
44         void Edit(int, int);
45         ///
46         unsigned char Editable() const {
47                 return 1;
48         }
49         ///
50         Inset::Code LyxCode() const { return Inset::PARENT_CODE; }
51         ///
52         void setParent(string fn) { setContents(fn); }
53 };
54
55 #endif