struct Espresso::Cursor

Overview

Custom or standard cursor to display the mouse's location in a window.

Included Modules

Extended Modules

Defined in:

espresso/input/mouse/cursor.cr

Constructors

Instance Method Summary

Constructor Detail

def self.arrow : self #

Creates a standard Arrow cursor shape.


[View source]
def self.crosshair : self #

Creates a standard Crosshair cursor shape.


[View source]
def self.h_resize : self #

Creates a standard HResize cursor shape.


[View source]
def self.hand : self #

Creates a standard Hand cursor shape.


[View source]
def self.i_beam : self #

Creates a standard IBeam cursor shape.


[View source]
def self.new(image, x = 0, y = 0) #

Creates a new custom cursor from an image.

Specify the cursor's appearance with the image argument. The x and y arguments specify the cursor's hot-spot.


[View source]
def self.standard(type) : self #

Creates a cursor from one of the standard shapes. See CursorShape for available options.


[View source]
def self.v_resize : self #

Creates a standard VResize cursor shape.


[View source]

Instance Method Detail

def destroy! #

Destroys the cursor and releases any resources it used. If the cursor is current for any window, that window will revert to the default cursor. This does not affect the cursor mode. All remaining cursors are destroyed when Espresso#terminate is called.

Do not attempt to use the cursor after destroying it.


[View source]
def to_unsafe : LibGLFW::Cursor #

Returns the underlying GLFW cursor pointer.


[View source]