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

Method GetBar

core/bars.go:111–118  ·  view source on GitHub ↗

GetBar returns Bar layout widget at given side, nil if not there.

(side styles.SideIndexes)

Source from the content-addressed store, hash-verified

109
110// GetBar returns Bar layout widget at given side, nil if not there.
111func (sc *Scene) GetBar(side styles.SideIndexes) *Frame {
112 nm := strings.ToLower(side.String()) + "-bar"
113 bar := sc.ChildByName(nm)
114 if bar != nil {
115 return bar.(*Frame)
116 }
117 return nil
118}
119
120// GetTopAppBar returns the TopAppBar Toolbar if it exists, nil otherwise.
121func (sc *Scene) GetTopAppBar() *Toolbar {

Callers 1

GetTopAppBarMethod · 0.95

Calls 2

ChildByNameMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected