Class: Tuile::Component::List::Cursor::None
- Inherits:
-
Tuile::Component::List::Cursor
- Object
- Tuile::Component::List::Cursor
- Tuile::Component::List::Cursor::None
- Defined in:
- lib/tuile/component/list.rb
Overview
No cursor — cursor is disabled.
Instance Attribute Summary
Attributes inherited from Tuile::Component::List::Cursor
Instance Method Summary collapse
- #candidate_positions(_line_count) ⇒ Array<Integer>
-
#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, _line_count, _viewport_lines) ⇒ Boolean
- #handle_mouse(_line, _event, _line_count) ⇒ Boolean
-
#initialize ⇒ None
constructor
A new instance of None.
Methods inherited from Tuile::Component::List::Cursor
Constructor Details
#initialize ⇒ None
Returns a new instance of None.
304 305 306 307 |
# File 'lib/tuile/component/list.rb', line 304 def initialize super(position: -1) freeze end |
Instance Method Details
#candidate_positions(_line_count) ⇒ Array<Integer>
327 328 329 |
# File 'lib/tuile/component/list.rb', line 327 def candidate_positions(_line_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.
337 338 339 |
# File 'lib/tuile/component/list.rb', line 337 def go(_new_position) false end |
#handle_key(_key, _line_count, _viewport_lines) ⇒ Boolean
313 314 315 |
# File 'lib/tuile/component/list.rb', line 313 def handle_key(_key, _line_count, ) false end |
#handle_mouse(_line, _event, _line_count) ⇒ Boolean
321 322 323 |
# File 'lib/tuile/component/list.rb', line 321 def handle_mouse(_line, _event, _line_count) false end |