struct NCurses::MouseEvent

Overview

Returned by #get_mouse after Key::Mouse has been returned

Defined in:

ncurses/mouse_event.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(device_id, coordinates, state) #

[View source]
def self.new(event : LibNCurses::MEVENT) #

Converts fields from LibC ints to specific types


[View source]

Instance Method Detail

def coordinates : NamedTuple() #

[View source]
def device_id : Int16 #

[View source]
def enclose?(window : Window) #

If this mouse event took place inside a specific window


[View source]
def non_relative(window : Window) : MouseEvent #

Returns a new MouseEvent with full-screen relative coordinates

The opposite of #relative

Wrapper for wmouse_trafo()


[View source]
def relative(window : Window) : MouseEvent #

Returns a new MouseEvent with window-relative coordinates

Wrapper for wmouse_trafo()


[View source]
def state : Mouse #

[View source]