xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Static Public Member Functions | List of all members
xtd::forms::cursors Class Referencefinal

Provides a collection of Cursor objects for use by a Windows Forms application. More...

#include <cursors.h>

Static Public Member Functions

static cursor app_starting ()
 Gets the cursor that appears when an application starts. More...
 
static cursor arrow ()
 Gets the arrow cursor. More...
 
static cursor cell ()
 Gets the cell cursor. More...
 
static cursor closed_hand ()
 Gets the closed hand cursor. More...
 
static cursor contextual_menu ()
 Gets the contextual menu 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 const std::vector< cursor > & get_cursors ()
 
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 int cursor, typically to zoom in an object. More...
 
static cursor zoom_out ()
 Gets the zoom out cursor, typically to zoom out an object. More...
 

Detailed Description

Provides a collection of Cursor objects for use by a Windows Forms application.

Library
xtd.forms
Examples
The following code example demonstrate the use of cursors component.
#include <xtd/xtd>
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;
};
int main() {
application::run(form1());
}
Windows
cursors_w.png

cursors_wd.png
macOS
cursors_m.png

cursors_md.png
Gnome
cursors_g.png

cursors_gd.png

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 Gtk macOS
app_starting_w.png
html app_starting_g.png html app_starting_m.png

◆ arrow()

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

Gets the arrow cursor.

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

◆ cell()

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

Gets the cell cursor.

Returns
The cursor that represents the cell cursor.
Appearance
Windows Gtk macOS
cell_w.png
html cell_g.png html cell_m.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 Gtk macOS
closed_hand_w.png
html closed_hand_g.png html closed_hand_m.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 Gtk macOS
contextual_menu_w.png
html contextual_menu_g.png html contextual_menu_m.png

◆ cross()

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

Gets the crosshair cursor.

Returns
The cursor that represents the crosshair cursor.
Appearance
Windows Gtk macOS
cross_w.png
html cross_g.png html cross_m.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 Gtk macOS
default_cursor_w.png
html default_cursor_g.png html default_cursor_m.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 Gtk macOS
disappearing_item_w.png
html disappearing_item_g.png html disappearing_item_m.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 Gtk macOS
drag_copy_w.png
html drag_copy_g.png html drag_copy_m.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 Gtk macOS
drag_link_w.png
html drag_link_g.png html drag_link_m.png

◆ 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 Gtk macOS
hand_w.png
html hand_g.png html hand_m.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 Gtk macOS
help_w.png
html help_g.png html help_m.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 Gtk macOS
hsplit_w.png
html hsplit_g.png html hsplit_m.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 Gtk macOS
ibeam_w.png
html ibeam_g.png html ibeam_m.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 Gtk macOS
no_w.png
html no_g.png html no_m.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 & dropt operation.
Appearance
Windows Gtk macOS
no_drag_w.png
html no_drag_g.png html no_drag_m.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 Gtk macOS
no_move_2d_w.png
html no_move_2d_g.png html no_move_2d_m.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 Gtk macOS
no_move_horiz_w.png
html no_move_horiz_g.png html no_move_horiz_m.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 Gtk macOS
no_move_vert_w.png
html no_move_vert_g.png html no_move_vert_m.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 Gtk macOS
open_hand_w.png
html open_hand_g.png html open_hand_m.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 Gtk macOS
pan_east_w.png
html pan_east_g.png html pan_east_m.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 Gtk macOS
pan_ne_w.png
html pan_ne_g.png html pan_ne_m.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 Gtk macOS
pan_north_w.png
html pan_north_g.png html pan_north_m.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 Gtk macOS
pan_nw_w.png
html pan_nw_g.png html pan_nw_m.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 Gtk macOS
pan_se_w.png
html pan_se_g.png html pan_se_m.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 Gtk macOS
pan_south_w.png
html pan_south_g.png html pan_south_m.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 Gtk macOS
pan_sw_w.png
html pan_sw_g.png html pan_sw_m.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 Gtk macOS
pan_west_w.png
html pan_west_g.png html pan_west_m.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 Gtk macOS
size_all_w.png
html size_all_g.png html size_all_m.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 Gtk macOS
size_nesw_w.png
html size_nesw_g.png html size_nesw_m.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 Gtk macOS
size_ns_w.png
html size_ns_g.png html size_ns_m.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 Gtk macOS
size_nwse_w.png
html size_nwse_g.png html size_nwse_m.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 Gtk macOS
size_we_w.png
html size_we_g.png html size_we_m.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 Gtk macOS
up_arrow_w.png
html up_arrow_g.png html up_arrow_m.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 Gtk macOS
vibeam_w.png
html vibeam_g.png html vibeam_m.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 Gtk macOS
vsplit_w.png
html vsplit_g.png html vsplit_m.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 Gtk macOS
wait_cursor_w.png
html wait_cursor_g.png html wait_cursor_m.png

◆ zoom_in()

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

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

Returns
The cursor that represents the zoom in cursor.
Appearance
Windows Gtk macOS
zoom_in_w.png
html zoom_in_g.png html zoom_in_m.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 Gtk macOS
zoom_out_w.png
html zoom_out_g.png html zoom_out_m.png

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