]> git.lyx.org Git - lyx.git/blob - src/insets/insetparent.h
Don't remove cell selections after fontchange.
[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-2001 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 &, bool same_id = false);
31         ///
32         virtual Inset * clone(Buffer const & buffer, bool same_id = false) const {
33                 return new InsetParent(params(), buffer, same_id);
34         }
35         ///
36         string const getScreenLabel(Buffer const *) 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         void edit(BufferView * bv, bool front = true);
45         /// 
46         int latex(Buffer const *, std::ostream &,
47                   bool fragile, bool free_spc) const;
48         ///
49         void setParent(string fn) { setContents(fn); }
50 };
51 #endif