Class: Tuile::Component::List::CursorChangedEvent
- Inherits:
-
Data
- Object
- Data
- Tuile::Component::List::CursorChangedEvent
- Includes:
- Event
- Defined in:
- lib/tuile/component/list.rb,
sig/tuile.rbs
Overview
What #on_cursor_changed fires.
Instance Attribute Summary collapse
-
#item ⇒ Object?
readonly
@return — the item there,
nilwhen the cursor is off-content (Tuile::Component::List::Cursor::None, empty list, orpositionpast the last item). -
#position ⇒ Integer
readonly
@return — the cursor's 0-based index.
-
#source ⇒ List
readonly
@return — the list whose cursor moved.
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).
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.
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.
108 |
# File 'lib/tuile/component/list.rb', line 108 CursorChangedEvent = Data.define(:source, :position, :item) { include Tuile::Event } |