]> git.lyx.org Git - features.git/commitdiff
Pass and store references to LyXView and Dialogs, not pointers in the
authorAngus Leeming <leeming@lyx.org>
Thu, 15 Aug 2002 16:34:48 +0000 (16:34 +0000)
committerAngus Leeming <leeming@lyx.org>
Thu, 15 Aug 2002 16:34:48 +0000 (16:34 +0000)
FormBaseDeprecated-derived classes.

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

14 files changed:
src/frontends/Makefile.am
src/frontends/controllers/ChangeLog
src/frontends/controllers/GUI.h
src/frontends/guiapi.C [new file with mode: 0644]
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormBaseDeprecated.C
src/frontends/xforms/FormBaseDeprecated.h
src/frontends/xforms/FormDocument.C
src/frontends/xforms/FormDocument.h
src/frontends/xforms/FormInset.C
src/frontends/xforms/FormInset.h
src/frontends/xforms/FormPreferences.C
src/frontends/xforms/FormTabular.C
src/frontends/xforms/Makefile.am

index 7fb67b402b41e33707334c067cb5a0bedb710f4a..8e194e47755c5767421afdf8840ce6d9b8bea8e4 100644 (file)
@@ -40,7 +40,6 @@ libfrontends_la_SOURCES = \
        WorkAreaFactory.h \
        font_metrics.h \
        guiapi.h \
-       guiapi.C \
        key_state.h \
        lyx_gui.h \
        mouse_state.h \
index b221d53934c9d21666edc1ee670ff92bf991adaf..8a0a8a5176b6c14e6b303d2abb8a15c37c4b8d7f 100644 (file)
@@ -2,6 +2,8 @@
 
        * lots: changed my email address to leeming@lyx.org.
 
+       * GUI.h: return it to private derivation from boost::noncopyable.
+
 2002-08-14  Angus Leeming  <leeming@lyx.org>
 
        * GUI.h: public derivation from boost::noncopyable.
index 03f1a902e12acb7947975085a81e0efd9152156e..5e44edbc75e9753a238b34d43fac2a73df31e446 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright 2001 The LyX Team.
  * See the file COPYING.
  *
- * \author Angus Leeming <a.leeming@ic.ac.uk>
+ * \author Angus Leeming <leeming@lyx.org>
  */
 
 #ifndef GUI_H
@@ -18,7 +18,7 @@
  */
 template <typename Controller, typename GUIview,
          typename Policy,     typename GUIbc>
-class GUI : public boost::noncopyable {
+class GUI : boost::noncopyable {
 public:
        ///
        GUI(LyXView & lv, Dialogs & d);
diff --git a/src/frontends/guiapi.C b/src/frontends/guiapi.C
new file mode 100644 (file)
index 0000000..e69de29
index b37be2057318dbcda27c38e09368ccb57ddc6e19..102ef54f03cdd21bfdbd8fdb1d6c74a74efcd924 100644 (file)
@@ -2,6 +2,19 @@
 
        * lots: changed my email address to leeming@lyx.org.
 
+       * FormBaseDeprecated.[Ch]: return it to private derivation from
+       boost::noncopyable.
+
+       * FormBaseDeprecated.[Ch]:
+       * FormDocument.[Ch]:
+       * FormInset.[Ch]:
+       * FormMaths*.[Ch]:
+       * FormPreferences.[Ch]:
+       * FormTabular.[Ch]:
+       pass and store references to LyXView and Dialogs, not pointers.
+
+       * FormInset.[Ch]: remove class FormCommand.
+
 2002-08-14  Angus Leeming  <leeming@lyx.org>
 
        * FormBaseDeprecated.h: public derivation from boost::noncopyable.
index 208665502d6af4a99cb464552d6adfccc991390c..9230bf7d48bc1194a63b1e2f957634cda5d14550 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2000-2001 The LyX Team.
  * See the file COPYING.
  *
- * \author Angus Leeming, a.leeming@ic.ac.uk
+ * \author Angus Leeming <leeming@lyx.org>
  */
 
 #include <config.h>
@@ -39,14 +39,12 @@ static int C_PrehandlerCB(FL_OBJECT *, int, FL_Coord, FL_Coord, int, void *);
 } // extern "C"
 
 
-FormBaseDeprecated::FormBaseDeprecated(LyXView * lv, Dialogs * d,
+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())
-{
-       lyx::Assert(lv && d);
-}
+{}
 
 
 FormBaseDeprecated::~FormBaseDeprecated()
@@ -71,7 +69,7 @@ void FormBaseDeprecated::redraw()
 void FormBaseDeprecated::connect()
 {
        fl_set_form_minsize(form(), minw_, minh_);
-       r_ = d_->redrawGUI.connect(boost::bind(&FormBaseDeprecated::redraw, this));
+       r_ = d_.redrawGUI.connect(boost::bind(&FormBaseDeprecated::redraw, this));
 }
 
 
@@ -205,7 +203,7 @@ void FormBaseDeprecated::RestoreCB()
 }
 
 
-FormBaseBI::FormBaseBI(LyXView * lv, Dialogs * d, string const & t,
+FormBaseBI::FormBaseBI(LyXView & lv, Dialogs & d, string const & t,
                       bool allowResize)
        : FormBaseDeprecated(lv, d, t, allowResize)
 {}
@@ -213,12 +211,12 @@ FormBaseBI::FormBaseBI(LyXView * lv, Dialogs * d, string const & t,
 
 void FormBaseBI::connect()
 {
-       h_ = d_->hideAll.connect(boost::bind(&FormBaseBI::hide, this));
+       h_ = d_.hideAll.connect(boost::bind(&FormBaseBI::hide, this));
        FormBaseDeprecated::connect();
 }
 
 
-FormBaseBD::FormBaseBD(LyXView * lv, Dialogs * d, string const & t,
+FormBaseBD::FormBaseBD(LyXView & lv, Dialogs & d, string const & t,
                       bool allowResize)
        : FormBaseDeprecated(lv, d, t, allowResize)
 {}
@@ -226,9 +224,9 @@ FormBaseBD::FormBaseBD(LyXView * lv, Dialogs * d, string const & t,
 
 void FormBaseBD::connect()
 {
-       u_ = d_->updateBufferDependent.
+       u_ = d_.updateBufferDependent.
                connect(boost::bind(&FormBaseBD::updateSlot, this, _1));
-       h_ = d_->hideBufferDependent.
+       h_ = d_.hideBufferDependent.
                connect(boost::bind(&FormBaseBD::hide, this));
        FormBaseDeprecated::connect();
 }
index 4b9aeee741a414bbacf16bedea0548109e804805..5bd894e0737e2f3f4834fd04721b8b3d8d345c03 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright 2000-2002 the LyX Team
  * Read the file COPYING
  *
- * \author Angus Leeming, a.leeming@ic.ac.uk
+ * \author Angus Leeming <leeming@lyx.org>
  */
 
 /* A base class for those remaining xforms dialogs that haven't yet undergone
@@ -34,11 +34,11 @@ class Dialogs;
 class LyXView;
 class Tooltips;
 
-class FormBaseDeprecated : public boost::noncopyable, public FeedbackController
+class FormBaseDeprecated : boost::noncopyable, public FeedbackController
 {
 public:
        ///
-       FormBaseDeprecated(LyXView *, Dialogs *, string const &, bool);
+       FormBaseDeprecated(LyXView &, Dialogs &, string const &, bool);
        ///
        virtual ~FormBaseDeprecated();
 
@@ -118,9 +118,9 @@ protected: // methods
         *  We could modify Dialogs to have a visible LyXFunc* instead and
         *  save a couple of bytes per dialog.
         */
-       LyXView * lv_;
+       LyXView & lv_;
        /// Used so we can get at the signals we have to connect to.
-       Dialogs * d_;
+       Dialogs & d_;
        /// Hide connection.
        boost::signals::connection h_;
        /// Redraw connection.
@@ -147,7 +147,7 @@ private:
 class FormBaseBI : public FormBaseDeprecated {
 protected:
        /// Constructor
-       FormBaseBI(LyXView *, Dialogs *, string const &,
+       FormBaseBI(LyXView &, Dialogs &, string const &,
                   bool allowResize = true);
 
        /// Connect signals
@@ -160,7 +160,7 @@ protected:
 class FormBaseBD : public FormBaseDeprecated {
 protected:
        /// Constructor
-       FormBaseBD(LyXView *, Dialogs *, string const &,
+       FormBaseBD(LyXView &, Dialogs &, string const &,
                   bool allowResize = true);
 
        /// Connect signals
index 2e75829252f58373ba4e04d46b4bf38706e302de..e6ea894e0ca6cfdb1020d4c99ba4c95e4463b94a 100644 (file)
@@ -56,7 +56,7 @@ using std::bind2nd;
 using Liason::setMinibuffer;
 using std::vector;
 
-FormDocument::FormDocument(LyXView * lv, Dialogs * d)
+FormDocument::FormDocument(LyXView & lv, Dialogs & d)
        : FormBaseBD(lv, d, _("Document Layout")),
          ActCell(0), Confirmed(0),
          current_bullet_panel(0), current_bullet_depth(0), fbullet(0)
@@ -341,7 +341,7 @@ void FormDocument::build()
 
 void FormDocument::apply()
 {
-       if (!lv_->view()->available() || !dialog_.get())
+       if (!lv_.view()->available() || !dialog_.get())
                return;
 
        bool redo = class_apply();
@@ -351,17 +351,17 @@ void FormDocument::apply()
        bullets_apply();
 
        if (redo) {
-               lv_->view()->redoCurrentBuffer();
+               lv_.view()->redoCurrentBuffer();
        }
-       lv_->buffer()->markDirty();
-       setMinibuffer(lv_, _("Document layout set"));
+       lv_.buffer()->markDirty();
+       setMinibuffer(&lv_, _("Document layout set"));
 }
 
 
 void FormDocument::cancel()
 {
        // this avoids confusion when reopening
-       BufferParams & param = lv_->buffer()->params;
+       BufferParams & param = lv_.buffer()->params;
        param.temp_bullets[0] = param.user_defined_bullets[0];
        param.temp_bullets[1] = param.user_defined_bullets[1];
        param.temp_bullets[2] = param.user_defined_bullets[2];
@@ -377,7 +377,7 @@ void FormDocument::update()
 
        checkReadOnly();
 
-       BufferParams const & params = lv_->buffer()->params;
+       BufferParams const & params = lv_.buffer()->params;
 
        class_update(params);
        paper_update(params);
@@ -481,12 +481,12 @@ bool FormDocument::input(FL_OBJECT * ob, long)
                language_apply(params);
                options_apply(params);
                bullets_apply(params);
-               params.preamble = lv_->buffer()->params.preamble;
+               params.preamble = lv_.buffer()->params.preamble;
                saveParamsAsDefault(params);
        }
 
        if (ob == dialog_->button_reset_defaults) {
-               BufferParams params = lv_->buffer()->params;
+               BufferParams params = lv_.buffer()->params;
                params.textclass = combo_doc_class->get() - 1;
                params.useClassDefaults();
                UpdateLayoutDocument(params);
@@ -735,7 +735,7 @@ bool FormDocument::class_apply(BufferParams &params)
 
 bool FormDocument::class_apply()
 {
-       BufferParams &params = lv_->buffer()->params;
+       BufferParams &params = lv_.buffer()->params;
 
        unsigned int const old_class = params.textclass;
 
@@ -746,11 +746,11 @@ bool FormDocument::class_apply()
                if (textclasslist[params.textclass].load()) {
                        // successfully loaded
                        redo = true;
-                       setMinibuffer(lv_, _("Converting document to new document class..."));
+                       setMinibuffer(&lv_, _("Converting document to new document class..."));
                        int ret = CutAndPaste::SwitchLayoutsBetweenClasses(
                                old_class, params.textclass,
-                               &*(lv_->buffer()->paragraphs.begin()),
-                               lv_->buffer()->params);
+                               &*(lv_.buffer()->paragraphs.begin()),
+                               lv_.buffer()->params);
                        if (ret) {
                                string s;
                                if (ret == 1) {
@@ -833,7 +833,7 @@ void FormDocument::paper_apply(BufferParams & params)
 
 void FormDocument::paper_apply()
 {
-       paper_apply(lv_->buffer()->params);
+       paper_apply(lv_.buffer()->params);
 }
 
 
@@ -876,8 +876,8 @@ bool FormDocument::language_apply(BufferParams & params)
 
        if (old_language != new_language
            && old_language->RightToLeft() == new_language->RightToLeft()
-           && !lv_->buffer()->isMultiLingual())
-               lv_->buffer()->changeLanguage(old_language, new_language);
+           && !lv_.buffer()->isMultiLingual())
+               lv_.buffer()->changeLanguage(old_language, new_language);
 
        if (old_language != new_language) {
                redo = true;
@@ -892,7 +892,7 @@ bool FormDocument::language_apply(BufferParams & params)
 
 bool FormDocument::language_apply()
 {
-       return language_apply(lv_->buffer()->params);
+       return language_apply(lv_.buffer()->params);
 }
 
 
@@ -923,14 +923,14 @@ bool FormDocument::options_apply(BufferParams & params)
 
 bool FormDocument::options_apply()
 {
-       return options_apply(lv_->buffer()->params);
+       return options_apply(lv_.buffer()->params);
 }
 
 
 void FormDocument::bullets_apply(BufferParams & params)
 {
        /* update the bullet settings */
-       BufferParams & buf_params = lv_->buffer()->params;
+       BufferParams & buf_params = lv_.buffer()->params;
 
        // a little bit of loop unrolling
        params.user_defined_bullets[0] = buf_params.temp_bullets[0];
@@ -942,7 +942,7 @@ void FormDocument::bullets_apply(BufferParams & params)
 
 void FormDocument::bullets_apply()
 {
-       bullets_apply(lv_->buffer()->params);
+       bullets_apply(lv_.buffer()->params);
 }
 
 void FormDocument::UpdateClassParams(BufferParams const & params)
@@ -1203,7 +1203,7 @@ void FormDocument::bullets_update(BufferParams const & params)
             (XpmVersion==4 && XpmRevision<7)))
                return;
 
-       bool const isLinuxDoc = lv_->buffer()->isLinuxDoc();
+       bool const isLinuxDoc = lv_.buffer()->isLinuxDoc();
        setEnabled(fbullet, !isLinuxDoc);
 
        if (isLinuxDoc) return;
@@ -1218,7 +1218,7 @@ void FormDocument::bullets_update(BufferParams const & params)
 
 void FormDocument::checkReadOnly()
 {
-       if (bc().readOnly(lv_->buffer()->isReadonly())) {
+       if (bc().readOnly(lv_.buffer()->isReadonly())) {
                combo_doc_class->deactivate();
                combo_language->deactivate();
                postWarning(_("Document is read-only."
@@ -1300,7 +1300,7 @@ bool FormDocument::CheckDocumentInput(FL_OBJECT * ob, long)
 
 void FormDocument::ChoiceBulletSize(FL_OBJECT * ob, long /*data*/)
 {
-       BufferParams & param = lv_->buffer()->params;
+       BufferParams & param = lv_.buffer()->params;
 
        // convert from 1-6 range to -1-4
        param.temp_bullets[current_bullet_depth].setSize(fl_get_choice(ob) - 2);
@@ -1311,7 +1311,7 @@ void FormDocument::ChoiceBulletSize(FL_OBJECT * ob, long /*data*/)
 
 void FormDocument::InputBulletLaTeX(FL_OBJECT *, long)
 {
-       BufferParams & param = lv_->buffer()->params;
+       BufferParams & param = lv_.buffer()->params;
 
        param.temp_bullets[current_bullet_depth].
                setText(fl_get_input(bullets_->input_bullet_latex));
@@ -1328,7 +1328,7 @@ void FormDocument::BulletDepth(FL_OBJECT * ob)
        /*                                                            */
        /* I'm inclined to just go with 3 and 4 at the moment and     */
        /* maybe try to support the others later                      */
-       BufferParams & param = lv_->buffer()->params;
+       BufferParams & param = lv_.buffer()->params;
 
        int data = 0;
        if (ob == bullets_->radio_bullet_depth_1)
@@ -1413,7 +1413,7 @@ void FormDocument::BulletBMTable(FL_OBJECT * ob, long /*data*/)
        /* to that extracted from the current chosen position of the BMTable  */
        /* Don't forget to free the button's old pixmap first.                */
 
-       BufferParams & param = lv_->buffer()->params;
+       BufferParams & param = lv_.buffer()->params;
        int bmtable_button = fl_get_bmtable(ob);
 
        /* try to keep the button held down till another is pushed */
@@ -1430,13 +1430,13 @@ void FormDocument::CheckChoiceClass(FL_OBJECT * ob, long)
        if (!ob)
                ob = class_->choice_doc_class;
 
-       lv_->prohibitInput();
+       lv_.prohibitInput();
 
        unsigned int tc = combo_doc_class->get() - 1;
        if (textclasslist[tc].load()) {
                // we use a copy of the bufferparams because we do not
                // want to modify them yet.
-               BufferParams params = lv_->buffer()->params;
+               BufferParams params = lv_.buffer()->params;
 
                if (lyxrc.auto_reset_options) {
                        params.textclass = tc;
@@ -1454,9 +1454,9 @@ void FormDocument::CheckChoiceClass(FL_OBJECT * ob, long)
                Alert::alert(_("Conversion Errors!"),
                             _("Unable to switch to new document class."),
                             _("Reverting to original document class."));
-               combo_doc_class->select(int(lv_->buffer()->params.textclass) + 1);
+               combo_doc_class->select(int(lv_.buffer()->params.textclass) + 1);
        }
-       lv_->allowInput();
+       lv_.allowInput();
 }
 
 
index 429fa6632535c1f7c4ba029cc54eca663973e8f9..4d9330591d9a2408faa8eba9dbc5fb0092dffdd4 100644 (file)
@@ -35,7 +35,7 @@ struct FD_document_bullet;
  */
 class FormDocument : public FormBaseBD {
 public:
-       FormDocument(LyXView *, Dialogs *);
+       FormDocument(LyXView &, Dialogs &);
        ///
        static void ComboInputCB(int, void *, Combox *);
 private:
index 1c3506ca7e2d7698d7cc8449c63138ca4aed1840..3d0b47f126661b39e6952444ce294cf9622baff0 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2000-2001 The LyX Team.
  * See the file COPYING.
  *
- * \author Angus Leeming, a.leeming@ic.ac.uk
+ * \author Angus Leeming <leeming@lyx.org>
  */
 
 #include <config.h>
 #pragma implementation
 #endif
 
-#include "Dialogs.h"
-#include "frontends/LyXView.h"
 #include "FormInset.h"
-#include "xformsBC.h"
-#include "insets/insetcommand.h"
+
+#include "frontends/Dialogs.h"
 
 #include <boost/bind.hpp>
 
-FormInset::FormInset(LyXView * lv, Dialogs * d, string const & t)
+FormInset::FormInset(LyXView & lv, Dialogs & d, string const & t)
        : FormBaseBD(lv, d, t)
 {}
 
 
 void FormInset::connect()
 {
-       u_ = d_->updateBufferDependent.
+       u_ = d_.updateBufferDependent.
                connect(boost::bind(&FormInset::updateSlot, this, _1));
-       h_ = d_->hideBufferDependent.
+       h_ = d_.hideBufferDependent.
                connect(boost::bind(&FormInset::hide, this));
        FormBaseDeprecated::connect();
 }
@@ -51,46 +49,3 @@ void FormInset::updateSlot(bool switched)
        else
                update();
 }
-
-
-FormCommand::FormCommand(LyXView * lv, Dialogs * d, string const & t)
-       : FormInset(lv, d, t),
-         inset_(0)
-{}
-
-
-void FormCommand::disconnect()
-{
-       inset_ = 0;
-       params = InsetCommandParams(string());
-       FormInset::disconnect();
-}
-
-
-void FormCommand::showInset(InsetCommand * inset)
-{
-       if (inset == 0) return;  // maybe we should Assert this?
-
-       // If connected to another inset, disconnect from it.
-       if (inset_)
-               ih_.disconnect();
-
-       inset_    = inset;
-       params    = inset->params();
-       ih_ = inset->hideDialog.connect(boost::bind(&FormCommand::hide, this));
-       show();
-}
-
-
-void FormCommand::createInset(string const & arg)
-{
-       if (inset_) {
-               ih_.disconnect();
-               inset_ = 0;
-       }
-
-       params.setFromString(arg);
-       if (!arg.empty())
-               bc().valid(); // so that the user can press Ok
-       show();
-}
index c5d4604f38e243aca3e1a57f5b4f66e3c83e89f2..8c7904c073263109c9cadbe7bd4e71209e578c14 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright 2000-2001 the LyX Team
  * Read the file COPYING
  *
- * \author Angus Leeming, a.leeming@ic.ac.uk
+ * \author Angus Leeming <leeming@lyx.org>
  */
 
 /* A base class for dialogs connected to insets. This class is temporary in that
@@ -30,7 +30,7 @@ class InsetCommand;
 class FormInset : public FormBaseBD {
 protected:
        /// Constructor
-       FormInset(LyXView *, Dialogs *, string const &);
+       FormInset(LyXView &, Dialogs &, string const &);
 
        /// Connect signals. Also perform any necessary initialisation.
        virtual void connect();
@@ -44,27 +44,4 @@ protected:
        boost::signals::connection ih_;
 };
 
-
-/** This class is an XForms GUI base class to insets derived from
-    InsetCommand
- */
-class FormCommand : public FormInset {
-protected:
-       /// Constructor
-       FormCommand(LyXView *, Dialogs *, string const &);
-
-       /// Disconnect signals. Also perform any necessary housekeeping.
-       virtual void disconnect();
-
-       /// Slot launching dialog to (possibly) create a new inset
-       void createInset(string const &);
-       /// Slot launching dialog to an existing inset
-       void showInset(InsetCommand *);
-
-       /// pointer to the inset passed through showInset
-       InsetCommand * inset_;
-       /// the nitty-griity. What is modified and passed back
-       InsetCommandParams params;
-};
-
 #endif
index e433ca981fe3304f593a5c498a3ecf66a17f833a..ad3ebdfc2a0d5432775f2f2c128100612ec5f669 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2000-2001 The LyX Team.
  * See the file COPYING.
  *
- * \author Angus Leeming, a.leeming@ic.ac.uk
+ * \author Angus Leeming <leeming@lyx.org>
  */
 
 #include <config.h>
@@ -72,7 +72,7 @@ Converters local_converters;
 
 
 FormPreferences::FormPreferences(LyXView & lv, Dialogs & d)
-       : FormBaseBI(&lv, &d, _("Preferences"), false),
+       : FormBaseBI(lv, d, _("Preferences"), false),
          colors_(*this), converters_(*this), inputs_misc_(*this),
          formats_(*this), interface_(*this), language_(*this),
          lnf_misc_(*this), outputs_misc_(*this), paths_(*this),
@@ -132,7 +132,7 @@ void FormPreferences::ok()
                colors_.modifiedXformsPrefs = !XformsColor::write(filename);
        }
 
-       lv_->dispatch(FuncRequest(LFUN_SAVEPREFERENCES));
+       lv_.dispatch(FuncRequest(LFUN_SAVEPREFERENCES));
 }
 
 
@@ -415,7 +415,7 @@ void FormPreferences::Colors::apply()
                                setCursorColor(GUI_COLOR_CURSOR);
                        }
                }
-               parent_.lv_->getDialogs().redrawGUI();
+               parent_.lv_.getDialogs().redrawGUI();
        }
 
        // Now do the same for the LyX LColors...
@@ -437,7 +437,7 @@ void FormPreferences::Colors::apply()
 
                        string const s = lcolor.getLyXName(lc) + string(" ") +
                                hexname;
-                       parent_.lv_->dispatch(FuncRequest(LFUN_SET_COLOR, s));
+                       parent_.lv_.dispatch(FuncRequest(LFUN_SET_COLOR, s));
                }
        }
 }
@@ -744,7 +744,7 @@ void FormPreferences::Colors::LoadBrowserLyX()
                               << "\". Set to \"black\"!" << endl;
 
                        string const arg = lcolor.getLyXName(lc) + " black";
-                       parent_.lv_->dispatch(FuncRequest(LFUN_SET_COLOR, arg));
+                       parent_.lv_.dispatch(FuncRequest(LFUN_SET_COLOR, arg));
                        continue;
                }
 
@@ -2556,7 +2556,7 @@ void FormPreferences::ScreenFonts::apply() const
        if (changed) {
                // Now update the buffers
                // Can anything below here affect the redraw process?
-               parent_.lv_->dispatch(FuncRequest(LFUN_SCREEN_FONT_UPDATE));
+               parent_.lv_.dispatch(FuncRequest(LFUN_SCREEN_FONT_UPDATE));
        }
 }
 
@@ -2979,7 +2979,7 @@ void FormPreferences::browse(FL_OBJECT * inpt,
 
        // Show the file browser dialog
        string const new_filename =
-               browseFile(lv_, filename, title, pattern, dir1, dir2);
+               browseFile(&lv_, filename, title, pattern, dir1, dir2);
 
        // Save the filename to the dialog
        if (new_filename != filename && !new_filename.empty()) {
index 3bd41556a64aa830db182461e11606c48557100c..bd5f9be702cab228a3b15cf95ef7544a98e5df45 100644 (file)
@@ -39,7 +39,7 @@ using std::remove_if;
 
 
 FormTabular::FormTabular(LyXView & lv, Dialogs & d)
-       : FormInset(&lv, &d, _("Tabular Layout")),
+       : FormInset(lv, d, _("Tabular Layout")),
          inset_(0), actCell_(-1), closing_(false)
 {
 }
@@ -246,7 +246,7 @@ void FormTabular::update()
                                        cell_options_->choice_value_mcolumn_width,
                                        pwidth, default_unit);
 
-               if (!lv_->buffer()->isReadonly()) {
+               if (!lv_.buffer()->isReadonly()) {
                        setEnabled(cell_options_->input_special_multialign, true);
                        setEnabled(cell_options_->input_mcolumn_width, true);
                        setEnabled(cell_options_->choice_value_mcolumn_width, true);
@@ -322,7 +322,7 @@ void FormTabular::update()
        special = tabular->GetAlignSpecial(cell, LyXTabular::SET_SPECIAL_COLUMN);
        fl_set_input(column_options_->input_special_alignment, special.c_str());
 
-       bool const isReadonly = lv_->buffer()->isReadonly();
+       bool const isReadonly = lv_.buffer()->isReadonly();
        setEnabled(column_options_->input_special_alignment, !isReadonly);
 
        pwidth = tabular->GetColumnPWidth(cell);
@@ -548,7 +548,7 @@ bool FormTabular::input(FL_OBJECT * ob, long)
        }
        // No point in processing directives that you can't do anything with
        // anyhow, so exit now if the buffer is read-only.
-       if (lv_->buffer()->isReadonly()) {
+       if (lv_.buffer()->isReadonly()) {
                update();
                return false;
        }
@@ -557,7 +557,7 @@ bool FormTabular::input(FL_OBJECT * ob, long)
                string const str =
                        getLengthFromWidgets(column_options_->input_column_width,
                                             column_options_->choice_value_column_width);
-               inset_->tabularFeatures(lv_->view().get(), LyXTabular::SET_PWIDTH, str);
+               inset_->tabularFeatures(lv_.view().get(), LyXTabular::SET_PWIDTH, str);
 
                //check if the input is valid
                string const input =
@@ -576,7 +576,7 @@ bool FormTabular::input(FL_OBJECT * ob, long)
                string const str =
                        getLengthFromWidgets(cell_options_->input_mcolumn_width,
                                             cell_options_->choice_value_mcolumn_width);
-               inset_->tabularFeatures(lv_->view().get(), LyXTabular::SET_MPWIDTH, str);
+               inset_->tabularFeatures(lv_.view().get(), LyXTabular::SET_MPWIDTH, str);
 
                //check if the input is valid
                string const input =
@@ -689,7 +689,7 @@ bool FormTabular::input(FL_OBJECT * ob, long)
        else
                return false;
 
-       inset_->tabularFeatures(lv_->view().get(), num, special);
+       inset_->tabularFeatures(lv_.view().get(), num, special);
        update();
 
        return true;
index f0441344480400aa3b7483da42b7d54b74c1e5b4..61a5c34be4316eac01416c19cb13bcfa800ceb5c 100644 (file)
@@ -143,7 +143,6 @@ libxforms_la_SOURCES = \
        FormUrl.h \
        FormVCLog.C \
        FormVCLog.h \
-       guiapi.C \
        LyXKeySymFactory.C \
        LyXScreenFactory.C \
        MathsSymbols.C \