mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
74 lines
2.0 KiB
C
74 lines
2.0 KiB
C
|
// -*- C++ -*-
|
||
|
/**
|
||
|
* \file Delegates.h
|
||
|
* This file is part of LyX, the document processor.
|
||
|
* Licence details can be found in the file COPYING.
|
||
|
*
|
||
|
* \author André Pönitz
|
||
|
*
|
||
|
* Full author contact details are available in file CREDITS.
|
||
|
*/
|
||
|
|
||
|
#ifndef DELEGATES_H
|
||
|
#define DELEGATES_H
|
||
|
|
||
|
#include "support/docstring.h"
|
||
|
|
||
|
namespace lyx {
|
||
|
|
||
|
class Buffer;
|
||
|
class Inset;
|
||
|
|
||
|
namespace frontend {
|
||
|
|
||
|
class GuiBufferViewDelegate
|
||
|
{
|
||
|
public:
|
||
|
virtual ~GuiBufferViewDelegate() {}
|
||
|
|
||
|
/// This function is called when some message shows up.
|
||
|
virtual void message(docstring const & msg) = 0;
|
||
|
|
||
|
/// This function is called when some dialog needs to be shown.
|
||
|
virtual void showDialog(std::string const & name) = 0;
|
||
|
|
||
|
/// This function is called when some dialog needs to be shown with
|
||
|
/// some data.
|
||
|
virtual void showDialogWithData(std::string const & name,
|
||
|
std::string const & data) = 0;
|
||
|
|
||
|
/// This function is called when some inset dialogs needs to be shown.
|
||
|
virtual void showInsetDialog(std::string const & name,
|
||
|
std::string const & data, Inset * inset) = 0;
|
||
|
|
||
|
/// This function is called when some dialogs needs to be updated.
|
||
|
virtual void updateDialog(std::string const & name,
|
||
|
std::string const & data) = 0;
|
||
|
};
|
||
|
|
||
|
|
||
|
class GuiBufferDelegate
|
||
|
{
|
||
|
public:
|
||
|
virtual ~GuiBufferDelegate() {}
|
||
|
/// This function is called when the buffer structure is changed.
|
||
|
virtual void structureChanged() = 0;
|
||
|
/// This function is called when some parsing error shows up.
|
||
|
virtual void errors(std::string const &) = 0;
|
||
|
/// This function is called when some message shows up.
|
||
|
virtual void message(docstring const &) = 0;
|
||
|
/// This function is called when the buffer busy status change.
|
||
|
virtual void busy(bool) = 0;
|
||
|
/// This function is called when the buffer readonly status change.
|
||
|
virtual void readonly(bool) = 0;
|
||
|
/// Update window titles of all users.
|
||
|
virtual void updateTitles() = 0;
|
||
|
/// Reset autosave timers for all users.
|
||
|
virtual void resetAutosaveTimers() = 0;
|
||
|
};
|
||
|
|
||
|
} // namespace frontend
|
||
|
} // namespace lyx
|
||
|
|
||
|
#endif
|