-/* 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>
#include "BufferView.h"
#include <boost/bind.hpp>
-
+#include <boost/signals/connection.hpp>
using std::abs;
using std::endl;
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));
}
}
-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.
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);
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
{