Class: Tuile::Mouse::DragEvent

Inherits:
Data
  • Object
show all
Includes:
Event
Defined in:
lib/tuile/mouse.rb,
sig/tuile.rbs

Overview

The pointer moved while a component holds the grab.

The one event Router makes rather than routes, so posting one to Screen#handle_mouse raises: drive a grabbed component with a MoveEvent carrying the held button, or with FakeScreen#drag.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#buttonSymbol (readonly)

@return — the button whose press took the grab.

Returns:

  • (Symbol)


78
# File 'lib/tuile/mouse.rb', line 78

DragEvent = Data.define(:button, :x, :y) { include Event }

#xInteger (readonly)

@return — 0-based column — may lie outside the grabbed component's rect, and even outside the screen's last known size.

Returns:

  • (Integer)


78
# File 'lib/tuile/mouse.rb', line 78

DragEvent = Data.define(:button, :x, :y) { include Event }

#yInteger (readonly)

@return — 0-based row.

Returns:

  • (Integer)


78
# File 'lib/tuile/mouse.rb', line 78

DragEvent = Data.define(:button, :x, :y) { include Event }

Instance Method Details

#pointPoint

@return — the event's position.

Returns:



638
# File 'sig/tuile.rbs', line 638

def point: () -> Point