Class: Gtk::Container

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

Instance Method Summary collapse

Instance Method Details

#add(child, properties = {}) ⇒ Object Also known as: <<



20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/gtk3/container.rb', line 20

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

#add_child(*args) ⇒ Object



34
35
36
37
38
39
40
# File 'lib/gtk3/container.rb', line 34

def add_child(*args)
  if args.size == 1
    add(*args)
  else
    super
  end
end

#add_rawObject



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

alias_method :add_raw, :add

#child_get_property(child, name) ⇒ Object



55
56
57
58
59
60
# File 'lib/gtk3/container.rb', line 55

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



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

alias_method :child_get_property_raw, :child_get_property

#focus_chainObject



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

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

#focus_chain_rawObject



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

alias_method :focus_chain_raw, :focus_chain