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
getstr
  • References/Ruby on Rails/Ruby/Classes/Curses/Curses::Window

getstr() Instance Public methods This is equivalent to a series f

2025-01-10 15:47:30
attron
  • References/Ruby on Rails/Ruby/Classes/Curses/Curses::Window

attron(attrs) Instance Public methods Turns off the named attributes attrs

2025-01-10 15:47:30
getch
  • References/Ruby on Rails/Ruby/Classes/Curses/Curses::Window

getch() Instance Public methods Read and returns a character from the window

2025-01-10 15:47:30
color_set
  • References/Ruby on Rails/Ruby/Classes/Curses/Curses::Window

color_set(col) Instance Public methods Sets the current color of the given

2025-01-10 15:47:30
resize
  • References/Ruby on Rails/Ruby/Classes/Curses/Curses::Window

resize(lines, cols) Instance Public methods Resize the current window to

2025-01-10 15:47:30
curx
  • References/Ruby on Rails/Ruby/Classes/Curses/Curses::Window

curx() Instance Public methods A getter for the current column (X coord) of

2025-01-10 15:47:30
attroff
  • References/Ruby on Rails/Ruby/Classes/Curses/Curses::Window

attroff(attrs) Instance Public methods Turns on the named attributes attrs

2025-01-10 15:47:30
bkgdset
  • References/Ruby on Rails/Ruby/Classes/Curses/Curses::Window

bkgdset(ch) Instance Public methods Manipulate the background of the current

2025-01-10 15:47:30
noutrefresh
  • References/Ruby on Rails/Ruby/Classes/Curses/Curses::Window

noutrefresh() Instance Public methods Refreshes the windows and lines.

2025-01-10 15:47:30
new
  • References/Ruby on Rails/Ruby/Classes/Curses/Curses::Window

new(height, width, top, left) Class Public methods Contruct a new

2025-01-10 15:47:30