Class: Tuile::Component::List::Cursor::None
- Inherits:
-
Cursor
- Object
- Cursor
- Tuile::Component::List::Cursor::None
- Defined in:
- lib/tuile/component/list.rb,
sig/tuile.rbs
Overview
No cursor — cursor is disabled.
Instance Method Summary collapse
-
#candidate_positions(_item_count) ⇒ ::Array[Integer]
@param
_item_count. -
#go(_new_position) ⇒ Boolean
Overridden so all movement funnels — base #go_to_last, #go_to_first, etc., which all call #go — become safe no-ops on a disabled cursor.
-
#handle_key(_key, _item_count, _viewport_rows) ⇒ Boolean
@param
_key. -
#handle_mouse(_item_index, _event, _item_count) ⇒ Boolean
@param
_item_index. -
#initialize ⇒ None
constructor
A new instance of None.
Constructor Details
#initialize ⇒ None
Returns a new instance of None.
351 352 353 354 |
# File 'lib/tuile/component/list.rb', line 351 def initialize super(position: -1) freeze end |
Instance Method Details
#candidate_positions(_item_count) ⇒ ::Array[Integer]
@param _item_count
374 375 376 |
# File 'lib/tuile/component/list.rb', line 374 def candidate_positions(_item_count) [] end |
#go(_new_position) ⇒ Boolean
Overridden so all movement funnels — base Tuile::Component::List::Cursor#go_to_last, Tuile::Component::List::Cursor#go_to_first, etc., which all call #go — become safe no-ops on a disabled cursor. The instance is frozen, so a default mutating #go would raise.
@param _new_position
@return — always false.
384 385 386 |
# File 'lib/tuile/component/list.rb', line 384 def go(_new_position) false end |
#handle_key(_key, _item_count, _viewport_rows) ⇒ Boolean
@param _key
@param _item_count
@param _viewport_rows
360 361 362 |
# File 'lib/tuile/component/list.rb', line 360 def handle_key(_key, _item_count, ) false end |
#handle_mouse(_item_index, _event, _item_count) ⇒ Boolean
@param _item_index
@param _event
@param _item_count
368 369 370 |
# File 'lib/tuile/component/list.rb', line 368 def handle_mouse(_item_index, _event, _item_count) false end |