Class: Gtk::TreeViewColumn
- Defined in:
- lib/gtk/tree_view_column.rb
Instance Attribute Summary
Attributes inherited from GObject
Instance Method Summary collapse
-
#initialize(title = nil, renderer = nil, options = {}) ⇒ TreeViewColumn
constructor
A new instance of TreeViewColumn.
Methods inherited from Widget
Methods inherited from GObject
#method_missing, #signal_connect, type_register, #unref
Constructor Details
#initialize(title = nil, renderer = nil, options = {}) ⇒ TreeViewColumn
Returns a new instance of TreeViewColumn.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/gtk/tree_view_column.rb', line 12 def initialize(title=nil,renderer=nil,={}) if title.is_a?(FFI::Pointer) @native = title else attributes = .map{ |key,value| [:string,key.to_s,:int,value] }.flatten = title && .size > 0 @native = if raise "renderer misses native" unless renderer.native Lib.gtk_tree_view_column_new_with_attributes(title,renderer.native,*attributes,:string,nil) else Lib.gtk_tree_view_column_new() end unless set_title(title) if title if .size > 0 Lib.gtk_tree_view_column_set_attributes(native,renderer.native,*attributes,:string,nil) end end end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Gtk::GObject