2001-05-04 10:36:36 +00:00
|
|
|
// -*- C++ -*-
|
2002-09-05 14:10:50 +00:00
|
|
|
/**
|
|
|
|
* \file ControlToc.h
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2001-03-30 19:24:28 +00:00
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* \author Angus Leeming
|
2001-03-30 19:24:28 +00:00
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2001-03-30 19:24:28 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONTROLTOC_H
|
|
|
|
#define CONTROLTOC_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "ControlCommand.h"
|
2002-07-21 15:51:07 +00:00
|
|
|
#include "toc.h"
|
2003-02-25 14:51:38 +00:00
|
|
|
#include <vector>
|
2001-03-30 19:24:28 +00:00
|
|
|
|
2004-05-19 15:11:37 +00:00
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
2001-03-30 19:24:28 +00:00
|
|
|
/** A controller for TOC dialogs.
|
|
|
|
*/
|
2002-10-21 17:38:09 +00:00
|
|
|
class ControlToc : public ControlCommand {
|
2001-03-30 19:24:28 +00:00
|
|
|
public:
|
|
|
|
///
|
2003-02-25 14:51:38 +00:00
|
|
|
ControlToc(Dialog &);
|
2001-03-30 19:24:28 +00:00
|
|
|
|
|
|
|
/// Goto this paragraph id
|
2004-05-19 15:11:37 +00:00
|
|
|
void goTo(toc::TocItem const &);
|
2001-03-30 19:24:28 +00:00
|
|
|
|
2002-07-21 15:51:07 +00:00
|
|
|
/// Return the list of types available
|
2003-10-06 15:43:21 +00:00
|
|
|
std::vector<std::string> const getTypes() const;
|
2001-03-30 19:24:28 +00:00
|
|
|
|
2005-07-04 13:05:03 +00:00
|
|
|
/// Return the guiname from a given cmdName of the TOC param
|
2005-07-27 15:22:08 +00:00
|
|
|
std::string const getGuiName(std::string const & type) const;
|
2005-07-04 13:05:03 +00:00
|
|
|
|
2001-03-30 19:24:28 +00:00
|
|
|
/// Given a type, returns the contents
|
2004-05-19 15:11:37 +00:00
|
|
|
toc::Toc const getContents(std::string const & type) const;
|
2006-03-29 05:08:42 +00:00
|
|
|
|
|
|
|
/// Apply the selected outlining operation
|
|
|
|
void outline(toc::OutlineOp op);
|
2006-04-18 09:57:47 +00:00
|
|
|
|
|
|
|
/// Test if outlining operation is possible
|
|
|
|
bool canOutline(std::string const & type);
|
2001-03-30 19:24:28 +00:00
|
|
|
};
|
|
|
|
|
2004-05-19 15:11:37 +00:00
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2001-03-30 19:24:28 +00:00
|
|
|
#endif // CONTROLTOC_H
|