case LFUN_DIALOG_TOGGLE:
case LFUN_DIALOG_DISCONNECT_INSET:
case LFUN_DIALOG_HIDE:
+ case LFUN_DIALOG_SHOW:
BOOST_ASSERT(lyx_view_);
lyx_view_->dispatch(cmd);
break;
case LFUN_BUFFER_EXPORT:
BOOST_ASSERT(lyx_view_ && lyx_view_->buffer());
if (argument == "custom")
- lyx_view_->showDialog("sendto", string());
+ dispatch(FuncRequest(LFUN_DIALOG_SHOW, "sendto"));
else
lyx_view_->buffer()->doExport(argument, false);
break;
break;
} // end switch(code)
if (insetCodeOK)
- lyx_view_->showDialog(name, data, 0);
+ dispatch(FuncRequest(LFUN_DIALOG_SHOW, name + " " + data));
break;
}
virtual void message(docstring const & msg) = 0;
/// This function is called when some inset dialogs needs to be shown.
+ /** \param name == "bibtex", "citation" etc; an identifier used to
+ launch a particular dialog.
+ \param data is a string representation of the Inset contents.
+ It is often little more than the output from Inset::write.
+ It is passed to, and parsed by, the frontend dialog.
+ Several of these dialogs do not need any data.
+ \param inset ownership is _not_ passed to the frontend dialog.
+ It is stored internally and used by the kernel to ascertain
+ what to do with the FuncRequest dispatched from the frontend
+ dialog on 'Apply'; should it be used to create a new inset at
+ the current cursor position or modify an existing, 'open' inset?
+ */
virtual void showDialog(std::string const & name,
std::string const & data, Inset * inset = 0) = 0;
* in a single LyXView.
*/
class LyXView
- : public GuiBufferViewDelegate, public GuiBufferDelegate
{
public:
///
// This View's Dialogs
//
- /** \param name == "bibtex", "citation" etc; an identifier used to
- launch a particular dialog.
- \param data is a string representation of the Inset contents.
- It is often little more than the output from Inset::write.
- It is passed to, and parsed by, the frontend dialog.
- Several of these dialogs do not need any data,
- so it defaults to string().
- \param inset ownership is _not_ passed to the frontend dialog.
- It is stored internally and used by the kernel to ascertain
- what to do with the FuncRequest dispatched from the frontend
- dialog on 'Apply'; should it be used to create a new inset at
- the current cursor position or modify an existing, 'open' inset?
- */
- virtual void showDialog(std::string const & name,
- std::string const & data, Inset * inset = 0) = 0;
-
///
virtual void disconnectDialog(std::string const & name) = 0;
///
* is deleted. This might be useful for closing other dialogs
* depending on a given GuiView.
*/
-class GuiView : public QMainWindow, public LyXView
+class GuiView : public QMainWindow, public LyXView, public GuiBufferViewDelegate,
+ public GuiBufferDelegate
{
Q_OBJECT
public: