def __init__(
        self,
        value="",
        font_height=ENC_SANS_BOLD_FONT_HEIGHT,
        font_path="sans_bold",
        width=155,
        no_of_visible_lines=7,
        syntax_highlighting="",
        show_line_number=False,
        name="text_display",
        command=empty_function,
        validation_command=None,
        coordinates_name="topleft",
        coordinates_value=(0, 0),
    ):
        """Store data and perform setups.

        Parameters
        ==========

        value (string)
            text used as value of the widget.
        syntax_highlighting (string)
            string hinting the syntax highlighting behaviour;
            if empty, no syntax highlighting is applied
            when editing the text; if not empty, the string
            must indicate which syntax to use for the
            highlighting; for now, only 'python' (for
            Python code syntax) and 'comment' (a subset
            of Python code highlighting to highlight
            special "todo" words) are available.
        show_line_number (bool)
            indicates whether to show the line numbers
            or not, when editing the text.
        font_path (string)
            indicates the font style to be used when
            editing the contents. Defaults to 'sans_bold',
            which uses the normal font of the app. You can
            also use 'mono_bold', which uses a monospace
            font when editing the text (for instance, if
            the text you want to edit is code).
        width (integer)
            width of the widget.
        no_of_visible_lines (positive integer)
            number of lines that can be seen in the
            widget.
        name (string)
            an arbitrary name to help identify the widget;
            it is assigned to the 'name' attribute.
        validation_command (None, string or callable)
            if it is None, the instance is set up so that
            no validation is done.

            If it is a string, it must be a key in a
            preset map used to grab a valid command.

            If it is a callable, it must accept a single
            argument and its return value is used to
            determine whether validation passed (when the
            return value is truthy value) or not (when it
            is not truthy).
        coordinates_name (string)
            represents attribute name of a pygame.Rect
            instance wherein to store the position
            information from the coordinates value parameter.
        coordinates_value (sequence w/ 2 integers)
            represents the x and y coordinates of a
            position in 2d space.
        """
        ### ensure value argument received is a string

        if type(value) is not str:

            raise TypeError("'value' received must be of 'str' type")

        ### ensure there is at least one visible line

        if no_of_visible_lines < 1:

            raise ValueError("'no_of_visible_lines' must be >= 1")

        ### process and store the font_path argument;
        ###
        ### besides the font path, the font path itself
        ### may also be a key from the FONT_PATH_MAP,
        ### in which case it is replaced by the
        ### proper path

        try:
            font_path = FONT_PATH_MAP[font_path]
        except KeyError:
            pass

        self.font_path = font_path

        ### store other arguments

        self.value = value
        self.font_height = font_height

        self.syntax_highlighting = syntax_highlighting
        self.show_line_number = show_line_number

        self.width = width
        self.no_of_visible_lines = no_of_visible_lines

        self.command = command
        self.name = name

        ### setup validation: since 'validation_command'
        ### is a property with setter implementation, this
        ### assignment triggers setups for the validation
        ### command
        self.validation_command = validation_command

        ### create a surface to clean the image attribute
        ### surface every time the value changes

        height = ICON_HEIGHT + (font_height * no_of_visible_lines) + 3

        self.clean_surf = render_rect(width, height, TEXT_DISPLAY_BG)

        ### use blit aligned to blit icon aligned to the
        ### topleft

        blit_aligned(
            ICON_SURF,
            self.clean_surf,
            retrieve_pos_from="topleft",
            assign_pos_to="topleft",
            offset_pos_by=(1, 1),
        )

        ### create an image from the clean surf
        self.image = self.clean_surf.copy()

        ### prepare style data
        self.prepare_style_data()

        ### update the image contents with the value
        self.update_image()

        ### create rect from the image attribute and
        ### position it

        self.rect = self.image.get_rect()
        setattr(self.rect, coordinates_name, coordinates_value)
Store data and perform setups.

        Parameters
        ==========

        value (string)
            text used as value of the widget.
        syntax_highlighting (string)
            string hinting the syntax highlighting behaviour;
            if empty, no syntax highlighting is applied
            when editing the text; if not empty, the string
            must indicate which syntax to use for the
            highlighting; for now, only 'python' (for
            Python code syntax) and 'comment' (a subset
            of Python code highlighting to highlight
            special "todo" words) are available.
        show_line_number (bool)
            indicates whether to show the line numbers
            or not, when editing the text.
        font_path (string)
            indicates the font style to be used when
            editing the contents. Defaults to 'sans_bold',
            which uses the normal font of the app. You can
            also use 'mono_bold', which uses a monospace
            font when editing the text (for instance, if
            the text you want to edit is code).
        width (integer)
            width of the widget.
        no_of_visible_lines (positive integer)
            number of lines that can be seen in the
            widget.
        name (string)
            an arbitrary name to help identify the widget;
            it is assigned to the 'name' attribute.
        validation_command (None, string or callable)
            if it is None, the instance is set up so that
            no validation is done.

            If it is a string, it must be a key in a
            preset map used to grab a valid command.

            If it is a callable, it must accept a single
            argument and its return value is used to
            determine whether validation passed (when the
            return value is truthy value) or not (when it
            is not truthy).
        coordinates_name (string)
            represents attribute name of a pygame.Rect
            instance wherein to store the position
            information from the coordinates value parameter.
        coordinates_value (sequence w/ 2 integers)
            represents the x and y coordinates of a
            position in 2d space.
        
nodezator/widget/textdisplay.py