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 | |
| auto | handle () const noexcept -> xtd::intptr |
| Gets the handle of the cursor. | |
| auto | hot_spot () const noexcept -> xtd::drawing::point |
| Gets the cursor hot spot. | |
| auto | size () const noexcept -> xtd::drawing::size |
| Gets the size of the cursor object. | |
| auto | tag () const noexcept -> const xtd::any_object & |
| Gets the object that contains data about the control. | |
| auto | tag (xtd::any_object value) -> cursor & |
| Sets the object that contains data about the control. | |
Methodds | |
| auto | copy_handle () const -> xtd::intptr |
| Copies the handle of this cursor. | |
| auto | equals (const xtd::object &obj) const noexcept -> bool 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. | |
| auto | get_hash_code () const noexcept -> xtd::usize override |
| Serves as a hash function for a particular type. | |
| auto | to_string () const noexcept -> xtd::string override |
| Returns a string containing the name of the cursor. | |
Public Static Properties | |
| static auto | current () -> cursor |
| Gets a cursor object that represents the mouse cursor. | |
| static auto | current (const cursor &cursor) -> void |
| Sets a cursor object that represents the mouse cursor. | |
| static auto | position () -> xtd::drawing::point |
| Gets the cursor's position. | |
| static auto | position (const xtd::drawing::point &position) -> void |
| 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 auto | get_type () const noexcept -> type_object |
| Gets the type of the current instance. | |
| template<typename object_t> | |
| auto | memberwise_clone () const -> xtd::unique_ptr_object< object_t > |
| Creates a shallow copy of the current object. | |
| virtual auto | equals (const cursor &) const noexcept -> bool=0 |
| Indicates whether the current object is equal to another object of the same type. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are considered equal. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| 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. |
|
nodiscardnoexcept |
Gets the handle of the cursor.
|
nodiscardnoexcept |
Gets the cursor hot spot.
|
nodiscardnoexcept |
Gets the size of the cursor object.
|
nodiscardnoexcept |
Gets the object that contains data about the control.
| auto xtd::forms::cursor::tag | ( | xtd::any_object | value | ) | -> cursor & |
Sets the object that contains data about the control.
| value | A xtd::any_object that contains data about the control. The default is empty. |
|
staticnodiscard |
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. |
|
staticnodiscard |
Gets the cursor's position.
|
static |
Sets the cursor's position.
| position | A point that represents the cursor's position in screen coordinates. |
|
nodiscard |
Copies the handle of this cursor.
|
nodiscardoverridevirtualnoexcept |
Determines whether the specified object is equal to the current object.
| obj | The object to compare with the current object. |
Reimplemented from xtd::object.
|
nodiscardoverridenoexcept |
Determines whether the specified object is equal to the current object.
| other | The object to compare with the current object. |
|
nodiscardoverridevirtualnoexcept |
Serves as a hash function for a particular type.
Reimplemented from xtd::object.
|
nodiscardoverridevirtualnoexcept |
Returns a string containing the name of the cursor.
Reimplemented from xtd::object.
|
staticnodiscard |
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. |
|
staticnodiscard |
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.