class Gtk::TextView

Public Instance Methods

get_iter_at(options) click to toggle 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
get_iter_at_location(x, y) click to toggle source
# 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
Also aliased as: get_iter_at_location_raw
get_iter_at_location_raw(x, y)
get_iter_at_position(x, y) click to toggle source
# 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
Also aliased as: get_iter_at_position_raw
get_iter_at_position_raw(x, y)