rkumar / rbcurse

ruby based curses widgets: fields, buttons, textarea. menus, message boxes, tabbed panes, tables, listboxes, splitpanes, scrollpanes. Event based, MVC architecture. (DEPRECATED - PLS USE rbcurse-core)
http://totalrecall.wordpress.com/
138 stars 13 forks source link

rbcurse (for ruby 1.9.x)

Kindly use the canis gem instead. Have a look at ncumbra too.

Please install rbcurse-core. I have just released 0.0.3 on Jan 5, 2012.

gem install rbcurse-core

Version 1.5.2 of rbcurse will install both core and rbcurse-extras.

WARNING

Currently this repo (rbcurse) is in flux. I've moved stuff off to other repos (rbcurse-core, rbcurse-extras and rbcurse-experimental.). This will be a wrapper repo.

Please go to branch 1.4.1 for the last version of all code in one repo. Gem 1.4.1 is the last gem that contains all the code in one gem/repo.

DESCRIPTION:

A small but comprehensive widget library written in ruby for creating ncurses/curses applications. (Tested on 1.9.1/2, compatible with 1.8.7.)

rbcurse is now a meta-gem. It depends on core, extras and experimental. You may install core in isolation, too, if you don't want all these. Extras and experimental depend on core. rbcurse-core depends only on ffi-ncurses.

The essence of 'simple' is knowing "what to leave out" - attributed to Steve Jobs

News

FEATURES

Above may be created using DSL like syntax, or hashes, and modified at runtime. Very flexible unlike ncurses forms and fields.

Download rbcurse

Screenshots

Other links

Major changes

PROBLEMS, ISSUES

Splitpane

Deprecated. Please use vimsplit instead. It's cleaner and hopefully easier to use. Splitpanes suffered from the problem of the system not knowing which pane the user was issuing a command (resize) in (when there were embedded panes).

Scrollpane

Avoid this. Listboxes and textareas already implement scrolling. I was using pads to implement a viewport, this was slow esp with scrollpanes within splitpanes, but the copywin() and related methods often gave errors or seg-faults.

General terminal related issues.

The following are issues with terminals (or with ncurses-ruby in some cases) not with rbcurse.

I am developing and testing under "gnu screen" (compiled with 256 colors) under OSX Lion, using zsh). I have just shifted to iTerm2 - this gives me some additional keys such as PageUp, PageDown, Home and End but takes away some others that Terminal gaves me such as shifted-function keys and Control-left, Ctrl-Right.

Just for information, I am transitioning from macports to homebrew. I use rvm.

REQUIREMENTS:

INSTALL:

(In following commands, use sudo if installing gems in readonly are such as /opt/local/).

gem install rbcurse

Now go to the the examples folder and execute some examples. Each sample writes to a log file named rbc13.log (earlier view.log). If the examples folder is readonly, you will have to set LOGDIR to a writable folder as below.

cd examples 
ruby test2.rb
LOGDIR=~/tmp ruby test1.rb

To install only the core:

gem install rbcurse-core

LICENSE:

Copyright (c) 2008 -2011 rkumar

Same as ruby license.