|
JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins
« « « Anklang Documentation |
Represents a mouse cursor image. More...
#include "juce_MouseCursor.h"
Classes | |
| class | PlatformSpecificHandle |
| class | SharedCursorHandle |
Public Types | |
| enum | StandardCursorType { ParentCursor , NoCursor , NormalCursor , WaitCursor , IBeamCursor , CrosshairCursor , CopyingCursor , PointingHandCursor , DraggingHandCursor , LeftRightResizeCursor , UpDownResizeCursor , UpDownLeftRightResizeCursor , TopEdgeResizeCursor , BottomEdgeResizeCursor , LeftEdgeResizeCursor , RightEdgeResizeCursor , TopLeftCornerResizeCursor , TopRightCornerResizeCursor , BottomLeftCornerResizeCursor , BottomRightCornerResizeCursor , NumStandardCursorTypes } |
| The set of available standard mouse cursors. More... | |
Public Member Functions | |
| MouseCursor () noexcept | |
| Creates the standard arrow cursor. | |
| MouseCursor (StandardCursorType) | |
| Creates one of the standard mouse cursor. | |
| MouseCursor (const Image &image, int hotSpotX, int hotSpotY) | |
| Creates a custom cursor from an image. | |
| MouseCursor (const Image &image, int hotSpotX, int hotSpotY, float scaleFactor) | |
| Creates a custom cursor from an image. | |
| MouseCursor (const ScaledImage &image, Point< int > hotSpot) | |
| Creates a custom cursor from an image. | |
| MouseCursor (const MouseCursor &) | |
| Creates a copy of another cursor object. | |
| MouseCursor & | operator= (const MouseCursor &) |
| Copies this cursor from another object. | |
| ~MouseCursor () | |
| Destructor. | |
| MouseCursor (MouseCursor &&) noexcept | |
| Move constructor. | |
| MouseCursor & | operator= (MouseCursor &&) noexcept |
| Move assignment operator. | |
| bool | operator== (const MouseCursor &) const noexcept |
| Checks whether two mouse cursors are the same. | |
| bool | operator!= (const MouseCursor &) const noexcept |
| Checks whether two mouse cursors are the same. | |
| bool | operator== (StandardCursorType type) const noexcept |
| Checks whether this cursor is of the standard type mentioned. | |
| bool | operator!= (StandardCursorType type) const noexcept |
| Checks whether this cursor is of the standard type mentioned. | |
Static Public Member Functions | |
| static void | showWaitCursor () |
| Makes the system show its default 'busy' cursor. | |
| static void | hideWaitCursor () |
| If showWaitCursor has been called, this will return the mouse to its normal state. | |
Friends | |
| class | detail::MouseInputSourceImpl |
Represents a mouse cursor image.
This object can either be used to represent one of the standard mouse cursor shapes, or a custom one generated from an image.
@tags{GUI}
Definition at line 38 of file juce_MouseCursor.h.
The set of available standard mouse cursors.
Definition at line 43 of file juce_MouseCursor.h.
| juce::MouseCursor::MouseCursor | ( | StandardCursorType | type | ) |
Creates one of the standard mouse cursor.
Definition at line 89 of file juce_MouseCursor.cpp.
Creates a custom cursor from an image.
| image | the image to use for the cursor - if this is bigger than the system can manage, it might get scaled down first, and might also have to be turned to black-and-white if it can't do colour cursors. |
| hotSpotX | the x position of the cursor's hotspot within the image |
| hotSpotY | the y position of the cursor's hotspot within the image |
Definition at line 94 of file juce_MouseCursor.cpp.
| juce::MouseCursor::MouseCursor | ( | const Image & | image, |
| int | hotSpotX, | ||
| int | hotSpotY, | ||
| float | scaleFactor | ||
| ) |
Creates a custom cursor from an image.
| image | the image to use for the cursor - if this is bigger than the system can manage, it might get scaled down first, and might also have to be turned to black-and-white if it can't do colour cursors. |
| hotSpotX | the x position of the cursor's hotspot within the image |
| hotSpotY | the y position of the cursor's hotspot within the image |
| scaleFactor | the factor by which this image is larger than the target screen size of the cursor. |
Definition at line 99 of file juce_MouseCursor.cpp.
| juce::MouseCursor::MouseCursor | ( | const ScaledImage & | image, |
| Point< int > | hotSpot | ||
| ) |
Creates a custom cursor from an image.
| image | the image to use for the cursor - if this is bigger than the system can manage, it might get scaled down first, and might also have to be turned to black-and-white if it can't do colour cursors. |
| hotSpot | the position of the cursor's hotspot within the image |
Definition at line 104 of file juce_MouseCursor.cpp.
|
static |
If showWaitCursor has been called, this will return the mouse to its normal state.
This will look at what component is under the mouse, and update the cursor to be the correct one for that component.
Definition at line 138 of file juce_MouseCursor.cpp.
|
noexcept |
Checks whether two mouse cursors are the same.
For custom cursors, two cursors created from the same image won't be recognised as the same, only MouseCursor objects that have been copied from the same object.
Definition at line 130 of file juce_MouseCursor.cpp.
|
noexcept |
Checks whether this cursor is of the standard type mentioned.
Definition at line 131 of file juce_MouseCursor.cpp.
|
noexcept |
Checks whether two mouse cursors are the same.
For custom cursors, two cursors created from the same image won't be recognised as the same, only MouseCursor objects that have been copied from the same object.
Definition at line 119 of file juce_MouseCursor.cpp.
|
noexcept |
Checks whether this cursor is of the standard type mentioned.
Definition at line 124 of file juce_MouseCursor.cpp.
|
static |
Makes the system show its default 'busy' cursor.
This will turn the system cursor to an hourglass or spinning beachball until the next time the mouse is moved, or hideWaitCursor() is called.
This is handy if the message loop is about to block for a couple of seconds while busy and you want to give the user feedback about this.
Definition at line 133 of file juce_MouseCursor.cpp.
|
friend |
Definition at line 183 of file juce_MouseCursor.h.