Class: Gtk::TextView
- Inherits:
-
Object
- Object
- Gtk::TextView
- Extended by:
- GLib::Deprecatable
- Defined in:
- lib/gtk3/text-view.rb,
lib/gtk3/deprecated.rb
Instance Method Summary collapse
- #get_iter_at(options) ⇒ Object
- #get_iter_at_location(x, y) ⇒ Object
- #get_iter_at_location_raw ⇒ Object
- #get_iter_at_position(x, y) ⇒ Object
- #get_iter_at_position_raw ⇒ Object
Instance Method Details
#get_iter_at(options) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/gtk3/text-view.rb', line 19 def get_iter_at() location = [:location] position = [:position] if location get_iter_at_location(*location) elsif position get_iter_at_position(*position) else = "must specify :location or :position: #{.inspect}" raise ArgumentError, end end |
#get_iter_at_location(x, y) ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/gtk3/text-view.rb', line 34 def get_iter_at_location(x, y) found, iter = get_iter_at_location_raw(x, y) if found iter else nil end end |
#get_iter_at_location_raw ⇒ Object
33 |
# File 'lib/gtk3/text-view.rb', line 33 alias_method :get_iter_at_location_raw, :get_iter_at_location |
#get_iter_at_position(x, y) ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'lib/gtk3/text-view.rb', line 44 def get_iter_at_position(x, y) found, iter, trailing = get_iter_at_position_raw(x, y) if found [iter, trailing] else nil end end |
#get_iter_at_position_raw ⇒ Object
43 |
# File 'lib/gtk3/text-view.rb', line 43 alias_method :get_iter_at_position_raw, :get_iter_at_position |