Ruby Ncurses Forms and widgets library

Last revision: 2010-09-04

DESCRIPTION

rbcurse is a comprehensive widget library written in ruby for creating ncurses applications. Unlike ncurses forms and fields, all rbcurse widgets can be created at *any* time, and modified at any time. Most widgets have vim-like or emacs-like key bindings for more keyboard friendliness. I am currently focusing on this aspect.

Version 1.1.5: works with ruby 1.9.2, contains more files missed out from gemspec (rbcurse.rb), and corrects some things that give errors in 1.8.7.

Version 1.1.4: works with ruby 1.9.2, also contains files missed out from gemspec.

This page could be outdated. Major additions and work has been committed. Check the Blog and github page here for the latest. This branch works under ruby 1.9 (git branch) The "classic" branch is for ruby 1.8 only. Please check for the various branches (currently working on branch master. ) Downloads

All widgets expose events to which actions can be bound (typically movement, enter/leave, data modifications etc). Many are built using the MVC architecture so there are data-models and renderers that may be modified/extended/replaced. For example, for table editing each column datatype has its own cell-renderer (for string, numeric, checkboxes and comboboxes).

This library depends on ncurses gem, but only for the Window (and in some cases Pad) class. It does not use ncurses forms and fields which are very restrictive and cumbersome.

Released 0.1.2 on Feb 22. Minor tweaks and enhancements in 0.1.3 in March (1.8.x version)

Released 1.1.1 in March 2010. Many improvements and features. This is the 1.9.1 version

INSTALL

Please see github page for latest instructions. ncurses-ruby gem seems to be broken at the moment.
sudo gem install ncurses
sudo gem install rbcurse
If you are on Mac OS X Snow Leopard, please use ncurses-0.9.1 (see instructions on http://trickyco.de/ ).

FEATURES

Above may be created using DSL like syntax, or hashes.

MISSING FEATURES

TUTORIAL

Here is a getting started page for rbcurse.

STATUS

Stable. If you've been googling for "ruby ncurses", you've probably found many projects that have not released code or are abandoned midway. This is a new project (released 2008), but has released sample applications, and there are many screenshots and a few demos (MOV format), so you can check it out before you download and install.

CURRENT WORK

Currently (as of 2010-05-07), write a tutorial for rbcurse, and then think about cleaning up and cutting out cruft and perhaps removing inconsistencies. I am also considering an optional command-mode in as many components as makes sense. This will allow a user to switch to command mode (vim like) and issue vim-ish commands to navigate, change, edit, etc. By default, this mode is off.

(outdated)
My current focus is on writing some applications, to not only test the widgets but also find out loopholes or missing functionality. I have made a TODO app (video) which allows for editing of multiple rows and columns in a tabular format. The second was a File Explorer (2 paned) which I shall continue working on, so it has a fair amount of functionality. The third which i shall start in a day or so, is a small SQL client (image)(video), which will test the ability to change table structures, find loopholes in tables with a large number of columns.

See this link for demos and screenshots. Please note that the demos are hastily created and there's a lot more to the apps than shown. File Explorer Demo

Tiny SQL Client demo

Todo Demo

A screenshot of the Finder/Explorer:

A screenshot of table editing (string, numbers, floats, boolean (checkbox) and multi-values:

A screenshot of list editing:

Screenshots of combos



Left and right aligned checkboxes:



Context sensitive popup-menu (attached to table) :


There are submenus, and some options are disabled conditionally. Hotkeys and accelerators have been defined.

For more, check the blog linked on the top, or this folder.

Acknowledgements

Developed on Vim editor on Mac OS X.