module Glint::Input::Mouse

Overview

Utility module for managing mouse-related features.

Defined in:

glint/input/cursor.cr
glint/input/mouse.cr

Class Method Summary

Class Method Detail

def self.back_down? : Bool #

Returns whether Mouse::Button::Back is in the down state.

def self.back_down? : Bool
  Button::Back.is_down?
end

[View source]
def self.back_pressed? : Bool #

Returns whether Mouse::Button::Back is in the pressed state.

def self.back_pressed? : Bool
  Button::Back.is_pressed?
end

[View source]
def self.back_released? : Bool #

Returns whether Mouse::Button::Back is in the released state.

def self.back_released? : Bool
  Button::Back.is_released?
end

[View source]
def self.back_up? : Bool #

Returns whether Mouse::Button::Back is in the up state.

def self.back_up? : Bool
  Button::Back.is_up?
end

[View source]
def self.down?(mouse_button : Button) : Bool #

Returns whether mouse_button is in the down state.

def self.down?(mouse_button : Button) : Bool
  mouse_button.is_down?
end

[View source]
def self.extra_down? : Bool #

Returns whether Mouse::Button::Extra is in the down state.

def self.extra_down? : Bool
  Button::Extra.is_down?
end

[View source]
def self.extra_pressed? : Bool #

Returns whether Mouse::Button::Extra is in the pressed state.

def self.extra_pressed? : Bool
  Button::Extra.is_pressed?
end

[View source]
def self.extra_released? : Bool #

Returns whether Mouse::Button::Extra is in the released state.

def self.extra_released? : Bool
  Button::Extra.is_released?
end

[View source]
def self.extra_up? : Bool #

Returns whether Mouse::Button::Extra is in the up state.

def self.extra_up? : Bool
  Button::Extra.is_up?
end

[View source]
def self.forward_down? : Bool #

Returns whether Mouse::Button::Forward is in the down state.

def self.forward_down? : Bool
  Button::Forward.is_down?
end

[View source]
def self.forward_pressed? : Bool #

Returns whether Mouse::Button::Forward is in the pressed state.

def self.forward_pressed? : Bool
  Button::Forward.is_pressed?
end

[View source]
def self.forward_released? : Bool #

Returns whether Mouse::Button::Forward is in the released state.

def self.forward_released? : Bool
  Button::Forward.is_released?
end

[View source]
def self.forward_up? : Bool #

Returns whether Mouse::Button::Forward is in the up state.

def self.forward_up? : Bool
  Button::Forward.is_up?
end

[View source]
def self.left_down? : Bool #

Returns whether Mouse::Button::Left is in the down state.

def self.left_down? : Bool
  Button::Left.is_down?
end

[View source]
def self.left_pressed? : Bool #

Returns whether Mouse::Button::Left is in the pressed state.

def self.left_pressed? : Bool
  Button::Left.is_pressed?
end

[View source]
def self.left_released? : Bool #

Returns whether Mouse::Button::Left is in the released state.

def self.left_released? : Bool
  Button::Left.is_released?
end

[View source]
def self.left_up? : Bool #

Returns whether Mouse::Button::Left is in the up state.

def self.left_up? : Bool
  Button::Left.is_up?
end

[View source]
def self.middle_down? : Bool #

Returns whether Mouse::Button::Middle is in the down state.

def self.middle_down? : Bool
  Button::Middle.is_down?
end

[View source]
def self.middle_pressed? : Bool #

Returns whether Mouse::Button::Middle is in the pressed state.

def self.middle_pressed? : Bool
  Button::Middle.is_pressed?
end

[View source]
def self.middle_released? : Bool #

Returns whether Mouse::Button::Middle is in the released state.

def self.middle_released? : Bool
  Button::Middle.is_released?
end

[View source]
def self.middle_up? : Bool #

Returns whether Mouse::Button::Middle is in the up state.

def self.middle_up? : Bool
  Button::Middle.is_up?
end

[View source]
def self.position : Position #

Returns the mouse position.


[View source]
def self.pressed?(mouse_button : Button) : Bool #

Returns whether mouse_button is in the pressed state.

def self.pressed?(mouse_button : Button) : Bool
  mouse_button.is_pressed?
end

[View source]
def self.released?(mouse_button : Button) : Bool #

Returns whether mouse_button is in the released state.

def self.released?(mouse_button : Button) : Bool
  mouse_button.is_released?
end

[View source]
def self.right_down? : Bool #

Returns whether Mouse::Button::Right is in the down state.

def self.right_down? : Bool
  Button::Right.is_down?
end

[View source]
def self.right_pressed? : Bool #

Returns whether Mouse::Button::Right is in the pressed state.

def self.right_pressed? : Bool
  Button::Right.is_pressed?
end

[View source]
def self.right_released? : Bool #

Returns whether Mouse::Button::Right is in the released state.

def self.right_released? : Bool
  Button::Right.is_released?
end

[View source]
def self.right_up? : Bool #

Returns whether Mouse::Button::Right is in the up state.

def self.right_up? : Bool
  Button::Right.is_up?
end

[View source]
def self.side_down? : Bool #

Returns whether Mouse::Button::Side is in the down state.

def self.side_down? : Bool
  Button::Side.is_down?
end

[View source]
def self.side_pressed? : Bool #

Returns whether Mouse::Button::Side is in the pressed state.

def self.side_pressed? : Bool
  Button::Side.is_pressed?
end

[View source]
def self.side_released? : Bool #

Returns whether Mouse::Button::Side is in the released state.

def self.side_released? : Bool
  Button::Side.is_released?
end

[View source]
def self.side_up? : Bool #

Returns whether Mouse::Button::Side is in the up state.

def self.side_up? : Bool
  Button::Side.is_up?
end

[View source]
def self.up?(mouse_button : Button) : Bool #

Returns whether mouse_button is in the up state.

def self.up?(mouse_button : Button) : Bool
  mouse_button.is_up?
end

[View source]
def self.x : Int #

Returns the x-coordinate of the the cursor position.


[View source]
def self.y : Int #

Returns the y-coordinate of the mouse position.


[View source]