This object watches for mouse-events happening within a component, and if the mouse remains still for long enough, triggers an event to indicate that it has become inactive.
You'd use this for situations where e.g. you want to hide the mouse-cursor when the user's not actively using the mouse.
After creating an instance of this, use addListener to get callbacks when the activity status changes.
@tags{GUI}
|
|
inlineoverrideprivatevirtual |
Called when a mouse button is pressed.
The MouseEvent object passed in contains lots of methods for finding out which button was pressed, as well as which modifier keys (e.g. shift, ctrl) were held down at the time.
Once a button is held down, the mouseDrag method will be called when the mouse moves, until the button is released.
- Parameters
-
| Event | details about the position and status of the mouse event, including the source component in which it occurred |
- See also
- mouseUp, mouseDrag, mouseDoubleClick, contains
Reimplemented from juce::MouseListener.
|
|
inlineoverrideprivatevirtual |
Called when the mouse first enters a component.
If the mouse button isn't pressed and the mouse moves into a component, this will be called to let the component react to this.
When the mouse button is pressed and held down while being moved in or out of a component, no mouseEnter or mouseExit callbacks are made - only mouseDrag messages are sent to the component that the mouse was originally clicked on, until the button is released.
- Parameters
-
| Event | details about the position and status of the mouse event, including the source component in which it occurred |
- See also
- mouseExit, mouseDrag, mouseMove, contains
Reimplemented from juce::MouseListener.
|
|
inlineoverrideprivatevirtual |
Called when the mouse moves out of a component.
This will be called when the mouse moves off the edge of this component.
If the mouse button was pressed, and it was then dragged off the edge of the component and released, then this callback will happen when the button is released, after the mouseUp callback.
- Parameters
-
| Event | details about the position and status of the mouse event, including the source component in which it occurred |
- See also
- mouseEnter, mouseDrag, mouseMove, contains
Reimplemented from juce::MouseListener.
|
|
inlineoverrideprivatevirtual |
Called when the mouse moves inside a component.
If the mouse button isn't pressed and the mouse moves over a component, this will be called to let the component react to this.
A component will always get a mouseEnter callback before a mouseMove.
- Parameters
-
| Event | details about the position and status of the mouse event, including the source component in which it occurred |
- See also
- mouseEnter, mouseExit, mouseDrag, contains
Reimplemented from juce::MouseListener.
|
|
inlineoverrideprivatevirtual |
Called when the mouse-wheel is moved.
This callback is sent to the component that the mouse is over when the wheel is moved.
If not overridden, a component will forward this message to its parent, so that parent components can collect mouse-wheel messages that happen to child components which aren't interested in them.
- Parameters
-
| Event | details about the mouse event |
| wheel | details about the wheel movement |
Reimplemented from juce::MouseListener.