| 428 | } |
| 429 | |
| 430 | void TreeControl::notifyMouseWheel(Widget* pSender, int nValue) |
| 431 | { |
| 432 | if (mnScrollRange <= 0) |
| 433 | return; |
| 434 | |
| 435 | int nPosition = (int)mpWidgetScroll->getScrollPosition(); |
| 436 | if (nValue < 0) |
| 437 | nPosition += mnItemHeight; |
| 438 | else |
| 439 | nPosition -= mnItemHeight; |
| 440 | |
| 441 | if (nPosition >= mnScrollRange) |
| 442 | nPosition = mnScrollRange; |
| 443 | else if (nPosition < 0) |
| 444 | nPosition = 0; |
| 445 | |
| 446 | if ((int)mpWidgetScroll->getScrollPosition() == nPosition) |
| 447 | return; |
| 448 | |
| 449 | mpWidgetScroll->setScrollPosition(nPosition); |
| 450 | |
| 451 | scrollTo(nPosition); |
| 452 | sendScrollingEvents(nPosition); |
| 453 | } |
| 454 | |
| 455 | void TreeControl::notifyMouseDoubleClick(Widget* pSender) |
| 456 | { |
nothing calls this directly
no test coverage detected