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
|