def select_all_toggle(self, should_select):
        """Toggle (de)selection of all objs.

        Parameters
        ==========
        should_select (boolean)
            If true, all objs should be selected,
            otherwise they are all deselected.
        """
        ### clear the selection

        self.selected_objs.clear()
        self.active_obj = None

        ### if we must select...
        if should_select:

            ### select all objects

            self.selected_objs.extend(chain(APP_REFS.gm.nodes, APP_REFS.gm.text_blocks))

            ### try setting the active selection to the last
            ### selected object
            try:
                self.active_obj = self.selected_objs[-1]

            ### otherwise set the active selection to None
            except IndexError:
                self.active_obj = None
Toggle (de)selection of all objs.

        Parameters
        ==========
        should_select (boolean)
            If true, all objs should be selected,
            otherwise they are all deselected.
        
nodezator/editing/selection.py