class
Ruby latest stable (v2_5_5)
-
0 notes
- Superclass:
Data
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125 (0)
- 1_9_3_392 (0)
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
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