]> git.lyx.org Git - lyx.git/blob - src/insets/insettoc.h
clear()->erase() ; lots of using directives for cxx
[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 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         explicit
32         InsetTOC(Buffer * b) : InsetCommand("tableofcontents"), owner(b) {}
33         ///
34         Inset * Clone() const { return new InsetTOC(owner); }
35         ///
36         string getScreenLabel() const;
37         /// On edit, we open the TOC pop-up
38         void Edit(BufferView * bv, int, int, unsigned int);
39         ///
40         EDITABLE Editable() const {
41                 return IS_EDITABLE;
42         }
43         ///
44         bool display() const { return true; }
45         ///
46         Inset::Code LyxCode() const { return Inset::TOC_CODE; }
47         ///
48         int Linuxdoc(std::ostream &) const;
49         ///
50         int DocBook(std::ostream &) const;
51 private:
52         ///
53         Buffer * owner;
54 };
55
56 #endif