module Crysterm::Mixin::Children
Direct including types
Defined in:
mixin/children.crInstance Method Summary
-
#<<(widget : Widget)
Adds
element
to list of children. -
#>>(widget : Widget)
Removes
element
from list of children. -
#append(element)
Appends
element
to list of children -
#append(*elements)
Appends
element
s to list of children in the order given (first listed is first added) -
#children
Widget's children
Widget
s. -
#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
ev
on all parent nodes. -
#emit_descendants(ev : EventHandler::Event | EventHandler::Event.class) : Nil
Emits
ev
on all children nodes, recursively. -
#has_ancestor?(obj)
Returns true if
obj
is found in the list of parents, recursively -
#has_descendant?(obj)
Returns true if
obj
is found in the list of children, recursively -
#insert(element, i = -1)
Inserts
element
into list of children widgets -
#insert_after(element, other)
Adds node to the list of children after the specified
other
element -
#insert_before(element, other)
Adds node to the list of children before the specified
other
element -
#prepend(element)
Prepends node to the list of children
-
#remove(element)
Removes
element
from 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 element
s 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