Module: Glimmer::LibUI::Parent
- Included in:
- ControlProxy, ControlProxy::AreaProxy, ControlProxy::ImageProxy, ControlProxy::MenuProxy, ControlProxy::OpenTypeFeaturesProxy, ControlProxy::PathProxy, ControlProxy::TextProxy, Shape
- Defined in:
- lib/glimmer/libui/parent.rb
Overview
Parent controls and shapes who have children and add child post_initialize_child
Instance Method Summary collapse
- #children ⇒ Object
-
#post_initialize_child(child, add_child: true) ⇒ Object
Subclasses can override and must call super (passing add_child: false to cancel adding child to children).
Instance Method Details
#children ⇒ Object
31 32 33 |
# File 'lib/glimmer/libui/parent.rb', line 31 def children @children ||= [] end |
#post_initialize_child(child, add_child: true) ⇒ Object
Subclasses can override and must call super (passing add_child: false to cancel adding child to children)
27 28 29 |
# File 'lib/glimmer/libui/parent.rb', line 27 def post_initialize_child(child, add_child: true) children << child if add_child end |