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

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

move(y,x) Instance Public methods Moves the window so that the upper left-hand

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

standout() Instance Public methods Enables the best highlighting mode of the

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

timeout=(delay) Instance Public methods Sets block and non-blocking reads for

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

scrl(num) Instance Public methods Scrolls the current window

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

getbkgd() Instance Public methods Returns an Interer (ch) for the

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

subwin(height, width, top, left) Instance Public methods Contruct a new subwindow

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

maxx() Instance Public methods A getter for the maximum columns for the window

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

attrset(attrs) Instance Public methods Sets the current attributes of the given

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

Instance Public methods << Add String str to the current string.

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

maxy() Instance Public methods A getter for the maximum lines for the window

2025-01-10 15:47:30