]> git.lyx.org Git - lyx.git/blob - src/insets/insetparent.h
prepare for 1.1.6pre2
[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         ///
30         InsetParent(InsetCommandParams const &, Buffer const &);
31         ///
32         Inset * Clone(Buffer const & buffer) const {
33                 return new InsetParent(params(), buffer);
34         }
35         ///
36         string const getScreenLabel() const;
37         ///
38         EDITABLE Editable() const { return IS_EDITABLE; }
39         ///
40         Inset::Code LyxCode() const { return Inset::PARENT_CODE; }
41         ///
42         void Edit(BufferView *, int, int, unsigned int);
43         /// 
44         int Latex(Buffer const *, std::ostream &,
45                   bool fragile, bool free_spc) const;
46         ///
47         void setParent(string fn) { setContents(fn); }
48 };
49 #endif