Class: Gtk::Container
- Inherits:
-
Object
- Object
- Gtk::Container
- Extended by:
- GLib::Deprecatable
- Includes:
- Enumerable
- Defined in:
- lib/gtk3/container.rb,
lib/gtk3/deprecated.rb
Instance Method Summary collapse
- #<<(widget) ⇒ Object
- #add(child, properties = {}) ⇒ Object
- #add_raw ⇒ Object
- #child_get_property(child, name) ⇒ Object
- #child_get_property_raw ⇒ Object
- #focus_chain ⇒ Object
- #focus_chain_raw ⇒ Object
Instance Method Details
#<<(widget) ⇒ Object
34 35 36 37 |
# File 'lib/gtk3/container.rb', line 34 def <<() add() self end |
#add(child, properties = {}) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/gtk3/container.rb', line 22 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_raw ⇒ Object
21 |
# File 'lib/gtk3/container.rb', line 21 alias_method :add_raw, :add |
#child_get_property(child, name) ⇒ Object
50 51 52 53 54 55 |
# File 'lib/gtk3/container.rb', line 50 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_raw ⇒ Object
49 |
# File 'lib/gtk3/container.rb', line 49 alias_method :child_get_property_raw, :child_get_property |
#focus_chain ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'lib/gtk3/container.rb', line 40 def focus_chain set_explicitly, = focus_chain_raw if set_explicitly else nil end end |
#focus_chain_raw ⇒ Object
39 |
# File 'lib/gtk3/container.rb', line 39 alias_method :focus_chain_raw, :focus_chain |