struct Lime::Modules::Mouse::Event

Overview

A mouse event.

Defined in:

lime/modules.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(x : Int32, y : Int32, type : Symbol) #

[View source]

Instance Method Detail

def clone #

[View source]
def copy_with(x _x = @x, y _y = @y, type _type = @type) #

[View source]
def kind : Symbol #

Returns the kind of mouse event based on #type:

  • :release if a mouse button has been released.
  • :click if a mouse button has been pressed.
  • :wheel if the wheel has been scrolled.
  • :drag if mode is Mode::Drag or Mode::All and a mouse button has been pressed and the mouse has been moved.
  • :move if mode is Mode::All and the mouse has been moved.

[View source]
def type : Symbol #
  • :release if a mouse button has been released.

  • :left if the left mouse button has been pressed.

  • :wheel if the mouse wheel button has been pressed.

  • :right if the right mouse button has been pressed.

  • :wheel_up if the mouse wheel has been scrolled up.

  • :wheel_down if the mouse wheel has been scrolled down.

Only if mode is Mode::Drag or Mode::All:

  • :left_drag if the left mouse button has been pressed and the mouse has been moved.
  • :wheel_drag if the mouse wheel button has been pressed and the mouse has been moved.
  • :right_drag if the right mouse button has been pressed and the mouse has been moved.

Only if mode is Mode::All:

  • :move if the mouse has been moved.

[View source]
def x : Int32 #

def y : Int32 #