]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlToc.h
The reference dialog now disconnects from the inset on Apply. Its behaviour
[lyx.git] / src / frontends / controllers / ControlToc.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ====================================================== 
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 2001 The LyX Team.
8  *
9  * ======================================================
10  *
11  * \file ControlToc.h
12  * \author Angus Leeming <a.leeming@ic.ac.uk>
13  */
14
15 #ifndef CONTROLTOC_H
16 #define CONTROLTOC_H
17
18 #ifdef __GNUG__
19 #pragma interface
20 #endif
21
22 #include "ControlCommand.h"
23 #include "buffer.h" // Buffer::SingleList
24
25 /** A controller for TOC dialogs.
26  */
27 class ControlToc : public ControlCommand
28 {
29 public:
30         ///
31         ControlToc(LyXView &, Dialogs &);
32
33         /// Goto this paragraph id
34         void Goto(int const & id) const;
35
36         /// Returns a vector of list types in the document
37         std::vector<string> const getTypes() const;
38
39         /// Given a type, returns the contents
40         Buffer::SingleList const getContents(string const & type) const;
41 };
42
43 namespace toc 
44 {
45     /** Given the cmdName of the TOC param, returns the type used
46         by ControlToc::getContents() */
47         string const getType(string const & cmdName);
48
49 } // namespace toc
50
51 #endif // CONTROLTOC_H