Class: Gtk::Box

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

Instance Method Summary collapse

Constructor Details

#initialize(orientation, spacing = 0) ⇒ Box

Returns a new instance of Box.



20
21
22
# File 'lib/gtk3/box.rb', line 20

def initialize(orientation, spacing=0)
  initialize_raw(orientation, spacing || 0)
end

Instance Method Details

#initialize_rawObject



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

alias_method :initialize_raw, :initialize

#pack_end(child, options = {}) ⇒ Object



33
34
35
36
37
38
# File 'lib/gtk3/box.rb', line 33

def pack_end(child, options={})
  expand  = options[:expand]  || false
  fill    = options[:fill]    || false
  padding = options[:padding] || 0
  pack_end_raw(child, expand, fill, padding)
end

#pack_end_rawObject



32
# File 'lib/gtk3/box.rb', line 32

alias_method :pack_end_raw, :pack_end

#pack_start(child, options = {}) ⇒ Object



25
26
27
28
29
30
# File 'lib/gtk3/box.rb', line 25

def pack_start(child, options={})
  expand  = options[:expand]  || false
  fill    = options[:fill]    || false
  padding = options[:padding] || 0
  pack_start_raw(child, expand, fill, padding)
end

#pack_start_rawObject



24
# File 'lib/gtk3/box.rb', line 24

alias_method :pack_start_raw, :pack_start

#set_child_packing(child, options = {}) ⇒ Object



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/gtk3/box.rb', line 41

def set_child_packing(child, options={})
  expand    = options[:expand]
  fill      = options[:fill]
  padding   = options[:padding]
  pack_type = options[:pack_type]

  old_expand, old_fill, old_padding, old_pack_type =
    query_child_packing(child)

  expand    = old_expand    if expand.nil?
  fill      = old_fill      if fill.nil?
  padding   = old_padding   if padding.nil?
  pack_type = old_pack_type if pack_type.nil?

  set_child_packing_raw(child,
                        expand,
                        fill,
                        padding,
                        pack_type)
end

#set_child_packing_rawObject



40
# File 'lib/gtk3/box.rb', line 40

alias_method :set_child_packing_raw, :set_child_packing