#include "BufferView.h"
#include "frontends/LyXView.h"
+#include "frontends/WorkArea.h"
// Qt defines a macro 'signals' that clashes with a boost namespace.
// All is well if the namespace is visible first.
k |= key_modifier::ctrl;
if (state & Qt::ShiftButton)
k |= key_modifier::shift;
- if (state & Qt::AltButton)
+ if (state & Qt::AltButton || state & Qt::MetaButton)
k |= key_modifier::alt;
return k;
}
} // namespace anon
+namespace lyx {
+namespace frontend {
+
// This is a 'heartbeat' generating synthetic mouse move events when the
// cursor is at the top or bottom edge of the viewport. One scroll per 0.2 s
SyntheticMouseEvent::SyntheticMouseEvent()
synthetic_mouse_event_.scrollbar_value_old = scrollbar_value;
// ... and dispatch the event to the LyX core.
- wa_->view().view()->workAreaDispatch(synthetic_mouse_event_.cmd);
+ wa_->view().workArea()->dispatch(synthetic_mouse_event_.cmd);
}
}
void QContentPane::scrollBarChanged(int val)
{
if (track_scrollbar_)
- wa_->view().view()->scrollDocView(val);
+ wa_->view().workArea()->scrollBufferView(val);
}
FuncRequest cmd(LFUN_MOUSE_TRIPLE,
dc_event_.x, dc_event_.y,
q_button_state(dc_event_.state));
- wa_->view().view()->workAreaDispatch(cmd);
+ wa_->view().workArea()->dispatch(cmd);
return;
}
FuncRequest const cmd(LFUN_MOUSE_PRESS, e->x(), e->y(),
q_button_state(e->button()));
- wa_->view().view()->workAreaDispatch(cmd);
+ wa_->view().workArea()->dispatch(cmd);
}
FuncRequest const cmd(LFUN_MOUSE_RELEASE, e->x(), e->y(),
q_button_state(e->button()));
- wa_->view().view()->workAreaDispatch(cmd);
+ wa_->view().workArea()->dispatch(cmd);
}
synthetic_mouse_event_.scrollbar_value_old = scrollbar_value;
// ... and dispatch the event to the LyX core.
- wa_->view().view()->workAreaDispatch(cmd);
+ wa_->view().workArea()->dispatch(cmd);
}
}
boost::shared_ptr<QLyXKeySym> sym(new QLyXKeySym);
sym->set(ev.get());
- wa_->view().view()->workAreaKeyPress(sym, q_key_state(ev->state()));
+ wa_->view().workArea()->processKeySym(sym, q_key_state(ev->state()));
keyeventQueue_.pop();
handle_autos = false;
FuncRequest cmd(LFUN_MOUSE_DOUBLE,
dc_event_.x, dc_event_.y,
q_button_state(dc_event_.state));
- wa_->view().view()->workAreaDispatch(cmd);
+ wa_->view().workArea()->dispatch(cmd);
}
}
pixmap_->resize(width(), height());
- wa_->view().view()->workAreaResize();
+ wa_->view().workArea()->resizeBufferView();
}
{
if (!pixmap_.get()) {
pixmap_.reset(new QPixmap(width(), height()));
- wa_->view().view()->workAreaResize();
+ wa_->view().workArea()->resizeBufferView();
return;
}
{
track_scrollbar_ = track_on;
}
+
+} // namespace frontend
+} // namespace lyx
+
+#include "QContentPane_moc.cpp"