#include "GView.h"
#include "GMenubar.h"
+#include "GToolbar.h"
#include "GMiniBuffer.h"
#include "BufferView.h"
#include "funcrequest.h"
#include "frontends/Toolbars.h"
+#include "frontends/WorkArea.h"
#include "support/filetools.h"
#include "support/convert.h"
} // namespace anon
-GView::GView(Gui & owner) : LyXView(owner)
+GView::GView() : LyXView()
{
// The physical store for the boxes making up the layout.
box_store_.push_back(BoxPtr(new Gtk::VBox));
focus_command_buffer.connect(
boost::bind(&GMiniBuffer::editMode, minibuffer_.get()));
- view_state_changed.connect(boost::bind(&GView::showViewState, this));
signal_focus_in_event().connect(sigc::mem_fun(*this, &GView::onFocusIn));
//
int width = 750;
void GView::prohibitInput() const
{
- view()->hideCursor();
+ // FIXME: Why is prohibitInput const?
+ // FIXME: hideCursor is protected
+ //const_cast<GView*>(this)->workArea()->hideCursor();
const_cast<GView*>(this)->set_sensitive(false);
}
}
-void GView::message(string const & msg)
+void GView::message(docstring const & msg)
{
- minibuffer_->message(msg);
+ minibuffer_->message(lyx::to_utf8(msg));
}
-void GView::showViewState()
+void GView::updateStatusBar()
{
- message(getLyXFunc().viewStatusMessage());
+ message(lyx::from_utf8(getLyXFunc().viewStatusMessage()));
}
-void GView::setWindowTitle(string const & t, string const & /*it*/)
+void GView::setWindowTitle(docstring const & t, docstring const & /*it*/)
{
- set_title(Glib::locale_to_utf8(t));
+ set_title(lyx::to_utf8(t));
}
void GView::busy(bool yes) const
{
- if (yes ) {
- view()->hideCursor();
+ // FIXME: Why is busy const?
+ if (yes) {
+ // FIXME: hideCursor is protected
+ //const_cast<GView*>(this)->workArea()->hideCursor();
Gdk::Cursor cursor(Gdk::WATCH);
const_cast<GView *>(this)->get_window()->set_cursor(cursor);
const_cast<GView *>(this)->set_sensitive(false);
void GView::clearMessage()
{
- message(getLyXFunc().viewStatusMessage());
+ message(lyx::from_utf8(getLyXFunc().viewStatusMessage()));
}
}
+Toolbars::ToolbarPtr GView::makeToolbar(ToolbarBackend::Toolbar const & tbb)
+{
+ return make_toolbar(tbb, *this);
+}
+
} // namespace frontend
} // namespace lyx