Class: Gtk::ListStore
- Inherits:
-
Object
- Object
- Gtk::ListStore
- Defined in:
- lib/gtk4/list-store.rb
Instance Method Summary collapse
- #append ⇒ Object
- #append_raw ⇒ Object
-
#initialize(*columns) ⇒ ListStore
constructor
A new instance of ListStore.
- #initialize_raw ⇒ Object
- #insert(index, values = nil) ⇒ Object
- #insert_after(index) ⇒ Object
- #insert_after_raw ⇒ Object
- #insert_before(index) ⇒ Object
- #insert_before_raw ⇒ Object
- #insert_raw ⇒ Object
- #prepend ⇒ Object
- #prepend_raw ⇒ Object
- #set_column_types(*types) ⇒ Object
- #set_column_types_raw ⇒ Object
Constructor Details
#initialize(*columns) ⇒ ListStore
Returns a new instance of ListStore.
20 21 22 23 24 25 |
# File 'lib/gtk4/list-store.rb', line 20 def initialize(*columns) if columns.empty? raise ArgumentError, "No column type is specified" end initialize_raw(columns) end |
Instance Method Details
#append ⇒ Object
28 29 30 31 32 |
# File 'lib/gtk4/list-store.rb', line 28 def append iter = append_raw setup_iter(iter) iter end |
#append_raw ⇒ Object
27 |
# File 'lib/gtk4/list-store.rb', line 27 alias_method :append_raw, :append |
#initialize_raw ⇒ Object
19 |
# File 'lib/gtk4/list-store.rb', line 19 alias_method :initialize_raw, :initialize |
#insert(index, values = nil) ⇒ Object
42 43 44 45 46 47 |
# File 'lib/gtk4/list-store.rb', line 42 def insert(index, values=nil) iter = insert_raw(index) setup_iter(iter) set_values(iter, values) if values iter end |
#insert_after(index) ⇒ Object
57 58 59 60 61 |
# File 'lib/gtk4/list-store.rb', line 57 def insert_after(index) iter = insert_after_raw(index) setup_iter(iter) iter end |
#insert_after_raw ⇒ Object
56 |
# File 'lib/gtk4/list-store.rb', line 56 alias_method :insert_after_raw, :insert_after |
#insert_before(index) ⇒ Object
50 51 52 53 54 |
# File 'lib/gtk4/list-store.rb', line 50 def insert_before(index) iter = insert_before_raw(index) setup_iter(iter) iter end |
#insert_before_raw ⇒ Object
49 |
# File 'lib/gtk4/list-store.rb', line 49 alias_method :insert_before_raw, :insert_before |
#insert_raw ⇒ Object
41 |
# File 'lib/gtk4/list-store.rb', line 41 alias_method :insert_raw, :insert |
#prepend ⇒ Object
35 36 37 38 39 |
# File 'lib/gtk4/list-store.rb', line 35 def prepend iter = prepend_raw setup_iter(iter) iter end |
#prepend_raw ⇒ Object
34 |
# File 'lib/gtk4/list-store.rb', line 34 alias_method :prepend_raw, :prepend |
#set_column_types(*types) ⇒ Object
64 65 66 67 68 69 |
# File 'lib/gtk4/list-store.rb', line 64 def set_column_types(*types) if types.size == 1 and types[0].is_a?(Array) types = types[0] end set_column_types_raw(types) end |
#set_column_types_raw ⇒ Object
63 |
# File 'lib/gtk4/list-store.rb', line 63 alias_method :set_column_types_raw, :set_column_types |