Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
mitk::ApplicationCursor Class Reference

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 ApplicationCursorGetInstance ()
 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...
 

Detailed Description

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 61 of file mitkApplicationCursor.h.

Constructor & Destructor Documentation

◆ ApplicationCursor()

mitk::ApplicationCursor::ApplicationCursor ( )
protected

Purposely hidden - singleton.

Member Function Documentation

◆ GetCursorPosition()

const Point2I mitk::ApplicationCursor::GetCursorPosition ( )

Get absolute mouse position on screen

Returns
(-1, -1) if querying mouse position is not possible

◆ GetInstance()

static ApplicationCursor* mitk::ApplicationCursor::GetInstance ( )
static

This class is a singleton.

◆ PopCursor()

void mitk::ApplicationCursor::PopCursor ( )

Restore the previous cursor.

◆ PushCursor() [1/2]

void mitk::ApplicationCursor::PushCursor ( const char *  XPM[],
int  hotspotX = -1,
int  hotspotY = -1 
)

Change the current application cursor.

◆ PushCursor() [2/2]

void mitk::ApplicationCursor::PushCursor ( std::istream &  ,
int  hotspotX = -1,
int  hotspotY = -1 
)

Change the current application cursor.

◆ RegisterImplementation()

static void mitk::ApplicationCursor::RegisterImplementation ( ApplicationCursorImplementation implementation)
static

To be called by a toolkit specific ApplicationCursorImplementation.

◆ SetCursorPosition()

void mitk::ApplicationCursor::SetCursorPosition ( const Point2I )

Set absolute mouse position on screen.


The documentation for this class was generated from the following file: