]> git.lyx.org Git - lyx.git/blob - src/insets/insettoc.h
0c850e00645c6fef6581bfbd1392925fbe134e85
[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-2000 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 using std::ostream;
23
24 class Buffer;
25
26 /** Used to insert table of contents
27  */
28 class InsetTOC : public InsetCommand {
29 public:
30         ///
31         InsetTOC() : InsetCommand("tableofcontents") {}
32         ///
33         InsetTOC(Buffer * b) : InsetCommand("tableofcontents"), owner(b) {}
34         ///
35         Inset * Clone() const { return new InsetTOC(owner); }
36         ///
37         string getScreenLabel() const { return _("Table of Contents"); }
38         /// On edit, we open the TOC pop-up
39         void Edit(BufferView * bv, int, int, unsigned int);
40         ///
41         EDITABLE Editable() const {
42                 return IS_EDITABLE;
43         }
44         ///
45         bool display() const { return true; }
46         ///
47         Inset::Code LyxCode() const { return Inset::TOC_CODE; }
48         ///
49         int Linuxdoc(ostream &) const;
50         ///
51         int DocBook(ostream &) const;
52 private:
53         ///
54         Buffer * owner;
55 };
56
57 #endif