]> git.lyx.org Git - lyx.git/blob - src/insets/insettoc.h
pos=string::npos for regex not found, use handcoded transform in lstring.C, fix the...
[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 // Created by Lgb 970527
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(int, 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         ///
47         int Linuxdoc(string & file);
48         ///
49         int DocBook(string & file);
50 private:
51         ///
52         Buffer * owner;
53 };
54
55 #endif