MCPcopy
hub / github.com/g3n/engine / rowsHeight

Method rowsHeight

gui/table.go:1420–1435  ·  view source on GitHub ↗

rowsHeight returns the available start y coordinate and height in the table for rows, considering the visibility of the header and status panels.

()

Source from the content-addressed store, hash-verified

1418// rowsHeight returns the available start y coordinate and height in the table for rows,
1419// considering the visibility of the header and status panels.
1420func (t *Table) rowsHeight() (float32, float32) {
1421
1422 start := float32(0)
1423 height := t.ContentHeight()
1424 if t.header.Visible() {
1425 height -= t.header.Height()
1426 start += t.header.Height()
1427 }
1428 if t.statusPanel.Visible() {
1429 height -= t.statusPanel.Height()
1430 }
1431 if height < 0 {
1432 return 0, 0
1433 }
1434 return start, height
1435}
1436
1437// setVScrollBar sets the visibility state of the vertical scrollbar
1438func (t *Table) setVScrollBar(state bool) {

Callers 3

recalcMethod · 0.95
setVScrollBarMethod · 0.95
calcMaxFirstMethod · 0.95

Calls 3

ContentHeightMethod · 0.80
VisibleMethod · 0.65
HeightMethod · 0.65

Tested by

no test coverage detected