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"
22 ControlToc::ControlToc(Dialog & d)
23 : ControlCommand(d, "toc")
27 void ControlToc::goTo(lyx::toc::TocItem const & item)
29 item.goTo(kernel().lyxview());
33 vector<string> const ControlToc::getTypes() const
35 return lyx::toc::getTypes(kernel().buffer());
39 lyx::toc::Toc const ControlToc::getContents(string const & type) const
41 lyx::toc::Toc empty_list;
43 // This shouldn't be possible...
44 if (!kernel().isBufferAvailable()) {
48 lyx::toc::TocList tmp = lyx::toc::getTocList(kernel().buffer());
49 lyx::toc::TocList::iterator it = tmp.find(type);
50 if (it == tmp.end()) {