From: Thomas Geymayer Date: Sun, 16 Dec 2012 18:02:21 +0000 (+0100) Subject: Canvas: Remove old event handling code X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ac27fae7129788a099e3820061e69e8139bfabc2;p=simgear.git Canvas: Remove old event handling code --- diff --git a/simgear/canvas/Canvas.cxx b/simgear/canvas/Canvas.cxx index 8d3059cb..5ab19006 100644 --- a/simgear/canvas/Canvas.cxx +++ b/simgear/canvas/Canvas.cxx @@ -66,15 +66,6 @@ namespace canvas _view_height(-1), _status(node, "status"), _status_msg(node, "status-msg"), - _mouse_x(node, "mouse/x"), - _mouse_y(node, "mouse/y"), - _mouse_dx(node, "mouse/dx"), - _mouse_dy(node, "mouse/dy"), - _mouse_button(node, "mouse/button"), - _mouse_state(node, "mouse/state"), - _mouse_mod(node, "mouse/mod"), - _mouse_scroll(node, "mouse/scroll"), - _mouse_event(node, "mouse/event"), _sampling_dirty(false), _render_dirty(true), _visible(true), @@ -365,17 +356,6 @@ namespace canvas //---------------------------------------------------------------------------- bool Canvas::handleMouseEvent(const MouseEventPtr& event) { - _mouse_x = event->client_pos.x(); - _mouse_y = event->client_pos.y(); - _mouse_dx = event->delta.x(); - _mouse_dy = event->delta.y(); - _mouse_button = event->button; - _mouse_state = event->state; - _mouse_mod = event->mod; - //_mouse_scroll = event.scroll; - // Always set event type last because all listeners are attached to it - _mouse_event = event->type; - if( !_root_group.get() ) return false; @@ -547,10 +527,9 @@ namespace canvas void Canvas::setStatusFlags(unsigned int flags, bool set) { if( set ) - _status = _status | flags; + _status |= flags; else - _status = _status & ~flags; - // TODO maybe extend simgear::PropertyObject to allow |=, &= etc. + _status &= ~flags; if( (_status & MISSING_SIZE_X) && (_status & MISSING_SIZE_Y) ) _status_msg = "Missing size"; diff --git a/simgear/canvas/Canvas.hxx b/simgear/canvas/Canvas.hxx index f53c7492..4d8239c3 100644 --- a/simgear/canvas/Canvas.hxx +++ b/simgear/canvas/Canvas.hxx @@ -148,14 +148,6 @@ namespace canvas PropertyObject _status; PropertyObject _status_msg; - PropertyObject _mouse_x, _mouse_y, - _mouse_dx, _mouse_dy, - _mouse_button, - _mouse_state, - _mouse_mod, - _mouse_scroll, - _mouse_event; - bool _sampling_dirty, _render_dirty, _visible;