]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Delegates.h
Never, never use a string for something that has 3 values
[lyx.git] / src / frontends / Delegates.h
index 1a41771e3dc7b9de264d3a84de4708376bd647ee..d13af7eec5b3c7fdef0f12f6d30854135e7866fa 100644 (file)
@@ -17,6 +17,7 @@
 namespace lyx {
 
 class Buffer;
+class DocIterator;
 class Inset;
 
 namespace frontend {
@@ -30,12 +31,24 @@ public:
        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;
 
-       /// This function is called when some dialogs needs to be updated.
+       /// This function is called when some dialogs needs to be reset.
        /** \param name == "citation", "bibtex" etc; an identifier used
-           to update the contents of a particular dialog with \param data.
+           to reset the contents of a particular dialog with \param data.
            See the comments to 'show', above.
        */
        virtual void updateDialog(std::string const & name,
@@ -49,8 +62,10 @@ public:
        virtual ~GuiBufferDelegate() {}
        /// This function is called when the buffer structure is changed.
        virtual void structureChanged() = 0;
+       /// This function is called when the buffer structure has been updated.
+       virtual void updateTocItem(std::string const &, DocIterator const &) = 0;
        /// This function is called when some parsing error shows up.
-       virtual void errors(std::string const &) = 0;
+       virtual void errors(std::string const &, bool from_master = false) = 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.