change to use new scroll events
use c++ style casts
Merge pull request #911 from akdor1154/pixelScrollingPatch

change to use new scroll events