class Gtk::TreeView - gtk3-3.1.8 Documentation

# class Gtk::TreeView

### Public Instance Methods

enable_model_drag_dest(targets, actions) click to toggle source

    # File lib/gtk3/tree-view.rb, line 36
    def enable_model_drag_dest(targets, actions)
      targets = ensure_drag_targets(targets)
      enable_model_drag_dest_raw(targets, actions)
    end

Also aliased as: enable_model_drag_dest_raw
enable_model_drag_dest_raw(targets, actions)
Alias for: enable_model_drag_dest
enable_model_drag_source(flags, targets, actions) click to toggle source

    # File lib/gtk3/tree-view.rb, line 30
    def enable_model_drag_source(flags, targets, actions)
      targets = ensure_drag_targets(targets)
      enable_model_drag_source_raw(flags, targets, actions)
    end

Also aliased as: enable_model_drag_source_raw
enable_model_drag_source_raw(flags, targets, actions)
Alias for: enable_model_drag_source
expand_row(path, options={}) click to toggle source

    # File lib/gtk3/tree-view.rb, line 66
    def expand_row(path, options={})
      if options == true or options == false
        open_all = options
      else
        open_all = options[:open_all]
        open_all = true if open_all.nil?
      end

      expand_row_raw(path, open_all)
    end

Also aliased as: expand_row_raw
expand_row_raw(path, options={})
Alias for: expand_row
get_path_at_pos(x, y) click to toggle source

    # File lib/gtk3/tree-view.rb, line 20
    def get_path_at_pos(x, y)
      found, *info = get_path_at_pos_raw(x, y)
      if found
        info
      else
        nil
      end
    end

Also aliased as: get_path_at_pos_raw
get_path_at_pos_raw(x, y)
Alias for: get_path_at_pos
insert_column(*args, &block) click to toggle source

    # File lib/gtk3/tree-view.rb, line 42
    def insert_column(*args, &block)
      case args.size
      when 2
        column, position = args
        insert_column_raw(column, position)
      when 3
        position, title, cell = args
        insert_column_with_data_func(position, title, cell, &block)
      when 4
        position, title, cell, attributes = args
        column = TreeViewColumn.new
        column.sizing = :fixed if fixed_height_mode?
        column.title = title
        column.pack_start(cell, true)
        attributes.each do |name, column_id|
          column.add_attribute(cell, name, column_id)
        end
        insert_column_raw(column, position)
      else
        raise ArgumentError, "wrong number of arguments (#{args.size} for 2..4)"
      end
    end

Also aliased as: insert_column_raw
insert_column_raw(*args, &block)
Alias for: insert_column

### Private Instance Methods

create_signal_handler(signal_name, callback) click to toggle source
Calls superclass method

    # File lib/gtk3/tree-view.rb, line 78
    def create_signal_handler(signal_name, callback)
      case signal_name
      when "row-collapsed", "row-expanded"
        lambda do |tree_view, iter, path, *extra_args|
          iter.model = tree_view.model
          callback.call(tree_view, iter, path, *extra_args)
        end
      else
        super
      end
    end