Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
hdi::core::Cursor Class Reference

Represents a cursor that can be shown on the screen, as well as metadata about the current cursor. More...

#include <hdicoreCursor.h>

Public Types

enum  AdobeCursor {
  BrushCursor = 10 , CrosshairsCursor = 20 , CrosshairsAddCursor = 30 , CrosshairsAnchorCursor = 40 ,
  CrosshairsCircleBoldCursor = 50 , CrosshairsCircleBrokenCursor = 60 , CrosshairsCircleWholeCursor = 70 , CrosshairsCloseCursor = 80 ,
  CrosshairsContinueCursor = 90 , CrosshairsDeleteCursor = 100 , CrosshairsEllipsisCursor = 110 , CrosshairsNoCursor = 120 ,
  CrosshairsSquareBrokenCursor = 130 , DirectMoveCursor = 140 , DirectMoveCopyCursor = 150 , DirectSelectCursor = 160 ,
  DirectSelectAddCursor = 170 , DirectSelectBehindCursor = 180 , EyeDropperCursor = 190 , EyeDropperFilledCursor = 200 ,
  FistCursor = 210 , HandCursor = 220 , MoveCursor = 230 , MoveCopyCursor = 240 ,
  PenCursor = 250 , PenAddCursor = 260 , PencilCursor = 270 , PenCloseCursor = 280 ,
  PenContinueCursor = 290 , PenCornerCursor = 300 , PenNewCursor = 310 , PenSubstractCursor = 320 ,
  PenWeldCursor = 330 , RotateBottomCenterCursor = 340 , RotateBottomLeftCursor = 350 , RotateBottomRightCursor = 360 ,
  RotateMidLeftCursor = 370 , RotateMidRightCursor = 380 , RotateTopCenterCursor = 390 , RotateTopLeftCursor = 400 ,
  RotateTopRightCursor = 410 , ScaleDeclineCursor = 420 , ScaleHorizontalCursor = 430 , ScaleInclineCursor = 440 ,
  ScaleVerticalCursor = 450 , SelectCursor = 460 , SelectBehindCursor = 470 , WatchCursor = 480 ,
  ZoomInCursor = 490 , ZoomNoneCursor = 500 , ZoomOutCursor = 510
}
 Describes the built-in Adobe cursors that can be acquired.
 

Public Member Functions

 Cursor ()
 Constructs an empty Cursor object.
 
 Cursor (const Cursor &c_)
 Constructs a new Cursor object from an existing Cursor object (copy constructor)
 
 Cursor (const AdobeCursor cursor_)
 Constructs a new Cursor object from a built-in Adobe cursor.
 
 Cursor (const int16_t cursorID_, const int16_t cursorID3to2x_, const int16_t cursorID2x_, const Point &hotSpot_)
 Constructs a new Cursor object from a PNG image and a hot spot.
 
 Cursor (const int16_t cursorID_, const int16_t cursorID3to2x_, const int16_t cursorID2x_, const int16_t cursorID3x_, const int16_t cursorID4x_, const Point &hotSpot_)
 Constructs a new Cursor object from a PNG image and a hot spot.
 
Cursoroperator= (const Cursor &rhs_)
 Assigns one Cursor object to another.
 
virtual ~Cursor ()
 Destructs a Cursor object.
 
virtual bool isEmpty () const
 Gets whether the target Cursor object is empty (constructed with the default ctor)
 
virtual void enable ()
 Shows the cursor (sets it as current)
 
virtual Point hotSpot () const
 Gets the cursor hot spot.
 
virtual bool operator== (const Cursor &rhs_) const
 Tests whether a given Cursor object is the same as another.
 
virtual bool operator!= (const Cursor &rhs_) const
 Tests whether a given Cursor object is not the same as another.
 

Static Public Member Functions

static Cursor CurrentCursor ()
 Named constructor to acquire a Cursor object for whichever cursor image is current.
 
static Point screenLoc ()
 Gets the absolute location of the cursor on the screen.
 
static void mouseDown (const Point &pt_)
 Simulates a mouse down (with no modifier keys) at an absolute location on the screen.
 
static void mouseUp (const Point &pt_)
 Simulates a mouse up (with no modifier keys) at an absolute location on the screen.
 
static void click (const Point &pt_)
 Simulates a click (with no modifier keys) at an absolute location on the screen.
 

Static Public Attributes

static const int16_t noneImageID = 0
 Default image ID to indicate that no image should be used.
 

Friends

pui::Cursor * __accessImpl (const Cursor &)
 

Detailed Description

Represents a cursor that can be shown on the screen, as well as metadata about the current cursor.

Constructor & Destructor Documentation

◆ Cursor() [1/5]

hdi::core::Cursor::Cursor ( )

Constructs an empty Cursor object.

Author
GW
Date
09/2014
Note
To test if a Cursor object is empty, call isEmpty() on it
Empty Cursor objects do not relate to any UI cursor; they are designed to be "receivers" of some other Cursor object via the overloaded assignment operator. Empty Cursor objects are useless until such time (though it is safe to call any of their methods)

◆ Cursor() [2/5]

hdi::core::Cursor::Cursor ( const Cursor c_)

Constructs a new Cursor object from an existing Cursor object (copy constructor)

Author
GW
Date
09/2014
Parameters
c_Existing Cursor object

◆ Cursor() [3/5]

hdi::core::Cursor::Cursor ( const AdobeCursor  cursor_)

Constructs a new Cursor object from a built-in Adobe cursor.

Author
GW
Date
09/2014
Parameters
cursor_Adobe cursor identifier

◆ Cursor() [4/5]

hdi::core::Cursor::Cursor ( const int16_t  cursorID_,
const int16_t  cursorID3to2x_,
const int16_t  cursorID2x_,
const Point hotSpot_ 
)

Constructs a new Cursor object from a PNG image and a hot spot.

Author
GW
Date
08/2013
Parameters
cursorID_PNGI resource ID for the cursor
cursorID3to2x_PNGI resource ID for the cursor at 1.5x resolution
cursorID2x_PNGI resource ID for the cursor at 2x resolution
hotSpot_Coordinate within the cursor that acts as the hot spot, at 1x resolution
Note
Use noneImageID to indicate that no 1.5x or 2x variant is available.
PNGI resource IDs from 0-5000 are reserved for hdi_core.

◆ Cursor() [5/5]

hdi::core::Cursor::Cursor ( const int16_t  cursorID_,
const int16_t  cursorID3to2x_,
const int16_t  cursorID2x_,
const int16_t  cursorID3x_,
const int16_t  cursorID4x_,
const Point hotSpot_ 
)

Constructs a new Cursor object from a PNG image and a hot spot.

Author
GW
Date
08/2013
Parameters
cursorID_PNGI resource ID for the cursor
cursorID3to2x_PNGI resource ID for the cursor at 1.5x resolution
cursorID2x_PNGI resource ID for the cursor at 2x resolution
hotSpot_Coordinate within the cursor that acts as the hot spot, at 1x resolution
Note
Use noneImageID to indicate that no variants above 1x are available.
PNGI resource IDs from 0-5000 are reserved for hdi_core.

◆ ~Cursor()

virtual hdi::core::Cursor::~Cursor ( )
virtual

Destructs a Cursor object.

Author
GW
Date
08/2013

Member Function Documentation

◆ click()

static void hdi::core::Cursor::click ( const Point pt_)
static

Simulates a click (with no modifier keys) at an absolute location on the screen.

Author
GW
Date
08/2013
Parameters
pt_Point to click
Note
A click event is simply a mouse down immediately followed by a mouse up

◆ CurrentCursor()

static Cursor hdi::core::Cursor::CurrentCursor ( )
static

Named constructor to acquire a Cursor object for whichever cursor image is current.

Author
GW
Date
11/2015
Returns
A Cursor object for the current UI cursor

◆ enable()

virtual void hdi::core::Cursor::enable ( )
virtual

Shows the cursor (sets it as current)

Author
GW
Date
08/2013

◆ hotSpot()

virtual Point hdi::core::Cursor::hotSpot ( ) const
virtual

Gets the cursor hot spot.

Author
GW
Date
09/2014
Returns
The hot spot for the target cursor

◆ isEmpty()

virtual bool hdi::core::Cursor::isEmpty ( ) const
virtual

Gets whether the target Cursor object is empty (constructed with the default ctor)

Author
GW
Date
09/2014
Returns
true if the target Cursor object is empty, false otherwise

◆ mouseDown()

static void hdi::core::Cursor::mouseDown ( const Point pt_)
static

Simulates a mouse down (with no modifier keys) at an absolute location on the screen.

Author
GW
Date
08/2013
Parameters
pt_Point at which to create the mouse down event

◆ mouseUp()

static void hdi::core::Cursor::mouseUp ( const Point pt_)
static

Simulates a mouse up (with no modifier keys) at an absolute location on the screen.

Author
GW
Date
08/2013
Parameters
pt_Point at which to create the mouse up event

◆ operator!=()

virtual bool hdi::core::Cursor::operator!= ( const Cursor rhs_) const
virtual

Tests whether a given Cursor object is not the same as another.

Author
GW
Date
09/2014
Parameters
rhs_Cursor to compare against (righthand side of inequality operator)
Returns
true for the target and rhs_ being different cursors, false otherwise

◆ operator=()

Cursor & hdi::core::Cursor::operator= ( const Cursor rhs_)

Assigns one Cursor object to another.

Author
GW
Date
09/2014
Parameters
rhs_Existing Cursor object to copy values from
Returns
The target Cursor object, but with its values updated to match that of the rhs_ argument

◆ operator==()

virtual bool hdi::core::Cursor::operator== ( const Cursor rhs_) const
virtual

Tests whether a given Cursor object is the same as another.

Author
GW
Date
09/2014
Parameters
rhs_Cursor to compare against (righthand side of equality operator)
Returns
true for the target and rhs_ being the same cursor, false otherwise

◆ screenLoc()

static Point hdi::core::Cursor::screenLoc ( )
static

Gets the absolute location of the cursor on the screen.

Author
GW
Date
08/2013
Returns
The location of the cursor on the screen, with the origin being top-left

Member Data Documentation

◆ noneImageID

const int16_t hdi::core::Cursor::noneImageID = 0
static

Default image ID to indicate that no image should be used.

Warning
Do not use 0 as your own PNGI image ID!