2006-03-05 17:24:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
2007-08-31 05:53:55 +00:00
|
|
|
* \file GuiToc.h
|
2006-03-05 17:24:44 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author John Levon
|
|
|
|
* \author Kalle Dalheimer
|
2007-10-06 20:35:44 +00:00
|
|
|
* \author Angus Leeming
|
2006-03-05 17:24:44 +00:00
|
|
|
* \author Abdelrazak Younes
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#ifndef GUITOC_H
|
|
|
|
#define GUITOC_H
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-10-08 20:14:58 +00:00
|
|
|
#include "DockView.h"
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
namespace lyx {
|
2020-10-14 14:28:47 +02:00
|
|
|
|
|
|
|
class Cursor;
|
|
|
|
class DispatchResult;
|
|
|
|
class FuncStatus;
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
namespace frontend {
|
|
|
|
|
2007-10-08 20:14:58 +00:00
|
|
|
class TocWidget;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-10-08 20:14:58 +00:00
|
|
|
class GuiToc : public DockView
|
2006-03-05 17:24:44 +00:00
|
|
|
{
|
2007-03-12 14:23:44 +00:00
|
|
|
Q_OBJECT
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
public:
|
|
|
|
///
|
2007-10-08 20:14:58 +00:00
|
|
|
GuiToc(
|
2007-11-05 13:52:37 +00:00
|
|
|
GuiView & parent, ///< the main window where to dock.
|
2007-10-08 20:14:58 +00:00
|
|
|
Qt::DockWidgetArea area = Qt::LeftDockWidgetArea, ///< Position of the dock (and also drawer)
|
2020-03-03 14:27:03 -05:00
|
|
|
Qt::WindowFlags flags = {});
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-04-03 13:07:38 +00:00
|
|
|
///
|
2020-10-01 10:42:11 +03:00
|
|
|
bool initialiseParams(std::string const & data) override;
|
|
|
|
void updateView() override;
|
|
|
|
void enableView(bool enable) override;
|
|
|
|
bool wantInitialFocus() const override { return false; }
|
2020-10-03 15:42:14 +03:00
|
|
|
void closeEvent(QCloseEvent * event) override;
|
2020-10-01 10:42:11 +03:00
|
|
|
bool isClosing() const override { return is_closing_; }
|
2007-10-06 20:35:44 +00:00
|
|
|
|
2007-10-08 20:14:58 +00:00
|
|
|
public:
|
2007-10-07 18:58:47 +00:00
|
|
|
/// clean-up on hide.
|
2020-10-01 10:42:11 +03:00
|
|
|
void clearParams() override {}
|
2007-10-07 18:58:47 +00:00
|
|
|
///
|
2020-10-01 10:42:11 +03:00
|
|
|
void dispatchParams() override;
|
2007-10-07 18:58:47 +00:00
|
|
|
///
|
2020-10-01 10:42:11 +03:00
|
|
|
bool isBufferDependent() const override { return true; }
|
2009-04-08 21:06:58 +00:00
|
|
|
///
|
2020-03-03 00:02:45 -05:00
|
|
|
void doDispatch(Cursor & cur, FuncRequest const & fr, DispatchResult & dr);
|
2009-04-11 11:43:13 +00:00
|
|
|
///
|
|
|
|
bool getStatus(Cursor & cur, FuncRequest const & fr, FuncStatus & fs) const;
|
2008-03-06 19:39:52 +00:00
|
|
|
|
2008-05-02 12:09:51 +00:00
|
|
|
private:
|
2008-03-06 19:39:52 +00:00
|
|
|
///
|
2008-05-02 12:09:51 +00:00
|
|
|
TocWidget * widget_;
|
2009-05-14 23:46:42 +00:00
|
|
|
///
|
|
|
|
bool is_closing_;
|
2006-03-05 17:24:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#endif // GUITOC_H
|