A datasource if a source of data for a graphical object. The datas are always indexed by an integer.
Each real datasource has to implement a few functions :
A constructor for the datasource has the right to have parameters. When constructed it should update the available range and set the selected range to the available range.
get($index)
Return the data associated to the corresponding index.
is_available($index)
Tell if the data is available for the corresponding index.
update_value_range()
Update the minimum value and the maximum value.
get_selected_range()
Return the range of selected data.
Set the range of selected data.
get_available_range()
Return the range of available data.
Set the range of available data.
get_value_range()
Return the minimum and the maximum of the values available within the selected range.
set_min_value($min)
Set the minimum value.
set_max_value($max)
Set the maximum value.