VisibleColumnsInDisplayOrder returns a slice of visible columns in display order.
()
| 625 | // VisibleColumnsInDisplayOrder returns a slice of visible columns in display |
| 626 | // order. |
| 627 | func (tv *TableView) VisibleColumnsInDisplayOrder() []*TableViewColumn { |
| 628 | visibleCols := tv.visibleColumns() |
| 629 | indices := make([]int32, len(visibleCols)) |
| 630 | |
| 631 | frozenCount := tv.visibleFrozenColumnCount() |
| 632 | normalCount := len(visibleCols) - frozenCount |
| 633 | |
| 634 | if frozenCount > 0 { |
| 635 | if win.FALSE == win.SendMessage(tv.hwndFrozenLV, win.LVM_GETCOLUMNORDERARRAY, uintptr(frozenCount), uintptr(unsafe.Pointer(&indices[0]))) { |
| 636 | newError("LVM_GETCOLUMNORDERARRAY") |
| 637 | return nil |
| 638 | } |
| 639 | } |
| 640 | if normalCount > 0 { |
| 641 | if win.FALSE == win.SendMessage(tv.hwndNormalLV, win.LVM_GETCOLUMNORDERARRAY, uintptr(normalCount), uintptr(unsafe.Pointer(&indices[frozenCount]))) { |
| 642 | newError("LVM_GETCOLUMNORDERARRAY") |
| 643 | return nil |
| 644 | } |
| 645 | } |
| 646 | |
| 647 | orderedCols := make([]*TableViewColumn, len(visibleCols)) |
| 648 | |
| 649 | for i, j := range indices { |
| 650 | if i >= frozenCount { |
| 651 | j += int32(frozenCount) |
| 652 | } |
| 653 | orderedCols[i] = visibleCols[j] |
| 654 | } |
| 655 | |
| 656 | return orderedCols |
| 657 | } |
| 658 | |
| 659 | // RowsPerPage returns the number of fully visible rows. |
| 660 | func (tv *TableView) RowsPerPage() int { |
nothing calls this directly
no test coverage detected