| 181 | } |
| 182 | |
| 183 | void ListBox::notifyMouseWheel(Widget* _sender, int _rel) |
| 184 | { |
| 185 | if (mRangeIndex <= 0) |
| 186 | return; |
| 187 | |
| 188 | if (mWidgetScroll == nullptr) |
| 189 | return; |
| 190 | |
| 191 | int offset = (int)mWidgetScroll->getScrollPosition(); |
| 192 | if (_rel < 0) |
| 193 | offset += mHeightLine; |
| 194 | else |
| 195 | offset -= mHeightLine; |
| 196 | |
| 197 | if (offset >= mRangeIndex) |
| 198 | offset = mRangeIndex; |
| 199 | else if (offset < 0) |
| 200 | offset = 0; |
| 201 | |
| 202 | if ((int)mWidgetScroll->getScrollPosition() == offset) |
| 203 | return; |
| 204 | |
| 205 | mWidgetScroll->setScrollPosition(offset); |
| 206 | _setScrollView(offset); |
| 207 | _sendEventChangeScroll(offset); |
| 208 | |
| 209 | _resetContainer(true); |
| 210 | } |
| 211 | |
| 212 | void ListBox::notifyScrollChangePosition(ScrollBar* _sender, size_t _position) |
| 213 | { |
nothing calls this directly
no test coverage detected