Class: Gtk::Widget

Inherits:
Object
  • Object
show all
Defined in:
lib/gutkumber/finders.rb

Instance Method Summary collapse

Instance Method Details

#child_widgets_with_class(klass, acc = []) ⇒ Object



57
58
59
60
61
62
63
64
65
66
67
# File 'lib/gutkumber/finders.rb', line 57

def child_widgets_with_class(klass, acc=[])
  if self.is_a? klass
    acc << self
  end
  if self.respond_to?(:children)
    self.children.each do |gtk_child|
      gtk_child.child_widgets_with_class(klass, acc)
    end
  end
  acc
end