]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlToc.h
hopefully fix tex2lyx linking.
[lyx.git] / src / frontends / controllers / ControlToc.h
1 // -*- C++ -*-
2 /**
3  * \file ControlToc.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef CONTROLTOC_H
13 #define CONTROLTOC_H
14
15
16 #include "ControlCommand.h"
17 #include "TocBackend.h"
18
19 #include <vector>
20
21 namespace lyx {
22 namespace frontend {
23
24 /** A controller for TOC dialogs.
25  */
26 class ControlToc : public ControlCommand {
27 public:
28         ///
29         ControlToc(Dialog &);
30
31         /// Goto this paragraph id
32         void goTo(TocItem const &);
33
34         /// Return the list of types available
35         std::vector<std::string> const & getTypes() const;
36
37         /// Return the guiname from a given cmdName of the TOC param
38         std::string const getGuiName(std::string const & type) const;
39
40         /// Return the first TocItem before the cursor
41         TocIterator const getCurrentTocItem(std::string const & type) const;
42
43         /// Given a type, returns the contents
44         Toc const & getContents(std::string const & type) const;
45
46         /// Apply the selected outlining operation
47         void outlineUp();
48         ///
49         void outlineDown();
50         ///
51         void outlineIn();
52         ///
53         void outlineOut();
54         
55         /// Test if outlining operation is possible
56         bool canOutline(std::string const & type);
57 };
58
59 } // namespace frontend
60 } // namespace lyx
61
62 #endif // CONTROLTOC_H