]> git.lyx.org Git - lyx.git/blob - src/frontends/Delegates.h
cosmetics
[lyx.git] / src / frontends / Delegates.h
1 // -*- C++ -*-
2 /**
3  * \file Delegates.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef DELEGATES_H
13 #define DELEGATES_H
14
15 #include "support/docstring.h"
16
17 namespace lyx {
18
19 class Buffer;
20 class Inset;
21
22 namespace frontend {
23
24 class GuiBufferViewDelegate 
25 {
26 public:
27         virtual ~GuiBufferViewDelegate() {}
28
29         /// This function is called when some message shows up.
30         virtual void message(docstring const & msg) = 0;
31
32         /// This function is called when some dialog needs to be shown.
33         virtual void showDialog(std::string const & name) = 0;
34
35         /// This function is called when some dialog needs to be shown with
36         /// some data.
37         virtual void showDialogWithData(std::string const & name,
38                 std::string const & data) = 0;
39
40         /// This function is called when some inset dialogs needs to be shown.
41         virtual void showInsetDialog(std::string const & name,
42                 std::string const & data, Inset * inset) = 0;
43
44         /// This function is called when some dialogs needs to be updated.
45         virtual void updateDialog(std::string const & name,
46                 std::string const & data) = 0;
47 };
48
49
50 class GuiBufferDelegate
51 {
52 public:
53         virtual ~GuiBufferDelegate() {}
54         /// This function is called when the buffer structure is changed.
55         virtual void structureChanged() = 0;
56         /// This function is called when some parsing error shows up.
57         virtual void errors(std::string const &) = 0;
58         /// This function is called when some message shows up.
59         virtual void message(docstring const &) = 0;
60         /// This function is called when the buffer busy status change.
61         virtual void setBusy(bool) = 0;
62         /// This function is called when the buffer readonly status change.
63         virtual void setReadOnly(bool) = 0;
64         /// Update window titles of all users.
65         virtual void updateTitles() = 0;
66         /// Reset autosave timers for all users.
67         virtual void resetAutosaveTimers() = 0;
68 };
69
70 } // namespace frontend
71 } // namespace lyx
72
73 #endif