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"
26 ControlToc::ControlToc(Dialog & d)
27 : ControlCommand(d, "toc")
31 void ControlToc::goTo(toc::TocItem const & item)
33 item.goTo(kernel().lyxview());
37 vector<string> const ControlToc::getTypes() const
39 return toc::getTypes(kernel().buffer());
43 string const ControlToc::getGuiName(string const & type) const
46 return _("Table of Contents");
48 return _(toc::getGuiName(type, kernel().buffer()));
52 toc::Toc const ControlToc::getContents(string const & type) const
56 // This shouldn't be possible...
57 if (!kernel().isBufferAvailable()) {
61 toc::TocList tmp = toc::getTocList(kernel().buffer());
62 toc::TocList::iterator it = tmp.find(type);
63 if (it == tmp.end()) {
70 } // namespace frontend