Hi,

I added 2 new events which I guess could be quite usefull
mousewheelup and mousewheel down.
At the moment I only implemented it for qt, but anyway heres what I added

vgui_event.h
------------------

    enum vgui_event_type
    {
      vgui_EVENT_NULL = 0,
      vgui_ENTER,
      vgui_LEAVE,
      vgui_BUTTON_DOWN,  /* */ vgui_MOUSE_DOWN = vgui_BUTTON_DOWN, vgui_MOUSE_PRESS = vgui_BUTTON_DOWN,
      vgui_BUTTON_UP,    /* */ vgui_MOUSE_UP = vgui_BUTTON_UP, vgui_MOUSE_RELEASE = vgui_BUTTON_UP,
      vgui_MOTION,       /* */ vgui_MOUSE_MOTION = vgui_MOTION,
      vgui_KEY_PRESS,    /* */ vgui_KEY_DOWN = vgui_KEY_PRESS,
      vgui_KEY_RELEASE,  /* */ vgui_KEY_UP = vgui_KEY_RELEASE,
      vgui_RESHAPE,
      vgui_TIMER,
      vgui_DRAW,
      vgui_DRAW_OVERLAY, /* */ vgui_OVERLAY_DRAW = vgui_DRAW_OVERLAY,
      vgui_STRING,
      vgui_HSCROLL,
      vgui_VSCROLL,
      vgui_DESTROY,
      vgui_IDLE,
      vgui_OTHER,
      vgui_FOCUSGAINED,
      vgui_FOCUSLOST,
++  vgui_WHEEL_UP,
++  vgui_WHEEL_DOWN,
      vgui_EVENT_MAX    // This must be the last entry in the list
    };

vgui_qt_adaptor.h
-------------------------

      void mouseMoveEvent   (QMouseEvent* e);
      void mousePressEvent  (QMouseEvent* e);
      void mouseReleaseEvent(QMouseEvent* e);
      void keyPressEvent    (QKeyEvent*   e);
      void keyReleaseEvent  (QKeyEvent*   e);
++  void wheelEvent         (QWheelEvent* e);

      vgui_event translate(QMouseEvent* e);
      vgui_event translate(QKeyEvent* e);
++  vgui_event translate(QWheelEvent* e);


vgui_qt_adaptor.cxx
------------------------------

//--------------------------------------------------------------------------------
void vgui_qt_adaptor::wheelEvent      (QWheelEvent* e)
{
    vgui_event ev = translate(e);
   
    if(e->delta() > 0)
        ev.type = vgui_WHEEL_UP;
    else
        ev.type = vgui_WHEEL_DOWN;

    dispatch_to_tableau(ev);
}


vgui_event vgui_qt_adaptor::translate(QWheelEvent* e)
{
   vgui_event ev;
   int state = vgui_MODIFIER_NULL;
   if (e-> state () & ControlButton) state |= vgui_CTRL;
   if (e-> state () & AltButton) state |= vgui_ALT;
   if (e-> state () & ShiftButton) state |= vgui_SHIFT;
   ev. modifier = vgui_modifier (state);
   ev. wx = e-> x ();
   ev. wy = QGLWidget::height () - e-> y ();
   return ev;
}


hope this helps

--
Grtz
Rowin Heymans