def get_focus(self, event):
        """Perform setups and get focus to itself.

        "Getting focus" means assuming control of the
        application loop.

        This method is aliased as "on_mouse_click" to
        comply with the mouse interaction protocol.

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

            although the argument is not used, it is
            required in order to comply with protocol
            used; when needed it can be used to retrieve
            the position of the mouse click, for instance.

            Check pygame.event module documentation on
            pygame website for more info about this event
            object.
        """
        ### assign behaviours

        self.update = self.update_focused
        self.draw = self.draw_focused
        self.handle_input = self.handle_events

        ### if app is not in play mode, enable text editing events
        ### and set the text input rect

        if GENERAL_NS.mode_name != 'play':

            start_text_input()
            set_text_input_rect(self.rect.move(0, 20))

        ### align line topleft with self.rect.topleft and
        ### move cursor to the end of the contents

        self.cursor.line.rect.topleft = self.rect.topleft
        self.cursor.go_to_end()

        ### store topleft left position for later
        ### reference if needed
        self.last_topleft = self.rect.topleft

        ### give focus to self by raising a manager switch
        ### exception with a reference to this widget
        raise SwitchLoopException(self)
Perform setups and get focus to itself.

        "Getting focus" means assuming control of the
        application loop.

        This method is aliased as "on_mouse_click" to
        comply with the mouse interaction protocol.

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

            although the argument is not used, it is
            required in order to comply with protocol
            used; when needed it can be used to retrieve
            the position of the mouse click, for instance.

            Check pygame.event module documentation on
            pygame website for more info about this event
            object.
        
nodezator/widget/literalentry.py