Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkApplicationCursor.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkApplicationCursor_h
14 #define mitkApplicationCursor_h
15 
16 #include <mitkNumericTypes.h>
17 #include <MitkCoreExports.h>
18 
19 namespace mitk
20 {
31  {
32  public:
40  virtual void PushCursor(const char *XPM[], int hotspotX, int hotspotY) = 0;
41 
49  virtual void PushCursor(std::istream &cursorStream, int hotspotX, int hotspotY) = 0;
50 
52  virtual void PopCursor() = 0;
53 
58  virtual const Point2I GetCursorPosition() = 0;
59 
64  virtual void SetCursorPosition(const Point2I &position) = 0;
65 
67  };
68 
83  {
84  public:
90 
96 
104  void PushCursor(const char *XPM[], int hotspotX = -1, int hotspotY = -1);
105 
113  void PushCursor(std::istream &cursorStream, int hotspotX = -1, int hotspotY = -1);
114 
116  void PopCursor();
117 
123 
128  void SetCursorPosition(const Point2I &position);
129 
130  protected:
133 
134  private:
135  static ApplicationCursorImplementation *m_Implementation;
136  };
137 
138 } // namespace
139 
140 #endif
#define MITKCORE_EXPORT
Abstract interface for toolkit-specific cursor implementations.
virtual void PopCursor()=0
Restore the previous cursor from the stack.
virtual const Point2I GetCursorPosition()=0
Get the absolute mouse position on screen.
virtual void PushCursor(std::istream &cursorStream, int hotspotX, int hotspotY)=0
Push a new cursor onto the cursor stack (stream format).
virtual void SetCursorPosition(const Point2I &position)=0
Set the absolute mouse position on screen.
virtual void PushCursor(const char *XPM[], int hotspotX, int hotspotY)=0
Push a new cursor onto the cursor stack (XPM format).
Singleton for overriding the application's cursor.
const Point2I GetCursorPosition()
Get the absolute mouse position on screen.
void PushCursor(std::istream &cursorStream, int hotspotX=-1, int hotspotY=-1)
Push a new cursor onto the stack (stream format).
static void RegisterImplementation(ApplicationCursorImplementation *implementation)
Register a toolkit-specific cursor implementation.
void PopCursor()
Pop the most recent cursor from the stack, restoring the previous one.
ApplicationCursor()
Hidden constructor (singleton pattern).
void PushCursor(const char *XPM[], int hotspotX=-1, int hotspotY=-1)
Push a new cursor onto the stack (XPM format).
void SetCursorPosition(const Point2I &position)
Set the absolute mouse position on screen.
static ApplicationCursor * GetInstance()
Get the singleton instance.
Convenience header that includes all MITK numeric types.
Find image slices visible on a given plane.