def add_item(
        self,
        value=Sentinel,
        custom_command=True,
        quantity_command=True,
        reference_clickables=True,
        update_value=True,
    ):
        """Create new widget for the widget list.

        Accompanying buttons are also created.
        """
        ### if value is a sentinel, grab a new one from
        ### the default factory
        if value is Sentinel:
            value = self.default_factory()

        ### if the self.value will be updated, and thereby
        ### incremented, since this operation adds an item,
        ### we must only allow it if the resulting length
        ### won't be higher than the maximum allowed

        if update_value:

            ## get the resulting length
            resulting_length = len(self.value) + 1

            ## if resulting length isn't less than or
            ## equal the maximum length defined, we cancel
            ## this operation by returning earlier
            if not resulting_length <= self.max_len:
                return

        ### create a list to hold objects representing
        ### this item
        item_objs = List2D()

        ### instantiate and store moving buttons

        ## move up button

        move_up_on_mouse_release = get_oblivious_callable(
            partial(self.move_item_up, item_objs)
        )

        move_up_button = Object2D(
            image=MOVE_UP_BUTTON_SURF,
            rect=MOVE_UP_BUTTON_SURF.get_rect(),
            on_mouse_release=move_up_on_mouse_release,
        )

        ## move down button

        move_down_on_mouse_release = get_oblivious_callable(
            partial(self.move_item_down, item_objs)
        )

        move_down_button = Object2D(
            image=MOVE_DOWN_BUTTON_SURF,
            rect=MOVE_DOWN_BUTTON_SURF.get_rect(),
            on_mouse_release=move_down_on_mouse_release,
        )

        ### instantiate widget
        widget = self.widget_factory(value=value, command=self.command)

        ### instantiate delete button

        ## on_mouse_release command

        remove_on_mouse_release = get_oblivious_callable(
            partial(self.remove_item, item_objs)
        )

        ## obj

        remove_button = Object2D(
            image=REMOVE_BUTTON_SURF,
            rect=REMOVE_BUTTON_SURF.get_rect(),
            on_mouse_release=remove_on_mouse_release,
        )

        ### store all objects in the list

        item_objs.extend((move_up_button, move_down_button, widget, remove_button))

        ### position the objects side to side, aligning
        ### each object's midright with the next object's
        ### midleft, with just a bit of horizontal offset

        item_objs.rect.snap_rects_ip(
            retrieve_pos_from="midright", assign_pos_to="midleft", offset_pos_by=(5, 0)
        )

        ### align the item's topleft with the topleft of
        ### the add_button
        item_objs.rect.topleft = self.add_button.rect.topleft

        ### and position the add button below the item,
        ### adding a bit of padding
        self.add_button.rect.top = item_objs.rect.bottom + self.vertical_padding

        ### finally insert the item into the all_objects
        ### list, before the last item, which is the
        ### add button
        self.all_objects.insert(-1, item_objs)

        ### execute specific commands, if requested

        if custom_command:
            self.command()
        if quantity_command:
            self.quantity_command()
        if reference_clickables:
            self.reference_clickables()

        ### if requested, update the value of this widget
        if update_value:
            self.value = self.get()
Create new widget for the widget list.

        Accompanying buttons are also created.
        
nodezator/our3rdlibs/iterablewidget/op.py