()
| 99 | func (tb *TreeButton) WidgetValue() any { return &tb.Tree } |
| 100 | |
| 101 | func (tb *TreeButton) Init() { |
| 102 | tb.Button.Init() |
| 103 | tb.SetType(ButtonTonal).SetIcon(icons.Edit) |
| 104 | tb.Updater(func() { |
| 105 | path := "None" |
| 106 | if tb.Tree != nil { |
| 107 | path = tb.Tree.AsTree().String() |
| 108 | } |
| 109 | tb.SetText(path) |
| 110 | }) |
| 111 | InitValueButton(tb, true, func(d *Body) { |
| 112 | makeInspector(d, tb.Tree) |
| 113 | }) |
| 114 | } |
| 115 | |
| 116 | // TypeChooser represents a [types.Type] value with a chooser. |
| 117 | type TypeChooser struct { |
nothing calls this directly
no test coverage detected