]> git.lyx.org Git - lyx.git/blob - src/insets/insetparent.h
Some forgotten files and Anguses citation patch.
[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
20 class Buffer;
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         explicit
33         InsetParent(string const & fn, Buffer * owner = 0);
34         /// 
35         int Latex(Buffer const *, std::ostream &, bool fragile, bool free_spc) const;
36         ///
37         Inset * Clone() const { return new InsetParent(getContents()); }
38         ///
39         string getScreenLabel() const;
40         ///
41         void Edit(BufferView *, int, int, unsigned int);
42         ///
43         EDITABLE Editable() const {
44                 return IS_EDITABLE;
45         }
46         ///
47         Inset::Code LyxCode() const { return Inset::PARENT_CODE; }
48         ///
49         void setParent(string fn) { setContents(fn); }
50 };
51 #endif