def get_recent_file_objs(recent_files):
    """Return custom "recent file" objects.

    That is, objects which load a recent file when clicked
    (when the mouse is released, actually).

    Parameters
    ==========
    recent_files (list)
        if not empty, each item in this list is a string
        representing the path to a previously opened file.
    """
    ### instantiate a custom list
    objs = List2D()

    ### if there are no paths listed, return the empty list,
    ### exiting the function
    if not recent_files:
        return objs

    ### otherwise, create objects representing the first
    ### files in the list

    ## instantiate and store a label with
    ## 'Open recent files..' as its text

    recent_files_label = Object2D.from_surface(
        render_text(text=t.splash_screen.open_recent_files, **TEXT_SETTINGS)
    )

    objs.append(recent_files_label)

    ## define an initial topleft for the next objects
    topleft = recent_files_label.rect.move(10, 5).bottomleft

    ## reference the 'open()' method of the window manager
    window_manager_open = APP_REFS.wm.open

    ## iterate over the 08 most recent files among the ones
    ## listed, creating the "recent file" objects;
    ##
    ## the quantity of files was chosen arbitrarily, based
    ## on what looked best next to the other elements;

    for filepath in recent_files[:8]:

        ## obtain text

        text_surf = render_text(
            text=filepath.name,
            **{
                **TEXT_SETTINGS,
                "max_width": 300,
            },
        )

        ## instantiate

        recent_file_obj = Object2D.from_surface(
            combine_surfaces(
                [NATIVE_FILE_ICON, text_surf],
                retrieve_pos_from="midright",
                assign_pos_to="midleft",
                offset_pos_by=(3, 0),
            )
        )

        ## set 'on_mouse_release' command to load the file

        recent_file_obj.on_mouse_release = get_oblivious_callable(
            partial(window_manager_open, filepath)
        )

        ## position the object
        recent_file_obj.rect.topleft = topleft

        ## update the topleft used so the next object is
        ## properly positioned if there is one
        topleft = recent_file_obj.rect.move(0, 3).bottomleft

        ## store the recent file object
        objs.append(recent_file_obj)

    ### finally return the list of objects
    return objs
Return custom "recent file" objects.

    That is, objects which load a recent file when clicked
    (when the mouse is released, actually).

    Parameters
    ==========
    recent_files (list)
        if not empty, each item in this list is a string
        representing the path to a previously opened file.
    
nodezator/splashscreen/factoryfuncs.py