Type:
Class
Description
The means by which to create and manage frames or windows. While there may be more than one window at a time, only one window will receive input.
Usage
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | require 'curses' Curses.init_screen() my_str = "LOOK! PONIES!" win = Curses::Window. new ( 8 , (my_str.length + 10 ), (Curses.lines - 8 ) / 2 , (Curses.cols - (my_str.length + 10 )) / 2 ) win.box( "|" , "-" ) win.setpos( 2 , 3 ) win.addstr(my_str) # or even win << "\nORLY" win << "\nYES!! " + my_str win.refresh win.getch win.close |