Class: Gtk::TreeIter

Inherits:
Object
  • Object
show all
Defined in:
lib/gtk4/tree-iter.rb

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object



80
81
82
83
84
# File 'lib/gtk4/tree-iter.rb', line 80

def ==(other)
  other.is_a?(self.class) and
    @model == other.model and
    path == other.path
end

#childrenObject



72
73
74
# File 'lib/gtk4/tree-iter.rb', line 72

def children
  @model.iter_children(self)
end

#first_childObject



76
77
78
# File 'lib/gtk4/tree-iter.rb', line 76

def first_child
  nth_child(0)
end

#get_value(column) ⇒ Object Also known as: []



27
28
29
# File 'lib/gtk4/tree-iter.rb', line 27

def get_value(column)
  @model.get_value(self, column)
end

#has_child?Boolean

Returns:

  • (Boolean)


60
61
62
# File 'lib/gtk4/tree-iter.rb', line 60

def has_child?
  @model.iter_has_child(self)
end

#modelObject



19
20
21
# File 'lib/gtk4/tree-iter.rb', line 19

def model
  @model
end

#model=(model) ⇒ Object



23
24
25
# File 'lib/gtk4/tree-iter.rb', line 23

def model=(model)
  @model = model
end

#n_childrenObject



64
65
66
# File 'lib/gtk4/tree-iter.rb', line 64

def n_children
  @model.iter_n_children(self)
end

#next!Object



52
53
54
# File 'lib/gtk4/tree-iter.rb', line 52

def next!
  @model.iter_next(self)
end

#nth_child(n) ⇒ Object



68
69
70
# File 'lib/gtk4/tree-iter.rb', line 68

def nth_child(n)
  @model.iter_nth_child(self, n)
end

#parentObject



56
57
58
# File 'lib/gtk4/tree-iter.rb', line 56

def parent
  @model.iter_parent(self)
end

#pathObject



44
45
46
# File 'lib/gtk4/tree-iter.rb', line 44

def path
  @model.get_path(self)
end

#previous!Object



48
49
50
# File 'lib/gtk4/tree-iter.rb', line 48

def previous!
  @model.iter_previous(self)
end

#set_value(column, value) ⇒ Object Also known as: []=



32
33
34
35
36
# File 'lib/gtk4/tree-iter.rb', line 32

def set_value(column, value)
  gtype = @model.get_column_type(column)
  gvalue = GLib::Value.new(gtype, value)
  @model.set_value(self, column, gvalue)
end

#set_values(values) ⇒ Object Also known as: values=



39
40
41
# File 'lib/gtk4/tree-iter.rb', line 39

def set_values(values)
  @model.set_values(self, values)
end