    def __init__(self, canvas, palette, x, y, height, get_pos, set_pos, absolute=False):
        """
        :param canvas: The canvas on which to draw the scroll bar.
        :param palette: The palette of the parent Frame.
        :param x: The x location of the top of the scroll bar.
        :param y: The y location of the top of the scroll bar.
        :param height: The height of the scroll bar.
        :param get_pos: A function to return the current position of the scroll bar.
        :param set_pos: A function to set the current position of the scroll bar.
        :param absolute: Whether the scroll bar should use absolute co-ordinates when handling mouse
            events.

        The current position for the scroll bar is defined to be 0.0 at the top and 1.0 at the
        bottom.  The scroll bar will call `get_pos` to find the current position when drawing and
        uses `set_pos` to update this position on a mouse click.

        The widget using the scroll bar is responsible for maintaining its own state of where the
        current view is scrolled (e.g. which is the top line in a text box) and for providing
        these two functions to translate that internal state into a form the scroll bar can use.
        """
        self._canvas = canvas
        self.palette = palette
        self.max_height = 0
        self._x = x
        self._y = y
        self._height = height
        self._absolute = absolute
        self._get_pos = get_pos
        self._set_pos = set_pos
:param canvas: The canvas on which to draw the scroll bar.
:param palette: The palette of the parent Frame.
:param x: The x location of the top of the scroll bar.
:param y: The y location of the top of the scroll bar.
:param height: The height of the scroll bar.
:param get_pos: A function to return the current position of the scroll bar.
:param set_pos: A function to set the current position of the scroll bar.
:param absolute: Whether the scroll bar should use absolute co-ordinates when handling mouse
events.

The current position for the scroll bar is defined to be 0.0 at the top and 1.0 at the
bottom.  The scroll bar will call `get_pos` to find the current position when drawing and
uses `set_pos` to update this position on a mouse click.

The widget using the scroll bar is responsible for maintaining its own state of where the
current view is scrolled (e.g. which is the top line in a text box) and for providing
these two functions to translate that internal state into a form the scroll bar can use.
asciimatics/widgets/scrollbar.py