ViewportWidget::SetMouseEventCallback
Defined in:
Sets the mouse event callback function for a viewport widget.
C4Viewports.hPrototype
void SetMouseEventCallback(MouseEventCallback *callback, void *cookie = nullptr);
Parameters
callback |
A pointer to the mouse event callback function. |
cookie |
A user-defined pointer that is passed to the callback function. |
Description
The SetMouseEventCallback function installs a callback function that is called when a mouse event occurs inside a viewport widget. The callback parameter should point to a function having the following prototype.
typedef void MouseEventCallback(const MouseEventData *, ViewportWidget *, void *);
cookie parameter.The current mouse event callback function is called when the viewport widget's
Widget::HandleMouseEvent function is called by the Interface Manager.If the
callback parameter is nullptr, then any currently installed mouse event callback function is removed.In between mouse down and mouse up events, the track task callback function is called once per frame if such a callback function has been installed using the
ViewportWidget::SetTrackTaskCallback function.
See Also
ViewportWidget::SetTrackTaskCallback
ViewportWidget::SetDirectRenderCallback
