def __init__(
        self,
        value=".",
        loop_holder=None,
        string_when_single=True,
        name="path_preview",
        width=155,
        draw_on_window_resize=empty_function,
        command=empty_function,
        coordinates_name="topleft",
        coordinates_value=(0, 0),
    ):
        """Store arguments and define button image.

        Parameters
        ==========

        value
        (string representing a path or tuple of strings
        representing pahts)
            initial value of the widget.
        string_when_single (bool)
            when more than one path is given, the value is
            always a tuple of strings, however, this
            parameter defines whether the value
            must be represented by a string when only
            a single path is given, rather than a tuple
            with a single string.
        name (string)
            an arbitrary name to help identify the widget.
        coordinates_name (string)
            represents attribute name of rect wherein
            to store the position information from the
            coordinates value parameter.
        coordinates_value (list/tuple/vector w/ 2 integers)
            represents the x and y coordinates of a
            position in 2d space.
        """
        ### store string_when_single argument
        self.string_when_single = string_when_single

        ### validate value received
        self.validate_value(value)

        ### store other arguments

        self.value = value
        self.name = name
        self.command = command
        self.width = width

        ### define control attribute for when there's
        ### more than one path listed
        self.path_index = 0

        ### entry to display/change index

        max_value = len(value) - 1 if not isinstance(value, str) else 0

        topleft = self.button_rects[1].move(1, 0).topright

        self.index_entry = IntFloatEntry(
            value=0,
            min_value=0,
            max_value=max_value,
            numeric_classes_hint="int",
            font_height=ICON_SURF.get_height() - 1,
            width=68,
            loop_holder=loop_holder,
            command=self.update_previewed_path_from_entry,
            draw_on_window_resize=draw_on_window_resize,
            position_reference_getter=(partial(GET_TOPLEFT, self)),
            coordinates_name="topleft",
            coordinates_value=topleft,
        )

        ### create surface for the widget

        self.image = render_rect(
            self.width,
            self.height,
            PATHPREVIEW_BG,
        )

        ### create rect from the image, then position it

        self.rect = self.image.get_rect()

        setattr(self.rect, coordinates_name, coordinates_value)

        ### update the image contents with the value
        self.update_image()
Store arguments and define button image.

        Parameters
        ==========

        value
        (string representing a path or tuple of strings
        representing pahts)
            initial value of the widget.
        string_when_single (bool)
            when more than one path is given, the value is
            always a tuple of strings, however, this
            parameter defines whether the value
            must be represented by a string when only
            a single path is given, rather than a tuple
            with a single string.
        name (string)
            an arbitrary name to help identify the widget.
        coordinates_name (string)
            represents attribute name of rect wherein
            to store the position information from the
            coordinates value parameter.
        coordinates_value (list/tuple/vector w/ 2 integers)
            represents the x and y coordinates of a
            position in 2d space.
        
nodezator/widget/pathpreview/base.py