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