openshot-audio  0.1.4
juce_MouseCursor.h
Go to the documentation of this file.
1 /*
2  ==============================================================================
3 
4  This file is part of the JUCE library.
5  Copyright (c) 2015 - ROLI Ltd.
6 
7  Permission is granted to use this software under the terms of either:
8  a) the GPL v2 (or any later version)
9  b) the Affero GPL v3
10 
11  Details of these licenses can be found at: www.gnu.org/licenses
12 
13  JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
14  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15  A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 
17  ------------------------------------------------------------------------------
18 
19  To release a closed-source product which uses JUCE, commercial licenses are
20  available: visit www.juce.com for more information.
21 
22  ==============================================================================
23 */
24 
25 #ifndef JUCE_MOUSECURSOR_H_INCLUDED
26 #define JUCE_MOUSECURSOR_H_INCLUDED
27 
28 
29 //==============================================================================
37 {
38 public:
39  //==============================================================================
42  {
43  ParentCursor = 0,
51  CopyingCursor,
70  NumStandardCursorTypes
71  };
72 
73  //==============================================================================
76 
79 
89  MouseCursor (const Image& image, int hotSpotX, int hotSpotY);
90 
102  MouseCursor (const Image& image, int hotSpotX, int hotSpotY, float scaleFactor);
103 
104  //==============================================================================
106  MouseCursor (const MouseCursor&);
107 
109  MouseCursor& operator= (const MouseCursor&);
110 
112  ~MouseCursor();
113 
114  #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS
115  MouseCursor (MouseCursor&&) noexcept;
116  MouseCursor& operator= (MouseCursor&&) noexcept;
117  #endif
118 
125  bool operator== (const MouseCursor&) const noexcept;
126 
133  bool operator!= (const MouseCursor&) const noexcept;
134 
136  bool operator== (StandardCursorType type) const noexcept;
137 
139  bool operator!= (StandardCursorType type) const noexcept;
140 
141  //==============================================================================
152  static void showWaitCursor();
153 
162  static void hideWaitCursor();
163 
164 
165 private:
166  //==============================================================================
168  friend class SharedCursorHandle;
169  SharedCursorHandle* cursorHandle;
170 
172  void showInWindow (ComponentPeer* window) const;
173  void showInAllWindows() const;
174  void* getHandle() const noexcept;
175 
176  static void* createStandardMouseCursor (MouseCursor::StandardCursorType type);
177  static void deleteMouseCursor (void* cursorHandle, bool isStandard);
178 
179  JUCE_LEAK_DETECTOR (MouseCursor)
180 };
181 
182 #endif // JUCE_MOUSECURSOR_H_INCLUDED
Definition: juce_MouseCursor.h:55
Definition: juce_MouseCursor.h:62
Definition: juce_MouseCursor.h:58
Definition: juce_MouseCursor.h:36
#define noexcept
Definition: juce_CompilerSupport.h:141
Definition: juce_MouseCursor.h:54
Definition: juce_MouseCursor.h:59
Definition: juce_MouseCursor.h:46
#define JUCE_API
Definition: juce_StandardHeader.h:139
Definition: juce_MouseCursor.h:48
Definition: juce_MouseCursor.cpp:45
Definition: juce_MouseCursor.h:65
Definition: juce_MouseCursor.h:61
Definition: juce_MouseInputSource.cpp:25
bool operator==(const var &v1, const var &v2) noexcept
Definition: juce_Variant.cpp:565
Definition: juce_MouseCursor.h:68
Definition: juce_MouseCursor.h:45
StandardCursorType
Definition: juce_MouseCursor.h:41
Definition: juce_Image.h:54
#define JUCE_LEAK_DETECTOR(OwnerClass)
Definition: juce_LeakedObjectDetector.h:141
Definition: juce_MouseCursor.h:49
bool operator!=(const var &v1, const var &v2) noexcept
Definition: juce_Variant.cpp:566
Definition: juce_MouseCursor.h:66
Definition: juce_MouseCursor.h:50
Definition: juce_MouseCursor.h:57
Definition: juce_ComponentPeer.h:41
Definition: juce_MouseCursor.h:67
Definition: juce_MouseCursor.h:64
Definition: juce_MouseCursor.h:63