def __init__(
        self,
        value="",
        options=("",),
        max_width=155,
        font_path=ENC_SANS_BOLD_FONT_PATH,
        font_height=ENC_SANS_BOLD_FONT_HEIGHT,
        antialiased=True,
        foreground_color=OPTION_TRAY_FG,
        background_color=OPTION_TRAY_BG,
        selected_foreground_color=(OPTION_TRAY_SELECTED_FG),
        selected_background_color=(OPTION_TRAY_SELECTED_BG),
        name="option_tray",
        coordinates_name="topleft",
        coordinates_value=(0, 0),
        command=empty_function,
    ):
        """Store data and perform setups.

        Parameters
        ==========

        value (string, integer, float, bool or None)
            value assumed by the widget. Must be present
            in the 'options' argument.
        options (iterable of values)
            values the widget is allowed to assume. Each
            value in the options must be of type str, int,
            float, bool or must be None.
        max_width (integer)
            maximum widget width in pixels.
        font_path (string)
            a key used to define which font file to used;
            for available keys, check the FONT_PATH_MAP
            dictionary in textman/font.py.
        font_height (integer)
            font height in pixels.
        antialiased (boolean)
            indicates whether the text should be antialiased
            or not.
        foreground_color (sequence of integers)
            the integers represent the values of red, blue
            and green channels respectively, with values
            from 0 to 255, all inclusive; the color is
            used for the text.
        background_color (sequence of integers)
            same as foreground color, but used for the
            background.
        selected_foreground_color (sequence of integers)
            same as foreground color, but used for the
            foreground of the selected option.
        selected_background_color (sequence of integers)
            same as foreground color, but used for the
            background of the selected option.
        name (string)
            an optional arbitrary string which is stored
            in the 'name' attribute of the instance;
            may be used to help identify the widget.
        coordinates_name (string)
            attribute name of pygame.Rect wherein to set the
            position information from the coordinates value
            parameter.
        coordinates_value (2-tuple of integers)
            represents a position in 2d space; the values of
            x and y axes, respectively.
        command (callable)
            callable executed whenever an option is selected.
        """
        ### store max width, font height and font key

        self.max_width = max_width
        self.font_height = font_height
        self.font_path = font_path

        ### make sure options is a list
        options = list(options)

        ### validate value and options
        self.validate_value_and_options(value, options)

        ### store value and options

        self.value = value
        self.options = options

        ### store other attributes

        self.command = command
        self.name = name

        ### gather text style data for each kind of text
        ### surfaces to be created

        self.normal_text_settings = {
            "font_path": font_path,
            "font_height": font_height,
            "antialiased": antialiased,
            "foreground_color": foreground_color,
            "background_color": background_color,
        }

        self.selected_text_settings = {
            "font_path": font_path,
            "font_height": font_height,
            "antialiased": antialiased,
            "foreground_color": selected_foreground_color,
            "background_color": selected_background_color,
        }

        ### set the surface map and right coordinates
        self.set_surface_map_and_right_coordinates()

        ### position the rect
        setattr(self.rect, coordinates_name, coordinates_value)
Store data and perform setups.

        Parameters
        ==========

        value (string, integer, float, bool or None)
            value assumed by the widget. Must be present
            in the 'options' argument.
        options (iterable of values)
            values the widget is allowed to assume. Each
            value in the options must be of type str, int,
            float, bool or must be None.
        max_width (integer)
            maximum widget width in pixels.
        font_path (string)
            a key used to define which font file to used;
            for available keys, check the FONT_PATH_MAP
            dictionary in textman/font.py.
        font_height (integer)
            font height in pixels.
        antialiased (boolean)
            indicates whether the text should be antialiased
            or not.
        foreground_color (sequence of integers)
            the integers represent the values of red, blue
            and green channels respectively, with values
            from 0 to 255, all inclusive; the color is
            used for the text.
        background_color (sequence of integers)
            same as foreground color, but used for the
            background.
        selected_foreground_color (sequence of integers)
            same as foreground color, but used for the
            foreground of the selected option.
        selected_background_color (sequence of integers)
            same as foreground color, but used for the
            background of the selected option.
        name (string)
            an optional arbitrary string which is stored
            in the 'name' attribute of the instance;
            may be used to help identify the widget.
        coordinates_name (string)
            attribute name of pygame.Rect wherein to set the
            position information from the coordinates value
            parameter.
        coordinates_value (2-tuple of integers)
            represents a position in 2d space; the values of
            x and y axes, respectively.
        command (callable)
            callable executed whenever an option is selected.
        
nodezator/widget/optiontray/main.py