]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Delegates.h
Embedding: add embedCB checkboxes to IncludeUi and ExternalUi
[lyx.git] / src / frontends / Delegates.h
index 270e4fabf189576bcdd863dfd35eeb9b4a26107a..96c134bf56b706bf2f9fc152ea3e39f397ae8de8 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef DELEGATES_H
 #define DELEGATES_H
 
-#include "support/docstring.h"
+#include "support/strfwd.h"
 
 namespace lyx {
 
@@ -29,19 +29,27 @@ public:
        /// 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;
+       /** \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;
 
        /// This function is called when some dialogs needs to be updated.
+       /** \param name == "citation", "bibtex" etc; an identifier used
+           to update the contents of a particular dialog with \param data.
+           See the comments to 'show', above.
+       */
        virtual void updateDialog(std::string const & name,
                std::string const & data) = 0;
 };