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

Method setAllColumns

plot/plotcore/ploteditor.go:439–457  ·  view source on GitHub ↗

setAllColumns turns all Columns on or off (except X axis)

(on bool)

Source from the content-addressed store, hash-verified

437
438// setAllColumns turns all Columns on or off (except X axis)
439func (pl *PlotEditor) setAllColumns(on bool) {
440 fr := pl.columnsFrame
441 for i, cli := range fr.Children {
442 if i < plotColumnsHeaderN {
443 continue
444 }
445 ci := i - plotColumnsHeaderN
446 cp := pl.Columns[ci]
447 if cp.Column == pl.Options.XAxis {
448 continue
449 }
450 cp.On = on
451 cl := cli.(*core.Frame)
452 sw := cl.Child(0).(*core.Switch)
453 sw.SetChecked(cp.On)
454 }
455 pl.UpdatePlot()
456 pl.NeedsRender()
457}
458
459// setColumnsByName turns columns on or off if their name contains
460// the given string.

Callers 1

makeColumnsMethod · 0.95

Calls 4

UpdatePlotMethod · 0.95
ChildMethod · 0.80
SetCheckedMethod · 0.80
NeedsRenderMethod · 0.80

Tested by

no test coverage detected