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;
class form1 :
public form {
public:
form1() {
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.bounds({190, 20, 150, 200});
}
private:
};
auto main()->int {
}
|
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...
|
|