Class: Gtk::ListStore
Instance Attribute Summary
Attributes inherited from GObject
Instance Method Summary collapse
- #append(iter) ⇒ Object
-
#initialize(n_columns, *types) ⇒ ListStore
constructor
A new instance of ListStore.
-
#to_tree_model ⇒ Object
def set *args puts “SET #argsargs.inspect” end.
Methods inherited from GObject
#method_missing, #signal_connect, type_register, #unref
Constructor Details
#initialize(n_columns, *types) ⇒ ListStore
Returns a new instance of ListStore.
9 10 11 12 13 |
# File 'lib/gtk/list_store.rb', line 9 def initialize(n_columns, *types) @native = Lib.gtk_list_store_new(n_columns, *(types.map{ |type| [:int,GType[type]] }.flatten) ) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Gtk::GObject
Instance Method Details
#append(iter) ⇒ Object
14 15 16 17 |
# File 'lib/gtk/list_store.rb', line 14 def append iter iter.owner = self Lib.gtk_list_store_append(native,iter.to_ptr) end |
#to_tree_model ⇒ Object
def set *args
puts "SET #{args.inspect}"
end
21 22 23 |
# File 'lib/gtk/list_store.rb', line 21 def to_tree_model Gtk::TreeModel.new(native) end |