Module: Iup::DynamicFillMethods
- Included in:
- BackgroundBox, GridBox, HBox, Radio, ScrollBox, SplitBox, StretchBox, VBox, ZBox
- Defined in:
- lib/wrapped/dynamic-fill-methods.rb
Overview
Methods for containers where the child elements can be added after construction.
Instance Method Summary collapse
-
#append(child) ⇒ Object
Inserts an element at the end of the container, after the last element of the container.
-
#insert(ref_child, new_child) ⇒ Object
Inserts an element before another child of the container.
Instance Method Details
#append(child) ⇒ Object
Inserts an element at the end of the container, after the last element of the container.
9 10 11 |
# File 'lib/wrapped/dynamic-fill-methods.rb', line 9 def append child IupLib.IupAppend(@handle, child.handle) end |
#insert(ref_child, new_child) ⇒ Object
Inserts an element before another child of the container.
14 15 16 17 18 19 20 |
# File 'lib/wrapped/dynamic-fill-methods.rb', line 14 def insert(ref_child, new_child) if ref_child.nil? IupLib.IupInsert(@handle, nil, new_child.handle) else IupLib.IupInsert(@handle, ref_child.handle, new_child.handle) end end |