Represents the image used to paint the mouse pointer.
Public Fields | |
static cursor | none |
Represent none cursor. | |
Public Constructors | |
cursor () | |
Initializes a new instance of the cursor class. | |
cursor (intptr handle) | |
Initializes a new instance of the Cursor class from the specified Windows handle. | |
Public Properties | |
intptr | handle () const noexcept |
Gets the handle of the cursor. | |
drawing::point | hot_spot () const noexcept |
Gets the cursor hot spot. | |
drawing::size | size () const noexcept |
Gets the size of the cursor object. | |
const xtd::any_object & | tag () const noexcept |
Gets the object that contains data about the control. | |
void | tag (xtd::any_object tag) |
Sets the object that contains data about the control. | |
Methodds | |
intptr | copy_handle () const |
Copies the handle of this cursor. | |
bool | equals (const xtd::object &obj) const noexcept override |
Determines whether the specified object is equal to the current object. | |
bool | equals (const cursor &value) const noexcept override |
Determines whether the specified object is equal to the current object. | |
xtd::size | get_hash_code () const noexcept override |
Serves as a hash function for a particular type. | |
xtd::string | to_string () const noexcept override |
Returns a string containing the name of the cursor. | |
Public Static Properties | |
static xtd::forms::cursor | current () |
Gets a cursor object that represents the mouse cursor. | |
static void | current (const xtd::forms::cursor &cursor) |
Sets a cursor object that represents the mouse cursor. | |
static drawing::point | position () |
Gets the cursor's position. | |
static void | position (const drawing::point &position) |
Sets the cursor's position. | |
Static methodds | |
static cursor | from_bitmap (const xtd::drawing::bitmap &bitmap, const xtd::drawing::point &hot_spot) |
Create a cursor form a specified bitmap with specified hot spot. | |
static cursor | from_bitmap (const xtd::drawing::bitmap &bitmap) |
Create a cursor form a specified bitmap. | |
static void | hide () |
Hides the cursor. | |
static void | show () |
Displays the cursor. | |
Additional Inherited Members | |
object ()=default | |
Create a new instance of the ultimate base class object. | |
virtual type_object | get_type () const noexcept |
Gets the type of the current instance. | |
template<class object_t> | |
xtd::unique_ptr_object< object_t > | memberwise_clone () const |
Creates a shallow copy of the current object. | |
virtual bool | equals (const cursor &) const noexcept=0 |
Indicates whether the current object is equal to another object of the same type. | |
template<class object_a_t, class object_b_t> | |
static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are considered equal. | |
template<class object_a_t, class object_b_t> | |
static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are the same instance. | |
xtd::forms::cursor::cursor | ( | ) |
Initializes a new instance of the cursor class.
|
explicit |
Initializes a new instance of the Cursor class from the specified Windows handle.
handle | An IntPtr that represents the Windows handle of the cursor to create. |
|
noexcept |
Gets the handle of the cursor.
|
noexcept |
Gets the cursor hot spot.
|
noexcept |
Gets the size of the cursor object.
|
noexcept |
Gets the object that contains data about the control.
void xtd::forms::cursor::tag | ( | xtd::any_object | tag | ) |
Sets the object that contains data about the control.
tag | A xtd::any_object that contains data about the control. The default is empty. |
|
static |
Gets a cursor object that represents the mouse cursor.
|
static |
Sets a cursor object that represents the mouse cursor.
cursor | A cursor that represents the mouse cursor. The default is cursor::none. |
|
static |
Gets the cursor's position.
|
static |
Sets the cursor's position.
position | A point that represents the cursor's position in screen coordinates. |
intptr xtd::forms::cursor::copy_handle | ( | ) | const |
Copies the handle of this cursor.
|
overridevirtualnoexcept |
Determines whether the specified object is equal to the current object.
obj | The object to compare with the current object. |
true
if the specified object is equal to the current object. otherwise, false
. Reimplemented from xtd::object.
|
overridenoexcept |
Determines whether the specified object is equal to the current object.
other | The object to compare with the current object. |
true
if the specified object is equal to the current object. otherwise, false
.
|
overridevirtualnoexcept |
Serves as a hash function for a particular type.
Reimplemented from xtd::object.
|
overridevirtualnoexcept |
Returns a string containing the name of the cursor.
Reimplemented from xtd::object.
|
static |
Create a cursor form a specified bitmap with specified hot spot.
bitmap | A xtd::drawing::bitmap image will be use by cursor. |
hot_spot | A xtd::drawing::point hot spot location. |
|
static |
Create a cursor form a specified bitmap.
bitmap | A xtd::drawing::bitmap image will be use by cursor. |
|
static |
Hides the cursor.
The show and hide method calls must be balanced. For every call to the hide method there must be a corresponding call to the show method.
|
static |
Displays the cursor.
The show and hide method calls must be balanced. For every call to the hide method there must be a corresponding call to the show method.
|
static |
Represent none cursor.