APIdock / Ruby
/
class

Curses ::Window

ruby latest stable - Superclass: Data

Class deprecated or moved

This class is deprecated or moved on the latest stable version. The last existing version (v1_9_3_392) is shown here.

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 

Files

  • ext/curses/curses.c

AltStyle によって変換されたページ (->オリジナル) /