TwMouseWheel (function)

int TwMouseWheel(int pos)


Call this function to inform AntTweakBar that the mouse wheel has been used.

AntTweakBar interprets this event and acts consequently. So TwMouseWheel has to be called each time your app receives a mouse wheel event that is not handled directly by your app.

If you are using SDL, GLUT, GLFW or Windows (DirectX), the library provides some helper functions to handle events. See the section how to integrate for more details.



The new position of the wheel.

Return value

  • 1 if the mouse wheel event has been handled by AntTweakBar,
  • 0 otherwise.

See also