def repaint
      return unless @repaint_required
 
      # 2014-08-10 - 14:53 changing bgcolor or color resets color_pair, so this must be reset if nil
      @color_pair ||= get_color $bottomcolor, @color, @bgcolor
      #print_header(htext, posy = 0, posx = 0)
      att = get_attrib @attr
      len = @window.width
      len = Ncurses.COLS-0 if len == 0
      # print a bar across the screen 
      @window.attron(Ncurses.COLOR_PAIR(@color_pair) | att)
      # 2016-01-13 - changed since "1" was giving problems in mvhline in some cases
      #@window.mvhline(@row, @col, 1, len)
      @window.mvhline(@row, @col, @space_char, len)
      @window.attroff(Ncurses.COLOR_PAIR(@color_pair) | att)
      #print_header(@text1 + " %15s " % @text2 + " %20s" % @text_center , posy=0, posx=0)

      # Now print the text in the correct positions with no padding, else some terminal
      # will blacken the text out.
      print_header("#{@text1}  #{@text2}") # + " %20s" % @text_center , posy=0, posx=0)
      print_center("#{@text_center}") # + " %20s" % @text_center , posy=0, posx=0)
      print_top_right(@text_right)
      @repaint_required = false
    end
def repaint
      return unless @repaint_required
 
      # 2014-08-10 - 14:53 changing bgcolor or color resets color_pair, so this must be reset if nil
      @color_pair ||= get_color $bottomcolor, @color, @bgcolor
      #print_header(htext, posy = 0, posx = 0)
      att = get_attrib @attr
      len = @window.width
      len = Ncurses.COLS-0 if len == 0
      # print a bar across the screen 
      @window.attron(Ncurses.COLOR_PAIR(@color_pair) | att)
      # 2016-01-13 - changed since "1" was giving problems in mvhline in some cases
      #@window.mvhline(@row, @col, 1, len)
      @window.mvhline(@row, @col, @space_char, len)
      @window.attroff(Ncurses.COLOR_PAIR(@color_pair) | att)
      #print_header(@text1 + " %15s " % @text2 + " %20s" % @text_center , posy=0, posx=0)

      # Now print the text in the correct positions with no padding, else some terminal
      # will blacken the text out.
      print_header("#{@text1}  #{@text2}") # + " %20s" % @text_center , posy=0, posx=0)
      print_center("#{@text_center}") # + " %20s" % @text_center , posy=0, posx=0)
      print_top_right(@text_right)
      @repaint_required = false
    end
XXX need to move wrapping etc up and done once.