Class: ATSPI::Accessible::Text::Selection
- Extended by:
- Forwardable
- Defined in:
- lib/atspi/accessible/text/selection.rb
Overview
Represents a selected range in a ATSPI::Accessible::Text.
Actions collapse
-
#deselect ⇒ true, false
Deselects itself.
-
#move_end_to(new_end_offset) ⇒ true, false
Moves its end to the given offset.
-
#move_start_to(new_start_offset) ⇒ true, false
Moves its start to the given offset.
Instance Method Details
#deselect ⇒ true, false
Deselects itself.
20 21 22 |
# File 'lib/atspi/accessible/text/selection.rb', line 20 def deselect @text_native.remove_selection(@idx) end |
#move_end_to(new_end_offset) ⇒ true, false
Moves its end to the given offset.
42 43 44 |
# File 'lib/atspi/accessible/text/selection.rb', line 42 def move_end_to(new_end_offset) @text_native.set_selection(@idx, start, new_end_offset.to_i) end |
#move_start_to(new_start_offset) ⇒ true, false
Moves its start to the given offset.
31 32 33 |
# File 'lib/atspi/accessible/text/selection.rb', line 31 def move_start_to(new_start_offset) @text_native.set_selection(@idx, new_start_offset.to_i, self.end) end |