]> git.mxchange.org Git - simgear.git/commitdiff
Canvas: Remove old event handling code
authorThomas Geymayer <tomgey@gmail.com>
Sun, 16 Dec 2012 18:02:21 +0000 (19:02 +0100)
committerThomas Geymayer <tomgey@gmail.com>
Sun, 16 Dec 2012 18:02:21 +0000 (19:02 +0100)
simgear/canvas/Canvas.cxx
simgear/canvas/Canvas.hxx

index 8d3059cbc9d5b1a9a3979c705ca7588dbb8d9c8e..5ab19006048b4c575777454d85f09f1bd0286be6 100644 (file)
@@ -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";
index f53c7492d4ae8f44ad85819c57f4ac647a86b207..4d8239c3bb79939f1069280ea661d17ef666d689 100644 (file)
@@ -148,14 +148,6 @@ namespace canvas
       PropertyObject<int>           _status;
       PropertyObject<std::string>   _status_msg;
 
-      PropertyObject<int>   _mouse_x, _mouse_y,
-                            _mouse_dx, _mouse_dy,
-                            _mouse_button,
-                            _mouse_state,
-                            _mouse_mod,
-                            _mouse_scroll,
-                            _mouse_event;
-
       bool _sampling_dirty,
            _render_dirty,
            _visible;