]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/XFormsView.C
Yet more dialog tweaking from Rob.
[lyx.git] / src / frontends / xforms / XFormsView.C
index 46d63349887b0164f5258604d01cbb72fcd78de5..1f504959d85576d689c39b69a6aabed4937f7023 100644 (file)
@@ -1,12 +1,12 @@
-/* This file is part of
- * ======================================================
+/**
+ * \file XFormsView.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *           LyX, The Document Processor
+ * \author unknown
  *
- *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2001 The LyX Team.
- *
- * ====================================================== */
+ * Full author contact details are available in file CREDITS
+ */
 
 #include <config.h>
 
@@ -35,7 +35,7 @@
 #include "BufferView.h"
 
 #include <boost/bind.hpp>
-
+#include <boost/signals/connection.hpp>
 using std::abs;
 using std::endl;
 
@@ -59,15 +59,15 @@ 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_changed.connect(boost::bind(&XFormsView::show_view_state, this));
-       focus_command_buffer.connect(boost::bind(&XMiniBuffer::focus, minibuffer_.get()));
+       view_state_con = view_state_changed.connect(boost::bind(&XFormsView::show_view_state, this));
+       focus_con = focus_command_buffer.connect(boost::bind(&XMiniBuffer::focus, minibuffer_.get()));
+
        // Make sure the buttons are disabled if needed.
        updateToolbar();
-       getDialogs()->redrawGUI.connect(boost::bind(&XFormsView::redraw, this));
+       redraw_con = getDialogs().redrawGUI().connect(boost::bind(&XFormsView::redraw, 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,9 +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_->set(true);
+       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);
@@ -197,19 +195,19 @@ void XFormsView::message(string const & str)
        minibuffer_->message(str);
 }
 
+
 void XFormsView::show_view_state()
 {
-       message(getLyXFunc()->view_status_message());
+       message(getLyXFunc().view_status_message());
 }
+
+
 // How should this actually work? Should it prohibit input in all BufferViews,
 // or just in the current one? If "just the current one", then it should be
 // placed in BufferView. If "all BufferViews" then LyXGUI (I think) should
 // run "prohibitInput" on all LyXViews which will run prohibitInput on all
 // BufferViews. Or is it perhaps just the (input in) BufferViews in the
-// current LyxView that should be prohibited (Lgb) (This applies to
+// current LyXView that should be prohibited (Lgb) (This applies to
 // "allowInput" as well.)
 void XFormsView::prohibitInput() const
 {