4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
15 #include "support/strfwd.h"
24 class GuiBufferViewDelegate
27 virtual ~GuiBufferViewDelegate() {}
29 /// This function is called when some message shows up.
30 virtual void message(docstring const & msg) = 0;
32 /// This function is called when some inset dialogs needs to be shown.
33 /** \param name == "bibtex", "citation" etc; an identifier used to
34 launch a particular dialog.
35 \param data is a string representation of the Inset contents.
36 It is often little more than the output from Inset::write.
37 It is passed to, and parsed by, the frontend dialog.
38 Several of these dialogs do not need any data.
39 \param inset ownership is _not_ passed to the frontend dialog.
40 It is stored internally and used by the kernel to ascertain
41 what to do with the FuncRequest dispatched from the frontend
42 dialog on 'Apply'; should it be used to create a new inset at
43 the current cursor position or modify an existing, 'open' inset?
45 virtual void showDialog(std::string const & name,
46 std::string const & data, Inset * inset = 0) = 0;
48 /// This function is called when some dialogs needs to be reset.
49 /** \param name == "citation", "bibtex" etc; an identifier used
50 to reset the contents of a particular dialog with \param data.
51 See the comments to 'show', above.
53 virtual void updateDialog(std::string const & name,
54 std::string const & data) = 0;
58 class GuiBufferDelegate
61 virtual ~GuiBufferDelegate() {}
62 /// This function is called when the buffer structure is changed.
63 virtual void structureChanged() = 0;
64 /// This function is called when the buffer structure has been updated.
65 virtual void updateTocItem(std::string const &, DocIterator const &) = 0;
66 /// This function is called when some parsing error shows up.
67 virtual void errors(std::string const &, bool from_master = false) = 0;
68 /// This function is called when some message shows up.
69 virtual void message(docstring const &) = 0;
70 /// This function is called when the buffer busy status change.
71 virtual void setBusy(bool) = 0;
72 /// Reset autosave timers for all users.
73 virtual void resetAutosaveTimers() = 0;
76 } // namespace frontend