]> git.lyx.org Git - lyx.git/blob - src/insets/insettoc.h
apply the ostream changes to mathed, some other small related things
[lyx.git] / src / insets / insettoc.h
1 // -*- C++ -*-
2 /* This file is part of*
3  * ======================================================
4  *
5  *           LyX, The Document Word Processor
6  *       
7  *           Copyright 1995 Matthias Ettrich
8  *           Copyright 1996-1999 The LyX Team.
9  * 
10  * ====================================================== */
11
12 #ifndef INSET_TOC_H
13 #define INSET_TOC_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "insetcommand.h"
20 #include "gettext.h"
21
22 class Buffer;
23
24 /** Used to insert table of contents
25  */
26 class InsetTOC : public InsetCommand {
27 public:
28         ///
29         InsetTOC() : InsetCommand("tableofcontents") {}
30         ///
31         InsetTOC(Buffer * b) : InsetCommand("tableofcontents"), owner(b) {}
32         ///
33         Inset * Clone() const { return new InsetTOC(owner); }
34         ///
35         string getScreenLabel() const { return _("Table of Contents"); }
36         /// On edit, we open the TOC pop-up
37         void Edit(BufferView * bv, int, int, unsigned int);
38         ///
39         unsigned char Editable() const {
40                 return 1;
41         }
42         ///
43         bool display() const { return true; }
44         ///
45         Inset::Code LyxCode() const { return Inset::TOC_CODE; }
46 #ifdef USE_OSTREAM_ONLY
47         ///
48         int Linuxdoc(ostream &) const;
49         ///
50         int DocBook(ostream &) const;
51 #else
52         ///
53         int Linuxdoc(string & file) const;
54         ///
55         int DocBook(string & file) const;
56 #endif
57 private:
58         ///
59         Buffer * owner;
60 };
61
62 #endif