]> git.lyx.org Git - lyx.git/blob - src/insets/insetparent.h
change to use only ostream to write latex from insets
[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-1999 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 class Buffer;
22
23 /** Reference to the parent document.
24
25   Useful to load a parent document from a child document and to
26   share parent's properties between preambleless children. 
27  */
28 class InsetParent : public InsetCommand {
29 public:
30         /// Non-standard LyX macro
31         InsetParent() : InsetCommand("lyxparent") {}
32         ///
33         InsetParent(string const & fn, Buffer * owner = 0);
34         /// 
35         int Latex(ostream &, signed char fragile) const;
36 #ifndef USE_OSTREAM_ONLY
37         ///
38         int Latex(string & file, signed char fragile) const;
39 #endif
40         ///
41         Inset * Clone() const { return new InsetParent(getContents()); }
42         ///
43         string getScreenLabel() const {
44                 return string(_("Parent:")) + getContents();
45         }
46         ///
47         void Edit(BufferView *, int, int, unsigned int);
48         ///
49         unsigned char Editable() const {
50                 return 1;
51         }
52         ///
53         Inset::Code LyxCode() const { return Inset::PARENT_CODE; }
54         ///
55         void setParent(string fn) { setContents(fn); }
56 };
57 #endif