Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Allows to override the application's cursor. More...
#include <mitkApplicationCursor.h>
Public Member Functions | |
void | PushCursor (const char *XPM[], int hotspotX=-1, int hotspotY=-1) |
Change the current application cursor. More... | |
void | PushCursor (std::istream &, int hotspotX=-1, int hotspotY=-1) |
Change the current application cursor. More... | |
void | PopCursor () |
Restore the previous cursor. More... | |
const Point2I | GetCursorPosition () |
void | SetCursorPosition (const Point2I &) |
Set absolute mouse position on screen. More... | |
Static Public Member Functions | |
static ApplicationCursor * | GetInstance () |
This class is a singleton. More... | |
static void | RegisterImplementation (ApplicationCursorImplementation *implementation) |
To be called by a toolkit specific ApplicationCursorImplementation. More... | |
Protected Member Functions | |
ApplicationCursor () | |
Purposely hidden - singleton. More... | |
Allows to override the application's cursor.
Base class for classes that allow to override the applications cursor with context dependent cursors. Accepts cursors in the XPM format.
The behaviour is stack-like. You can push your cursor on top of the stack and later pop it to reset the cursor to its former state. This is mimicking Qt's Application::setOverrideCuror() behaviour, but should be ok for most cases where you want to switch a cursor.
Definition at line 65 of file mitkApplicationCursor.h.
|
protected |
Purposely hidden - singleton.
Definition at line 26 of file mitkApplicationCursor.cpp.
Referenced by GetInstance().
const Point2I mitk::ApplicationCursor::GetCursorPosition | ( | ) |
Get absolute mouse position on screen
Definition at line 82 of file mitkApplicationCursor.cpp.
References mitk::ApplicationCursorImplementation::GetCursorPosition(), and MITK_ERROR.
|
static |
This class is a singleton.
Definition at line 27 of file mitkApplicationCursor.cpp.
References ApplicationCursor().
Referenced by mitk::SlicesCoordinator::ResetMouseCursor(), mitk::EventStateMachine::ResetMouseCursor(), mitk::SlicesCoordinator::SetMouseCursor(), and mitk::EventStateMachine::SetMouseCursor().
void mitk::ApplicationCursor::PopCursor | ( | ) |
Restore the previous cursor.
Definition at line 69 of file mitkApplicationCursor.cpp.
References MITK_ERROR, and mitk::ApplicationCursorImplementation::PopCursor().
Referenced by mitk::SlicesCoordinator::ResetMouseCursor(), mitk::EventStateMachine::ResetMouseCursor(), mitk::SlicesCoordinator::SetMouseCursor(), and mitk::EventStateMachine::SetMouseCursor().
void mitk::ApplicationCursor::PushCursor | ( | const char * | XPM[], |
int | hotspotX = -1 , |
||
int | hotspotY = -1 |
||
) |
Change the current application cursor.
Definition at line 56 of file mitkApplicationCursor.cpp.
References MITK_ERROR, and mitk::ApplicationCursorImplementation::PushCursor().
Referenced by mitk::SlicesCoordinator::SetMouseCursor(), and mitk::EventStateMachine::SetMouseCursor().
void mitk::ApplicationCursor::PushCursor | ( | std::istream & | cursor, |
int | hotspotX = -1 , |
||
int | hotspotY = -1 |
||
) |
Change the current application cursor.
Definition at line 43 of file mitkApplicationCursor.cpp.
References MITK_ERROR, and mitk::ApplicationCursorImplementation::PushCursor().
|
static |
To be called by a toolkit specific ApplicationCursorImplementation.
Definition at line 38 of file mitkApplicationCursor.cpp.
Referenced by QmitkApplicationCursor::QmitkApplicationCursor().
void mitk::ApplicationCursor::SetCursorPosition | ( | const Point2I & | p | ) |
Set absolute mouse position on screen.
Definition at line 95 of file mitkApplicationCursor.cpp.
References MITK_ERROR, and mitk::ApplicationCursorImplementation::SetCursorPosition().