A discussion with a user of the German Lazarus forum gave me the idea that the TDatapointDistanceTool could be generalized for other measurement tasks.
You drag a horizontal line across the region of interest, and the new tool fits a polynomial to the data in that range. A polynomial of degree 0 would yield the mean value in the selected range, a polyomial of degree 1 allows to determine the slope (very important in technical and physical applications), and a polynomial of degree 2 around a peak allows to identify the coordinates of the peak.
In the attachment I am posting a little application in which the events of the TDatapointDistanceTool are used to perform the calculations and to display the results.
Maybe this is of interest for somebody. Ideally, the code could be put into a separate "TFitTool" but some changes in the underlying infrastructure are needed to get rid of some unnecessary properties of the distance tool.