Progress on SplitPane and ScrollPane

Great progress on rbcurse’s Scrollpanes and Splitpanes. Scrollpanes contain a viewport which handles the window or porthole into it’s child object. The scrollpane handles communication with the viewport, and the scrollbars. I’ve just added some neat scrollbars. However, there’s a lot of drudge work to be done such as event listeners, and allowing editable objects inside scrollpanes and splitpanes.

rbcurse scrollpane

Scrollpane using ncurses

Splitpanes: tested a splitpane with 2 splitpanes as its child components. However, have to use real world objects inside that. Objects that go inside scroll and splitpanes need to be buffered using pads. That and their handling of cursor position etc need to be taken care of.

SplitPane using ncurses (rbcurse)

SplitPane using ncurses (rbcurse)

A major change in the upcoming version (0.1.3), is that widgets will no longer write directly onto the screen. That was quick and easy and light. But for real world apps, when one has splitpanes, scrollpanes etc, then parent objects need to clip and place their child objects themselves. Child widgets don’t even know their coordinates. So using pads internally was required.

That means that most of the existing classes will need to be modified to use pads for painting. A lot of drudge coding. May need to make borders and scrollbars into classes. The upcoming version should be exciting. Now it should be possible to make a Tree class, too.


# print section of file from regex to end of file
$ cat | ruby -pe ‘@found=true if $_ =~ /regex/; next unless @found’

Explore posts in the same categories: ncurses, rbcurse, ruby

Comment: