Check to see that the mouse is within the boundries of the bar.
Check the current mouse position to see if it is within the bounds of the adjustment bar. It is only necessary to check if the mouse is with in one direction of the bar's alloted space. For example, we only care if the mouse is within the y-range of a vertical adjustment.
Get the adjustment value based on a new bar position.
Sometimes it is necessary to first set the position of the bar and then the value of the adjustment. This method calculates the value based on the current bar position and a change in the bar's position. This method is mostly used for dragging the bar within the track while scrolling.