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(_line_count) ⇒ ::Array[Integer]
@param
_line_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, _line_count, _viewport_lines) ⇒ Boolean
@param
_key. -
#handle_mouse(_line, _event, _line_count) ⇒ Boolean
@param
_line. -
#initialize ⇒ None
constructor
A new instance of None.
Constructor Details
#initialize ⇒ None
Returns a new instance of None.
301 302 303 304 |
# File 'lib/tuile/component/list.rb', line 301 def initialize super(position: -1) freeze end |
Instance Method Details
#candidate_positions(_line_count) ⇒ ::Array[Integer]
@param _line_count
324 325 326 |
# File 'lib/tuile/component/list.rb', line 324 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.
@param _new_position
@return — always false.
334 335 336 |
# File 'lib/tuile/component/list.rb', line 334 def go(_new_position) false end |
#handle_key(_key, _line_count, _viewport_lines) ⇒ Boolean
@param _key
@param _line_count
@param _viewport_lines
310 311 312 |
# File 'lib/tuile/component/list.rb', line 310 def handle_key(_key, _line_count, ) false end |
#handle_mouse(_line, _event, _line_count) ⇒ Boolean
@param _line
@param _event
@param _line_count
318 319 320 |
# File 'lib/tuile/component/list.rb', line 318 def handle_mouse(_line, _event, _line_count) false end |