3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Angus Leeming
8 * Full author contact details are available in file CREDITS
14 #pragma implementation
17 #include "ControlToc.h"
20 #include "support/lstrings.h" // tostr
27 ControlToc::ControlToc(LyXView & lv, Dialogs & d)
28 : ControlCommand(lv, d, LFUN_TOC_INSERT)
32 void ControlToc::goTo(toc::TocItem const & item) const
38 vector<string> const ControlToc::getTypes() const
40 return toc::getTypes(buffer());
44 toc::Toc const ControlToc::getContents(string const & type) const
48 // This shouldn't be possible...
49 if (!bufferIsAvailable()) {
53 toc::TocList tmp = toc::getTocList(buffer());
54 toc::TocList::iterator it = tmp.find(type);
55 if (it == tmp.end()) {