Class: Gtk::Container

Inherits:
Object
  • Object
show all
Extended by:
GLib::Deprecatable
Includes:
Enumerable
Defined in:
lib/gtk3/container.rb,
lib/gtk3/deprecated.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.child_propertiesObject



21
22
23
# File 'lib/gtk3/container.rb', line 21

def child_properties
  child_properties_raw[0]
end

.child_properties_rawObject



20
# File 'lib/gtk3/container.rb', line 20

alias_method :child_properties_raw, :child_properties

Instance Method Details

#<<(widget) ⇒ Object



41
42
43
44
# File 'lib/gtk3/container.rb', line 41

def <<(widget)
  add(widget)
  self
end

#add(child, properties = {}) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/gtk3/container.rb', line 29

def add(child, properties={})
  child.freeze_child_notify
  begin
    add_raw(child)
    properties.each do |key, value|
      child_set_property(child, key, value)
    end
  ensure
    child.thaw_child_notify
  end
end

#add_rawObject



28
# File 'lib/gtk3/container.rb', line 28

alias_method :add_raw, :add

#child_get_property(child, name) ⇒ Object



57
58
59
60
61
62
# File 'lib/gtk3/container.rb', line 57

def child_get_property(child, name)
  property = self.class.find_child_property(name)
  value = GLib::Value.new(property.value_type)
  child_get_property_raw(child, name, value)
  value.value
end

#child_get_property_rawObject



56
# File 'lib/gtk3/container.rb', line 56

alias_method :child_get_property_raw, :child_get_property

#focus_chainObject



47
48
49
50
51
52
53
54
# File 'lib/gtk3/container.rb', line 47

def focus_chain
  set_explicitly, widgets = focus_chain_raw
  if set_explicitly
    widgets
  else
    nil
  end
end

#focus_chain_rawObject



46
# File 'lib/gtk3/container.rb', line 46

alias_method :focus_chain_raw, :focus_chain