xtd 0.2.0
Loading...
Searching...
No Matches
xtd::forms::cursors Class Referencefinal
Inheritance diagram for xtd::forms::cursors:
xtd::static_object

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 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_loading_indicators.parent(*this);
list_box_loading_indicators.bounds({20, 20, 150, 200});
list_box_loading_indicators.anchor(anchor_styles::top | anchor_styles::left | anchor_styles::bottom);
list_box_loading_indicators.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_loading_indicators.selected_index_changed += [&] {
loading_indicator_panel.cursor(any_cast<forms::cursor>(list_box_loading_indicators.selected_item().tag()));
};
list_box_loading_indicators.selected_item("Default");
loading_indicator_panel.parent(*this);
loading_indicator_panel.border_style(border_style::fixed_3d);
loading_indicator_panel.back_color(drawing::system_colors::window());
loading_indicator_panel.bounds({190, 20, 150, 200});
loading_indicator_panel.anchor(anchor_styles::top | anchor_styles::left | anchor_styles::bottom | anchor_styles::right);
}
private:
list_box list_box_loading_indicators;
panel loading_indicator_panel;
};
auto main() -> int {
application::run(form1 {});
}
static void run()
Begins running a standard application message loop on the current thread, without a form.
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:54
Represents a standard Windows list box.
Definition list_box.h:33
Used to group collections of controls.
Definition panel.h:32
@ location
Specifies that both the x and y coordinates of the control are defined.
@ text
The xtd::forms::status_bar_panel displays text in the standard font.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10

Public Static Properties

static cursor app_starting ()
 Gets the cursor that appears when an application starts.
 
static cursor arrow ()
 Gets the arrow cursor.
 
static cursor closed_hand ()
 Gets the closed hand cursor.
 
static cursor contextual_menu ()
 Gets the contextual menu cursor.
 
static cursor cell ()
 Gets the cell cursor.
 
static cursor cross ()
 Gets the crosshair cursor.
 
static cursor default_cursor ()
 Gets the default cursor, which is usually an arrow cursor.
 
static cursor disappearing_item ()
 Gets the disappearing item cursor.
 
static cursor drag_copy ()
 Gets the drag copy cursor.
 
static cursor drag_link ()
 Gets the drag link cursor.
 
static cursor hand ()
 Gets the hand cursor, typically used when hovering over a Web link.
 
static cursor help ()
 Gets the Help cursor, which is a combination of an arrow and a question mark.
 
static cursor hsplit ()
 Gets the cursor that appears when the mouse is positioned over a horizontal splitter bar.
 
static cursor ibeam ()
 Gets the I-beam cursor, which is used to show where the text cursor appears when the mouse is clicked.
 
static cursor no ()
 Gets the cursor that indicates that a particular region is invalid for the current operation.
 
static cursor no_drag ()
 Gets the cursor that indicates that a particular region is invalid for the current drag & drop operation.
 
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.
 
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.
 
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.
 
static cursor open_hand ()
 Gets the open hand cursor.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
static cursor size_all ()
 Gets the four-headed sizing cursor, which consists of four joined arrows that point north, south, east, and west.
 
static cursor size_nesw ()
 Gets the two-headed diagonal (northeast/southwest) sizing cursor.
 
static cursor size_ns ()
 Gets the two-headed vertical (north/south) sizing cursor.
 
static cursor size_nwse ()
 Gets the two-headed diagonal (northwest/southeast) sizing cursor.
 
static cursor size_we ()
 Gets the two-headed diagonal (northwest/southeast) sizing cursor.
 
static cursor up_arrow ()
 Gets the up arrow cursor, typically used to identify an insertion point.
 
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.
 
static cursor vsplit ()
 Gets the cursor that appears when the mouse is positioned over a vertical splitter bar.
 
static cursor wait_cursor ()
 Gets the wait cursor, typically an hourglass shape.
 
static cursor zoom_in ()
 Gets the zoom_in cursor, typically to zoom in an object.
 
static cursor zoom_out ()
 Gets the zoom out cursor, typically to zoom out an object.
 

Public Static Methods

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

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
 
 
 
 
 
 

◆ arrow()

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

Gets the arrow cursor.

Returns
The cursor that represents the arrow cursor.
Appearance
Windows macOS Gnome
 
 
 
 
 
 

◆ 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
 
 
 
 
 
 

◆ 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
 
 
 
 
 
 

◆ cell()

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

Gets the cell cursor.

Returns
The cursor that represents the cell cursor.
Appearance
Windows macOS Gnome
 
 
 
 
 
 

◆ cross()

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

Gets the crosshair cursor.

Returns
The cursor that represents the crosshair cursor.
Appearance
Windows macOS Gnome
 
 
 
 
 
 

◆ 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
 
 
 
 
 
 

◆ 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
 
 
 
 
 
 

◆ 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_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
 
 
 
 
 
 

◆ 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
 
 
 
 
 
 

◆ 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
 
 
 
 
 
 

◆ 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
 
 
 
 
 
 

◆ 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
 
 
 
 
 
 

◆ 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_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_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_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_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
 
 
 
 
 
 

◆ 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
 
 
 
 
 
 

◆ 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_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_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_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_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_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_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_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
 
 
 
 
 
 

◆ 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_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_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_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_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
 
 
 
 
 
 

◆ 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
 
 
 
 
 
 

◆ 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
 
 
 
 
 
 

◆ 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
 
 
 
 
 
 

◆ 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
 
 
 
 
 
 

◆ 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_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
 
 
 
 
 
 

◆ from_name()

static cursor xtd::forms::cursors::from_name ( const xtd::string 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.

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