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.
13 #include "ControlToc.h"
24 ControlToc::ControlToc(Dialog & d)
25 : ControlCommand(d, "toc")
29 void ControlToc::goTo(toc::TocItem const & item)
31 item.goTo(kernel().lyxview());
35 vector<string> const ControlToc::getTypes() const
37 return toc::getTypes(kernel().buffer());
41 toc::Toc const ControlToc::getContents(string const & type) const
45 // This shouldn't be possible...
46 if (!kernel().isBufferAvailable()) {
50 toc::TocList tmp = toc::getTocList(kernel().buffer());
51 toc::TocList::iterator it = tmp.find(type);
52 if (it == tmp.end()) {
59 } // namespace frontend