Class: Tuile::Component::List::CursorChangedEvent

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

Overview

What #on_cursor_changed fires.

Instance Attribute Summary collapse

Instance Attribute Details

#item ⇒ Object? (readonly)

@return — the item there, nil when the cursor is off-content (Tuile::Component::List::Cursor::None, empty list, or position past the last item).

Returns:

  • (Object, nil)


108
# File 'lib/tuile/component/list.rb', line 108

CursorChangedEvent = Data.define(:source, :position, :item) { include Tuile::Event }

#position ⇒ Integer (readonly)

@return — the cursor's 0-based index.

Returns:

  • (Integer)


108
# File 'lib/tuile/component/list.rb', line 108

CursorChangedEvent = Data.define(:source, :position, :item) { include Tuile::Event }

#source ⇒ List (readonly)

@return — the list whose cursor moved.

Returns:



108
# File 'lib/tuile/component/list.rb', line 108

CursorChangedEvent = Data.define(:source, :position, :item) { include Tuile::Event }