2001-05-04 10:36:36 +00:00
|
|
|
// -*- C++ -*-
|
2001-03-30 19:24:28 +00:00
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
|
|
|
* Copyright 2001 The LyX Team.
|
|
|
|
*
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* \file ControlToc.h
|
|
|
|
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONTROLTOC_H
|
|
|
|
#define CONTROLTOC_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "ControlCommand.h"
|
|
|
|
#include "buffer.h" // Buffer::SingleList
|
|
|
|
|
|
|
|
/** A controller for TOC dialogs.
|
|
|
|
*/
|
|
|
|
class ControlToc : public ControlCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
ControlToc(LyXView &, Dialogs &);
|
|
|
|
|
|
|
|
/// Goto this paragraph id
|
|
|
|
void Goto(int const & id) const;
|
|
|
|
|
|
|
|
/// Returns a vector of list types in the document
|
|
|
|
std::vector<string> const getTypes() const;
|
|
|
|
|
|
|
|
/// Given a type, returns the contents
|
|
|
|
Buffer::SingleList const getContents(string const & type) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
namespace toc
|
|
|
|
{
|
|
|
|
/** Given the cmdName of the TOC param, returns the type used
|
|
|
|
by ControlToc::getContents() */
|
2001-05-04 10:36:36 +00:00
|
|
|
string const getType(string const & cmdName);
|
2001-03-30 19:24:28 +00:00
|
|
|
|
|
|
|
} // namespace toc
|
|
|
|
|
|
|
|
#endif // CONTROLTOC_H
|