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

clrtoeol() Instance Public methods Clear the window to the end of line, that

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

scrollok(bool) Instance Public methods Controls what happens when the cursor

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

box(vert, hor) Instance Public methods set the characters to frame the window

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

scroll() Instance Public methods Scrolls the current window up one line.

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

deleteln() Instance Public methods Delete the line under the cursor.

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

keypad(bool) Instance Public methods Enables the keypad of the user's terminal

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

insch(ch) Instance Public methods Insert a character ch, before

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

setscrreg(top, bottom) Instance Public methods

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

standend() Instance Public methods Enables the Normal display (no highlight)

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