def on_mouse_action(self, method_name, event):
        """Behave according to given method name.

        When the method name is 'on_mouse_click' or
        'on_mouse_release', works by marking/unmarking
        the text block as a target of the mouse click.
        Additionally, when the 'on_mouse_release' event
        also triggers the editing assistant method to
        check whether the object must have its selected
        state changed.

        The flags are used to support the
        "move by dragging" features.

        When the method name is 'on_right_mouse_release',
        presents the popup menu for text blocks.

        Parameters
        ==========
        event
            (pygame.event.Event of
            pygame.MOUSEBUTTONDOWN/MOUSEBUTTONUP type)

            though we don't use it in this method, it is
            required in order to comply with protocol used;

            Check pygame.event module documentation on
            pygame website for more info about this event
            object.
        """
        if method_name == "on_mouse_click":
            self.mouse_click_target = True

        elif method_name == "on_mouse_release":

            self.mouse_click_target = False
            APP_REFS.ea.change_selection_state(self)

        elif method_name == "on_right_mouse_release":

            (APP_REFS.ea.text_block_popup_menu.show(self, event.pos))
Behave according to given method name.

        When the method name is 'on_mouse_click' or
        'on_mouse_release', works by marking/unmarking
        the text block as a target of the mouse click.
        Additionally, when the 'on_mouse_release' event
        also triggers the editing assistant method to
        check whether the object must have its selected
        state changed.

        The flags are used to support the
        "move by dragging" features.

        When the method name is 'on_right_mouse_release',
        presents the popup menu for text blocks.

        Parameters
        ==========
        event
            (pygame.event.Event of
            pygame.MOUSEBUTTONDOWN/MOUSEBUTTONUP type)

            though we don't use it in this method, it is
            required in order to comply with protocol used;

            Check pygame.event module documentation on
            pygame website for more info about this event
            object.
        
nodezator/graphman/textblock/main.py