struct Termbox::Event::MouseEvent

Overview

Emitted by mouse events when mouse is enabled (see InputMode::Mouse for more).

Defined in:

termbox2/event.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from struct Termbox::Event::BaseEvent

initialize initialize

Constructor methods inherited from struct Termbox::Event::BaseEvent

new new

Class methods inherited from struct Termbox::Event::BaseEvent

from(event : LibTermbox::Event) from

Constructor Detail

def self.new(button : Termbox::MouseButton, x : Int32, y : Int32) #

[View source]

Class Method Detail

def self.from(event) #

Creates a MouseEvent from a Termbox event struct.


[View source]

Instance Method Detail

def button : MouseButton #

Returns the mouse button of this event.


[View source]
def x : Int32 #

Returns the mouse X position of this event, in columns.


[View source]
def y : Int32 #

Returns the mouse Y position of this event, in rows.


[View source]