class Gtk::TextView - gtk3-3.1.8 Documentation

# 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)
      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
get_iter_at_location_raw(x, y)
Alias for: get_iter_at_location
get_iter_at_position(x, y) click to toggle 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
get_iter_at_position_raw(x, y)
Alias for: get_iter_at_position