class Gtk::TextView
Public Instance Methods
Source
# File lib/gtk3/text-view.rb, line 19 def get_iter_at(options) location = options[:location] position = options[:position] if location get_iter_at_location(*location) elsif position get_iter_at_position(*position) else message = "must specify :location or :position: #{options.inspect}" raise ArgumentError, message end end
Source
# File lib/gtk3/text-view.rb, line 34 def get_iter_at_location(x, y) result = get_iter_at_location_raw(x, y) if result.is_a?(Gtk::TextIter) # For GTK+ < 3.20 iter = result iter else found, iter = result if found iter else nil end end end
Also aliased as: get_iter_at_location_raw
Source
# File lib/gtk3/text-view.rb, line 50 def get_iter_at_position(x, y) result = get_iter_at_position_raw(x, y) if result.size == 2 # For GTK+ < 3.20 result else found, iter, trailing = result if found [iter, trailing] else nil end end end
Also aliased as: get_iter_at_position_raw