Version 1.2.0 rbcurse
gem install rbcurse --pre
I’ve been working on many new things … new control such as tree, vimsplits, dividers, scrollbars, progressbars, links — lost count of all the things I’ve added. Had to make some tiny changes htat are not backward compatible to make the widgets more usable.
Most importantly is the App class which allows the user to make applications. All the ncurses mumbo-jumbo and even the rbcurse incantations are neatly wrapped in an App.new call and your block contains the app. Also, all widgets are wrapped into methods much like Shoes does, so they are easy to call without having to know what all has to be called.
I’ve introduced stacks and flows (conceot copied from Shoes). Its rough but allows us to stack widgets and the stack does the placement. Similarly, we can horizontally place buttons. It’s rough since it’s not yet a class, so it does not hold information. It places the widgets once and for all on the screen. Stacks and flows don’t persist in any way as objects that can be manipulated later. That shall come later, without changing the API.
Much like vim and other terminal programs, you can now suspend work, show some information outside of ncurses and come back into your ncurses app. Or allow the user to use the shell and return.
I am focusing on user interface patterns such as MasterDetail – see sample appemail.rb (you need to point it to a local mbox). I’ve also used a tree control for directories and a Listbox for directories which allows user to click and go down directories. I intend separating these from their demos so they can be reused. They contain basic functionality and there’s a lot more that can be added to make them complete.
Another pattern is ColumnBrowse