class Gtk::TreeViewColumn
Public Class Methods
new(*args)
click to toggle source
# File lib/gtk3/tree-view-column.rb, line 20 def initialize(*args) if args.size == 1 and args[0].is_a?(Hash) options = args[0].dup area = options.delete(:area) renderer = options.delete(:renderer) title = options.delete(:title) attributes = options.delete(:attributes) unless options.empty? names = options.keys.inspect available_names = [:area, :renderer, :title, :attributes].inspect message = "unknown option(s): #{names}: available options: #{available_names}" raise ArgumentError, message end else area = nil title, renderer, attributes = args end attributes ||= {} if area initialize_new_with_area(area) else initialize_raw end set_title(title) if title if renderer pack_start(renderer, true) attributes.each_entry do |key, value| add_attribute(renderer, key, value) end end end
Also aliased as: initialize_raw
Public Instance Methods
add_attribute(renderer, key, value)
click to toggle source
# File lib/gtk3/tree-view-column.rb, line 56 def add_attribute(renderer, key, value) key = key.to_s if key.is_a?(Symbol) add_attribute_raw(renderer, key, value) end
Also aliased as: add_attribute_raw