module Crysterm::Mixin::Children
Direct including types
Defined in:
mixin/children.crInstance Method Summary
-
#<<(widget : Widget)
Adds
elementto list of children. -
#>>(widget : Widget)
Removes
elementfrom list of children. -
#append(element)
Appends
elementto list of children -
#append(*elements)
Appends
elements to list of children in the order given (first listed is first added) -
#children
Widget's children
Widgets. -
#collect_ancestors(el : Widget) : Array(Widget)
Returns a flat list of all parent widgets, recursively
-
#collect_descendants(el : Widget) : Array(Widget)
Returns a flat list of all children widgets, recursively
-
#each_ancestor(&block : Proc(Widget, Nil)) : Nil
Runs a particular block for all ancestors, recursively
-
#each_descendant(&block : Proc(Widget, Nil)) : Nil
Runs a particular block for all descendants, recursively
-
#emit_ancestors(ev : EventHandler::Event | EventHandler::Event.class) : Nil
Emits
evon all parent nodes. -
#emit_descendants(ev : EventHandler::Event | EventHandler::Event.class) : Nil
Emits
evon all children nodes, recursively. -
#has_ancestor?(obj)
Returns true if
objis found in the list of parents, recursively -
#has_descendant?(obj)
Returns true if
objis found in the list of children, recursively -
#insert(element, i = -1)
Inserts
elementinto list of children widgets -
#insert_after(element, other)
Adds node to the list of children after the specified
otherelement -
#insert_before(element, other)
Adds node to the list of children before the specified
otherelement -
#prepend(element)
Prepends node to the list of children
-
#remove(element)
Removes
elementfrom list of children widgets -
#self_and_each_ancestor(&block : Proc(Widget, Nil)) : Nil
Runs a particular block for self and all ancestors, recursively
-
#self_and_each_descendant(&block : Proc(Widget, Nil)) : Nil
Runs a particular block for self and all descendants, recursively
Instance Method Detail
Adds element to list of children. Convenience method identical to #append
Removes element from list of children. Convenience method identical to #remove
Appends elements to list of children in the order given (first listed is first added)
Returns a flat list of all parent widgets, recursively
Returns a flat list of all children widgets, recursively
Runs a particular block for all ancestors, recursively
Runs a particular block for all descendants, recursively
Emits ev on all parent nodes.
Emits ev on all children nodes, recursively.
Adds node to the list of children after the specified other element
Adds node to the list of children before the specified other element
Runs a particular block for self and all ancestors, recursively
Runs a particular block for self and all descendants, recursively