Project

ppcurses

0.0
No release in over 3 years
Low commit activity in last 3 years
A curses abstraction layer.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

PPCurses¶ ↑

Some convenience code to initialize curses and some rudimentary GUI classes. See the test directory for example programs.

Install¶ ↑

gem install 'ppcurses'

To use ppcurses with a ruby > 2.1.5 you must install the curses gem.

gem install 'curses'

Usage¶ ↑

require 'rubygems'
require 'ppcurses'

def displayMenu
  mainMenu = PPCurses::Menu.new( [ "Press", "<ESCAPE>", "to Quit" ])
  mainMenu.show
  mainMenu.menu_selection
  mainMenu.close
end

screen = PPCurses::Screen.new
screen.run { displayMenu }

Curses and Ruby¶ ↑

There are several curses implementations for Ruby.

1. curses

This is the implementation that PPCurses uses. It was originally part of the Ruby standard library and later got pushed out of the standard libary into a gem.

2. ncurses-ruby

The heir to ncurses gem. It is under active development.

3. ncurses

Created by Earle Clubb this gem has been frozen at version 0.9.1 since 2004. You probably don’t want this gem, you probably want ncurses-ruby.

4. ffi-curses

A gem that makes curses available through FFI (foreign function interface), by Sean O’Halpin. The latest version is from 2011 (0.4.0).