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

Method setHorScrollBar

outdated/win/Qt3/qt3tableview.cpp:1500–1531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1498*/
1499
1500void QtTableView::setHorScrollBar( bool on, bool update )
1501{
1502 if ( on ) {
1503 tFlags |= Tbl_hScrollBar;
1504 horizontalScrollBar(); // created
1505 if ( update )
1506 updateScrollBars( horMask | verMask );
1507 else
1508 sbDirty = sbDirty | (horMask | verMask);
1509 if ( testTableFlags( Tbl_vScrollBar ) )
1510 coverCornerSquare( TRUE );
1511 if ( autoUpdate() )
1512 sbDirty = sbDirty | horMask;
1513 } else {
1514 tFlags &= ~Tbl_hScrollBar;
1515 if ( !hScrollBar )
1516 return;
1517 coverCornerSquare( FALSE );
1518 bool hideScrollBar = autoUpdate() && hScrollBar->isVisible();
1519 if ( hideScrollBar )
1520 hScrollBar->hide();
1521 if ( update )
1522 updateScrollBars( verMask );
1523 else
1524 sbDirty = sbDirty | verMask;
1525 if ( hideScrollBar && isVisible() )
1526 repaint( hScrollBar->x(), hScrollBar->y(),
1527 width() - hScrollBar->x(), hScrollBar->height() );
1528 }
1529 if ( update )
1530 updateFrameSize();
1531}
1532
1533
1534/*!

Callers

nothing calls this directly

Calls 1

heightMethod · 0.45

Tested by

no test coverage detected