MCPcopy Create free account
hub / github.com/cogentcore/core / Init

Method Init

core/values.go:101–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

99func (tb *TreeButton) WidgetValue() any { return &tb.Tree }
100
101func (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.
117type TypeChooser struct {

Callers

nothing calls this directly

Calls 9

InitValueButtonFunction · 0.85
makeInspectorFunction · 0.85
UpdaterMethod · 0.80
InitMethod · 0.65
SetIconMethod · 0.65
StringMethod · 0.65
AsTreeMethod · 0.65
SetTypeMethod · 0.45
SetTextMethod · 0.45

Tested by

no test coverage detected