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

Method SizeFinal

tensor/tensorcore/table.go:585–610  ·  view source on GitHub ↗

Header layout

()

Source from the content-addressed store, hash-verified

583// Header layout
584
585func (tb *Table) SizeFinal() {
586 tb.ListBase.SizeFinal()
587 lg := tb.ListGrid
588 sh := tb.SliceHeader()
589 sh.ForWidgetChildren(func(i int, cw core.Widget, cwb *core.WidgetBase) bool {
590 sgb := core.AsWidget(lg.Child(i))
591 gsz := &sgb.Geom.Size
592 if gsz.Actual.Total.X == 0 {
593 return tree.Continue
594 }
595 ksz := &cwb.Geom.Size
596 ksz.Actual.Total.X = gsz.Actual.Total.X
597 ksz.Actual.Content.X = gsz.Actual.Content.X
598 ksz.Alloc.Total.X = gsz.Alloc.Total.X
599 ksz.Alloc.Content.X = gsz.Alloc.Content.X
600 return tree.Continue
601 })
602 gsz := &lg.Geom.Size
603 ksz := &sh.Geom.Size
604 if gsz.Actual.Total.X > 0 {
605 ksz.Actual.Total.X = gsz.Actual.Total.X
606 ksz.Actual.Content.X = gsz.Actual.Content.X
607 ksz.Alloc.Total.X = gsz.Alloc.Total.X
608 ksz.Alloc.Content.X = gsz.Alloc.Content.X
609 }
610}
611
612// SelectedColumnStrings returns the string values of given column name.
613func (tb *Table) SelectedColumnStrings(colName string) []string {

Callers

nothing calls this directly

Implementers 1

_cogentcore_org_core_plot_plots_Tableyaegicore/symbols/cogentcore_org-core-

Calls 5

SliceHeaderMethod · 0.95
AsWidgetFunction · 0.92
ForWidgetChildrenMethod · 0.80
ChildMethod · 0.80
SizeFinalMethod · 0.65

Tested by

no test coverage detected