Class: Gtk::Box
- Inherits:
-
Object
- Object
- Gtk::Box
- Extended by:
- GLib::Deprecatable
- Defined in:
- lib/gtk3/box.rb,
lib/gtk3/deprecated.rb
Instance Method Summary collapse
-
#initialize(orientation, spacing = 0) ⇒ Box
constructor
A new instance of Box.
- #initialize_raw ⇒ Object
- #pack_end(child, options = {}) ⇒ Object
- #pack_end_raw ⇒ Object
- #pack_start(child, options = {}) ⇒ Object
- #pack_start_raw ⇒ Object
- #set_child_packing(child, options = {}) ⇒ Object
- #set_child_packing_raw ⇒ Object
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_raw ⇒ Object
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, ={}) = [:expand] || false fill = [:fill] || false padding = [:padding] || 0 pack_end_raw(child, , fill, padding) end |
#pack_end_raw ⇒ Object
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, ={}) = [:expand] || false fill = [:fill] || false padding = [:padding] || 0 pack_start_raw(child, , fill, padding) end |
#pack_start_raw ⇒ Object
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, ={}) = [:expand] fill = [:fill] padding = [:padding] pack_type = [:pack_type] , old_fill, old_padding, old_pack_type = query_child_packing(child) = if .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, , fill, padding, pack_type) end |
#set_child_packing_raw ⇒ Object
40 |
# File 'lib/gtk3/box.rb', line 40 alias_method :set_child_packing_raw, :set_child_packing |