![]() |
xtd - Reference Guide
0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
|
#include <cursor.h>
Represents the image used to paint the mouse pointer.
Inherits xtd::object.
Static Public Attributes | |
| static cursor | none |
| Represent none cursor. More... | |
Public Member Functions | |
| cursor () | |
| Initializes a new instance of the cursor class. More... | |
| cursor (intptr_t handle) | |
| Initializes a new instance of the Cursor class from the specified Windows handle. More... | |
| intptr_t | copy_handle () const |
| Copies the handle of this cursor. More... | |
| intptr_t | handle () const |
| Gets the handle of the cursor. More... | |
| drawing::point | hot_spot () const |
| Gets the cursor hot spot. More... | |
| drawing::size | size () const |
| Gets the size of the cursor object. More... | |
| std::any | tag () const |
| Gets the object that contains data about the control. More... | |
| void | tag (std::any tag) |
| Sets the object that contains data about the control. More... | |
| xtd::ustring | to_string () const noexcept override |
| Returns a string containing the name of the cursor. More... | |
Public Member Functions inherited from xtd::object | |
| object ()=default | |
| Create a new instance of the ultimate base class object. More... | |
| virtual bool | equals (const object &obj) const noexcept |
| Determines whether the specified object is equal to the current object. More... | |
| virtual size_t | get_hash_code () const noexcept |
| Serves as a hash function for a particular type. More... | |
| template<typename object_t > | |
| std::unique_ptr< object_t > | memberwise_clone () const |
| Gets the type of the current instance. More... | |
Static Public Member Functions | |
| static xtd::forms::cursor | current () |
| Gets a cursor object that represents the mouse cursor. More... | |
| static void | current (const xtd::forms::cursor &cursor) |
| Sets a cursor object that represents the mouse cursor. More... | |
| static cursor | from_bitmap (const xtd::drawing::bitmap &bitmap) |
| Create a cursor form a specified bitmap. More... | |
| 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. More... | |
| static void | hide () |
| Hides the cursor. More... | |
| static drawing::point | position () |
| Gets the cursor's position. More... | |
| static void | position (const drawing::point &position) |
| Sets the cursor's position. More... | |
| static void | show () |
| Displays the cursor. More... | |
Static Public Member Functions inherited from xtd::object | |
| static bool | equals (const object &object_a, const object &object_b) noexcept |
| Determines whether the specified object instances are considered equal. More... | |
| static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
| Determines whether the specified object instances are the same instance. More... | |
| xtd::forms::cursor::cursor | ( | ) |
Initializes a new instance of the cursor class.
|
inlineexplicit |
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. |
| intptr_t xtd::forms::cursor::copy_handle | ( | ) | const |
Copies the handle of this cursor.
|
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. |
|
inlinestatic |
Create a cursor form a specified bitmap.
| bitmap | A xtd::drawing::bitmap image will be use by cursor. |
|
inlinestatic |
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. |
|
inline |
Gets the handle of the 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.
|
inline |
Gets the cursor hot spot.
|
static |
Gets the cursor's position.
|
static |
Sets the cursor's position.
| position | A point that represents the cursor's position in screen coordinates. |
|
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.
|
inline |
Gets the size of the cursor object.
|
inline |
Gets the object that contains data about the control.
|
inline |
Sets the object that contains data about the control.
| tag | A std::any that contains data about the control. The default is empty. |
|
overridevirtualnoexcept |
Returns a string containing the name of the cursor.
Reimplemented from xtd::object.
|
static |
Represent none cursor.