class Opal::UI::Tree

Overview

Renders a hierarchical tree with branch connectors.

Defined in:

opal/ui/components/tree.cr

Constructors

Instance Method Summary

Instance methods inherited from class Opal::UI::Element

preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32) preferred_size, render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil render

Constructor Detail

def self.new(root_nodes : Array(TreeNode) = [] of TreeNode, title : String | Nil = nil) #

[View source]

Instance Method Detail

def add(node : TreeNode) : TreeNode #

[View source]
def add(label : String, color : Color | Symbol | String = :white, icon : String | Nil = nil) : TreeNode #

[View source]
def add(label : String, color : Color | Symbol | String = :white, icon : String | Nil = nil, &block : TreeNode -> Nil) : TreeNode #

[View source]
def preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32) #

[View source]
def render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil #

[View source]
def root_nodes : Array(TreeNode) #

[View source]
def title : String | Nil #

[View source]