]> git.lyx.org Git - lyx.git/blob - src/insets/insetparent.h
some using changes small changes in lyxfont and some other things, read the Changelog
[lyx.git] / src / insets / insetparent.h
1 // -*- C++ -*-
2 /* This file is part of*
3  * ====================================================== 
4  *
5  *           LyX, The Document Processor
6  *       
7  *           Copyright 1997-2000 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
21 using std::ostream;
22
23 class Buffer;
24
25 /** Reference to the parent document.
26
27   Useful to load a parent document from a child document and to
28   share parent's properties between preambleless children. 
29  */
30 class InsetParent : public InsetCommand {
31 public:
32         /// Non-standard LyX macro
33         InsetParent() : InsetCommand("lyxparent") {}
34         ///
35         InsetParent(string const & fn, Buffer * owner = 0);
36         /// 
37         int Latex(ostream &, signed char fragile, bool free_spc) const;
38         ///
39         Inset * Clone() const { return new InsetParent(getContents()); }
40         ///
41         string getScreenLabel() const {
42                 return string(_("Parent:")) + getContents();
43         }
44         ///
45         void Edit(BufferView *, int, int, unsigned int);
46         ///
47         EDITABLE Editable() const {
48                 return IS_EDITABLE;
49         }
50         ///
51         Inset::Code LyxCode() const { return Inset::PARENT_CODE; }
52         ///
53         void setParent(string fn) { setContents(fn); }
54 };
55 #endif