Class: Gtk::TreeView

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

Instance Method Summary collapse

Instance Method Details

#enable_model_drag_dest(targets, actions) ⇒ Object



36
37
38
39
# 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

#enable_model_drag_dest_rawObject



35
# File 'lib/gtk3/tree-view.rb', line 35

alias_method :enable_model_drag_dest_raw, :enable_model_drag_dest

#enable_model_drag_source(flags, targets, actions) ⇒ Object



30
31
32
33
# 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

#enable_model_drag_source_rawObject



29
# File 'lib/gtk3/tree-view.rb', line 29

alias_method :enable_model_drag_source_raw, :enable_model_drag_source

#expand_row(path, options = {}) ⇒ Object



66
67
68
69
70
71
72
73
74
75
# 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

#expand_row_rawObject



65
# File 'lib/gtk3/tree-view.rb', line 65

alias_method :expand_row_raw, :expand_row

#get_path_at_pos(x, y) ⇒ Object



20
21
22
23
24
25
26
27
# 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

#get_path_at_pos_rawObject



19
# File 'lib/gtk3/tree-view.rb', line 19

alias_method :get_path_at_pos_raw, :get_path_at_pos

#insert_column(*args, &block) ⇒ Object



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# 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

#insert_column_rawObject



41
# File 'lib/gtk3/tree-view.rb', line 41

alias_method :insert_column_raw, :insert_column