MCPcopy Create free account
hub / github.com/NetHack/NetHack / lastColVisible

Method lastColVisible

outdated/win/Qt3/qt3tableview.cpp:1029–1044  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1027*/
1028
1029int QtTableView::lastColVisible() const
1030{
1031 int cellMaxX;
1032 int col = findRawCol( maxViewX(), &cellMaxX );
1033 if ( col == -1 || col >= nCols ) { // maxViewX() past end?
1034 col = nCols - 1; // yes: return last col
1035 } else {
1036 if ( testTableFlags(Tbl_cutCellsH) && cellMaxX > maxViewX() ) {
1037 if ( col == xCellOffs ) // cut by bottom margin?
1038 return -1; // yes, nothing in the view
1039 else
1040 col = col - 1; // cell by margin, one back
1041 }
1042 }
1043 return col;
1044}
1045
1046/*!
1047 Returns TRUE if \a row is at least partially visible.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected