Class: Gtk::TextView

Inherits:
Object
  • Object
show all
Extended by:
GLib::Deprecatable
Defined in:
lib/gtk3/text-view.rb,
lib/gtk3/deprecated.rb

Instance Method Summary collapse

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(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) ⇒ 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_rawObject



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_rawObject



43
# File 'lib/gtk3/text-view.rb', line 43

alias_method :get_iter_at_position_raw, :get_iter_at_position