Class: Gtk::TreeViewColumn

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

Instance Method Summary collapse

Constructor Details

#initialize(title = nil, cell = nil, attributes = {}) ⇒ TreeViewColumn

Returns a new instance of TreeViewColumn.



20
21
22
23
24
25
26
27
# File 'lib/gtk3/tree-view-column.rb', line 20

def initialize(title=nil, cell=nil, attributes={})
  initialize_raw
  set_title(title) if title
  pack_start(cell, true) if cell
  attributes.each_entry do |key, value|
    add_attribute(cell, key, value)
  end
end

Instance Method Details

#add_attribute(cell, key, value) ⇒ Object



30
31
32
33
# File 'lib/gtk3/tree-view-column.rb', line 30

def add_attribute(cell, key, value)
  key = key.to_s if key.is_a?(Symbol)
  add_attribute_raw(cell, key, value)
end

#add_attribute_rawObject



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

alias_method :add_attribute_raw, :add_attribute

#initialize_rawObject



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

alias_method :initialize_raw, :initialize