lyx_mirror/src/frontends/controllers/ControlToc.h

73 lines
1.5 KiB
C
Raw Normal View History

// -*- C++ -*-
/**
* \file ControlToc.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author Angus Leeming
*
* Full author contact details are available in file CREDITS.
*/
#ifndef CONTROLTOC_H
#define CONTROLTOC_H
#include "ControlCommand.h"
#include "TocBackend.h"
#include <vector>
namespace lyx {
namespace frontend {
/** A controller for TOC dialogs.
*/
class ControlToc : public ControlCommand {
public:
///
ControlToc(Dialog &);
///
virtual ~ControlToc() {}
/// \c ControlCommand inherited method.
bool initialiseParams(std::string const & data);
/// Goto this paragraph id
void goTo(TocItem const &);
/// Return the list of types available
std::vector<std::string> const & getTypes() const;
/// Return the guiname from a given cmdName of the TOC param
docstring const getGuiName(std::string const & type) const;
/// Return the first TocItem before the cursor
TocIterator const getCurrentTocItem(std::string const & type) const;
/// Given a type, returns the contents
Toc const & getContents(std::string const & type) const;
/// Apply the selected outlining operation
void outlineUp();
///
void outlineDown();
///
void outlineIn();
///
void outlineOut();
/// Test if outlining operation is possible
bool canOutline(std::string const & type);
///
void updateBackend();
public:
/// Update the model data if needed.
virtual void update() = 0;
};
} // namespace frontend
} // namespace lyx
#endif // CONTROLTOC_H