xtd 0.2.0
xtd::forms::cursors Class Referencefinal

Definition

Provides a collection of xtd::forms::cursor objects for use by a Windows Forms application.

Header
#include <xtd/forms/cursors>
Namespace
xtd::forms
Library
xtd.forms
Examples
The following code example demonstrates the use of cursors component.
#include <xtd/forms/application>
#include <xtd/forms/cursors>
#include <xtd/forms/form>
#include <xtd/forms/list_box>
#include <xtd/forms/panel>
#include <xtd/drawing/system_colors>
using namespace std;
using namespace xtd;
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
text("Cursor example");
start_position(form_start_position::manual);
location({200, 200});
client_size({360, 240});
list_box_cursors.parent(*this);
list_box_cursors.bounds({20, 20, 150, 200});
list_box_cursors.items().push_back_range({{"Default", cursors::default_cursor()}, {"Application Starting", cursors::app_starting()}, {"Arrow", cursors::arrow()}, {"Closed hand", cursors::closed_hand()}, {"Contextual menu", cursors::contextual_menu()}, {"Cell", cursors::cell()}, {"Cross", cursors::cross()}, {"Disappearing item", cursors::disappearing_item()}, {"Drag copy", cursors::drag_copy()}, {"Drag link", cursors::drag_link()}, {"Hand", cursors::hand()}, {"Help", cursors::help()}, {"Horizontal split", cursors::hsplit()}, {"I beam", cursors::ibeam()}, {"No", cursors::no()}, {"No drag", cursors::no_drag()}, {"No move 2d", cursors::no_move_2d()}, {"No move horizontal", cursors::no_move_horiz()}, {"No move vertical", cursors::no_move_vert()}, {"Open hand", cursors::open_hand()}, {"Pan east", cursors::pan_east()}, {"Pan north east", cursors::pan_ne()}, {"Pan north", cursors::pan_north()}, {"Pan north west", cursors::pan_nw()}, {"Pan south east", cursors::pan_se()}, {"Pan south", cursors::pan_south()}, {"Pan south west", cursors::pan_sw()}, {"Pan West", cursors::pan_west()}, {"Size all", cursors::size_all()}, {"Size north-east south-west", cursors::size_nesw()}, {"Size north south", cursors::size_ns()}, {"Size north-west south-east", cursors::size_nwse()}, {"Size west east", cursors::size_we()}, {"Up arrow", cursors::up_arrow()}, {"Vertical I beam", cursors::vibeam()}, {"Vertical split", cursors::vsplit()}, {"Wait", cursors::wait_cursor()}, {"Zoom in", cursors::zoom_in()}, {"Zoom out", cursors::zoom_out()}});
list_box_cursors.selected_index_changed += [&] {
test_zone.cursor(any_cast<forms::cursor>(list_box_cursors.selected_item().tag()));
};
list_box_cursors.selected_item("Default");
test_zone.parent(*this);
test_zone.border_style(border_style::fixed_3d);
test_zone.back_color(drawing::system_colors::window());
test_zone.bounds({190, 20, 150, 200});
}
private:
list_box list_box_cursors;
panel test_zone;
};
auto main()->int {
application::run(form1 {});
}

Properties

static cursor app_starting ()
 Gets the cursor that appears when an application starts. More...
 
static cursor arrow ()
 Gets the arrow cursor. More...
 
static cursor closed_hand ()
 Gets the closed hand cursor. More...
 
static cursor contextual_menu ()
 Gets the contextual menu cursor. More...
 
static cursor cell ()
 Gets the cell cursor. More...
 
static cursor cross ()
 Gets the crosshair cursor. More...
 
static cursor default_cursor ()
 Gets the default cursor, which is usually an arrow cursor. More...
 
static cursor disappearing_item ()
 Gets the disappearing item cursor. More...
 
static cursor drag_copy ()
 Gets the drag copy cursor. More...
 
static cursor drag_link ()
 Gets the drag link cursor. More...
 
static cursor hand ()
 Gets the hand cursor, typically used when hovering over a Web link. More...
 
static cursor help ()
 Gets the Help cursor, which is a combination of an arrow and a question mark. More...
 
static cursor hsplit ()
 Gets the cursor that appears when the mouse is positioned over a horizontal splitter bar. More...
 
static cursor ibeam ()
 Gets the I-beam cursor, which is used to show where the text cursor appears when the mouse is clicked. More...
 
static cursor no ()
 Gets the cursor that indicates that a particular region is invalid for the current operation. More...
 
static cursor no_drag ()
 Gets the cursor that indicates that a particular region is invalid for the current drag & drop operation. More...
 
static cursor no_move_2d ()
 Gets the cursor that appears during wheel operations when the mouse is not moving, but the window can be scrolled in both a horizontal and vertical direction. More...
 
static cursor no_move_horiz ()
 Gets the cursor that appears during wheel operations when the mouse is not moving, but the window can be scrolled in a horizontal direction. More...
 
static cursor no_move_vert ()
 Gets the cursor that appears during wheel operations when the mouse is not moving, but the window can be scrolled in a vertical direction. More...
 
static cursor open_hand ()
 Gets the open hand cursor. More...
 
static cursor pan_east ()
 Gets the cursor that appears during wheel operations when the mouse is moving and the window is scrolling horizontally to the right. More...
 
static cursor pan_ne ()
 Gets the cursor that appears during wheel operations when the mouse is moving and the window is scrolling horizontally and vertically upward and to the right. More...
 
static cursor pan_north ()
 Gets the cursor that appears during wheel operations when the mouse is moving and the window is scrolling vertically in an upward direction. More...
 
static cursor pan_nw ()
 Gets the cursor that appears during wheel operations when the mouse is moving and the window is scrolling horizontally and vertically upward and to the left. More...
 
static cursor pan_se ()
 Gets the cursor that appears during wheel operations when the mouse is moving and the window is scrolling horizontally and vertically downward and to the right. More...
 
static cursor pan_south ()
 Gets the cursor that appears during wheel operations when the mouse is moving and the window is scrolling vertically in a downward direction. More...
 
static cursor pan_sw ()
 Gets the cursor that appears during wheel operations when the mouse is moving and the window is scrolling horizontally and vertically downward and to the left. More...
 
static cursor pan_west ()
 Gets the cursor that appears during wheel operations when the mouse is moving and the window is scrolling horizontally to the left. More...
 
static cursor size_all ()
 Gets the four-headed sizing cursor, which consists of four joined arrows that point north, south, east, and west. More...
 
static cursor size_nesw ()
 Gets the two-headed diagonal (northeast/southwest) sizing cursor. More...
 
static cursor size_ns ()
 Gets the two-headed vertical (north/south) sizing cursor. More...
 
static cursor size_nwse ()
 Gets the two-headed diagonal (northwest/southeast) sizing cursor. More...
 
static cursor size_we ()
 Gets the two-headed diagonal (northwest/southeast) sizing cursor. More...
 
static cursor up_arrow ()
 Gets the up arrow cursor, typically used to identify an insertion point. More...
 
static cursor vibeam ()
 Gets the vertical I-beam cursor, which is used to show where the text cursor appears when the mouse is clicked for vertical layout. More...
 
static cursor vsplit ()
 Gets the cursor that appears when the mouse is positioned over a vertical splitter bar. More...
 
static cursor wait_cursor ()
 Gets the wait cursor, typically an hourglass shape. More...
 
static cursor zoom_in ()
 Gets the zoom_in cursor, typically to zoom in an object. More...
 
static cursor zoom_out ()
 Gets the zoom out cursor, typically to zoom out an object. More...
 

Methods

static cursor from_name (const xtd::ustring &name)
 Gets cursor from name. More...
 
static const std::vector< cursor > & get_cursors ()
 Gets all cursors. More...
 

Member Function Documentation

◆ app_starting()

static cursor xtd::forms::cursors::app_starting ( )
static

Gets the cursor that appears when an application starts.

Returns
The cursor that represents the cursor that appears when an application starts.
Appearance
Windows macOS Gnome
 
app_starting_w.png
    html app_starting_m.png    html app_starting_g.png 

◆ arrow()

static cursor xtd::forms::cursors::arrow ( )
static

Gets the arrow cursor.

Returns
The cursor that represents the arrow cursor.
Appearance
Windows macOS Gnome
 
arrow_w.png
    html arrow_m.png    html arrow_g.png 

◆ cell()

static cursor xtd::forms::cursors::cell ( )
static

Gets the cell cursor.

Returns
The cursor that represents the cell cursor.
Appearance
Windows macOS Gnome
 
cell_w.png
    html cell_m.png    html cell_g.png 

◆ closed_hand()

static cursor xtd::forms::cursors::closed_hand ( )
static

Gets the closed hand cursor.

Returns
The cursor that represents the close hand cursor.
Appearance
Windows macOS Gnome
 
closed_hand_w.png
    html closed_hand_m.png    html closed_hand_g.png 

◆ contextual_menu()

static cursor xtd::forms::cursors::contextual_menu ( )
static

Gets the contextual menu cursor.

Returns
The cursor that represents the contextual menu cursor.
Appearance
Windows macOS Gnome
 
contextual_menu_w.png
    html contextual_menu_m.png    html contextual_menu_g.png 

◆ cross()

static cursor xtd::forms::cursors::cross ( )
static

Gets the crosshair cursor.

Returns
The cursor that represents the crosshair cursor.
Appearance
Windows macOS Gnome
 
cross_w.png
    html cross_m.png    html cross_g.png 

◆ default_cursor()

static cursor xtd::forms::cursors::default_cursor ( )
static

Gets the default cursor, which is usually an arrow cursor.

Returns
The cursor that represents the default cursor.
Appearance
Windows macOS Gnome
 
default_cursor_w.png
    html default_cursor_m.png    html default_cursor_g.png 

◆ disappearing_item()

static cursor xtd::forms::cursors::disappearing_item ( )
static

Gets the disappearing item cursor.

Returns
The cursor that represents the disappearing item cursor.
Appearance
Windows macOS Gnome
 
disappearing_item_w.png
    html disappearing_item_m.png    html disappearing_item_g.png 

◆ drag_copy()

static cursor xtd::forms::cursors::drag_copy ( )
static

Gets the drag copy cursor.

Returns
The cursor that represents the drag copy cursor.
Appearance
Windows macOS Gnome
 
drag_copy_w.png
    html drag_copy_m.png    html drag_copy_g.png 

◆ drag_link()

static cursor xtd::forms::cursors::drag_link ( )
static

Gets the drag link cursor.

Returns
The cursor that represents the drag link cursor.
Appearance
Windows macOS Gnome
 
drag_link_w.png
    html drag_link_m.png    html drag_link_g.png 

◆ from_name()

static cursor xtd::forms::cursors::from_name ( const xtd::ustring name)
static

Gets cursor from name.

Parameters
nameThe name to retreive the corresponding xtd::forms::cursor.
Returns
xtd::forms::cursor corrstandigng to tha parameter name..
Exceptions
xtd::argument_exceptionxtd::forms::cursor not found with specified name.

◆ get_cursors()

static const std::vector<cursor>& xtd::forms::cursors::get_cursors ( )
static

Gets all cursors.

Returns
cursor array.

◆ hand()

static cursor xtd::forms::cursors::hand ( )
static

Gets the hand cursor, typically used when hovering over a Web link.

Returns
The cursor that represents the hand cursor.
Appearance
Windows macOS Gnome
 
hand_w.png
    html hand_m.png    html hand_g.png 

◆ help()

static cursor xtd::forms::cursors::help ( )
static

Gets the Help cursor, which is a combination of an arrow and a question mark.

Returns
The cursor that represents the Help cursor.
Appearance
Windows macOS Gnome
 
help_w.png
    html help_m.png    html help_g.png 

◆ hsplit()

static cursor xtd::forms::cursors::hsplit ( )
static

Gets the cursor that appears when the mouse is positioned over a horizontal splitter bar.

Returns
The cursor that represents the cursor that appears when the mouse is positioned over a horizontal splitter bar.
Appearance
Windows macOS Gnome
 
hsplit_w.png
    html hsplit_m.png    html hsplit_g.png 

◆ ibeam()

static cursor xtd::forms::cursors::ibeam ( )
static

Gets the I-beam cursor, which is used to show where the text cursor appears when the mouse is clicked.

Returns
The cursor that represents the I-beam cursor.
Appearance
Windows macOS Gnome
 
ibeam_w.png
    html ibeam_m.png    html ibeam_g.png 

◆ no()

static cursor xtd::forms::cursors::no ( )
static

Gets the cursor that indicates that a particular region is invalid for the current operation.

Returns
The cursor that represents the cursor that indicates that a particular region is invalid for the current operation.
Appearance
Windows macOS Gnome
 
no_w.png
    html no_m.png    html no_g.png 

◆ no_drag()

static cursor xtd::forms::cursors::no_drag ( )
static

Gets the cursor that indicates that a particular region is invalid for the current drag & drop operation.

Returns
The cursor that represents the cursor that indicates that a particular region is invalid for the curren drag & drop operation.
Appearance
Windows macOS Gnome
 
no_drag_w.png
    html no_drag_m.png    html no_drag_g.png 

◆ no_move_2d()

static cursor xtd::forms::cursors::no_move_2d ( )
static

Gets the cursor that appears during wheel operations when the mouse is not moving, but the window can be scrolled in both a horizontal and vertical direction.

Returns
The cursor that represents the cursor that appears during wheel operations when the mouse is not moving.
Appearance
Windows macOS Gnome
 
no_move_2d_w.png
    html no_move_2d_m.png    html no_move_2d_g.png 

◆ no_move_horiz()

static cursor xtd::forms::cursors::no_move_horiz ( )
static

Gets the cursor that appears during wheel operations when the mouse is not moving, but the window can be scrolled in a horizontal direction.

Returns
The cursor that represents the cursor that appears during wheel operations when the mouse is not moving.
Appearance
Windows macOS Gnome
 
no_move_horiz_w.png
    html no_move_horiz_m.png    html no_move_horiz_g.png 

◆ no_move_vert()

static cursor xtd::forms::cursors::no_move_vert ( )
static

Gets the cursor that appears during wheel operations when the mouse is not moving, but the window can be scrolled in a vertical direction.

Returns
The cursor that represents the cursor that appears during wheel operations when the mouse is not moving.
Appearance
Windows macOS Gnome
 
no_move_vert_w.png
    html no_move_vert_m.png    html no_move_vert_g.png 

◆ open_hand()

static cursor xtd::forms::cursors::open_hand ( )
static

Gets the open hand cursor.

Returns
The cursor that represents the open hand cursor.
Appearance
Windows macOS Gnome
 
open_hand_w.png
    html open_hand_m.png    html open_hand_g.png 

◆ pan_east()

static cursor xtd::forms::cursors::pan_east ( )
static

Gets the cursor that appears during wheel operations when the mouse is moving and the window is scrolling horizontally to the right.

Returns
The cursor that represents the cursor that appears during wheel operations when the mouse is moving and the window is scrolling horizontally to the right.
Appearance
Windows macOS Gnome
 
pan_east_w.png
    html pan_east_m.png    html pan_east_g.png 

◆ pan_ne()

static cursor xtd::forms::cursors::pan_ne ( )
static

Gets the cursor that appears during wheel operations when the mouse is moving and the window is scrolling horizontally and vertically upward and to the right.

Returns
The cursor that represents the cursor that appears during wheel operations when the mouse is moving and the window is scrolling horizontally and vertically upward and to the right.
Appearance
Windows macOS Gnome
 
pan_ne_w.png
    html pan_ne_m.png    html pan_ne_g.png 

◆ pan_north()

static cursor xtd::forms::cursors::pan_north ( )
static

Gets the cursor that appears during wheel operations when the mouse is moving and the window is scrolling vertically in an upward direction.

Returns
The cursor that represents the cursor that appears during wheel operations when the mouse is moving and the window is scrolling vertically in an upward direction.
Appearance
Windows macOS Gnome
 
pan_north_w.png
    html pan_north_m.png    html pan_north_g.png 

◆ pan_nw()

static cursor xtd::forms::cursors::pan_nw ( )
static

Gets the cursor that appears during wheel operations when the mouse is moving and the window is scrolling horizontally and vertically upward and to the left.

Returns
The cursor that represents the cursor that appears during wheel operations when the mouse is moving and the window is scrolling horizontally and vertically upward and to the left.
Appearance
Windows macOS Gnome
 
pan_nw_w.png
    html pan_nw_m.png    html pan_nw_g.png 

◆ pan_se()

static cursor xtd::forms::cursors::pan_se ( )
static

Gets the cursor that appears during wheel operations when the mouse is moving and the window is scrolling horizontally and vertically downward and to the right.

Returns
The cursor that represents the cursor that appears during wheel operations when the mouse is moving and the window is scrolling horizontally and vertically downward and to the right.
Appearance
Windows macOS Gnome
 
pan_se_w.png
    html pan_se_m.png    html pan_se_g.png 

◆ pan_south()

static cursor xtd::forms::cursors::pan_south ( )
static

Gets the cursor that appears during wheel operations when the mouse is moving and the window is scrolling vertically in a downward direction.

Returns
The cursor that represents the cursor that appears during wheel operations when the mouse is moving and the window is scrolling vertically in a downward direction.
Appearance
Windows macOS Gnome
 
pan_south_w.png
    html pan_south_m.png    html pan_south_g.png 

◆ pan_sw()

static cursor xtd::forms::cursors::pan_sw ( )
static

Gets the cursor that appears during wheel operations when the mouse is moving and the window is scrolling horizontally and vertically downward and to the left.

Returns
The cursor that represents the cursor that appears during wheel operations when the mouse is moving and the window is scrolling horizontally and vertically downward and to the left.
Appearance
Windows macOS Gnome
 
pan_sw_w.png
    html pan_sw_m.png    html pan_sw_g.png 

◆ pan_west()

static cursor xtd::forms::cursors::pan_west ( )
static

Gets the cursor that appears during wheel operations when the mouse is moving and the window is scrolling horizontally to the left.

Returns
The cursor that represents the cursor that appears during wheel operations when the mouse is moving and the window is scrolling horizontally to the left.
Appearance
Windows macOS Gnome
 
pan_west_w.png
    html pan_west_m.png    html pan_west_g.png 

◆ size_all()

static cursor xtd::forms::cursors::size_all ( )
static

Gets the four-headed sizing cursor, which consists of four joined arrows that point north, south, east, and west.

Returns
The cursor that represents the four-headed sizing cursor.
Appearance
Windows macOS Gnome
 
size_all_w.png
    html size_all_m.png    html size_all_g.png 

◆ size_nesw()

static cursor xtd::forms::cursors::size_nesw ( )
static

Gets the two-headed diagonal (northeast/southwest) sizing cursor.

Returns
The cursor that represents two-headed diagonal (northeast/southwest) sizing cursor.
Appearance
Windows macOS Gnome
 
size_nesw_w.png
    html size_nesw_m.png    html size_nesw_g.png 

◆ size_ns()

static cursor xtd::forms::cursors::size_ns ( )
static

Gets the two-headed vertical (north/south) sizing cursor.

Returns
The cursor that represents the two-headed vertical (north/south) sizing cursor.
Appearance
Windows macOS Gnome
 
size_ns_w.png
    html size_ns_m.png    html size_ns_g.png 

◆ size_nwse()

static cursor xtd::forms::cursors::size_nwse ( )
static

Gets the two-headed diagonal (northwest/southeast) sizing cursor.

Returns
The cursor that represents the two-headed diagonal (northwest/southeast) sizing cursor.
Appearance
Windows macOS Gnome
 
size_nwse_w.png
    html size_nwse_m.png    html size_nwse_g.png 

◆ size_we()

static cursor xtd::forms::cursors::size_we ( )
static

Gets the two-headed diagonal (northwest/southeast) sizing cursor.

Returns
The cursor that represents the two-headed diagonal (northwest/southeast) sizing cursor.
Appearance
Windows macOS Gnome
 
size_we_w.png
    html size_we_m.png    html size_we_g.png 

◆ up_arrow()

static cursor xtd::forms::cursors::up_arrow ( )
static

Gets the up arrow cursor, typically used to identify an insertion point.

Returns
The cursor that represents the up arrow cursor.
Appearance
Windows macOS Gnome
 
up_arrow_w.png
    html up_arrow_m.png    html up_arrow_g.png 

◆ vibeam()

static cursor xtd::forms::cursors::vibeam ( )
static

Gets the vertical I-beam cursor, which is used to show where the text cursor appears when the mouse is clicked for vertical layout.

Returns
The cursor that represents the vertical I-beam cursor.
Appearance
Windows macOS Gnome
 
vibeam_w.png
    html vibeam_m.png    html vibeam_g.png 

◆ vsplit()

static cursor xtd::forms::cursors::vsplit ( )
static

Gets the cursor that appears when the mouse is positioned over a vertical splitter bar.

Returns
The cursor that represents the cursor that appears when the mouse is positioned over a vertical splitter bar.
Appearance
Windows macOS Gnome
 
vsplit_w.png
    html vsplit_m.png    html vsplit_g.png 

◆ wait_cursor()

static cursor xtd::forms::cursors::wait_cursor ( )
static

Gets the wait cursor, typically an hourglass shape.

Returns
The cursor that represents the wait cursor.
Appearance
Windows macOS Gnome
 
wait_cursor_w.png
    html wait_cursor_m.png    html wait_cursor_g.png 

◆ zoom_in()

static cursor xtd::forms::cursors::zoom_in ( )
static

Gets the zoom_in cursor, typically to zoom in an object.

Returns
The cursor that represents the zoom in cursor.
Appearance
Windows macOS Gnome
 
zoom_in_w.png
    html zoom_in_m.png    html zoom_in_g.png 

◆ zoom_out()

static cursor xtd::forms::cursors::zoom_out ( )
static

Gets the zoom out cursor, typically to zoom out an object.

Returns
The cursor that represents the zoom out cursor.
Appearance
Windows macOS Gnome
 
zoom_out_w.png
    html zoom_out_m.png    html zoom_out_g.png 

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