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
Latest screenshots and updates on blog.
sudo gem install ncurses sudo gem install rbcurseIf you are on Mac OS X Snow Leopard, please use ncurses-0.9.1 (see instructions on http://trickyco.de/ ).
Above may be created using DSL like syntax, or hashes.
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
Thanks to the creators and maintainers of ruby and ncurses-ruby and ncurses.
Also to all the helpful folk on ruby-forum.com for fielding my silly questions with patience (usually).
Thanks to all those who responded to my queries posted on my blog.
Thanks to all the great articles which helped me learn ruby, the pickaxe book, Jay Fields, Eli Bendersky, JEG, (_why, I still can’t understand a word of what you say!), and more.
Thanks to manveru (michael) used your window class and adapted getch
Thanks to sup - picked up some Color related stuff from there.
Thanks to Jim Freeze. Learned how to write DSLs from here.