@classmethod
def hline(cls, x=None, y=None, char='-', n=None):
    """
        Insert a horizontal line at position, at most n characters or width of
        window.

        :param x: optional x value
        :param y: optional y value
        :param char: the character to print, default '-'
        :param n: the number of characters, default rest of width of window
        """
    x, y = cls._fix_xy(x, y)
    n = cls.WIDTH if n is None else n
    return cls.WINDOW.hline(y, x, char, n)
