ScrollGesture#
- class omni.ui.scene.ScrollGesture#
Bases:
ShapeGestureThe gesture that provides a way to capture mouse scroll event.
Methods
__init__(self, _on_ended, None] = None, **kwargs)Constructs an gesture to track when the user clicked the mouse.
call_on_ended_fn(self, arg0)Called when the user scrolls.
has_on_ended_fn(self)Called when the user scrolls.
set_on_ended_fn(self, fn, None])Called when the user scrolls.
Attributes
The modifier that should be pressed to trigger this gesture.
The mouse button this gesture is watching.
The mouse buttons this gesture is watching.
Returns the current scroll state.
- __init__(self: omni.ui_scene._scene.ScrollGesture, _on_ended: Callable[[omni::ui::scene::AbstractShape], None] = None, **kwargs) None#
Constructs an gesture to track when the user clicked the mouse.
### Arguments:
- `onEnded :`
Function that is called when the user clicked the mouse button.
- `kwargsdict`
See below
### Keyword Arguments:
- `mouse_button`
The mouse button this gesture is watching.
- `modifiers`
The modifier that should be pressed to trigger this gesture.
- `on_ended_fn`
Called when the user scrolls.
- `name`
The name of the object. It’s used for debugging.
- `manager`
The Manager that controld this gesture.
- call_on_ended_fn(
- self: omni.ui_scene._scene.ScrollGesture,
- arg0: omni::ui::scene::AbstractShape,
Called when the user scrolls.
- has_on_ended_fn( ) bool#
Called when the user scrolls.
- set_on_ended_fn(self: omni.ui_scene._scene.ScrollGesture, fn: Callable[[omni::ui::scene::AbstractShape], None]) None#
Called when the user scrolls.
- property modifiers#
The modifier that should be pressed to trigger this gesture.
- property mouse_button#
The mouse button this gesture is watching.
- property mouse_buttons#
The mouse buttons this gesture is watching.
- property scroll#
Returns the current scroll state.