struct

Phosphor::TreeNode

Inherits Struct < Value < Object

One node in the tree TreeMock renders.

depth is already resolved by the owning Widget#syncTreeMock never computes it. Style fields are already-resolved Style values — never theme names; the Widget layer is the only place that touches the theme.

Constructors

new(label : String, children : Array(TreeNode) = [] of TreeNode, expanded : Bool = false, depth : Int32 = 0, style : Style = Style.default, expanded_style : Style = Style.default, selected_style : Style = Style.new.reverse)
Source

Instance methods

children
clone
Source
copy_with(label _label = @label, children _children = @children, expanded _expanded = @expanded, depth _depth = @depth, style _style = @style, expanded_style _expanded_style = @expanded_style, selected_style _selected_style = @selected_style)
Source
depth
expanded
expanded_style
label
selected_style
style