-
Notifications
You must be signed in to change notification settings - Fork 13
Home
Welcome to the rbcurse wiki!
rbcurse is a small widget library written in ruby for creating ncurses applications.
Some basic widgets exist in lib/rbcurse/rwidgets.rb, Menu related widgets and a couple more are in lib/rbcurse/rform.rb.
Test programs are in base dir: test1.rb, test2.rb, testtabp.rb, testcombo.rb.
The current blog for this is totalrecall. However, I would like to push details onto this wiki if possible, or create a blog/page here itself. Check the screenshots.
These widgets are written in ruby, using only ncurses window, color pairs. ncurses forms and fields have not been used.
- single line entry Field
- scrollable Listbox supporting single and multi-select
- multi-line editable area TextArea
- ToggleButton, Button, RadioButton and CheckBox
- MessageBox
- Menubar – with submenu and CheckBoxMenuItem
- PopupList
- TabbedPane
- ComboBox
- Labels (with mnemonics)
- Variable – a variable proxy as in Tk, but very minimal
- Form – container for widgets, manages drawing, transfer of focus
- Window – wrapper over ncurses window.
- Events – all widgets fire various events such as ENTER, LEAVE, PRESS, CHANGE, etc. Work is still happening on this front.
- Colors – background and foreground colors can be set or modified using english names.
-
Keys –
Window.getchar()
traps and returns keys including ALT/META, and combinations of ALT with CTRL and SHIFT etc.
One Window can have multiple forms. Fields can be created or modified at any time.
The aim is to make programming forms as fun and easy as possible. ncurses imposed many restrictions on the developer in terms of sequencing of form and field creation. It is not extendable or hackable since it exposes very little (unless you wish to change the C program).
Another aim has been to keep the class structure minimal and easy, so understanding the code is easy, while still not being restrictive.