]> git.lyx.org Git - features.git/commitdiff
No longer pass Controller & or Dialogs & to the View c-tors.
authorAngus Leeming <leeming@lyx.org>
Mon, 12 Aug 2002 14:28:43 +0000 (14:28 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 12 Aug 2002 14:28:43 +0000 (14:28 +0000)
GUI now contains a controller rather than derives from a controller.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4942 a592a061-630c-0410-9148-cb99ea01b6c8

148 files changed:
src/frontends/ChangeLog
src/frontends/DialogBase.h
src/frontends/Toolbar.C
src/frontends/Toolbar.h
src/frontends/controllers/ChangeLog
src/frontends/controllers/ControlButtons.C
src/frontends/controllers/ControlButtons.h
src/frontends/controllers/ControlDialog.h
src/frontends/controllers/ControlInset.h
src/frontends/controllers/GUI.h
src/frontends/controllers/ViewBase.h
src/frontends/controllers/character.h
src/frontends/qt2/ChangeLog
src/frontends/qt2/Menubar_pimpl.C
src/frontends/qt2/Menubar_pimpl.h
src/frontends/qt2/QAbout.C
src/frontends/qt2/QAbout.h
src/frontends/qt2/QBibitem.C
src/frontends/qt2/QBibitem.h
src/frontends/qt2/QBibtex.C
src/frontends/qt2/QBibtex.h
src/frontends/qt2/QCharacter.C
src/frontends/qt2/QCharacter.h
src/frontends/qt2/QCitation.C
src/frontends/qt2/QCitation.h
src/frontends/qt2/QERT.C
src/frontends/qt2/QERT.h
src/frontends/qt2/QError.C
src/frontends/qt2/QError.h
src/frontends/qt2/QExternal.C
src/frontends/qt2/QExternal.h
src/frontends/qt2/QFloat.C
src/frontends/qt2/QFloat.h
src/frontends/qt2/QGraphics.C
src/frontends/qt2/QGraphics.h
src/frontends/qt2/QInclude.C
src/frontends/qt2/QInclude.h
src/frontends/qt2/QIndex.C
src/frontends/qt2/QIndex.h
src/frontends/qt2/QLog.C
src/frontends/qt2/QLog.h
src/frontends/qt2/QMinipage.C
src/frontends/qt2/QMinipage.h
src/frontends/qt2/QParagraph.C
src/frontends/qt2/QParagraph.h
src/frontends/qt2/QPreamble.C
src/frontends/qt2/QPreamble.h
src/frontends/qt2/QPrint.C
src/frontends/qt2/QPrint.h
src/frontends/qt2/QRef.C
src/frontends/qt2/QRef.h
src/frontends/qt2/QSearch.C
src/frontends/qt2/QSearch.h
src/frontends/qt2/QShowFile.C
src/frontends/qt2/QShowFile.h
src/frontends/qt2/QSpellchecker.C
src/frontends/qt2/QSpellchecker.h
src/frontends/qt2/QTabularCreate.C
src/frontends/qt2/QTabularCreate.h
src/frontends/qt2/QTexinfo.C
src/frontends/qt2/QTexinfo.h
src/frontends/qt2/QThesaurus.C
src/frontends/qt2/QThesaurus.h
src/frontends/qt2/QToc.C
src/frontends/qt2/QToc.h
src/frontends/qt2/QURL.C
src/frontends/qt2/QURL.h
src/frontends/qt2/QVCLog.C
src/frontends/qt2/QVCLog.h
src/frontends/qt2/Qt2Base.C
src/frontends/qt2/Qt2Base.h
src/frontends/qt2/QtView.C
src/frontends/qt2/Toolbar_pimpl.C
src/frontends/qt2/Toolbar_pimpl.h
src/frontends/qt2/guiapi.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/Dialogs.C
src/frontends/xforms/FormAboutlyx.C
src/frontends/xforms/FormAboutlyx.h
src/frontends/xforms/FormBase.C
src/frontends/xforms/FormBase.h
src/frontends/xforms/FormBaseDeprecated.C
src/frontends/xforms/FormBaseDeprecated.h
src/frontends/xforms/FormBibitem.C
src/frontends/xforms/FormBibitem.h
src/frontends/xforms/FormBibtex.C
src/frontends/xforms/FormBibtex.h
src/frontends/xforms/FormBrowser.C
src/frontends/xforms/FormBrowser.h
src/frontends/xforms/FormCharacter.C
src/frontends/xforms/FormCharacter.h
src/frontends/xforms/FormCitation.C
src/frontends/xforms/FormCitation.h
src/frontends/xforms/FormERT.C
src/frontends/xforms/FormERT.h
src/frontends/xforms/FormError.C
src/frontends/xforms/FormError.h
src/frontends/xforms/FormExternal.C
src/frontends/xforms/FormExternal.h
src/frontends/xforms/FormFloat.C
src/frontends/xforms/FormFloat.h
src/frontends/xforms/FormForks.C
src/frontends/xforms/FormForks.h
src/frontends/xforms/FormGraphics.C
src/frontends/xforms/FormGraphics.h
src/frontends/xforms/FormInclude.C
src/frontends/xforms/FormInclude.h
src/frontends/xforms/FormIndex.C
src/frontends/xforms/FormIndex.h
src/frontends/xforms/FormLog.C
src/frontends/xforms/FormLog.h
src/frontends/xforms/FormMinipage.C
src/frontends/xforms/FormMinipage.h
src/frontends/xforms/FormParagraph.C
src/frontends/xforms/FormParagraph.h
src/frontends/xforms/FormPreamble.C
src/frontends/xforms/FormPreamble.h
src/frontends/xforms/FormPrint.C
src/frontends/xforms/FormPrint.h
src/frontends/xforms/FormRef.C
src/frontends/xforms/FormRef.h
src/frontends/xforms/FormSearch.C
src/frontends/xforms/FormSearch.h
src/frontends/xforms/FormSendto.C
src/frontends/xforms/FormSendto.h
src/frontends/xforms/FormShowFile.C
src/frontends/xforms/FormShowFile.h
src/frontends/xforms/FormSpellchecker.C
src/frontends/xforms/FormSpellchecker.h
src/frontends/xforms/FormTabularCreate.C
src/frontends/xforms/FormTabularCreate.h
src/frontends/xforms/FormTexinfo.C
src/frontends/xforms/FormTexinfo.h
src/frontends/xforms/FormThesaurus.C
src/frontends/xforms/FormThesaurus.h
src/frontends/xforms/FormToc.C
src/frontends/xforms/FormToc.h
src/frontends/xforms/FormUrl.C
src/frontends/xforms/FormUrl.h
src/frontends/xforms/FormVCLog.C
src/frontends/xforms/FormVCLog.h
src/frontends/xforms/Toolbar_pimpl.C
src/frontends/xforms/Toolbar_pimpl.h
src/frontends/xforms/Tooltips.C
src/frontends/xforms/Tooltips.h
src/frontends/xforms/XFormsView.C
src/frontends/xforms/XFormsView.h
src/frontends/xforms/guiapi.C

index c78464eb2b8cd4c136a133362587a463afe84bad..fb64a27cd080d701ec821728586001ef62cecf03 100644 (file)
@@ -1,3 +1,9 @@
+2002-08-12  Angus Leeming  <leeming@lyx.org>
+
+       * DialogBase.h: no longer derive from boost::signals::trackable.
+
+       * Toolbar.[Ch] (c-tor): no londer passed a Dialogs &.
+
 2002-08-08  John Levon  <levon@movementarian.org>
 
        * Toolbar.C:
index e9ba6926c3d959e989b344b4d371768622e10848..e4179d002235028d6e60272b1ac021ce9aa5a578 100644 (file)
@@ -17,7 +17,6 @@
 #ifndef DIALOGBASE_H
 #define DIALOGBASE_H
 
-#include <boost/signals/trackable.hpp>
 #include <boost/utility.hpp>
 
 /** Abstract base class of all dialogs.
@@ -26,7 +25,7 @@
     satisfy that request.  Thus a dialog will have to "pull" the necessary
     details from the core of the program.
  */
-class DialogBase : public boost::signals::trackable, boost::noncopyable
+class DialogBase : boost::noncopyable
 {
 public:
        /**@name Constructors and Deconstructors */
index c544bb3f916cc711daf47cbc28fd01a7081bf984..251f628004fb6b415f0a5582c7e0a35e5a61469e 100644 (file)
 
 using std::endl;
 
-Toolbar::Toolbar(LyXView * o, Dialogs & d,
-                int x, int y, ToolbarDefaults const &tbd)
+Toolbar::Toolbar(LyXView * o, int x, int y, ToolbarDefaults const &tbd)
        : last_textclass_(-1)
 {
-       pimpl_ = new Pimpl(o, d, x, y);
+       pimpl_ = new Pimpl(o, x, y);
 
        // extracts the toolbar actions from tbd
        for (ToolbarDefaults::const_iterator cit = tbd.begin();
index 77c1bd52d92caecb247201c478f6e1202c385565..331024efd092f639243c5f41cccf2b5025f98eb3 100644 (file)
@@ -22,7 +22,7 @@
 
 class LyXView;
 class ToolbarDefaults;
-class Dialogs;
+
 
 /** The LyX GUI independent toolbar class
   The GUI interface is implemented in the corresponding Toolbar_pimpl class.
@@ -30,8 +30,7 @@ class Dialogs;
 class Toolbar {
 public:
        ///
-       Toolbar(LyXView * o, Dialogs & d,
-               int x, int y, ToolbarDefaults const &);
+       Toolbar(LyXView * o, int x, int y, ToolbarDefaults const &);
 
        ///
        ~Toolbar();
index 384d656a38dcf5d72040991da9fc19f796dfcbe3..4837f603b72c8fc3bd79b11fd8e1d9c0d6c7bf0e 100644 (file)
@@ -1,3 +1,21 @@
+2002-08-12  Angus Leeming  <leeming@lyx.org>
+
+       * ControlButtons.[Ch] (bc, view): no longer virtual.
+       (setView, setButtonController): new methods, invoked by GUI.
+
+       * ControlDialog.h (show):
+       * ControlInset.h (createInset, showInset): make public, so that GUI can
+       invoke them.
+
+       * GUI.h: GUI now contains a controller, rather than deriving from it.
+       remove all those friend functions since we can now access the show,
+       createInset, showInset controller methods.
+
+       * ViewBase.h: simplifiy, enabling ControlButtons to be forward-declared.
+       (ViewBC): scrapped.
+
+       * character.h: #include a couple of STL files.
+
 2002-08-08  John Levon  <levon@movementarian.org>
 
        * ControlCommandBuffer.C: LyXAction cleanup
index 4b9560acb39fffd70b8bb56329119deab230bdf4..7c2172744b66ce3a36a9cb5e089774af7650518c 100644 (file)
 #include "ButtonControllerBase.h"
 #include "ViewBase.h"
 #include "lyxrc.h"
+#include "support/LAssert.h"
+
 
 ControlButtons::ControlButtons()
-       : emergency_exit_(false), is_closing_(false)
+       : emergency_exit_(false), is_closing_(false), bc_ptr_(0), view_ptr_(0)
 {}
 
 
@@ -62,3 +64,30 @@ bool ControlButtons::IconifyWithMain() const
 {
        return lyxrc.dialogs_iconify_with_main;
 }
+
+
+ButtonControllerBase & ControlButtons::bc()
+{
+       lyx::Assert(bc_ptr_);
+       return *bc_ptr_;
+}
+
+
+ViewBase & ControlButtons::view()
+{
+       lyx::Assert(view_ptr_);
+       return *view_ptr_;
+}
+
+
+void ControlButtons::setView(ViewBase & v)
+{
+       view_ptr_ = &v;
+}
+
+
+void ControlButtons::setButtonController(ButtonControllerBase & bc)
+{
+       bc_ptr_ = &bc;
+}
+
index 23978f22128a0c8c713a2bb096fa6d5e780ebaf9..2e5e796cae83667fdc3d89ad08d216fc14fba199 100644 (file)
@@ -48,7 +48,9 @@ public:
        ///
        virtual ~ControlButtons() {}
 
-       /// These functions are called when the controlling buttons are pressed.
+       /** These functions are called by the view when the appropriate buttons
+        *  are pressed.
+        */
        ///
        void ApplyButton();
        ///
@@ -57,15 +59,22 @@ public:
        void CancelButton();
        ///
        void RestoreButton();
-       ///
+
+       /// Returns the user-specified iconification policy.
        bool IconifyWithMain() const;
 
-       /** Allow the view to access the ButtonController. This method must be
-           instantiated in a daughter class that creates the actual instance
-           of the ButtonController. */
-       virtual ButtonControllerBase & bc() = 0;
+       ///
+       ButtonControllerBase & bc();
+
+       ///
+       void setView(ViewBase &);
+       ///
+       void setButtonController(ButtonControllerBase &);
 
 protected:
+       ///
+       ViewBase & view();
+
        /** When Applying it's useful to know whether the dialog is about
            to close or not (no point refreshing the display for example). */
        bool isClosing() const { return is_closing_; }
@@ -77,11 +86,6 @@ protected:
        /// Update dialog before showing it.
        virtual void update() = 0;
 
-       /** Allow the Controller to access the View. This method must be
-           instantiated in a daughter class that creates the actual instance
-           of the View. */
-       virtual ViewBase & view() = 0;
-
        /** This flag can be set by one of the miriad the controller methods
            to ensure that the dialog is shut down. */
        bool emergency_exit_;
@@ -89,7 +93,10 @@ protected:
 private:
        ///
        bool is_closing_;
-
+       /// We own neither of these pointers.
+       ButtonControllerBase * bc_ptr_;
+       ///
+       ViewBase * view_ptr_;
 };
 
 #endif // CONTROLBUTTONS_H
index a2cbfd0fbdfd29aaa28a75d76088c9f6629a2fcc..f55b9ef8ee86f02e7b70d39e0b369f691cf57941 100644 (file)
@@ -29,9 +29,12 @@ public:
        ///
        ControlDialog(LyXView &, Dialogs &);
 
-protected:
-       /// Show the dialog.
+       /** Show the dialog.
+        *  Publicly accessible so that it can be invoked by the Dialogs class.
+        */
        virtual void show();
+
+protected:
        /// Hide the dialog.
        virtual void hide();
        /// Update the dialog.
index 89ae4b5d5ed8ba8209adff257a156ff0e7e5c32e..494737845da22c00640b12620f83ed1fb79d9a0c 100644 (file)
@@ -37,12 +37,13 @@ public:
        ///
        Params const & params() const;
 
-protected:
        /// Slots connected in the daughter classes c-tor.
        /// Slot launching dialog to (possibly) create a new inset.
        void createInset(string const &);
        /// Slot launching dialog to an existing inset.
        void showInset(Inset *);
+
+protected:
        /// Allow the daughter methods to access the inset.
        Inset * inset() const;
 
index 6a93661c911a0b6b314508350d5b9f41eb05d748..c54320a786fdd6ccaeee70a7529e1d4e137b3aab 100644 (file)
 #define GUI_H
 
 #include "ButtonController.h"
-#include "ViewBase.h"
 
-/** This class instantiates and makes available the GUI-specific
-    ButtonController and View.
+
+/** This class makes a whole out of the disparate parts of a dialog.
  */
-template <class Controller, class GUIview, class Policy, class GUIbc>
-class GUI : public Controller {
+template <typename Controller, typename GUIview,
+         typename Policy,     typename GUIbc>
+class GUI {
 public:
        ///
-       GUI(LyXView & lv, Dialogs & d) : Controller(lv, d), view_(*this, d) {}
+       GUI(LyXView & lv, Dialogs & d);
        ///
-       virtual ButtonControllerBase & bc() { return bc_; }
+       Controller & controller() { return controller_; }
        ///
-       virtual ViewBase & view() { return view_; }
-
-       friend void gui_ShowAboutlyx(LyXView &, Dialogs &);
-       friend void gui_ShowBibitem(InsetCommand *, LyXView &, Dialogs &);
-       friend void gui_ShowBibtex(InsetCommand *, LyXView &, Dialogs &);
-       friend void gui_ShowCharacter(LyXView &, Dialogs &);
-       friend void gui_SetUserFreeFont(LyXView &, Dialogs &);
-       friend void gui_ShowCitation(InsetCommand *, LyXView &, Dialogs &);
-       friend void gui_CreateCitation(string const &, LyXView &, Dialogs &);
-       friend void gui_ShowDocument(LyXView &, Dialogs &);
-       friend void gui_ShowError(InsetError *, LyXView &, Dialogs &);
-       friend void gui_ShowERT(InsetERT *, LyXView &, Dialogs &);
-       friend void gui_UpdateERT(InsetERT *, LyXView &, Dialogs &);
-       friend void gui_ShowExternal(InsetExternal *, LyXView &, Dialogs &);
-       friend void gui_ShowFloat(InsetFloat *, LyXView &, Dialogs &);
-       friend void gui_ShowForks(LyXView &, Dialogs &);
-       friend void gui_ShowGraphics(InsetGraphics *, LyXView &, Dialogs &);
-       friend void gui_ShowInclude(InsetInclude *, LyXView &, Dialogs &);
-       friend void gui_ShowIndex(InsetCommand *, LyXView &, Dialogs &);
-       friend void gui_CreateIndex(LyXView &, Dialogs &);
-       friend void gui_ShowLogFile(LyXView &, Dialogs &);
-       friend void gui_ShowMathPanel(LyXView &, Dialogs &);
-       friend void gui_ShowMinipage(InsetMinipage *, LyXView &, Dialogs &);
-       friend void gui_UpdateMinipage(InsetMinipage *, LyXView &, Dialogs &);
-       friend void gui_ShowParagraph(LyXView &, Dialogs &);
-       friend void gui_ShowPreamble(LyXView &, Dialogs &);
-       friend void gui_ShowPreferences(LyXView &, Dialogs &);
-       friend void gui_ShowPrint(LyXView &, Dialogs &);
-       friend void gui_ShowRef(InsetCommand *, LyXView &, Dialogs &);
-       friend void gui_CreateRef(string const &, LyXView &, Dialogs &);
-       friend void gui_ShowSearch(LyXView &, Dialogs &);
-       friend void gui_ShowSendto(LyXView &, Dialogs &);
-       friend void gui_ShowSpellchecker(LyXView &, Dialogs &);
-       friend void gui_ShowTabularCreate(LyXView &, Dialogs &);
-       friend void gui_ShowTexinfo(LyXView &, Dialogs &);
-       friend void gui_ShowTOC(InsetCommand *, LyXView &, Dialogs &);
-       friend void gui_CreateTOC(string const &, LyXView &, Dialogs &);
-       friend void gui_ShowUrl(InsetCommand *, LyXView &, Dialogs &);
-       friend void gui_CreateUrl(string const &, LyXView &, Dialogs &);
-       friend void gui_ShowVCLogFile(LyXView &, Dialogs &);
+       Controller const & controller() const { return controller_; }
 
 private:
+       ///
+       Controller controller_;
        ///
        ButtonController<Policy, GUIbc> bc_;
        ///
        GUIview view_;
 };
 
+
+template <typename Controller, typename GUIview,
+         typename Policy,     typename GUIbc>
+GUI<Controller, GUIview, Policy, GUIbc>::GUI(LyXView & lv, Dialogs & d)
+       : controller_(lv, d),
+         view_()
+{
+       controller_.setView(view_);
+       controller_.setButtonController(bc_);
+       view_.setController(controller_);
+}
+
+
 #endif // GUI_H
index b12eed5295bbe551d79443b89c1cd8c68d10ec35..c1d98ab83b7b003a1cc3aa9dfc39640fa0a2007a 100644 (file)
 #ifndef VIEWBASE_H
 #define VIEWBASE_H
 
-#include <boost/utility.hpp>
-#include "ControlButtons.h"
+#include "support/LAssert.h"
+
+class ControlButtons;
+
 
 class ViewBase {
 public:
        ///
-       ViewBase(ControlButtons & c) : controller_(c) {}
+       ViewBase() : controller_ptr_(0) {}
        ///
        virtual ~ViewBase() {}
 
        /// Apply changes to LyX data from dialog.
        virtual void apply() = 0;
+       /// build the dialog
+       virtual void build() = 0;
        /// Hide the dialog.
        virtual void hide() = 0;
        /// Redraw the dialog (e.g. if the colors have been remapped).
@@ -34,47 +38,35 @@ public:
        virtual void show() = 0;
        /// Update dialog before/whilst showing it.
        virtual void update() = 0;
-       /// build the dialog
-       virtual void build() = 0;
 
-       /** These shortcuts allow (e.g. xform's) global callback functions
-           access to the buttons without making the whole controller_ public.
-       */
-       ///
-       void ApplyButton() { controller_.ApplyButton(); }
-       ///
-       void OKButton() { controller_.OKButton(); }
-       ///
-       void CancelButton() { controller_.CancelButton(); }
-       ///
-       void RestoreButton() { controller_.RestoreButton(); }
-
-       /** Defaults to nothing. Can be used by the Controller, however, to
-           indicate to the View that something has changed and that the
-           dialog therefore needs updating. */
+       /** Defaults to nothing. Can be used by the controller, however, to
+        *  indicate to the view that something has changed and that the
+        *  dialog therefore needs updating.
+        */
        virtual void partialUpdate(int) {}
 
-protected:
-       /// The view is, after all, controlled!
-       ControlButtons & controller_;
-};
-
-
-/** A generic class to cast the ButtonController controller_.bc_ to it's
-    daughter class. */
-template <class GUIbc>
-class ViewBC : public ViewBase {
-public:
+       /** This should be set by the GUI class that owns both the controller
+        *  and the view
+        */
+       void setController(ControlButtons & c) { controller_ptr_ = &c; }
+       
        ///
-       ViewBC(ControlButtons & c) : ViewBase(c) {}
-
-protected:
+       ControlButtons & getController()
+       {
+               lyx::Assert(controller_ptr_);
+               return *controller_ptr_;
+       }
        ///
-       GUIbc & bc() const
+       ControlButtons const & getController() const
        {
-               return static_cast<GUIbc &>(controller_.bc());
-               // return dynamic_cast<GUIbc &>(controller_.bc());
+               lyx::Assert(controller_ptr_);
+               return *controller_ptr_;
        }
+
+protected:
+       /// We don't own this.
+       ControlButtons * controller_ptr_;
 };
 
+
 #endif // VIEWBASE_H
index 10c7530c4462be520eb82e311fc4d3c10553a85a..75fe91ec9692a36874bc07bb511d1284597be185 100644 (file)
@@ -22,6 +22,9 @@
 #include "lyxfont.h"
 #include "LColor.h"
 
+#include <utility>
+#include <vector>
+
 /** Functions of use to the character GUI controller and view */
 namespace frnt {
        ///
index eede5dff10069bad02850624693226ac5d723ce0..968a020d560c121d15f2070444ad37bd8ad95058 100644 (file)
@@ -1,3 +1,57 @@
+2002-08-12  Angus Leeming  <leeming@lyx.org>
+
+       * Menubar_pimpl.C: no need to #include "Dialogs.h". Remove semi-colon
+       from namespace closing delimiter.
+
+       * Menubar_pimpl.h:  remove MenuItemInfo:: prefix from c-tor declaration.
+
+       * QAbout.[Ch]:
+       * QBibitem.[Ch]:
+       * QBibtex.[Ch]:
+       * QCharacter.[Ch]:
+       * QCitation.[Ch]:
+       * QERT.[Ch]:
+       * QError.[Ch]:
+       * QExternal.[Ch]:
+       * QFloat.[Ch]:
+       * QGraphics.[Ch]:
+       * QInclude.[Ch]:
+       * QIndex.[Ch]:
+       * QLog.[Ch]:
+       * QMinipage.[Ch]:
+       * QParagraph.[Ch]:
+       * QPreamble.[Ch]:
+       * QPrint.[Ch]:
+       * QRef.[Ch]:
+       * QSearch.[Ch]:
+       * QShowFile.[Ch]:
+       * QSpellchecker.[Ch]:
+       * QTabularCreate.[Ch]:
+       * QTexinfo.[Ch]:
+       * QThesaurus.[Ch]:
+       * QToc.[Ch]:
+       * QURL.[Ch]:
+       * QVCLog.[Ch]:
+       No longer pass Controller or Dialogs to the c-tor.
+       No longer forward-declare Dialogs.
+
+       * Qt2Base.[Ch]: derives from ViewBase directly.
+       No longer passed ControlButtons & or Dialogs &.
+       (bc): new method, enabling the daughter classes to access the
+       ButtonController.
+       (slotWMHide):
+       (slotApply):
+       (slotOK):
+       (slotClose):
+       (slotRestore): changes due to a change in the ViewBase class.
+
+       * QtView.C (c-tor): no longer pass Dialogs & to the Toolbar.
+
+       * Toolbar_pimpl.[Ch] (c-tor): no longer passed a Dialogs &.
+
+       * guiapi.C: access the controller methods by explicit invocation of the
+       controller.
+
 2002-08-09  John Levon  <levon@movementarian.org>
 
        * Toolbar_pimpl.C: add missing header
index afd9da20e9a7142f88c4d517ca82af2298ec6670..998b0ed9f793bdea4fa6c1aa61047a2cbbc10d23 100644 (file)
@@ -19,7 +19,6 @@
 #include "LyXAction.h"
 #include "kbmap.h"
 #include "buffer.h"
-#include "Dialogs.h"
 #include "lyxfunc.h"
 #include "FloatList.h"
 #include "support/lstrings.h"
@@ -58,7 +57,7 @@ string const getLabel(MenuItem const & mi)
        return label;
 }
 
-};
+}
  
 typedef vector<int>::size_type size_type;
 
index 66e0e12f7545bcca82778c0790d245ac33a1fa2e..0ffe61261d3a609551d74555b891c2b1d83dabfa 100644 (file)
@@ -36,10 +36,10 @@ class MenuBackend;
 /// stored state for menu items
 struct MenuItemInfo {
        // I REALLY hate this stupid requirement of std::map
-       MenuItemInfo::MenuItemInfo()
+       MenuItemInfo()
                : parent_(0), id_(0), item_(0) {};
  
-       MenuItemInfo::MenuItemInfo(QMenuData * p, int id, MenuItem const * item)
+       MenuItemInfo(QMenuData * p, int id, MenuItem const * item)
                : parent_(p), id_(id), item_(item) {};
  
        /// menu containing item
index 29b4d283edfd40d4075ae3c8860c2fc9cf21b2bd..859c3cb5633fbfba88d0983c63218e43d4bd046e 100644 (file)
@@ -28,8 +28,8 @@ using std::getline;
 
 typedef Qt2CB<ControlAboutlyx, Qt2DB<QAboutDialog> > base_class;
 
-QAbout::QAbout(ControlAboutlyx & c, Dialogs &)
-       : base_class(c, _("About LyX"))
+QAbout::QAbout()
+       : base_class(_("About LyX"))
 {
 }
 
index 7f0de19d064b3bf7eb8826dfbf2eaed40df8deb4..00c360627dcc78b36116d7c1243385ce10af96c2 100644 (file)
@@ -13,7 +13,6 @@
 #include "Qt2Base.h"
 #include "boost/utility.hpp"
 
-class Dialogs;
 class LyXView;
 class QAboutDialog;
 class ControlAboutlyx;
@@ -22,7 +21,7 @@ class QAbout
        : public Qt2CB<ControlAboutlyx, Qt2DB<QAboutDialog> >
 {
 public:
-       QAbout(ControlAboutlyx &, Dialogs &);
+       QAbout();
 
 private:
        /// not needed
index 77b3acb5bb83ec05215c8097bf3445340843f1a6..c96dbfcc6295459a0db1b2de53d134df5cfe0412 100644 (file)
@@ -23,8 +23,8 @@
  
 typedef Qt2CB<ControlBibitem, Qt2DB<QBibitemDialog> > base_class;
 
-QBibitem::QBibitem(ControlBibitem & c, Dialogs &)
-       : base_class(c, _("Bibliography Item"))
+QBibitem::QBibitem()
+       : base_class(_("Bibliography Item"))
 {
 }
 
index 9e6789c029b201e673153fd049be47ad6c5786fe..0797c31581b2d010ccf2ca5a3387a490bdab5800 100644 (file)
@@ -21,7 +21,7 @@ class QBibitem :
        friend class QBibitemDialog;
 
 public:
-       QBibitem(ControlBibitem &, Dialogs &);
+       QBibitem();
 
 protected:
        virtual bool isValid();
index 75a75e8ceaacd7702acbba1e103d0670f86da00f..16f20bee0cb66c7c4c71e33cd75bfa29df0abcbf 100644 (file)
@@ -29,8 +29,8 @@ using std::vector;
 
 typedef Qt2CB<ControlBibtex, Qt2DB<QBibtexDialog> > base_class;
 
-QBibtex::QBibtex(ControlBibtex & c, Dialogs &)
-       : base_class(c, _("BibTeX"))
+QBibtex::QBibtex()
+       : base_class(_("BibTeX"))
 {
 }
 
index 104555933efd781c80c8d5e388360f622ef11ccb..8528a260df8fa92fbfe4c5c7a3b5d5af1f340409 100644 (file)
@@ -21,7 +21,7 @@ class QBibtex :
        friend class QBibtexDialog;
 
 public:
-       QBibtex(ControlBibtex &, Dialogs &);
+       QBibtex();
 
 protected:
        virtual bool isValid();
index 2d7a64bc3290dcb6ba426339603e2a30dc63dc9d..ecc9e8eed67968d9455db80a050ce43509b0e9d2 100644 (file)
@@ -27,8 +27,8 @@ using std::vector;
 
 typedef Qt2CB<ControlCharacter, Qt2DB<QCharacterDialog> > base_class;
 
-QCharacter::QCharacter(ControlCharacter & c, Dialogs &)
-       : base_class(c, _("Character"))
+QCharacter::QCharacter()
+       : base_class(_("Character"))
 {
 }
 
index 0a6883c0b7c11cca35ca564fe0637ae57efe3754..2c059e20ca52b5ea4e84691b964f5cff6cda2a6e 100644 (file)
@@ -22,7 +22,7 @@
 
 class ControlCharacter;
 class QCharacterDialog;
-class Dialogs;
+
 
 class QCharacter :
        public Qt2CB<ControlCharacter, Qt2DB<QCharacterDialog> >
@@ -30,7 +30,7 @@ class QCharacter :
        friend class QCharacterDialog;
 
 public:
-       QCharacter(ControlCharacter &, Dialogs &);
+       QCharacter();
 
 private:
        /// Apply changes
index ca20bdcf6ecfbe5e798652486412772df78fa5ff..d0e079eefc19a46e5def79f416030906eb5c6527 100644 (file)
@@ -41,8 +41,8 @@ using std::vector;
 
 typedef Qt2CB<ControlCitation, Qt2DB<QCitationDialog> > base_class;
 
-QCitation::QCitation(ControlCitation & c, Dialogs &)
-       : base_class(c, _("Citation"))
+QCitation::QCitation()
+       : base_class(_("Citation"))
 {}
 
 
index 62cd8c6c848ad166905c8ebfaf913cc8e7767793..0224fec75808fb9ec2dafb0695dce58012b82280 100644 (file)
@@ -21,7 +21,7 @@ class QListBox;
 
 class ControlCitation;
 class QCitationDialog;
-class Dialogs;
+
 
 class QCitation : public Qt2CB<ControlCitation, Qt2DB<QCitationDialog> >
 {
@@ -29,7 +29,7 @@ class QCitation : public Qt2CB<ControlCitation, Qt2DB<QCitationDialog> >
 
 public:
        ///
-       QCitation(ControlCitation &, Dialogs &);
+       QCitation();
 
 private:
        ///
index c65e28af2acd6aae760ff457665360a555b70aa9..f034bcbe778454d24b59938e26e2c582fbbd3a84 100644 (file)
@@ -20,8 +20,8 @@
  
 typedef Qt2CB<ControlERT, Qt2DB<QERTDialog> > base_class;
 
-QERT::QERT(ControlERT & c, Dialogs &)
-       : base_class(c, _("LaTeX ERT"))
+QERT::QERT()
+       : base_class(_("LaTeX ERT"))
 {
 }
 
index 7d0e014c8a0fdeeee98b7872e3c363fbf2166fbd..fa0bc3f6f44cfb5d5d5b2c9e04ee31fa96855ef1 100644 (file)
@@ -14,7 +14,7 @@
 
 class ControlERT;
 class QERTDialog;
-class Dialogs;
+
 
 class QERT :
        public Qt2CB<ControlERT, Qt2DB<QERTDialog> >
@@ -22,7 +22,7 @@ class QERT :
        friend class QERTDialog;
 
 public:
-       QERT(ControlERT &, Dialogs &);
+       QERT();
 
 private:
        /// Apply changes
index 7d32c1fccfaf1796c5e979c7b1847905c2f40ae3..d2cd908c40f5bbefe44261ad30bd657e9734219d 100644 (file)
@@ -20,8 +20,8 @@
  
 typedef Qt2CB<ControlError, Qt2DB<QErrorDialog> > base_class;
 
-QError::QError(ControlError & c, Dialogs &)
-       : base_class(c, _("LaTeX Error"))
+QError::QError()
+       : base_class(_("LaTeX Error"))
 {
 }
 
index 17a498afb9e0b3be5ef9b2edef2a4b247a74a1b6..1737a700ba530af0a395597b486d0971b8dacc70 100644 (file)
@@ -14,7 +14,7 @@
 
 class ControlError;
 class QErrorDialog;
-class Dialogs;
+
 
 class QError :
        public Qt2CB<ControlError, Qt2DB<QErrorDialog> >
@@ -22,7 +22,7 @@ class QError :
        friend class QErrorDialog;
 
 public:
-       QError(ControlError &, Dialogs &);
+       QError();
 
 private:
        /// Apply changes
index 7cc2941c6898f30237297118671925944a785fd4..fe8c9576990529ee45d83539cbad4a5710ce1c87 100644 (file)
@@ -23,8 +23,8 @@
  
 typedef Qt2CB<ControlExternal, Qt2DB<QExternalDialog> > base_class;
 
-QExternal::QExternal(ControlExternal & c, Dialogs &)
-       : base_class(c, _("External"))
+QExternal::QExternal()
+       : base_class(_("External"))
 {
 }
 
index b058df9ccedcb64f0640453e189a64148ae8d3a7..1f900eb07c3cdf8f961826a7bc970025be73d48d 100644 (file)
@@ -21,7 +21,7 @@ class QExternal :
        friend class QExternalDialog;
 
 public:
-       QExternal(ControlExternal &, Dialogs &);
+       QExternal();
 
 protected:
        virtual bool isValid();
index 4101dd4bc29c4fe9fb8f883fdefb86d98508470a..7713d512bf7f4b1b42c30319d96ce50404f8ef3e 100644 (file)
@@ -27,8 +27,8 @@
 
 typedef Qt2CB<ControlFloat, Qt2DB<QFloatDialog> > base_class;
 
-QFloat::QFloat(ControlFloat & c, Dialogs &)
-       : base_class(c, _("LaTeX Information"))
+QFloat::QFloat()
+       : base_class(_("LaTeX Information"))
 {
 }
 
index ceecbdb257164e9f6676ee40b5eae6bb4f852f42..fbea7471434889130d9117215a627e5c8415a0c8 100644 (file)
@@ -27,7 +27,7 @@ public:
        ///
        friend class QFloatDialog;
        ///
-       QFloat(ControlFloat &, Dialogs &);
+       QFloat();
 private:
        /// Apply changes
        virtual void apply();
index 4e8768598694f45b9aa006952ff208b2497776d8..fe380c55e41e68d309da6cb25eb0cbb310883216 100644 (file)
@@ -41,8 +41,8 @@
 
 typedef Qt2CB<ControlGraphics, Qt2DB<QGraphicsDialog> > base_class;
 
-QGraphics::QGraphics(ControlGraphics & c, Dialogs &)
-       : base_class(c, _("Graphics"))
+QGraphics::QGraphics()
+       : base_class(_("Graphics"))
 {
 }
 
index 31870e8fb6fecdf5e019895e48fd92d2e62bb2a3..92eee3e586a24a9945f42dc7cb28b4d35189c101 100644 (file)
@@ -28,7 +28,7 @@ public:
        ///
        friend class QGraphicsDialog;
        ///
-       QGraphics(ControlGraphics &, Dialogs &);
+       QGraphics();
 
 protected:
        virtual bool isValid();
index 03b1d283b9eb44e92686e564e2ff970d3c595b3d..73a9b928f281359f9f2ae4abe5a7ff898fa589c9 100644 (file)
@@ -27,8 +27,8 @@
 
 typedef Qt2CB<ControlInclude, Qt2DB<QIncludeDialog> > base_class;
 
-QInclude::QInclude(ControlInclude & c, Dialogs &)
-       : base_class(c, _("Include"))
+QInclude::QInclude()
+       : base_class(_("Include"))
 {
 }
 
index 09876bbbe2a3521609d975af5723f823a57d7acf..b1cb7941a33b00362fb36f30bb980ace2eb6b04e 100644 (file)
@@ -27,7 +27,7 @@ public:
        ///
        friend class QIncludeDialog;
        ///
-       QInclude(ControlInclude &, Dialogs &);
+       QInclude();
 
 protected:
        virtual bool isValid();
index a730962853ba3f0de4856a7d45eb8810ae635d6f..f1c39be96bb23c3271b50210230930dbb95a3a5d 100644 (file)
@@ -19,8 +19,8 @@
 
 typedef Qt2CB<ControlIndex, Qt2DB<QIndexDialog> > base_class;
 
-QIndex::QIndex(ControlIndex & c, Dialogs &)
-       : base_class(c, _("Index"))
+QIndex::QIndex()
+       : base_class(_("Index"))
 {
 }
 
index 1d8521ad4b7dc5cfd6d5e52755c952db6d25d542..ecd3885e99898257d4b1c9536d66be8381c6e515 100644 (file)
@@ -15,7 +15,7 @@
 
 class ControlIndex;
 class QIndexDialog;
-class Dialogs;
+
 
 class QIndex :
        public Qt2CB<ControlIndex, Qt2DB<QIndexDialog> >
@@ -23,7 +23,7 @@ class QIndex :
        friend class QIndexDialog;
 
 public:
-       QIndex(ControlIndex &, Dialogs &);
+       QIndex();
 
 protected:
        virtual bool isValid();
index 4c98679229db86e5dceab88337b8a9012d0bd0ef..6d6a53b4612290a7854e444a94b2787e7b21825a 100644 (file)
@@ -29,8 +29,8 @@ using std::getline;
 
 typedef Qt2CB<ControlLog, Qt2DB<QLogDialog> > base_class;
 
-QLog::QLog(ControlLog & c, Dialogs &)
-       : base_class(c, _("Log"))
+QLog::QLog()
+       : base_class(_("Log"))
 {
 }
 
index 84dba702861526ee9289a3c45205a439f7c8174b..1f971c434451dd084dded408d087323800b93c62 100644 (file)
@@ -27,7 +27,7 @@ public:
        ///
        friend class QLogDialog;
        ///
-       QLog(ControlLog &, Dialogs &);
+       QLog();
 
 private:
        /// Apply changes
index 1b7104944d646bd034fe8584e26283478a90b910..dfa93c779324fbb663e771da413002f6937938d8 100644 (file)
@@ -29,8 +29,8 @@
 
 typedef Qt2CB<ControlMinipage, Qt2DB<QMinipageDialog> > base_class;
 
-QMinipage::QMinipage(ControlMinipage & c, Dialogs &)
-       : base_class(c, _("Minipage"))
+QMinipage::QMinipage()
+       : base_class(_("Minipage"))
 {
 }
 
index c2701592131083d475cc8548abd9dfc208f1d006..e36e2d594d773cc1504f4971fabff319742ffe37 100644 (file)
@@ -27,7 +27,7 @@ public:
        ///
        friend class QMinipageDialog;
        ///
-       QMinipage(ControlMinipage &, Dialogs &);
+       QMinipage();
 
 private:
        /// Apply changes
index 48a4b843266656886d458e515e02b5ebc66baf2d..d859e21bcfd6747fc14f3579f9bc98e697d97c01 100644 (file)
@@ -42,8 +42,8 @@ using std::remove_if;
 
 typedef Qt2CB<ControlParagraph, Qt2DB<QParagraphDialog> > base_class;
 
-QParagraph::QParagraph(ControlParagraph & c, Dialogs &)
-       : base_class(c, _("Paragraph Layout"))
+QParagraph::QParagraph()
+       : base_class(_("Paragraph Layout"))
 {}
 
 void QParagraph::build_dialog()
index f51218c7e1fe5d49fc88836a40e53b13f21a9e51..2c5d5cd996f4f9c68dc33c70a4ac686949cc30d7 100644 (file)
@@ -16,7 +16,7 @@
 
 class ControlParagraph;
 class QParagraphDialog;
-class Dialogs;
+
 
 class QParagraph :
        public Qt2CB<ControlParagraph, Qt2DB<QParagraphDialog> >
@@ -24,7 +24,7 @@ class QParagraph :
        friend class QParagraphDialog;
 
 public:
-       QParagraph(ControlParagraph &, Dialogs &);
+       QParagraph();
 
 private:
        /// Apply changes
index bbd66f62c72a1e0b5d61f7ef59349fe56c746032..e9d15963a68f9ac463d67acea4d58c579ea7075a 100644 (file)
@@ -26,8 +26,8 @@
 
 typedef Qt2CB<ControlPreamble, Qt2DB<QPreambleDialog> > base_class;
 
-QPreamble::QPreamble(ControlPreamble & c, Dialogs &)
-       : base_class(c, _("LaTeX Preamble"))
+QPreamble::QPreamble()
+       : base_class(_("LaTeX Preamble"))
 {
 }
 
index 021973a846f224c882cbd1cd707c94993bd972a3..b0f57be281be6f3e4c3ac28a0880425e99845211 100644 (file)
@@ -27,7 +27,7 @@ public:
        ///
        friend class QPreambleDialog;
        ///
-       QPreamble(ControlPreamble &, Dialogs &);
+       QPreamble();
 
 private:
        /// Apply changes
index 4241e14d16382e67b21b996d58978c53754ddc5a..7f6af2bb649ec358b1bd2d2edff1d51bbe8787f3 100644 (file)
@@ -32,8 +32,8 @@
  
 typedef Qt2CB<ControlPrint, Qt2DB<QPrintDialog> > base_class;
 
-QPrint::QPrint(ControlPrint & c, Dialogs &)
-       : base_class(c, _("Print"))
+QPrint::QPrint()
+       : base_class(_("Print"))
 {
 }
 
index d4f367a9c5108ade27a74ccf53b6be3771c7aa34..be9de9ecf0b67eef9a3d2e547b6d287f4fef1fbd 100644 (file)
@@ -29,7 +29,7 @@ public:
        ///
        friend class QPrintDialog;
        ///
-       QPrint(ControlPrint &, Dialogs &);
+       QPrint();
 
 private:
        /// Apply changes
index 9ecad81bd60cfdcf821918b9486b2a03943da4b2..e287509ccb4fcdd61de10e10d0483468d31e2b3b 100644 (file)
@@ -33,8 +33,8 @@ using std::endl;
 
 typedef Qt2CB<ControlRef, Qt2DB<QRefDialog> > base_class;
 
-QRef::QRef(ControlRef & c, Dialogs &)
-       : base_class(c, _("Cross Reference")),
+QRef::QRef()
+       : base_class(_("Cross Reference")),
        sort_(false), at_ref_(false)
 {
 }
index 2c671c21d66c1b91d045470a3322d9c1c5ce0a13..ff40a27664176f859d2c8db6d15957025fb25eb0 100644 (file)
@@ -17,7 +17,7 @@
 
 class ControlRef;
 class QRefDialog;
-class Dialogs;
+
 
 class QRef :
        public Qt2CB<ControlRef, Qt2DB<QRefDialog> >
@@ -25,7 +25,7 @@ class QRef :
        friend class QRefDialog;
 
 public:
-       QRef(ControlRef & c, Dialogs &);
+       QRef();
 
 private:
        /// apply changes
index 8cc286a2161e06d1760ff4e5c3f70674790091c5..75d96855bfec0a17dcf8403db8ff8dff5672a80e 100644 (file)
@@ -27,8 +27,8 @@
 
 typedef Qt2CB<ControlSearch, Qt2DB<QSearchDialog> > base_class;
 
-QSearch::QSearch(ControlSearch & c, Dialogs &)
-       : base_class(c, _("Search"))
+QSearch::QSearch()
+       : base_class(_("Search"))
 {
 }
 
index 576c413853059f956991c072385ba3c0f58bcd93..0ad702c8d4868fd5a82d8cae0315d54811cb9406 100644 (file)
@@ -18,7 +18,7 @@
 
 class ControlSearch;
 class QSearchDialog;
-class Dialogs;
+
 
 ///
 class QSearch
@@ -28,7 +28,7 @@ public:
        ///
        friend class QSearchDialog;
        ///
-       QSearch(ControlSearch &, Dialogs &);
+       QSearch();
 
 private:
        /// Apply changes
index 42d04e8080b7d62e1a02e683327465c31910a2ba..1798cbfb233960c9c4b5981aa1c8a4228226453c 100644 (file)
@@ -20,8 +20,8 @@
 
 typedef Qt2CB<ControlShowFile, Qt2DB<QShowFileDialog> > base_class;
 
-QShowFile::QShowFile(ControlShowFile & c, Dialogs &)
-       : base_class(c, _("ShowFile"))
+QShowFile::QShowFile()
+       : base_class(_("ShowFile"))
 {
 }
 
index d6279da93f5aa16c63827d9a4a3f5c0f3474e1c4..c35676bf963750b859470a25188faa4c7a445714 100644 (file)
@@ -14,7 +14,7 @@
 
 class ControlShowFile;
 class QShowFileDialog;
-class Dialogs;
+
 
 class QShowFile :
        public Qt2CB<ControlShowFile, Qt2DB<QShowFileDialog> >
@@ -22,7 +22,7 @@ class QShowFile :
        friend class QShowFileDialog;
 
 public:
-       QShowFile(ControlShowFile &, Dialogs &);
+       QShowFile();
 
 private:
        /// Apply changes
index 16c2aedd90a68ec722f9a1a0941c9790a463332c..40cd60ddca508beb789ab9f33834b4c92abe7343 100644 (file)
@@ -23,8 +23,8 @@
 
 typedef Qt2CB<ControlSpellchecker, Qt2DB<QSpellcheckerDialog> > base_class;
 
-QSpellchecker::QSpellchecker(ControlSpellchecker & c, Dialogs &)
-       : base_class(c, _("Spellchecker"))
+QSpellchecker::QSpellchecker()
+       : base_class(_("Spellchecker"))
 {
 }
 
index c8eea60f9635b630b54a9304f5ac00f08f02c352..edbfec7394c61abda94f98b3210ad3fe7738133c 100644 (file)
@@ -16,7 +16,7 @@
 
 class ControlSpellchecker;
 class QSpellcheckerDialog;
-class Dialogs;
+
 
 class QSpellchecker :
        public Qt2CB<ControlSpellchecker, Qt2DB<QSpellcheckerDialog> >
@@ -24,7 +24,7 @@ class QSpellchecker :
        friend class QSpellcheckerDialog;
 
 public:
-       QSpellchecker(ControlSpellchecker &, Dialogs &);
+       QSpellchecker();
 
        /// update from controller
        void partialUpdate(int id);
index f62327d46b9a06af8e194b1784ba43318f331892..6a72656e3f2cfccd0cbf4eade5652b0defdd330e 100644 (file)
@@ -24,8 +24,8 @@
 
 typedef Qt2CB<ControlTabularCreate, Qt2DB<QTabularCreateDialog> > base_class;
 
-QTabularCreate::QTabularCreate(ControlTabularCreate & c, Dialogs &)
-       : base_class(c, _("Insert table"))
+QTabularCreate::QTabularCreate()
+       : base_class(_("Insert table"))
 {
 }
 
index 6591df3483960c2a348d05ff7d128478678e70cb..10a68c22bc683fde3a07111937fc68a71772c13f 100644 (file)
@@ -18,7 +18,7 @@
 
 class ControlTabularCreate;
 class QTabularCreateDialog;
-class Dialogs;
+
 
 ///
 class QTabularCreate
@@ -28,7 +28,7 @@ public:
        ///
        friend class QTabularCreateDialog;
        ///
-       QTabularCreate(ControlTabularCreate &, Dialogs &);
+       QTabularCreate();
 
 private:
        /// Apply changes
index 2d356dd1f736d232dcaf071d4fea66ff21ed3a07..5c2e006f733a71f3e544a41f3b133ad4edf1a2f1 100644 (file)
@@ -31,8 +31,8 @@ using std::vector;
 
 typedef Qt2CB<ControlTexinfo, Qt2DB<QTexinfoDialog> > base_class;
 
-QTexinfo::QTexinfo(ControlTexinfo & c, Dialogs &)
-       : base_class(c, _("LaTeX Information")), warningPosted(false), activeStyle(ControlTexinfo::cls)
+QTexinfo::QTexinfo()
+       : base_class(_("LaTeX Information")), warningPosted(false), activeStyle(ControlTexinfo::cls)
 
 {
 }
index 1e1daf5101f3e468614988a1857d884717183787..26e5cc8ecb534feaf9de0aa44093f730cba24239 100644 (file)
@@ -28,7 +28,7 @@ public:
        ///
        friend class QTexinfoDialog;
        ///
-       QTexinfo(ControlTexinfo &, Dialogs &);
+       QTexinfo();
 private:
        /// Apply changes
        virtual void apply() { };
index f76d4cd3e1c097efbe78dd80679ceddd55b7a40c..feaa237db4762b187c28aa9ce1b66717efc8d709 100644 (file)
@@ -24,8 +24,8 @@
 
 typedef Qt2CB<ControlThesaurus, Qt2DB<QThesaurusDialog> > base_class;
 
-QThesaurus::QThesaurus(ControlThesaurus & c, Dialogs &)
-       : base_class(c, _("Thesaurus"))
+QThesaurus::QThesaurus()
+       : base_class(_("Thesaurus"))
 {
 }
 
index 8a09a1f8aef3ab297d23b2666495a450a90dc56c..f47e5fb775f7ee8443b8ff9a4a644ae95a7dd3c8 100644 (file)
@@ -27,7 +27,7 @@ public:
        ///
        friend class QThesaurusDialog;
        ///
-       QThesaurus(ControlThesaurus &, Dialogs &);
+       QThesaurus();
 private:
        /// Apply changes
        virtual void apply() { };
index 8d9ff056eb9f44357a85f1fb781da4970ef13575..7cb9c9e23d57173c1e8d1506f9136427f86e1ae9 100644 (file)
@@ -35,8 +35,8 @@ using std::vector;
 
 typedef Qt2CB<ControlToc, Qt2DB<QTocDialog> > base_class;
 
-QToc::QToc(ControlToc & c, Dialogs &)
-       : base_class(c, _("Table of contents")), depth_(1)
+QToc::QToc()
+       : base_class(_("Table of contents")), depth_(1)
 {}
 
 
index b7ae9e981df26099d1681d58f0dd8a4cec9f7f24..520a0759d0b1f204c7df5251fffea84b59e0d6f1 100644 (file)
@@ -27,7 +27,7 @@ class QToc :
        public Qt2CB<ControlToc, Qt2DB<QTocDialog> >
 {
 public:
-       QToc(ControlToc &, Dialogs &);
+       QToc();
 
        friend class QTocDialog;
 
index 66e7b222c8925d82ea8444dd42f1658f39d03c26..cc5d1b4573d1b5066fbb3e3ace50ded784fce6ff 100644 (file)
@@ -22,8 +22,8 @@
 
 typedef Qt2CB<ControlUrl, Qt2DB<QURLDialog> > base_class;
 
-QURL::QURL(ControlUrl & c, Dialogs &)
-       : base_class(c, _("URL"))
+QURL::QURL()
+       : base_class(_("URL"))
 {
 }
 
index 4f703e0d4adf1c2a380432f670734a7955a55e06..260ffd5de8fbfd7efc8570d4692286eac791167b 100644 (file)
 
 class ControlUrl;
 class QURLDialog;
-class Dialogs;
+
 
 class QURL :
        public Qt2CB<ControlUrl, Qt2DB<QURLDialog> >
 {
        friend class QURLDialog;
 public:
-       QURL(ControlUrl & c, Dialogs &);
+       QURL();
 
 protected:
        virtual bool isValid();
index 9c9f1e3d17c62923fde7f712f364d97d918e7603..da9273e43e88833c17d346aa690df20721153b07 100644 (file)
@@ -26,8 +26,8 @@
 
 typedef Qt2CB<ControlVCLog, Qt2DB<QVCLogDialog> > base_class;
 
-QVCLog::QVCLog(ControlVCLog & c, Dialogs &)
-       : base_class(c, _("VCLog"))
+QVCLog::QVCLog()
+       : base_class(_("VCLog"))
 {
 }
 
index b410b35f597bc2c842c05eece921d787016a2f96..fe59245fc10ae17cb6553cbec02aa88eae6646ef 100644 (file)
@@ -27,7 +27,7 @@ public:
        ///
        friend class QVCLogDialog;
        ///
-       QVCLog(ControlVCLog &, Dialogs &);
+       QVCLog();
 
 private:
        /// Apply changes
index b16305dfee99d3b2db5a0f3b66feea130cc0dfac..7f2a95f250f5de92f5ba8989ee78d618b1017ad6 100644 (file)
 #include "Dialogs.h"
 #include "Qt2Base.h"
 #include "Qt2BC.h"
+#include "ControlButtons.h"
 #include "support/LAssert.h"
 
-Qt2Base::Qt2Base(ControlButtons & c, QString const & t)
-       : ViewBC<Qt2BC>(c), updating_(false), title_(t)
+Qt2Base::Qt2Base(QString const & t)
+       : ViewBase(), updating_(false), title_(t)
 {}
 
 
+Qt2BC & Qt2Base::bc()
+{
+       return static_cast<Qt2BC &>(getController().bc());
+       // return dynamic_cast<Qt2BC &>(getController().bc());
+}
+
+
 void Qt2Base::show()
 {
        if (!form()) {
@@ -77,29 +85,29 @@ void Qt2Base::changed()
 
 void Qt2Base::slotWMHide()
 {
-       CancelButton();
+       getController().CancelButton();
 }
 
 
 void Qt2Base::slotApply()
 {
-       ApplyButton();
+       getController().ApplyButton();
 }
 
 
 void Qt2Base::slotOK()
 {
-       OKButton();
+       getController().OKButton();
 }
 
 
 void Qt2Base::slotClose()
 {
-       CancelButton();
+       getController().CancelButton();
 }
 
 
 void Qt2Base::slotRestore()
 {
-       RestoreButton();
+       getController().RestoreButton();
 }
index 06a5fbe0d8c62db19f15a5ba816373fdb7e9cb5c..640a043ced70f68e190772b345517ac027fd2629 100644 (file)
@@ -21,7 +21,6 @@
 #include "LString.h"
 #include "debug.h"
 #include "ButtonPolicies.h"
-#include "ControlButtons.h"
 
 #include <boost/scoped_ptr.hpp>
 
@@ -34,12 +33,12 @@ class Qt2BC;
 
 /** This class is an Qt2 GUI base class.
  */
-class Qt2Base : public QObject, public ViewBC<Qt2BC>
+class Qt2Base : public QObject, public ViewBase
 {
        Q_OBJECT
 public:
        ///
-       Qt2Base(ControlButtons &, QString const &);
+       Qt2Base(QString const &);
        ///
        virtual ~Qt2Base() {}
 
@@ -59,6 +58,9 @@ protected:
        /// is the dialog currently valid ?
        virtual bool isValid();
 
+       ///
+       Qt2BC & bc();
+
        /// are we updating ?
        bool updating_;
 
@@ -92,7 +94,7 @@ template <class Dialog>
 class Qt2DB: public Qt2Base
 {
 protected:
-       Qt2DB(ControlButtons &, QString const &);
+       Qt2DB(QString const &);
 
        /// update the dialog
        virtual void update();
@@ -110,8 +112,8 @@ protected:
 
 
 template <class Dialog>
-Qt2DB<Dialog>::Qt2DB(ControlButtons & c, QString const & t)
-       : Qt2Base(c, t)
+Qt2DB<Dialog>::Qt2DB(QString const & t)
+       : Qt2Base(t)
 {}
 
 
@@ -163,23 +165,31 @@ public:
 
 protected:
        ///
-       Qt2CB(ControlButtons &, QString const &);
+       Qt2CB(QString const &);
        /// The parent controller
-       Controller & controller() const;
+       Controller & controller();
+       /// The parent controller
+       Controller const & controller() const;
 };
 
 
 template <class Controller, class Base>
-Qt2CB<Controller, Base>::Qt2CB(ControlButtons & c, QString const & t)
-       : Base(c, t)
+Qt2CB<Controller, Base>::Qt2CB(QString const & t)
+       : Base(t)
 {}
 
 
 template <class Controller, class Base>
-Controller & Qt2CB<Controller, Base>::controller() const
+Controller & Qt2CB<Controller, Base>::controller()
+{
+       return static_cast<Controller &>(getController());
+}
+
+
+template <class Controller, class Base>
+Controller const & Qt2CB<Controller, Base>::controller() const
 {
-       return static_cast<Controller &>(controller_);
-       //return dynamic_cast<Controller &>(controller_);
+       return static_cast<Controller const &>(getController());
 }
 
 
index 953722b0da6999a3e0cab06532e01773eb911a87..086c775d52adb9b4667ba6b0ada670df651f66c7 100644 (file)
@@ -65,7 +65,7 @@ QtView::QtView(unsigned int width, unsigned int height)
        connect(menuBar(), SIGNAL(activated(int)),
                this, SLOT(activated(int)));
  
-       toolbar_.reset(new Toolbar(this, *getDialogs(), 0, 0, toolbardefaults));
+       toolbar_.reset(new Toolbar(this, 0, 0, toolbardefaults));
 
        statusBar()->setSizeGripEnabled(false);
  
index 512d83b4517abf7d4f466cb30adfb14a69a169e5..68e8cd5e857dea48731413dd23cad1ee87b57ef6 100644 (file)
@@ -93,7 +93,7 @@ public:
 };
 
  
-Toolbar::Pimpl::Pimpl(LyXView * o, Dialogs &, int, int)
+Toolbar::Pimpl::Pimpl(LyXView * o, int, int)
        : owner_(static_cast<QtView *>(o)), 
        combo_(0)
 {
index 49b12c79f486d06e29dc22a31b89aa71f1717f41..6205ab6a67eaea472fe8170b9a05d043589f0cf5 100644 (file)
@@ -36,7 +36,7 @@ struct Toolbar::Pimpl {
        friend class ToolbarProxy;
  
 public:
-       Pimpl(LyXView * o, Dialogs &, int x, int y);
+       Pimpl(LyXView * o, int x, int y);
 
        ~Pimpl();
        
index 171a7ac8c8d2c42915b8bd839e19a20a5c63a4f1..a4589662cd54d1e6e47903b01fb532dc723e094c 100644 (file)
@@ -180,7 +180,7 @@ extern "C" {
        {
                static GUI<ControlAboutlyx, QAbout,
                        OkCancelPolicy, Qt2BC> cal(lv, d);
-               cal.show();
+               cal.controller().show();
        }
 
 
@@ -188,7 +188,7 @@ extern "C" {
        {
                static GUI<ControlBibitem, QBibitem,
                        OkCancelReadOnlyPolicy, Qt2BC> cbi(lv, d);
-               cbi.showInset(ic);
+               cbi.controller().showInset(ic);
        }
 
 
@@ -196,31 +196,31 @@ extern "C" {
        {
                static GUI<ControlBibtex, QBibtex,
                        OkCancelReadOnlyPolicy, Qt2BC> cbt(lv, d);
-               cbt.showInset(ic);
+               cbt.controller().showInset(ic);
        }
 
 
        void gui_ShowCharacter(LyXView & lv, Dialogs & d)
        {
-               controlCharacterSingleton.get(lv, d).show();
+               controlCharacterSingleton.get(lv, d).controller().show();
        }
 
 
        void gui_SetUserFreeFont(LyXView & lv, Dialogs & d)
        {
-               controlCharacterSingleton.get(lv, d).apply();
+               controlCharacterSingleton.get(lv, d).controller().apply();
        }
 
 
        void gui_ShowCitation(InsetCommand * ic, LyXView & lv, Dialogs & d)
        {
-               controlCitationSingleton.get(lv, d).showInset(ic);
+               controlCitationSingleton.get(lv, d).controller().showInset(ic);
        }
 
 
        void gui_CreateCitation(string const & s, LyXView & lv, Dialogs & d)
        {
-               controlCitationSingleton.get(lv, d).createInset(s);
+               controlCitationSingleton.get(lv, d).controller().createInset(s);
        }
 
 
@@ -235,19 +235,19 @@ extern "C" {
        {
                static GUI<ControlError, QError,
                        OkCancelPolicy, Qt2BC> ce(lv, d);
-               ce.showInset(ie);
+               ce.controller().showInset(ie);
        }
 
 
        void gui_ShowERT(InsetERT * ie, LyXView & lv, Dialogs & d)
        {
-               controlERTSingleton.get(lv, d).showInset(ie);
+               controlERTSingleton.get(lv, d).controller().showInset(ie);
        }
 
 
        void gui_UpdateERT(InsetERT * ie, LyXView & lv, Dialogs & d)
        {
-               controlERTSingleton.get(lv, d).showInset(ie);
+               controlERTSingleton.get(lv, d).controller().showInset(ie);
        }
 
 
@@ -255,7 +255,7 @@ extern "C" {
        {
                static GUI<ControlExternal, QExternal,
                        OkApplyCancelReadOnlyPolicy, Qt2BC> ce(lv, d);
-               ce.showInset(ie);
+               ce.controller().showInset(ie);
        }
 
 
@@ -263,7 +263,7 @@ extern "C" {
        {
                static GUI<ControlShowFile, QShowFile,
                        OkCancelPolicy, Qt2BC> csf(lv, d);
-               csf.showFile(f);
+               csf.controller().showFile(f);
        }
 
 
@@ -271,7 +271,7 @@ extern "C" {
        {
                static GUI<ControlFloat, QFloat,
                        NoRepeatedApplyReadOnlyPolicy, Qt2BC> cf(lv, d);
-               cf.showInset(ifl);
+               cf.controller().showInset(ifl);
        }
 
 
@@ -280,7 +280,7 @@ extern "C" {
 #if 0
                static GUI<ControlForks, QForks,
                        OkApplyCancelPolicy, Qt2BC> cf(lv, d);
-               cf.show();
+               cf.controller().show();
 #endif 
        }
 
@@ -289,7 +289,7 @@ extern "C" {
        {
                static GUI<ControlGraphics, QGraphics,
                        NoRepeatedApplyReadOnlyPolicy, Qt2BC> cg(lv, d);
-               cg.showInset(ig);
+               cg.controller().showInset(ig);
        }
 
 
@@ -297,19 +297,19 @@ extern "C" {
        {
                static GUI<ControlInclude, QInclude,
                        OkCancelReadOnlyPolicy, Qt2BC> ci(lv, d);
-               ci.showInset(ii);
+               ci.controller().showInset(ii);
        }
 
 
        void gui_ShowIndex(InsetCommand * ic, LyXView & lv, Dialogs & d)
        {
-               controlIndexSingleton.get(lv, d).showInset(ic);
+               controlIndexSingleton.get(lv, d).controller().showInset(ic);
        }
 
 
        void gui_CreateIndex(LyXView & lv, Dialogs & d)
        {
-               controlIndexSingleton.get(lv, d).createInset("");
+               controlIndexSingleton.get(lv, d).controller().createInset("");
        }
 
 
@@ -324,7 +324,7 @@ extern "C" {
        {
                static GUI<ControlLog, QLog,
                        OkCancelPolicy, Qt2BC> cl(lv, d);
-               cl.show();
+               cl.controller().show();
        }
 
 
@@ -337,23 +337,23 @@ extern "C" {
 
        void gui_ShowMinipage(InsetMinipage * im, LyXView & lv, Dialogs & d)
        {
-               controlMinipageSingleton.get(lv, d).showInset(im);
+               controlMinipageSingleton.get(lv, d).controller().showInset(im);
        }
 
 
        void gui_UpdateMinipage(InsetMinipage * im, LyXView & lv, Dialogs & d)
        {
-               controlMinipageSingleton.get(lv, d).showInset(im);
+               controlMinipageSingleton.get(lv, d).controller().showInset(im);
        }
 
 
        void gui_ShowParagraph(LyXView & lv, Dialogs & d)
        {
-               controlParagraphSingleton.get(lv, d).show();
+               controlParagraphSingleton.get(lv, d).controller().show();
 #if 0
                static GUI<ControlParagraph, QParagraph,
                        OkApplyCancelReadOnlyPolicy, Qt2BC> cp(lv, d);
-               cp.show();
+               cp.controller().show();
 #endif
        }
 
@@ -376,7 +376,7 @@ extern "C" {
        {
                static GUI<ControlPreamble, QPreamble,
                        NoRepeatedApplyReadOnlyPolicy, Qt2BC> cp(lv, d);
-               cp.show();
+               cp.controller().show();
        }
 
 
@@ -390,19 +390,19 @@ extern "C" {
        {
                static GUI<ControlPrint, QPrint,
                        OkApplyCancelPolicy, Qt2BC> cp(lv, d);
-               cp.show();
+               cp.controller().show();
        }
 
 
        void gui_ShowRef(InsetCommand * ic, LyXView & lv, Dialogs & d)
        {
-               controlRefSingleton.get(lv, d).showInset(ic);
+               controlRefSingleton.get(lv, d).controller().showInset(ic);
        }
 
 
        void gui_CreateRef(string const & s, LyXView & lv, Dialogs & d)
        {
-               controlRefSingleton.get(lv, d).createInset(s);
+               controlRefSingleton.get(lv, d).controller().createInset(s);
        }
 
 
@@ -410,7 +410,7 @@ extern "C" {
        {
                static GUI<ControlSearch, QSearch,
                        NoRepeatedApplyReadOnlyPolicy, Qt2BC> cs(lv, d);
-               cs.show();
+               cs.controller().show();
        }
 
 
@@ -428,7 +428,7 @@ extern "C" {
        {
                static GUI<ControlSpellchecker, QSpellchecker,
                        NoRepeatedApplyReadOnlyPolicy, Qt2BC> cp(lv, d);
-               cp.show();
+               cp.controller().show();
        }
 
 
@@ -448,7 +448,7 @@ extern "C" {
        {
                static GUI<ControlTabularCreate, QTabularCreate,
                        OkApplyCancelReadOnlyPolicy, Qt2BC> ctc(lv, d);
-               ctc.show();
+               ctc.controller().show();
        }
 
 
@@ -456,7 +456,7 @@ extern "C" {
        {
                static GUI<ControlTexinfo, QTexinfo,
                        OkCancelPolicy, Qt2BC> ct(lv, d);
-               ct.show();
+               ct.controller().show();
        }
 
 
@@ -465,32 +465,32 @@ extern "C" {
 #ifdef HAVE_LIBAIKSAURUS
                static GUI<ControlThesaurus, QThesaurus,
                        OkApplyCancelReadOnlyPolicy, Qt2BC> ct(lv, d);
-               ct.showEntry(s);
+               ct.controller().showEntry(s);
 #endif
        }
 
 
        void gui_ShowTOC(InsetCommand * ic, LyXView & lv, Dialogs & d)
        {
-               controlTocSingleton.get(lv, d).showInset(ic);
+               controlTocSingleton.get(lv, d).controller().showInset(ic);
        }
 
 
        void gui_CreateTOC(string const & s, LyXView & lv, Dialogs & d)
        {
-               controlTocSingleton.get(lv, d).createInset(s);
+               controlTocSingleton.get(lv, d).controller().createInset(s);
        }
 
 
        void gui_ShowUrl(InsetCommand * ic, LyXView & lv, Dialogs & d)
        {
-               controlUrlSingleton.get(lv, d).showInset(ic);
+               controlUrlSingleton.get(lv, d).controller().showInset(ic);
        }
 
 
        void gui_CreateUrl(string const & s, LyXView & lv, Dialogs & d)
        {
-               controlUrlSingleton.get(lv, d).createInset(s);
+               controlUrlSingleton.get(lv, d).controller().createInset(s);
        }
 
 
@@ -498,7 +498,7 @@ extern "C" {
        {
                static GUI<ControlVCLog, QVCLog,
                        OkCancelPolicy, Qt2BC> cv(lv, d);
-               cv.show();
+               cv.controller().show();
        }
 
 } // extern "C"
index 73b688158c2b57dea9422862bc541610c03a07a4..11afc6e7a90c059b01c559e957866b0cbf6759af 100644 (file)
@@ -1,3 +1,62 @@
+2002-08-12  Angus Leeming  <leeming@lyx.org>
+
+       * Dialogs.C (c-tor): connect the Tooltips::toggleEnabled method to
+       the Dialogs::toggleTooltips signal.
+
+       * FormAboutlyx.[Ch]:
+       * FormBibitem.[Ch]:
+       * FormBibtex.[Ch]:
+       * FormBrowser.[Ch]:
+       * FormCharacter.[Ch]:
+       * FormCitation.[Ch]:
+       * FormERT.[Ch]:
+       * FormError.[Ch]:
+       * FormExternal.[Ch]:
+       * FormFloat.[Ch]:
+       * FormForks.[Ch]:
+       * FormGraphics.[Ch]:
+       * FormInclude.[Ch]:
+       * FormIndex.[Ch]:
+       * FormLog.[Ch]:
+       * FormMinipage.[Ch]:
+       * FormParagraph.[Ch]:
+       * FormPreamble.[Ch]:
+       * FormPrint.[Ch]:
+       * FormRef.[Ch]:
+       * FormSearch.[Ch]:
+       * FormSendto.[Ch]:
+       * FormShowFile.[Ch]:
+       * FormSpellchecker.[Ch]:
+       * FormTabularCreate.[Ch]:
+       * FormTexinfo.[Ch]:
+       * FormThesaurus.[Ch]:
+       * FormToc.[Ch]:
+       * FormURL.[Ch]:
+       * FormVCLog.[Ch]:
+       No longer pass Controller or Dialogs to the c-tor.
+       No longer forward-declare Dialogs.
+
+       * FormBase.[Ch]: derives from ViewBase directly.
+       No longer passed ControlButtons & or Dialogs &.
+       (bc): new method, enabling the daughter classes to access the
+       ButtonController.
+       (C_FormBaseApplyCB):
+       (C_FormBaseOKCB):
+       (C_FormBaseCancelCB):
+       (C_FormBaseRestoreCB):
+       (C_WMHideCB): changes due to a change in the ViewBase class.
+
+       * Toolbar_pimpl.[Ch] (c-tor):
+       * Tooltips.[Ch] (c-tor): no longer passed a Dialogs &.
+
+       * Tooltips.h (toggleEnabled): made public for the Dialogs c-tor.
+
+       * XFormsView.[Ch] (c-tor, create_form_form_main): no longer pass
+       Dialogs & to the Toolbar.
+
+       * guiapi.C: access the controller methods by explicit invocation of the
+       controller.
+
 2002-08-12  Lars Gullik Bjønnes  <larsbj@gullik.net>
 
        * FormDocument.C (saveParamsAsDefault): ParagraphList changes
index f4c3bf74d2b402eb177fd7ecc3b295ebc40e02f6..7fc8af49f5e7833c68741f3fe5c3f47661c529f6 100644 (file)
@@ -16,6 +16,8 @@
 #include "Dialogs.h"
 #include "Tooltips.h"
 
+#include <boost/bind.hpp>
+
 LyXView * dialogs_lyxview;
 
 
@@ -31,6 +33,7 @@ Dialogs::Dialogs(LyXView * lv)
 #if 1
        dialogs_lyxview = lv;
 #endif
+       toggleTooltips.connect(boost::bind(&Tooltips::toggleEnabled));
        // reduce the number of connections needed in
        // dialogs by a simple connection here.
        hideAll.connect(hideBufferDependent);
index 77c054e1747bba32921280bc376467425b98467f..964217dcaef234956bf18c2bcc0eb6d3b4d4eb9c 100644 (file)
@@ -25,8 +25,8 @@ using std::getline;
 
 typedef FormCB<ControlAboutlyx, FormDB<FD_aboutlyx> > base_class;
 
-FormAboutlyx::FormAboutlyx(ControlAboutlyx & c, Dialogs & d)
-       : base_class(c, d, _("About LyX"), false)
+FormAboutlyx::FormAboutlyx()
+       : base_class(_("About LyX"), false)
 {}
 
 
index f09a36704ad410f8782f4e81b012a9a0893e330c..1048f166dc459403eaa7c42e09e1c30608b040e3 100644 (file)
@@ -30,7 +30,7 @@ struct FD_aboutlyx_license;
 class FormAboutlyx : public FormCB<ControlAboutlyx, FormDB<FD_aboutlyx> > {
 public:
        ///
-       FormAboutlyx(ControlAboutlyx &, Dialogs &);
+       FormAboutlyx();
 
 private:
        /// not needed.
index 762a09f1e382b90e7174af336340447616256db6..53a0a70e996f4b54a745947f51e85047a7d970ce 100644 (file)
@@ -12,8 +12,9 @@
 #pragma implementation
 #endif
 
-#include "Dialogs.h"
 #include "FormBase.h"
+
+#include "ControlButtons.h"
 #include "xformsBC.h"
 #include "xforms_resize.h"
 #include "Tooltips.h"
@@ -32,10 +33,9 @@ static int C_PrehandlerCB(FL_OBJECT *, int, FL_Coord, FL_Coord, int, void *);
 } // extern "C"
 
 
-FormBase::FormBase(ControlButtons & c, Dialogs & d,
-                  string const & t, bool allowResize)
-       : ViewBC<xformsBC>(c), minw_(0), minh_(0), allow_resize_(allowResize),
-         title_(t), tooltips_(new Tooltips(d))
+FormBase::FormBase(string const & t, bool allowResize)
+       : ViewBase(), minw_(0), minh_(0), allow_resize_(allowResize),
+         title_(t), tooltips_(new Tooltips())
 {}
 
 
@@ -58,6 +58,13 @@ void FormBase::redraw()
 }
 
 
+xformsBC & FormBase::bc()
+{
+       return static_cast<xformsBC &>(getController().bc());
+       // return dynamic_cast<GUIbc &>(controller_ptr_->bc());
+}
+
+
 void FormBase::show()
 {
        if (!form()) {
@@ -102,9 +109,12 @@ void FormBase::show()
                if (!allow_resize_)
                        fl_set_form_maxsize(form(), minw_, minh_);
 
+               int const iconify = getController().IconifyWithMain() ?
+                       FL_TRANSIENT : 0;
+
                fl_show_form(form(),
                             FL_PLACE_MOUSE | FL_FREE_SIZE,
-                            (controller_.IconifyWithMain() ? FL_TRANSIENT : 0),
+                            iconify,
                             title_.c_str());
        }
 
@@ -166,26 +176,26 @@ extern "C" {
 
 void C_FormBaseApplyCB(FL_OBJECT * ob, long)
 {
-       GetForm(ob)->ApplyButton();
+       GetForm(ob)->getController().ApplyButton();
 }
 
 
 void C_FormBaseOKCB(FL_OBJECT * ob, long)
 {
-       GetForm(ob)->OKButton();
+       GetForm(ob)->getController().OKButton();
 }
 
 
 void C_FormBaseCancelCB(FL_OBJECT * ob, long)
 {
        FormBase * form = GetForm(ob);
-       form->CancelButton();
+       form->getController().CancelButton();
 }
 
 
 void C_FormBaseRestoreCB(FL_OBJECT * ob, long)
 {
-       GetForm(ob)->RestoreButton();
+       GetForm(ob)->getController().RestoreButton();
 }
 
 
@@ -200,7 +210,7 @@ static int C_WMHideCB(FL_FORM * form, void *)
        // Close the dialog cleanly, even if the WM is used to do so.
        lyx::Assert(form && form->u_vdata);
        FormBase * ptr = static_cast<FormBase *>(form->u_vdata);
-       ptr->CancelButton();
+       ptr->getController().CancelButton();
        return FL_CANCEL;
 }
 
index 53a54864c0a97ed5f2c343219f77f74a88061f12..b378ff1cc04fc965262a8e694c1046326d34254d 100644 (file)
 
 class xformsBC;
 class Tooltips;
-class Dialogs;
+
 
 /** This class is an XForms GUI base class.
  */
-class FormBase : public ViewBC<xformsBC>, public FeedbackController
+class FormBase : public ViewBase, public FeedbackController
 {
 public:
        ///
-       FormBase(ControlButtons &, Dialogs &,
-                string const &, bool allowResize);
+       FormBase(string const &, bool allowResize);
        ///
        virtual ~FormBase();
 
@@ -64,6 +63,9 @@ protected:
         */
        static void setPrehandler(FL_OBJECT * ob);
 
+       ///
+       xformsBC & bc();
+
 private:
        /// Pointer to the actual instantiation of xform's form
        virtual FL_FORM * form() const = 0;
@@ -93,8 +95,7 @@ class FormDB: public FormBase
 {
 protected:
        ///
-       FormDB(ControlButtons &, Dialogs &,
-              string const &, bool allowResize=true);
+       FormDB(string const &, bool allowResize=true);
        /// Pointer to the actual instantiation of xform's form
        virtual FL_FORM * form() const;
        /// Real GUI implementation.
@@ -103,9 +104,8 @@ protected:
 
 
 template <class Dialog>
-FormDB<Dialog>::FormDB(ControlButtons & c, Dialogs & d,
-                      string const & t, bool allowResize)
-       : FormBase(c, d, t, allowResize)
+FormDB<Dialog>::FormDB(string const & t, bool allowResize)
+       : FormBase(t, allowResize)
 {}
 
 
@@ -122,25 +122,31 @@ class FormCB: public Base
 {
 protected:
        ///
-       FormCB(Controller &, Dialogs &,
-              string const &, bool allowResize = true);
+       FormCB(string const &, bool allowResize = true);
        /// The parent controller
-       Controller & controller() const;
+       Controller & controller();
+       ///
+       Controller const & controller() const;
 };
 
 
 template <class Controller, class Base>
-FormCB<Controller, Base>::FormCB(Controller & c, Dialogs & d,
-                                string const & t, bool allowResize)
-       : Base(c, d, t, allowResize)
+FormCB<Controller, Base>::FormCB(string const & t, bool allowResize)
+       : Base(t, allowResize)
 {}
 
 
 template <class Controller, class Base>
-Controller & FormCB<Controller, Base>::controller() const
+Controller & FormCB<Controller, Base>::controller()
+{
+       return static_cast<Controller &>(getController());
+}
+
+
+template <class Controller, class Base>
+Controller const & FormCB<Controller, Base>::controller() const
 {
-       return static_cast<Controller &>(controller_);
-       //return dynamic_cast<Controller &>(controller_);
+       return static_cast<Controller const &>(getController());
 }
 
 
index 7213005212f2ae64b71ed39702c73d3541a7c0f7..208665502d6af4a99cb464552d6adfccc991390c 100644 (file)
@@ -43,7 +43,7 @@ FormBaseDeprecated::FormBaseDeprecated(LyXView * lv, Dialogs * d,
                                       string const & t, bool allowResize)
        : lv_(lv), d_(d), title_(t),
          minw_(0), minh_(0), allow_resize_(allowResize),
-         tooltips_(new Tooltips(*d))
+         tooltips_(new Tooltips())
 {
        lyx::Assert(lv && d);
 }
index 905a31533220efe54dc7b363b5cacda63165bae0..71bb9b4db505e0c2ab1930a40e93fb782aaa72d2 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "forms_fwd.h"
 
-//#include <boost/signals/trackable.hpp>
+#include <boost/signals/connection.hpp>
 
 class Buffer;
 class Dialogs;
index de9440f359ab8c858882aee8d663baeddb1f591c..835ac1c6e393d2ea28a4a4f8c19c110a775d5e68 100644 (file)
@@ -22,8 +22,8 @@
 
 typedef FormCB<ControlBibitem, FormDB<FD_bibitem> > base_class;
 
-FormBibitem::FormBibitem(ControlBibitem & c, Dialogs & d)
-       : base_class(c, d, _("Bibliography Entry"))
+FormBibitem::FormBibitem()
+       : base_class(_("Bibliography Entry"))
 {}
 
 
index 2c18ccbf219fa9b1077d71545fb88a70bc05a80a..ab24bdbcd9b72ea4485f96d951f84bb003988169 100644 (file)
@@ -26,7 +26,7 @@ struct FD_bibitem;
 class FormBibitem : public FormCB<ControlBibitem, FormDB<FD_bibitem> > {
 public:
        ///
-       FormBibitem(ControlBibitem &, Dialogs &);
+       FormBibitem();
 private:
        /// Set the Params variable for the Controller.
        virtual void apply();
index 6ec95c50ebc115f272b73732dbecad0f83f37654..e406a2d86e001f5052b7d062ec58f5fb6b415f1b 100644 (file)
@@ -36,8 +36,8 @@ using std::sort;
 
 typedef FormCB<ControlBibtex, FormDB<FD_bibtex> > base_class;
 
-FormBibtex::FormBibtex(ControlBibtex & c, Dialogs & d)
-       : base_class(c, d, _("BibTeX Database"))
+FormBibtex::FormBibtex()
+       : base_class(_("BibTeX Database"))
 {}
 
 
index 572b9c13f873f2c308caf935f810c2960312e87b..5b94c0c1daeec0440369f81fb3a2a00b3d2aecc5 100644 (file)
@@ -26,7 +26,7 @@ struct FD_bibtex;
 class FormBibtex : public FormCB<ControlBibtex, FormDB<FD_bibtex> > {
 public:
        ///
-       FormBibtex(ControlBibtex &, Dialogs &);
+       FormBibtex();
 private:
        /// Set the Params variable for the Controller.
        virtual void apply();
index 339335a536831e497eac9256fe6932717229f7dc..82b1a93e5ed3dbe6a9cbc6cf853344243ff64ca7 100644 (file)
@@ -16,9 +16,8 @@
 #include "forms/form_browser.h"
 #include "xformsBC.h"
 
-FormBrowser::FormBrowser(ControlButtons & c, Dialogs & d,
-                        string const & t, bool allowResize)
-       : FormDB<FD_browser>(c, d, t, allowResize)
+FormBrowser::FormBrowser(string const & t, bool allowResize)
+       : FormDB<FD_browser>(t, allowResize)
 {}
 
 
index 6312362c35835798fe8f1028bb2c7fc3fa9de9d4..196020eb22488dc15b3ad097414560a5499c6d23 100644 (file)
@@ -26,8 +26,7 @@ struct FD_browser;
 class FormBrowser : public FormDB<FD_browser> {
 public:
        ///
-       FormBrowser(ControlButtons &, Dialogs &,
-                   string const &, bool allowResize = true);
+       FormBrowser(string const &, bool allowResize = true);
 private:
        /// Build the dialog.
        virtual void build();
index 41f16413467059ef4669da0bbfe4c7d111e0fde2..ec50266dd95d2b28aafa8ec7ec2aa86ed804a01f 100644 (file)
@@ -36,8 +36,8 @@ using namespace frnt;
 
 typedef FormCB<ControlCharacter, FormDB<FD_character> > base_class;
 
-FormCharacter::FormCharacter(ControlCharacter & c, Dialogs & d)
-       : base_class(c, d, _("Character Layout"), false)
+FormCharacter::FormCharacter()
+       : base_class(_("Character Layout"), false)
 {}
 
 
index 7eb57d30b1ca5ce54fd06b2e248c0cf798b3d0c7..380da7b4e050e0d8e619988c8417c4bb53a043dd 100644 (file)
@@ -35,7 +35,7 @@ class FormCharacter
        : public FormCB<ControlCharacter, FormDB<FD_character> > {
 public:
        ///
-       FormCharacter(ControlCharacter &, Dialogs &);
+       FormCharacter();
 private:
 
        /// Apply from dialog
index 39d7bf908503b9961f35ccaad7ef597765f20854..22ac62b05d238701e5196a2f6e21c09d05575892 100644 (file)
@@ -115,8 +115,8 @@ void updateStyle(FD_citation * dialog, string command)
 typedef FormCB<ControlCitation, FormDB<FD_citation> > base_class;
 
 
-FormCitation::FormCitation(ControlCitation & c, Dialogs & d)
-       : base_class(c, d, _("Citation"), false)
+FormCitation::FormCitation()
+       : base_class(_("Citation"), false)
 {}
 
 
index efcba5b9ff9b51248bbce110a36e06f8f51a150b..c40f10931d5c93bfa81c3057898ecb54da07d018 100644 (file)
@@ -25,7 +25,7 @@ struct FD_citation;
 class FormCitation : public FormCB<ControlCitation, FormDB<FD_citation> > {
 public:
        ///
-       FormCitation(ControlCitation &, Dialogs &);
+       FormCitation();
 private:
        ///
        enum State {
index 64c66a3d4fc9bff331348ca3426bfe37be84a961..9f2e06bb8462065a185d5a5f4b53afde2d847edc 100644 (file)
@@ -23,8 +23,8 @@
 
 typedef FormCB<ControlERT, FormDB<FD_ert> > base_class;
 
-FormERT::FormERT(ControlERT & c, Dialogs & d)
-       : base_class(c, d, _("ERT Options"))
+FormERT::FormERT()
+       : base_class(_("ERT Options"))
 {}
 
 
index 7d61116c6644db103da899c24abd1d1148a2e0da..8209e7dc00415c5d12d1e8e941f18a5933d8d1a4 100644 (file)
@@ -26,7 +26,7 @@ class FormERT
        : public FormCB<ControlERT, FormDB<FD_ert> > {
 public:
        ///
-       FormERT(ControlERT &, Dialogs &);
+       FormERT();
 private:
        /// Set the Params variable for the Controller.
        virtual void apply();
index ead1e6478a727aff3cbd8f8c6aa42a00ea8104af..048e3dd69016882238aad3b1d50a9a3c09d544d6 100644 (file)
@@ -21,8 +21,8 @@
 
 typedef FormCB<ControlError, FormDB<FD_error> > base_class;
 
-FormError::FormError(ControlError & c, Dialogs & d)
-       : base_class(c, d, _("LaTeX Error"))
+FormError::FormError()
+       : base_class(_("LaTeX Error"))
 {}
 
 
index cbe367c4ef63a7790dcb05c21684ee2aee764edc..9af9085ed7b42dd2b7f9eddac1bbdb8643455edc 100644 (file)
@@ -24,7 +24,7 @@ struct FD_error;
 class FormError : public FormCB<ControlError, FormDB<FD_error> > {
 public:
        /// Constructor
-       FormError(ControlError &, Dialogs &);
+       FormError();
 private:
        /// not needed.
        virtual void apply() {}
index 1a6960bd7a40f893959df2bbe3ed4bd6ce7bb2b4..69d97706e7ba96c9610c7da211975162a53f3e12 100644 (file)
@@ -27,8 +27,8 @@
 
 typedef FormCB<ControlExternal, FormDB<FD_external> > base_class;
 
-FormExternal::FormExternal(ControlExternal & c, Dialogs & d)
-       : base_class(c, d, _("Edit external file"))
+FormExternal::FormExternal()
+       : base_class(_("Edit external file"))
 {}
 
 
index b55abd4708e7a6b30dab4a91aa717a76ec9dac1f..2fc3dfcfb4f5b730e35f1aa17c7b9f71fe1e8da7 100644 (file)
@@ -26,7 +26,7 @@ struct FD_external;
 class FormExternal : public FormCB<ControlExternal, FormDB<FD_external> > {
 public:
        ///
-       FormExternal(ControlExternal &, Dialogs &);
+       FormExternal();
 private:
        /// apply changes
        void apply();
index 839965d9c1164e02b6af7e783882ea7ac3de0e17..7252f7cd1a29cdb4fd6a17757b4a4c134c0d643a 100644 (file)
@@ -23,8 +23,8 @@
 
 typedef FormCB<ControlFloat, FormDB<FD_float> > base_class;
 
-FormFloat::FormFloat(ControlFloat & c, Dialogs & d)
-       : base_class(c, d, _("Float Options"))
+FormFloat::FormFloat()
+       : base_class(_("Float Options"))
 {}
 
 
index e8ad23e6ad42e64382b445b35073ec9eb95c06ff..bf870549d5301c7410a46a0f1a5acb67d4aaffc9 100644 (file)
@@ -25,7 +25,7 @@ struct FD_float;
 class FormFloat : public FormCB<ControlFloat, FormDB<FD_float> > {
 public:
        ///
-       FormFloat(ControlFloat &, Dialogs &);
+       FormFloat();
 private:
        /// Set the Params variable for the Controller.
        virtual void apply();
index a1242a808a3a0636aefba5b1fd11e5f926ff4992..81c7be89c98ebbaac4abab154229066fa5dbb617 100644 (file)
@@ -30,8 +30,8 @@ using std::find_if;
 
 typedef FormCB<ControlForks, FormDB<FD_forks> > base_class;
 
-FormForks::FormForks(ControlForks & c, Dialogs & d)
-       : base_class(c, d, _("Child processes"))
+FormForks::FormForks()
+       : base_class(_("Child processes"))
 {}
 
 
index 14eb28695eb379d0705fceefda89a69e915f274b..4f6c234760a12caedb43856382e21b31a6a1abaf 100644 (file)
@@ -22,7 +22,7 @@ struct FD_forks;
 class FormForks : public FormCB<ControlForks, FormDB<FD_forks> > {
 public:
        ///
-       FormForks(ControlForks &, Dialogs &);
+       FormForks();
 
        /// preemptive handler for feedback messages
        void feedbackCB(FL_OBJECT *, int);
index eb0fc4ce88ff1a2a75d5d59a7feb008ab66f301c..231c07707b1ea93b2b0658e5eed129d1a6748449 100644 (file)
@@ -54,8 +54,8 @@ LyXLength getLyXLengthFromWidgets(FL_OBJECT * input, FL_OBJECT * choice)
 
 typedef FormCB<ControlGraphics, FormDB<FD_graphics> > base_class;
 
-FormGraphics::FormGraphics(ControlGraphics & c, Dialogs & d)
-       : base_class(c, d, _("Graphics"), false)
+FormGraphics::FormGraphics()
+       : base_class(_("Graphics"), false)
 {}
 
 
index 6ae60f3244c17f8ebe8e677f971bcd5b6ad352d3..2c4456707f47ca1a76d4c2600ccb8d6ac69e9da5 100644 (file)
@@ -35,7 +35,7 @@ struct FD_graphics_special;
 class FormGraphics : public FormCB<ControlGraphics, FormDB<FD_graphics> > {
 public:
        ///
-       FormGraphics(ControlGraphics &, Dialogs &);
+       FormGraphics();
 private:
 
        /** Redraw the form (on receipt of a Signal indicating, for example,
index fcf18e902c3c63fe806f116fd368d01ebc42a9f7..8a504533a11e4f42f86b8b231f7374409a037f4a 100644 (file)
@@ -26,8 +26,8 @@
 
 typedef FormCB<ControlInclude, FormDB<FD_include> > base_class;
 
-FormInclude::FormInclude(ControlInclude & c, Dialogs & d)
-       : base_class(c, d, _("Include file"))
+FormInclude::FormInclude()
+       : base_class(_("Include file"))
 {}
 
 
@@ -150,7 +150,7 @@ ButtonPolicy::SMInput FormInclude::input(FL_OBJECT * ob, long)
                string const in_name = fl_get_input(dialog_->input_filename);
                if (!rtrim(in_name).empty() && controller().fileExists(in_name)) {
 //                     ApplyButton();
-                       OKButton();
+                       controller().OKButton();
                        controller().load(rtrim(in_name));
                        action = ButtonPolicy::SMI_NOOP;
                }
index 325dd4b0769a94e0256de91845f1f48b7e7fa1e7..1f508eee84379ee59c5d19415943e3a4052bfa62 100644 (file)
@@ -25,7 +25,7 @@ struct FD_include;
 class FormInclude : public FormCB<ControlInclude, FormDB<FD_include> > {
 public:
        ///
-       FormInclude(ControlInclude &, Dialogs &);
+       FormInclude();
 private:
        /// Set the Params variable for the Controller.
        virtual void apply();
index ec704bb07a9762cce63253f2c77263dbbf9d7a61..7921e66cadbd1833a30d717796b2d45529a79626 100644 (file)
@@ -21,8 +21,8 @@
 
 typedef FormCB<ControlIndex, FormDB<FD_index> > base_class;
 
-FormIndex::FormIndex(ControlIndex & c, Dialogs & d)
-       : base_class(c, d, _("Index"))
+FormIndex::FormIndex()
+       : base_class(_("Index"))
 {}
 
 
index 360f16c41f53de5b9aa77279b7c1c28a52484b17..8a1a55a06c12f6fa452259822b32fec3fefc5e21 100644 (file)
@@ -24,7 +24,7 @@ struct FD_index;
 class FormIndex : public FormCB<ControlIndex, FormDB<FD_index> > {
 public:
        ///
-       FormIndex(ControlIndex &, Dialogs &);
+       FormIndex();
 private:
        /// Set the Params variable for the Controller.
        virtual void apply();
index f317805d5f1aa88e2e6cc470c99bd8f001e63e53..e0c73bbb2c32e7df3892ee63800933373bd1037b 100644 (file)
@@ -19,8 +19,8 @@
 #include "gettext.h"
 #include FORMS_H_LOCATION
 
-FormLog::FormLog(ControlLog & c, Dialogs & d)
-       : FormCB<ControlLog, FormBrowser>(c, d, _("LaTeX Log"))
+FormLog::FormLog()
+       : FormCB<ControlLog, FormBrowser>( _("LaTeX Log"))
 {}
 
 
index 00806b0e2370602ea332bded7d82e299d30ded9a..b69eae35526f470c04262df0b4fa81cf15198929 100644 (file)
@@ -25,7 +25,7 @@ class ControlLog;
 class FormLog : public FormCB<ControlLog, FormBrowser> {
 public:
        ///
-       FormLog(ControlLog &, Dialogs &);
+       FormLog();
 
        // Functions accessible to the Controller.
 
index 7a5d2a1275cc9a36162d0fe82aa9cd30d380126a..53096b6004241f43ed1ce768c25502781b385600 100644 (file)
@@ -24,8 +24,8 @@
 
 typedef FormCB<ControlMinipage, FormDB<FD_minipage> > base_class;
 
-FormMinipage::FormMinipage(ControlMinipage & c, Dialogs & d)
-       : base_class(c, d, _("Minipage Options"))
+FormMinipage::FormMinipage()
+       : base_class(_("Minipage Options"))
 {}
 
 
index e54acd600dd7499457c38a9230d86ef9c9e461cd..c1cf7d05cd8aa70454d678c595c861293177cbf0 100644 (file)
@@ -26,7 +26,7 @@ class FormMinipage
        : public FormCB<ControlMinipage, FormDB<FD_minipage> > {
 public:
        ///
-       FormMinipage(ControlMinipage &, Dialogs &);
+       FormMinipage();
 private:
        /// Set the Params variable for the Controller.
        virtual void apply();
index 1e8ecc082dfa5b5c822ace1331675d7982cb9efa..481a030a31950f24e3d2b5a8b276e508242a6a9a 100644 (file)
@@ -38,8 +38,8 @@ using std::remove_if;
 
 typedef FormCB<ControlParagraph, FormDB<FD_paragraph> > base_class;
 
-FormParagraph::FormParagraph(ControlParagraph & c, Dialogs & d)
-       : base_class(c, d, _("Paragraph Layout"), false)
+FormParagraph::FormParagraph()
+       : base_class(_("Paragraph Layout"), false)
 {}
 
 void FormParagraph::build()
index c65c47469685fa8c4146b7efeecfec30dbbce089..a49e2e9f73dc52b4197c4fa201f9def6f66cb0c8 100644 (file)
@@ -25,7 +25,7 @@ class FormParagraph
        : public FormCB<ControlParagraph, FormDB<FD_paragraph> > {
 public:
        ///
-       FormParagraph(ControlParagraph &, Dialogs &);
+       FormParagraph();
 private:
        /// Build the dialog
        virtual void build();
index 299a6862ec2734b04728deeed61810e2dd14e200..2374cffb6d67a0838bc8b02ab7a11068eb2ede7a 100644 (file)
@@ -21,8 +21,8 @@
 
 typedef FormCB<ControlPreamble, FormDB<FD_preamble> > base_class;
 
-FormPreamble::FormPreamble(ControlPreamble & c, Dialogs & d)
-       : base_class(c, d, _("LaTeX preamble"))
+FormPreamble::FormPreamble()
+       : base_class(_("LaTeX preamble"))
 {}
 
 
index 8bf7e9fefaaf4a4ddab5248017fb8e3a273676a5..59e6c6e44085d1d76af2cd55d692cff9a10b352b 100644 (file)
@@ -24,7 +24,7 @@ struct FD_preamble;
 class FormPreamble : public FormCB<ControlPreamble, FormDB<FD_preamble> > {
 public:
        ///
-       FormPreamble(ControlPreamble &, Dialogs &);
+       FormPreamble();
 private:
        /// Apply from dialog
        virtual void apply();
index 551b4eb560845b7c80ed2e3fc98616147f17974b..7794204f5a88c5710f99f53889510c331e14f75f 100644 (file)
@@ -32,8 +32,8 @@ using std::make_pair;
 
 typedef FormCB<ControlPrint, FormDB<FD_print> > base_class;
 
-FormPrint::FormPrint(ControlPrint & c, Dialogs & d)
-       : base_class(c, d, _("Print")),
+FormPrint::FormPrint()
+       : base_class(_("Print")),
          target_(2), order_(2), which_(3)
 {}
 
index f9cddad70078dfb340be9957f969989c907c2c58..5caf1440c0cb608a5094dadb23679a8ade656fee 100644 (file)
@@ -29,7 +29,7 @@ struct FD_print;
 class FormPrint : public FormCB<ControlPrint, FormDB<FD_print> > {
 public:
        ///
-       FormPrint(ControlPrint &, Dialogs &);
+       FormPrint();
 private:
        /// Apply from dialog
        virtual void apply();
index 86a7ded32e72e06a33f556dec56f4e1a9d1cfa0b..70640bd4bd56f7e1a154b90dea6fbb07e3ed3e86 100644 (file)
@@ -30,8 +30,8 @@ using std::vector;
 
 typedef FormCB<ControlRef, FormDB<FD_ref> > base_class;
 
-FormRef::FormRef(ControlRef & c, Dialogs & d)
-       : base_class(c, d, _("Reference")),
+FormRef::FormRef()
+       : base_class(_("Reference")),
          at_ref_(false)
 {}
 
index 3a5ef194bf5da6f55164bdbe754a03a966ff1402..7cd40ee473c3682ba893acdc27b65004707e91e0 100644 (file)
@@ -24,7 +24,7 @@ struct FD_ref;
 class FormRef : public FormCB<ControlRef, FormDB<FD_ref> > {
 public:
        ///
-       FormRef(ControlRef &, Dialogs &);
+       FormRef();
 private:
        /// Set the Params variable for the Controller.
        virtual void apply();
index da4dd93f461a3d101762829259ba31cd11e59bc1..cfb0cc941606da28d6e41a9a4450f42b252d16d7 100644 (file)
@@ -20,8 +20,8 @@
 
 typedef FormCB<ControlSearch, FormDB<FD_search> > base_class;
 
-FormSearch::FormSearch(ControlSearch & c, Dialogs & d)
-       : base_class(c, d, _("LyX: Find and Replace"))
+FormSearch::FormSearch()
+       : base_class(_("LyX: Find and Replace"))
 {}
 
 
index 5f5be4cfb6413407b6159b3f2bbe02d52a0c8c51..f744b2538385f70cc6366b1645249a96681667b6 100644 (file)
@@ -24,7 +24,7 @@ struct FD_search;
 class FormSearch : public FormCB<ControlSearch, FormDB<FD_search> > {
 public:
        ///
-       FormSearch(ControlSearch &, Dialogs &);
+       FormSearch();
 private:
        /// not needed.
        virtual void apply() {}
index 11050fbfa3da12b9f63b97579fad3cadef23e58a..6841c28664e487dd808bdc5bc4f5a32f811cd18e 100644 (file)
@@ -26,8 +26,8 @@ using std::vector;
 
 typedef FormCB<ControlSendto, FormDB<FD_sendto> > base_class;
 
-FormSendto::FormSendto(ControlSendto & c, Dialogs & d)
-       : base_class(c, d, _("Send document to command"))
+FormSendto::FormSendto()
+       : base_class(_("Send document to command"))
 {}
 
 
index 86f9f7ba806b3e7d3b8c2bfe462eafbcdaa53d01..9ddc83a8e4025f8bfabd2eb3786e87d5e6116641 100644 (file)
@@ -26,7 +26,7 @@ struct FD_sendto;
 class FormSendto : public FormCB<ControlSendto, FormDB<FD_sendto> > {
 public:
        ///
-       FormSendto(ControlSendto &, Dialogs &);
+       FormSendto();
 private:
        /// Apply from dialog (modify or create inset)
        virtual void apply();
index 8e8f7b8b36b8f6d0765a4e4e5d7f13394c659443..3df6d3a831eadaa7d2cca82e8b7fb388291489b6 100644 (file)
@@ -20,8 +20,8 @@
 #include FORMS_H_LOCATION
 
 
-FormShowFile::FormShowFile(ControlShowFile & c, Dialogs & d)
-       : FormCB<ControlShowFile, FormBrowser>(c, d, string())
+FormShowFile::FormShowFile()
+       : FormCB<ControlShowFile, FormBrowser>(string())
 {}
 
 
index a00fb533e50ba0a88fd226aac81e6351cafc8d20..af057a9fffb7c2e8630af05728b9e9099417a853 100644 (file)
@@ -25,7 +25,7 @@ class ControlShowFile;
 class FormShowFile : public FormCB<ControlShowFile, FormBrowser> {
 public:
        ///
-       FormShowFile(ControlShowFile &, Dialogs &);
+       FormShowFile();
 
        // Functions accessible to the Controller.
 
index 23c388d2c52d33028974cda74577ed8ea0ac0691..867ac1ece347f86c58b70add14f6d67492b09801 100644 (file)
@@ -21,8 +21,8 @@
 
 typedef FormCB<ControlSpellchecker, FormDB<FD_spellchecker> > base_class;
 
-FormSpellchecker::FormSpellchecker(ControlSpellchecker & c, Dialogs & d)
-       : base_class(c, d, _("LyX: Spellchecker"), false)
+FormSpellchecker::FormSpellchecker()
+       : base_class(_("LyX: Spellchecker"), false)
 {}
 
 
index 5f986486cfcb49403ef794cd5cb462382edff322..d3efe3bedd4ccbe5c393aec2523f231c0711db83 100644 (file)
@@ -24,7 +24,7 @@ struct FD_spellchecker;
 class FormSpellchecker : public FormCB<ControlSpellchecker, FormDB<FD_spellchecker> > {
 public:
        ///
-       FormSpellchecker(ControlSpellchecker &, Dialogs &);
+       FormSpellchecker();
 private:
        /// not needed.
        void apply() {}
index 2e57b59a4a6cf264ce49576ee2c32db3fb935607..b6f7150a68c7c47d0b31208d4146e2d14f22f967 100644 (file)
@@ -26,8 +26,8 @@ using std::make_pair;
 
 typedef FormCB<ControlTabularCreate, FormDB<FD_tabular_create> > base_class;
 
-FormTabularCreate::FormTabularCreate(ControlTabularCreate & c, Dialogs & d)
-       : base_class(c, d, _("Insert Tabular"))
+FormTabularCreate::FormTabularCreate()
+       : base_class(_("Insert Tabular"))
 {}
 
 
index ef665ee84c398a61d57c8f4ac9f1d3314b357ddb..52ca202c94a416047b4d0fa761048122a0cb6e20 100644 (file)
@@ -27,7 +27,7 @@ class FormTabularCreate :
        public FormCB<ControlTabularCreate, FormDB<FD_tabular_create> > {
 public:
        ///
-       FormTabularCreate(ControlTabularCreate &, Dialogs &);
+       FormTabularCreate();
 private:
        /// Apply from dialog
        virtual void apply();
index d28e8fb8a997d472fd2d9ce25af6ecd7b4be3a7a..408c011c55d1142f089620d6d47a2e859acf8133 100644 (file)
@@ -26,8 +26,8 @@
 
 
 typedef FormCB<ControlTexinfo, FormDB<FD_texinfo> > base_class;
-FormTexinfo::FormTexinfo(ControlTexinfo & c, Dialogs & d)
-       : base_class(c, d, _("LaTeX Information")),
+FormTexinfo::FormTexinfo()
+       : base_class(_("LaTeX Information")),
          activeStyle(ControlTexinfo::cls)
 {}
 
index 0564fcd3eb5677f91a779fb64ccf3d17df79e029..2a4d18d1cc1df40fbb10ca6e9750f69ec446f3a8 100644 (file)
@@ -22,7 +22,7 @@ struct FD_texinfo;
 class FormTexinfo : public FormCB<ControlTexinfo, FormDB<FD_texinfo> > {
 public:
        ///
-       FormTexinfo(ControlTexinfo &, Dialogs &);
+       FormTexinfo();
 private:
        /// not needed
        virtual void apply() {}
index e7f351dec7446303a457753cbbf227bf50136cbe..a91317de613383d994d0042b36f8ed34465f6737 100644 (file)
@@ -33,8 +33,8 @@ using std::vector;
 typedef FormCB<ControlThesaurus, FormDB<FD_thesaurus> > base_class;
 
 
-FormThesaurus::FormThesaurus(ControlThesaurus & c, Dialogs & d)
-       : base_class(c, d, _("LyX: Thesaurus"), false),
+FormThesaurus::FormThesaurus()
+       : base_class(_("LyX: Thesaurus"), false),
          clickline_(-1)
 {
 }
index 82cbeafe01a801c263041e837ba2c1b1830e1a0e..c7c16228d9cdc6a6fa881f50ee50821444b5b484 100644 (file)
@@ -24,7 +24,7 @@ struct FD_thesaurus;
 class FormThesaurus : public FormCB<ControlThesaurus, FormDB<FD_thesaurus> > {
 public:
        ///
-       FormThesaurus(ControlThesaurus &, Dialogs &);
+       FormThesaurus();
 private:
        /// not needed.
        virtual void apply() {}
index 9a54cb9632787071aaccbd72a8e0403dc744bfaa..eb23182e6255561b9cfa49e0ebb87822103fd7c5 100644 (file)
@@ -30,8 +30,8 @@ using std::endl;
 
 typedef FormCB<ControlToc, FormDB<FD_toc> > base_class;
 
-FormToc::FormToc(ControlToc & c, Dialogs & d)
-       : base_class(c, d, _("Table of Contents"))
+FormToc::FormToc()
+       : base_class(_("Table of Contents"))
 {}
 
 
index bde478986109efce72a00425448e2d89ec31e7d1..e0992974ccf55ce06fe2bb10939a56627a867179 100644 (file)
@@ -25,7 +25,7 @@ struct FD_toc;
 class FormToc : public FormCB<ControlToc, FormDB<FD_toc> > {
 public:
        ///
-       FormToc(ControlToc &, Dialogs &);
+       FormToc();
 private:
        /// not needed
        virtual void apply() {}
index 823c8760af1b61d7dd075077acff27794b4996b1..9a5a5c997b59eb026dbc9521eb1d0f3d795065ea 100644 (file)
@@ -21,8 +21,8 @@
 
 typedef FormCB<ControlUrl, FormDB<FD_url> > base_class;
 
-FormUrl::FormUrl(ControlUrl & c, Dialogs & d)
-       : base_class(c, d, _("Url"))
+FormUrl::FormUrl()
+       : base_class(_("Url"))
 {}
 
 
index 361553a748d4e704a8fa4d00b7ab2fb8ba3ef01e..74e757a9562fa3097b1c0ea2752a88521d25be52 100644 (file)
@@ -24,7 +24,7 @@ struct FD_url;
 class FormUrl : public FormCB<ControlUrl, FormDB<FD_url> > {
 public:
        ///
-       FormUrl(ControlUrl &, Dialogs &);
+       FormUrl();
 private:
        /// Apply from dialog (modify or create inset)
        virtual void apply();
index 3f4ec370fb9e5b3438cf93323d8b1bc790c3d8f9..d0a4a0e0178eafdca145b4f1feb61ea44b3b943c 100644 (file)
@@ -20,8 +20,8 @@
 #include "gettext.h"
 #include FORMS_H_LOCATION
 
-FormVCLog::FormVCLog(ControlVCLog & c, Dialogs & d)
-       : FormCB<ControlVCLog, FormBrowser>(c, d, _("Version Control Log"))
+FormVCLog::FormVCLog()
+       : FormCB<ControlVCLog, FormBrowser>(_("Version Control Log"))
 {}
 
 
index e4ba01f1cd8ce835324f5b02646eb1c2a7c3ca02..9930964bfabeccb24b37e16f1bd9f3016b36783a 100644 (file)
@@ -25,7 +25,7 @@ class ControlVCLog;
 class FormVCLog : public FormCB<ControlVCLog, FormBrowser> {
 public:
        ///
-       FormVCLog(ControlVCLog &, Dialogs &);
+       FormVCLog();
 
        // Functions accessible to the Controller.
 
index 501531d7e2f19132060272125328fc8d39c67e2b..0e8de0e8285e95874b3c8c966630de0f25ef4705 100644 (file)
@@ -89,11 +89,11 @@ Toolbar::Pimpl::toolbarItem::operator=(toolbarItem const & ti)
 
 
 
-Toolbar::Pimpl::Pimpl(LyXView * o, Dialogs & d, int x, int y)
+Toolbar::Pimpl::Pimpl(LyXView * o, int x, int y)
        : owner_(static_cast<XFormsView *>(o)), xpos(x), ypos(y)
 {
        combox_ = 0;
-       tooltip_ = new Tooltips(d);
+       tooltip_ = new Tooltips();
 }
 
 
index a872e8bd0ae0449f84645c70b9b41ef5569ac988..9c712586acbd2dbc678f17823032b3cad4b8546f 100644 (file)
@@ -22,7 +22,6 @@
 
 class XFormsView;
 class Tooltips;
-class Dialogs;
 class Combox;
 
 /** The LyX xforms toolbar class
@@ -33,7 +32,7 @@ public:
        static void layoutSelectedCB(int, void *, Combox *);
  
        /// create an empty toolbar
-       Pimpl(LyXView * o, Dialogs &, int x, int y);
+       Pimpl(LyXView * o, int x, int y);
 
        ~Pimpl();
 
index 255b40c12313d9a64cced7fa98653dfda73fec18..e7125f8073955d9a102eda4d9a8ee2e80af7ef07 100644 (file)
@@ -19,7 +19,6 @@
 #endif
 
 #include "Tooltips.h"
-#include "Dialogs.h"
 #include "xforms_helpers.h" // formatted
 #include "gettext.h"
 #include "support/lstrings.h"
@@ -35,13 +34,8 @@ boost::signal0<void> Tooltips::toggled;
 
 #if FL_VERSION > 0 || FL_REVISION >= 89
 
-Tooltips::Tooltips(Dialogs & d)
+Tooltips::Tooltips()
 {
-       static bool first = true;
-       if (first) {
-               first = false;
-               d.toggleTooltips.connect(boost::bind(&Tooltips::toggleEnabled));
-       }
        toggled.connect(boost::bind(&Tooltips::set, this));
 }
 
index e6bcc0f6377e6b3bd4225db07ff8fad5ec7ed1c8..213e5f2c2f9fbd0d2396469e555d862c60cb0a49 100644 (file)
 
 #include <map>
 
-class Dialogs;
-
-
 #ifdef __GNUG__
 #pragma interface
 #endif
 
 class Tooltips : boost::noncopyable, public boost::signals::trackable {
 public:
-       Tooltips(Dialogs &);
+       ///
+       Tooltips();
 
        /// Initialise a tooltip for this ob.
        void init(FL_OBJECT * ob, string const & tip);
@@ -55,16 +53,16 @@ public:
 
 #endif
 
-private:
-
-       /// Are the tooltips on or off?
-       static bool enabled_;
-
        /** This method is connected to Dialogs::toggleTooltips and toggles
         *  the state of enabled_.
         */
        static void toggleEnabled();
 
+private:
+
+       /// Are the tooltips on or off?
+       static bool enabled_;
+
        /** Once enabled_ is changed, then this signal is emitted to update
         *  all the tooltips.
         */
index ea6a8929f96d5eff304fa7ce433dd3e7489b4c8e..eeb2776c8be932fc429522acd93d34e27914e2b5 100644 (file)
@@ -59,7 +59,7 @@ int C_XFormsView_atCloseMainFormCB(FL_FORM * form, void * p)
 XFormsView::XFormsView(int width, int height)
        : LyXView()
 {
-       create_form_form_main(*getDialogs(), width, height);
+       create_form_form_main(width, height);
        fl_set_form_atclose(getForm(), C_XFormsView_atCloseMainFormCB, 0);
 
        view_state_con = view_state_changed.connect(boost::bind(&XFormsView::show_view_state, this));
@@ -125,7 +125,7 @@ void XFormsView::show(int x, int y, string const & title)
 }
 
 
-void XFormsView::create_form_form_main(Dialogs & dia, int width, int height)
+void XFormsView::create_form_form_main(int width, int height)
        /* to make this work as it should, .lyxrc should have been
         * read first; OR maybe this one should be made dynamic.
         * Hmmmm. Lgb.
@@ -146,8 +146,7 @@ void XFormsView::create_form_form_main(Dialogs & dia, int width, int height)
 
        menubar_.reset(new Menubar(this, menubackend));
 
-       toolbar_.reset(new Toolbar(this, dia,
-                                  air, 30 + air + bw, toolbardefaults));
+       toolbar_.reset(new Toolbar(this, air, 30 + air + bw, toolbardefaults));
 
        int const ywork = 60 + 2 * air + bw;
        int const workheight = height - ywork - (25 + 2 * air);
index 6e8953ae349ca08b816387eed250dfe338de21c4..e81ce2c7c87910ee035ca2b0d19ef1c913238880 100644 (file)
@@ -20,7 +20,6 @@
 
 #include "frontends/LyXView.h"
 
-class Dialogs;
 class XMiniBuffer;
 
 /**
@@ -70,7 +69,7 @@ private:
        void show_view_state();
 
        /// makes the main form.
-       void create_form_form_main(Dialogs & d, int width, int height);
+       void create_form_form_main(int width, int height);
        /// the minibuffer
        boost::scoped_ptr<XMiniBuffer> minibuffer_;
        ///
index 67941e52d502ef2487f1f6c48675b58ad45b4b57..170da9a79ca03c4e606885e8d94115fd182fb168 100644 (file)
@@ -216,7 +216,7 @@ extern "C" {
        {
                static GUI<ControlAboutlyx, FormAboutlyx,
                        OkCancelPolicy, xformsBC> cal(lv, d);
-               cal.show();
+               cal.controller().show();
        }
 
 
@@ -224,7 +224,7 @@ extern "C" {
        {
                static GUI<ControlBibitem, FormBibitem,
                        OkCancelReadOnlyPolicy, xformsBC> cbi(lv, d);
-               cbi.showInset(ic);
+               cbi.controller().showInset(ic);
        }
 
 
@@ -232,31 +232,31 @@ extern "C" {
        {
                static GUI<ControlBibtex, FormBibtex,
                        OkCancelReadOnlyPolicy, xformsBC> cbt(lv, d);
-               cbt.showInset(ic);
+               cbt.controller().showInset(ic);
        }
 
 
        void gui_ShowCharacter(LyXView & lv, Dialogs & d)
        {
-               controlCharacterSingleton.get(lv, d).show();
+               controlCharacterSingleton.get(lv, d).controller().show();
        }
 
 
        void gui_SetUserFreeFont(LyXView & lv, Dialogs & d)
        {
-               controlCharacterSingleton.get(lv, d).apply();
+               controlCharacterSingleton.get(lv, d).controller().apply();
        }
 
 
        void gui_ShowCitation(InsetCommand * ic, LyXView & lv, Dialogs & d)
        {
-               controlCitationSingleton.get(lv, d).showInset(ic);
+               controlCitationSingleton.get(lv, d).controller().showInset(ic);
        }
 
 
        void gui_CreateCitation(string const & s, LyXView & lv, Dialogs & d)
        {
-               controlCitationSingleton.get(lv, d).createInset(s);
+               controlCitationSingleton.get(lv, d).controller().createInset(s);
        }
 
 
@@ -271,19 +271,19 @@ extern "C" {
        {
                static GUI<ControlError, FormError,
                        OkCancelPolicy, xformsBC> ce(lv, d);
-               ce.showInset(ie);
+               ce.controller().showInset(ie);
        }
 
 
        void gui_ShowERT(InsetERT * ie, LyXView & lv, Dialogs & d)
        {
-               controlERTSingleton.get(lv, d).showInset(ie);
+               controlERTSingleton.get(lv, d).controller().showInset(ie);
        }
 
 
        void gui_UpdateERT(InsetERT * ie, LyXView & lv, Dialogs & d)
        {
-               controlERTSingleton.get(lv, d).showInset(ie);
+               controlERTSingleton.get(lv, d).controller().showInset(ie);
        }
 
 
@@ -291,7 +291,7 @@ extern "C" {
        {
                static GUI<ControlExternal, FormExternal,
                        OkApplyCancelReadOnlyPolicy, xformsBC> ce(lv, d);
-               ce.showInset(ie);
+               ce.controller().showInset(ie);
        }
 
 
@@ -299,7 +299,7 @@ extern "C" {
        {
                static GUI<ControlShowFile, FormShowFile,
                        OkCancelPolicy, xformsBC> csf(lv, d);
-               csf.showFile(f);
+               csf.controller().showFile(f);
        }
 
 
@@ -307,7 +307,7 @@ extern "C" {
        {
                static GUI<ControlFloat, FormFloat,
                        NoRepeatedApplyReadOnlyPolicy, xformsBC> cf(lv, d);
-               cf.showInset(ifl);
+               cf.controller().showInset(ifl);
        }
 
 
@@ -315,7 +315,7 @@ extern "C" {
        {
                static GUI<ControlForks, FormForks,
                        OkApplyCancelPolicy, xformsBC> cf(lv, d);
-               cf.show();
+               cf.controller().show();
        }
 
 
@@ -323,7 +323,7 @@ extern "C" {
        {
                static GUI<ControlGraphics, FormGraphics,
                        NoRepeatedApplyReadOnlyPolicy, xformsBC> cg(lv, d);
-               cg.showInset(ig);
+               cg.controller().showInset(ig);
        }
 
 
@@ -331,19 +331,19 @@ extern "C" {
        {
                static GUI<ControlInclude, FormInclude,
                        OkCancelReadOnlyPolicy, xformsBC> ci(lv, d);
-               ci.showInset(ii);
+               ci.controller().showInset(ii);
        }
 
 
        void gui_ShowIndex(InsetCommand * ic, LyXView & lv, Dialogs & d)
        {
-               controlIndexSingleton.get(lv, d).showInset(ic);
+               controlIndexSingleton.get(lv, d).controller().showInset(ic);
        }
 
 
        void gui_CreateIndex(LyXView & lv, Dialogs & d)
        {
-               controlIndexSingleton.get(lv, d).createInset("");
+               controlIndexSingleton.get(lv, d).controller().createInset("");
        }
 
 
@@ -358,7 +358,7 @@ extern "C" {
        {
                static GUI<ControlLog, FormLog,
                        OkCancelPolicy, xformsBC> cl(lv, d);
-               cl.show();
+               cl.controller().show();
        }
 
 
@@ -371,13 +371,13 @@ extern "C" {
 
        void gui_ShowMinipage(InsetMinipage * im, LyXView & lv, Dialogs & d)
        {
-               controlMinipageSingleton.get(lv, d).showInset(im);
+               controlMinipageSingleton.get(lv, d).controller().showInset(im);
        }
 
 
        void gui_UpdateMinipage(InsetMinipage * im, LyXView & lv, Dialogs & d)
        {
-               controlMinipageSingleton.get(lv, d).showInset(im);
+               controlMinipageSingleton.get(lv, d).controller().showInset(im);
        }
 
 
@@ -385,7 +385,7 @@ extern "C" {
        {
                static GUI<ControlParagraph, FormParagraph,
                        OkApplyCancelReadOnlyPolicy, xformsBC> cp(lv, d);
-               cp.show();
+               cp.controller().show();
        }
 
 
@@ -407,7 +407,7 @@ extern "C" {
        {
                static GUI<ControlPreamble, FormPreamble,
                        NoRepeatedApplyReadOnlyPolicy, xformsBC> cp(lv, d);
-               cp.show();
+               cp.controller().show();
        }
 
 
@@ -421,19 +421,19 @@ extern "C" {
        {
                static GUI<ControlPrint, FormPrint,
                        OkApplyCancelPolicy, xformsBC> cp(lv, d);
-               cp.show();
+               cp.controller().show();
        }
 
 
        void gui_ShowRef(InsetCommand * ic, LyXView & lv, Dialogs & d)
        {
-               controlRefSingleton.get(lv, d).showInset(ic);
+               controlRefSingleton.get(lv, d).controller().showInset(ic);
        }
 
 
        void gui_CreateRef(string const & s, LyXView & lv, Dialogs & d)
        {
-               controlRefSingleton.get(lv, d).createInset(s);
+               controlRefSingleton.get(lv, d).controller().createInset(s);
        }
 
 
@@ -441,7 +441,7 @@ extern "C" {
        {
                static GUI<ControlSearch, FormSearch,
                        NoRepeatedApplyReadOnlyPolicy, xformsBC> cs(lv, d);
-               cs.show();
+               cs.controller().show();
        }
 
 
@@ -449,7 +449,7 @@ extern "C" {
        {
                static GUI<ControlSendto, FormSendto,
                        OkApplyCancelPolicy, xformsBC> cs(lv, d);
-               cs.show();
+               cs.controller().show();
        }
 
 
@@ -457,7 +457,7 @@ extern "C" {
        {
                static GUI<ControlSpellchecker, FormSpellchecker,
                        NoRepeatedApplyReadOnlyPolicy, xformsBC> cp(lv, d);
-               cp.show();
+               cp.controller().show();
        }
 
 
@@ -477,7 +477,7 @@ extern "C" {
        {
                static GUI<ControlTabularCreate, FormTabularCreate,
                        OkApplyCancelReadOnlyPolicy, xformsBC> ctc(lv, d);
-               ctc.show();
+               ctc.controller().show();
        }
 
 
@@ -485,7 +485,7 @@ extern "C" {
        {
                static GUI<ControlTexinfo, FormTexinfo,
                        OkCancelPolicy, xformsBC> ct(lv, d);
-               ct.show();
+               ct.controller().show();
        }
 
 
@@ -495,7 +495,7 @@ extern "C" {
        {
                static GUI<ControlThesaurus, FormThesaurus,
                        OkApplyCancelReadOnlyPolicy, xformsBC> ct(lv, d);
-               ct.showEntry(s);
+               ct.controller().showEntry(s);
        }
 
 #else
@@ -508,25 +508,25 @@ extern "C" {
 
        void gui_ShowTOC(InsetCommand * ic, LyXView & lv, Dialogs & d)
        {
-               controlTocSingleton.get(lv, d).showInset(ic);
+               controlTocSingleton.get(lv, d).controller().showInset(ic);
        }
 
 
        void gui_CreateTOC(string const & s, LyXView & lv, Dialogs & d)
        {
-               controlTocSingleton.get(lv, d).createInset(s);
+               controlTocSingleton.get(lv, d).controller().createInset(s);
        }
 
 
        void gui_ShowUrl(InsetCommand * ic, LyXView & lv, Dialogs & d)
        {
-               controlUrlSingleton.get(lv, d).showInset(ic);
+               controlUrlSingleton.get(lv, d).controller().showInset(ic);
        }
 
 
        void gui_CreateUrl(string const & s, LyXView & lv, Dialogs & d)
        {
-               controlUrlSingleton.get(lv, d).createInset(s);
+               controlUrlSingleton.get(lv, d).controller().createInset(s);
        }
 
 
@@ -534,7 +534,7 @@ extern "C" {
        {
                static GUI<ControlVCLog, FormVCLog,
                        OkCancelPolicy, xformsBC> cv(lv, d);
-               cv.show();
+               cv.controller().show();
        }
 
 } // extern "C"