PCL
pcl::Cursor Class Reference

Client-side interface to a PixInsight Cursor object. More...

#include <Cursor.h>

+ Inheritance diagram for pcl::Cursor:

Public Types

using std_cursor = StdCursor::value_type
 

Public Member Functions

 Cursor (const Bitmap &bmp, const pcl::Point &hotSpot)
 
 Cursor (const Bitmap &bmp, int hotSpotX=0, int hotSpotY=0)
 
 Cursor (const Cursor &c)
 
 Cursor (Cursor &&x)
 
 Cursor (std_cursor shape=StdCursor::Arrow)
 
 ~Cursor () override
 
pcl::Point HotSpot () const
 
Cursoroperator= (const Cursor &c)
 
Cursoroperator= (Cursor &&x)
 
- Public Member Functions inherited from pcl::UIObject
virtual ~UIObject () noexcept(false)
 
virtual void EnsureUnique ()
 
bool IsAlias () const
 
bool IsGarbage () const
 
bool IsNull () const
 
bool IsSameObject (const UIObject &o) const
 
bool IsUnique () const
 
String ObjectId () const
 
IsoString ObjectType () const
 
bool operator< (const UIObject &o) const
 
bool operator== (const UIObject &o) const
 
size_type RefCount () const
 
void SetObjectId (const String &id)
 

Static Public Member Functions

static CursorNull ()
 
static pcl::Point Position ()
 
static void SetPosition (const pcl::Point &pos)
 
static void SetPosition (int x, int y)
 
- Static Public Member Functions inherited from pcl::UIObject
static UIObjectNull ()
 

Additional Inherited Members

- Protected Member Functions inherited from pcl::UIObject
 UIObject ()=default
 
 UIObject (const UIObject &x)
 
 UIObject (UIObject &&x)
 
UIObjectoperator= (const UIObject &x)
 
UIObjectoperator= (UIObject &&x)
 

Detailed Description

TODO: Write a detailed description for Cursor.

Definition at line 167 of file Cursor.h.

Member Typedef Documentation

◆ std_cursor

using pcl::Cursor::std_cursor = StdCursor::value_type

Represents a standard cursor shape.

Definition at line 174 of file Cursor.h.

Constructor & Destructor Documentation

◆ Cursor() [1/5]

pcl::Cursor::Cursor ( std_cursor  shape = StdCursor::Arrow)

Constructs a Cursor object with the specified standard cursor shape.

◆ Cursor() [2/5]

pcl::Cursor::Cursor ( const Bitmap bmp,
const pcl::Point hotSpot 
)

Constructs a Cursor object with the specified bmp shape and hot spot coordinates hotSpot.

◆ Cursor() [3/5]

pcl::Cursor::Cursor ( const Bitmap bmp,
int  hotSpotX = 0,
int  hotSpotY = 0 
)

Constructs a Cursor object with the specified bmp shape and hot spot coordinates hotSpotX and hotSpotY.

◆ Cursor() [4/5]

pcl::Cursor::Cursor ( const Cursor c)
inline

Copy constructor. This object will reference the same server-side cursor as the specified instance c.

Definition at line 197 of file Cursor.h.

◆ Cursor() [5/5]

pcl::Cursor::Cursor ( Cursor &&  x)
inline

Move constructor.

Definition at line 205 of file Cursor.h.

◆ ~Cursor()

pcl::Cursor::~Cursor ( )
inlineoverride

Destroys a Cursor object. If this object references an existing cursor in the PixInsight core application, its reference count is decremented. If it becomes unreferenced, it will be garbage-collected.

Definition at line 215 of file Cursor.h.

Member Function Documentation

◆ HotSpot()

pcl::Point pcl::Cursor::HotSpot ( ) const

Returns the hot spot coordinates of this Cursor object.

The hot spot is the active point of the cursor. It is used by the operating system to calculate the current cursor position. Hot spot coordinates are given relative to the upper left corner of the cursor's shape bitmap.

◆ Null()

static Cursor& pcl::Cursor::Null ( )
static

Returns a reference to a null cursor. A null Cursor object does not correspond to an existing cursor object in the PixInsight core application.

◆ operator=() [1/2]

Cursor& pcl::Cursor::operator= ( const Cursor c)
inline

Copy assignment operator. Returns a reference to this object.

Makes this object reference the same server-side cursor as the specified instance c. If the previous cursor becomes unreferenced, it will be garbage-collected by the PixInsight core application.

Definition at line 226 of file Cursor.h.

◆ operator=() [2/2]

Cursor& pcl::Cursor::operator= ( Cursor &&  x)
inline

Move assignment operator. Returns a reference to this object.

Definition at line 235 of file Cursor.h.

◆ Position()

static pcl::Point pcl::Cursor::Position ( )
static

Returns the current cursor position in global coordinates.

◆ SetPosition() [1/2]

static void pcl::Cursor::SetPosition ( const pcl::Point pos)
inlinestatic

Sets the current cursor position in global coordinates.

This function is equivalent to SetPosition( pos.x, pos.y ).

Definition at line 274 of file Cursor.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ SetPosition() [2/2]

static void pcl::Cursor::SetPosition ( int  x,
int  y 
)
static

Sets the current cursor position to the specified x and y global coordinates.


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