1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 2001 The LyX Team.
8 * ======================================================
11 * \author Angus Leeming <a.leeming@ic.ac.uk>
17 #pragma implementation
20 #include "ControlToc.h"
23 #include "support/lstrings.h" // tostr
29 ControlToc::ControlToc(LyXView & lv, Dialogs & d)
30 : ControlCommand(lv, d, LFUN_TOC_INSERT)
34 void ControlToc::goTo(toc::TocItem const & item) const
40 vector<string> const ControlToc::getTypes() const
42 return toc::getTypes(buffer());
46 toc::Toc const ControlToc::getContents(string const & type) const
50 // This shouldn't be possible...
51 if (!bufferIsAvailable()) {
55 toc::TocList tmp = toc::getTocList(buffer());
56 toc::TocList::iterator it = tmp.find(type);
57 if (it == tmp.end()) {