rbcurse 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +20 -0
- data/NOTES +45 -0
- data/README.markdown +47 -68
- data/TODO2.txt +29 -32
- data/VERSION +1 -1
- data/examples/abasiclist.rb +2 -0
- data/examples/app.rb +2 -2
- data/examples/app.sample +10 -0
- data/examples/appemail.rb +29 -2
- data/examples/appemaillb.rb +1 -1
- data/examples/appgcompose.rb +9 -2
- data/examples/appmethods.rb +69 -0
- data/examples/atree.rb +2 -2
- data/examples/menu1.rb +1 -1
- data/examples/newtesttabp.rb +8 -5
- data/examples/qdfilechooser.rb +6 -3
- data/examples/rfe.rb +71 -16
- data/examples/rmail.rb +76 -7
- data/examples/sqlc.rb +14 -3
- data/examples/sqlm.rb +3 -3
- data/examples/term.rb +48 -0
- data/examples/term2.rb +48 -21
- data/examples/test1.rb +2 -2
- data/examples/test2.rb +162 -71
- data/examples/testapp.rb +2 -2
- data/examples/testapp2.rb +1 -1
- data/examples/testchars.rb +47 -46
- data/examples/testcombo.rb +2 -2
- data/examples/testkeypress.rb +2 -2
- data/examples/testlistbox.rb +2 -2
- data/examples/testmenu.rb +1 -1
- data/examples/testmulticomp.rb +1 -1
- data/examples/testmultispl.rb +1 -1
- data/examples/testree.rb +1 -22
- data/examples/testscroller.rb +2 -2
- data/examples/testscrolllb.rb +2 -2
- data/examples/testscrollp.rb +2 -2
- data/examples/testscrollta.rb +2 -2
- data/examples/testscrolltable.rb +2 -2
- data/examples/testsplit.rb +2 -2
- data/examples/testsplit2.rb +2 -2
- data/examples/testsplit3.rb +2 -2
- data/examples/testsplit3_1.rb +2 -2
- data/examples/testsplit3a.rb +2 -2
- data/examples/testsplit3b.rb +2 -2
- data/examples/testsplitta.rb +2 -2
- data/examples/testsplittv.rb +2 -2
- data/examples/testsplittvv.rb +2 -2
- data/examples/testtable.rb +2 -2
- data/examples/testtabp.rb +2 -2
- data/examples/testtodo.rb +1 -1
- data/examples/testtpane.rb +2 -2
- data/examples/testtpane2.rb +2 -2
- data/examples/testtpanetable.rb +6 -5
- data/examples/testvimsplit.rb +2 -2
- data/examples/viewtodo.rb +1 -1
- data/lib/rbcurse.rb +2 -1
- data/lib/rbcurse/action.rb +1 -1
- data/lib/rbcurse/app.rb +51 -14
- data/lib/rbcurse/applicationheader.rb +1 -1
- data/lib/rbcurse/celleditor.rb +1 -1
- data/lib/rbcurse/colormap.rb +11 -11
- data/lib/rbcurse/comboboxcellrenderer.rb +1 -1
- data/lib/rbcurse/extras/bottomline.rb +22 -10
- data/lib/rbcurse/extras/directorylist.rb +14 -1
- data/lib/rbcurse/extras/divider.rb +1 -1
- data/lib/rbcurse/extras/listselectable.rb +2 -2
- data/lib/rbcurse/extras/masterdetail.rb +3 -1
- data/lib/rbcurse/extras/scrollbar.rb +1 -1
- data/lib/rbcurse/extras/stdscrwindow.rb +75 -24
- data/lib/rbcurse/extras/tabular.rb +8 -3
- data/lib/rbcurse/extras/viewer.rb +18 -2
- data/lib/rbcurse/io.rb +26 -13
- data/lib/rbcurse/keylabelprinter.rb +3 -2
- data/lib/rbcurse/listcellrenderer.rb +1 -0
- data/lib/rbcurse/listkeys.rb +3 -2
- data/lib/rbcurse/listselectable.rb +4 -3
- data/lib/rbcurse/rbasiclistbox.rb +12 -5
- data/lib/rbcurse/rcombo.rb +2 -2
- data/lib/rbcurse/rcommandwindow.rb +5 -3
- data/lib/rbcurse/rdialogs.rb +8 -2
- data/lib/rbcurse/rlistbox.rb +10 -2
- data/lib/rbcurse/rmenu.rb +4 -4
- data/lib/rbcurse/rmessagebox.rb +10 -5
- data/lib/rbcurse/rmulticontainer.rb +21 -8
- data/lib/rbcurse/rmultisplit.rb +2 -2
- data/lib/rbcurse/rmultitextview.rb +5 -3
- data/lib/rbcurse/rpopupmenu.rb +3 -3
- data/lib/rbcurse/rprogress.rb +3 -2
- data/lib/rbcurse/rscrollform.rb +2 -2
- data/lib/rbcurse/rscrollpane.rb +9 -9
- data/lib/rbcurse/rsplitpane.rb +2 -2
- data/lib/rbcurse/rsplitpane2.rb +2 -2
- data/lib/rbcurse/rtabbedpane.rb +48 -12
- data/lib/rbcurse/rtabbedwindow.rb +4 -4
- data/lib/rbcurse/rtable.rb +6 -3
- data/lib/rbcurse/rtextarea.rb +8 -8
- data/lib/rbcurse/rtextview.rb +3 -2
- data/lib/rbcurse/rtree.rb +2 -2
- data/lib/rbcurse/rviewport.rb +2 -2
- data/lib/rbcurse/rvimsplit.rb +3 -2
- data/lib/rbcurse/rwidget.rb +63 -26
- data/lib/rbcurse/scrollable.rb +1 -1
- data/lib/rbcurse/table/tablecellrenderer.rb +1 -1
- data/lib/rbcurse/table/tabledatecellrenderer.rb +1 -1
- data/lib/rbcurse/tree/treemodel.rb +1 -1
- data/lib/rbcurse/vieditable.rb +1 -0
- data/lib/ver/ncurses.rb +122 -4
- data/lib/ver/panel.rb +162 -0
- data/lib/ver/window.rb +262 -120
- metadata +19 -7
- data/examples/keytest.rb +0 -178
- data/examples/mpad2.rb +0 -156
data/CHANGELOG
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
**2011-09-26**
|
|
2
|
+
## 1.3.0
|
|
3
|
+
|
|
4
|
+
### Moving to ffi-ncurses
|
|
5
|
+
Essentially code changes for ffi-ncurses. ncurses gem no longer supported
|
|
6
|
+
as it was painful to install. Required ffi-ncurses >= 0.4.0
|
|
7
|
+
|
|
8
|
+
Some bugfixes in demos and samples due to changes in 1.2.0, or ruby 1.9, which went
|
|
9
|
+
unnoticed.
|
|
10
|
+
|
|
11
|
+
### Deprecations
|
|
12
|
+
Some classes being deprecated:
|
|
13
|
+
- SplitPane (use vimsplit instead)
|
|
14
|
+
- ScrollPane (no substitute) Code supporting scrollpane will be removed
|
|
15
|
+
by 1.3.1 or 1.3.2 and this will not work.
|
|
16
|
+
|
|
17
|
+
### Tabbedpane
|
|
18
|
+
Not working correctly since moving to ffi-ncurses. Will be completely
|
|
19
|
+
rewritten by 1.3.2.
|
|
20
|
+
|
|
1
21
|
**2010-09-11**
|
|
2
22
|
## 1.2.0
|
|
3
23
|
|
data/NOTES
CHANGED
|
@@ -1999,3 +1999,48 @@ update more often than required. its called in different ways,
|
|
|
1999
1999
|
interactive and non-interactive. Need to look into that at some time.
|
|
2000
2000
|
|
|
2001
2001
|
* * * * * * * *
|
|
2002
|
+
|
|
2003
|
+
Subject: calcurse
|
|
2004
|
+
-----------------
|
|
2005
|
+
Date: 2010-12-01 18:49
|
|
2006
|
+
|
|
2007
|
+
Just installed calcurse (port) and was checking the UI. Neat. Some salient
|
|
2008
|
+
points:
|
|
2009
|
+
|
|
2010
|
+
1. Windows or panels. Standard with title, title border, border color
|
|
2011
|
+
changes when focus in panel or box (that's because it keeps updating
|
|
2012
|
+
time and thereofre cursor remains on status bar)
|
|
2013
|
+
2. 2 bottom lines for keys like we have (keylabels)
|
|
2014
|
+
3. 3rd last row is a sort of status bar like emacs and vim have
|
|
2015
|
+
4. Data entry in last 2 rows. 2nd last has prompt, last has entry or
|
|
2016
|
+
edit
|
|
2017
|
+
5. Similarly menu options selected in last row. A page comes with
|
|
2018
|
+
options, letter indexed.
|
|
2019
|
+
6. Allows layout change of panels.
|
|
2020
|
+
7. Allows color change, immediate change. Displays colors rather than
|
|
2021
|
+
name. Color chooser for BG and FG.
|
|
2022
|
+
|
|
2023
|
+
Subject: App.rb confirm before quit
|
|
2024
|
+
-----------------------------------
|
|
2025
|
+
Date: 2011-09-17 11:49
|
|
2026
|
+
|
|
2027
|
+
App should be able to configure whether it wants quit-confirm. Or a
|
|
2028
|
+
procedure to call before quitting, such as saving values. It's okay for
|
|
2029
|
+
demos where there's no state to just press F1 or q or C-q to quit.
|
|
2030
|
+
|
|
2031
|
+
* * * * * * * *
|
|
2032
|
+
|
|
2033
|
+
Subject: porting to ffi-ncurses
|
|
2034
|
+
-------------------------------
|
|
2035
|
+
Date: 2011-09-17 11:51
|
|
2036
|
+
|
|
2037
|
+
I've been working on porting the rbcurse gem to ffi-ncurses, since
|
|
2038
|
+
ncurses gems is so so hard to install for a lot of people. Thanks to
|
|
2039
|
+
Sean's support the work and retesting was actually very little. It's
|
|
2040
|
+
just that there is a lot of testing to do with all the programs,
|
|
2041
|
+
widgets.
|
|
2042
|
+
|
|
2043
|
+
Sean is coming out with a version 0.4.0 which I am using. rbcurse 1.3.0
|
|
2044
|
+
onwards uses ffi-ncurses.
|
|
2045
|
+
|
|
2046
|
+
* * * * * * * *
|
data/README.markdown
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
# rbcurse (for ruby 1.9.x)
|
|
2
2
|
|
|
3
|
-
*
|
|
3
|
+
* Migrating from ncurses-ruby to ffi-ncurses
|
|
4
|
+
|
|
5
|
+
I have moved rbcurse to ffi-ncurses (earlier ncurses gem).
|
|
6
|
+
|
|
7
|
+
If you are looking for the ncurses version, please goto
|
|
8
|
+
branch rbcurse1.2.0. I am not likely to support that henceforth due to the difficulty in installing ncurses gem.
|
|
9
|
+
|
|
10
|
+
Thanks a lot to Sean O'Halpin for the ffi-ncurses gem and immediately responding
|
|
11
|
+
to my queries. I am testing on OSX Snow Leopard with ruby 1.9.2, TERM=screen on zsh.
|
|
4
12
|
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
* 2011-09-14 : I am thinking of using the 1.2.x version for ncurses-ruby - any final
|
|
14
|
+
bug fixes etc, and releasing a 1.2.x gem. See the rbcurse1.2.0 branch for more updates.
|
|
15
|
+
Also, using 1.3.x and beyond for the ffi-ncurses version. Will start with a pre-release gem and
|
|
16
|
+
then do a final after some testing.
|
|
17
|
+
|
|
18
|
+
* Version that works with ruby 1.9 (backward compatible with 1.8.7)
|
|
11
19
|
|
|
12
20
|
* 1.2.0: many additions (See CHANGELOG for details)
|
|
13
21
|
- App class that wraps the environment and makes application development very easy
|
|
@@ -30,7 +38,7 @@
|
|
|
30
38
|
|
|
31
39
|
Check downloads at <http://github.com/rkumar/rbcurse/downloads>
|
|
32
40
|
|
|
33
|
-
test2.rb works - i always give it a quick run after making changes.
|
|
41
|
+
test2.rb works - i always give it a quick run after making changes. If using ruby1.9.2, you might say: `ruby -I. test2.rb`.
|
|
34
42
|
|
|
35
43
|
* <http://totalrecall.wordpress.com> - always has some status posted.
|
|
36
44
|
|
|
@@ -49,21 +57,24 @@ test2.rb works - i always give it a quick run after making changes. All the test
|
|
|
49
57
|
widgets. F2 for menubar toggling
|
|
50
58
|
|
|
51
59
|
* rfe.rb is a ruby file explorer demo.
|
|
52
|
-
Also see, appdirtree.rb for tree based file explorer.
|
|
53
60
|
|
|
54
|
-
*
|
|
61
|
+
* sqlm.rb is a ruby sql client _demo_ (using testd.db at
|
|
55
62
|
<http://www.benegal.org/files/screen/testd.db>)
|
|
56
63
|
(requires gem sqlite3-ruby)
|
|
57
64
|
sqlm.rb: uses a multi-container - each query opens a new table in the multicontainer
|
|
58
|
-
sqlc.rb: uses tabbedpanes - each query opens a new tab (quite a pain)
|
|
59
65
|
|
|
60
|
-
*
|
|
66
|
+
* alpmenu.rb - an alpine like menu screen that calls the following 2 programs
|
|
67
|
+
|
|
68
|
+
* testtodo.rb is a test TODO application (M-h to see popup menus)
|
|
61
69
|
|
|
62
|
-
|
|
70
|
+
* viewtodo.rb is a test TODO viewing application (now using sqlite3). The table is readonly, some vim keys are available.
|
|
71
|
+
|
|
72
|
+
* app.rb - demo of the app feature. Also has progress bars (type in the textarea to see progress bar)
|
|
73
|
+
|
|
74
|
+
* appemail.rb - a larger demo of the app feature and Column Browse pattern. Uses mbox to display mails. M-x to show commands at bottom of screen. Vim and bash-like file selection and other goodies.
|
|
75
|
+
|
|
76
|
+
* appdirtree - demo of file browser using Tree on left and list on right.
|
|
63
77
|
|
|
64
|
-
For a multiple program application, try alpmenu.rb. This gives a list of application to call (mimicks
|
|
65
|
-
alpine's menu. It links to viewtodo.rb and testtodo.rb. It shows how a program can be independent,
|
|
66
|
-
and be called from a menu.
|
|
67
78
|
|
|
68
79
|
* Screenshots on
|
|
69
80
|
<http://www.benegal.org/files/screen/?M=D> (new)
|
|
@@ -73,7 +84,7 @@ test2.rb works - i always give it a quick run after making changes. All the test
|
|
|
73
84
|
* Todo (for 0.1.2):
|
|
74
85
|
<http://rubyforge.org/pm/task.php?group_id=7775&group_project_id=13812&func=browse>
|
|
75
86
|
|
|
76
|
-
See [TODO2.txt](
|
|
87
|
+
See [TODO2.txt](https://github.com/rkumar/rbcurse/blob/master/TODO2.txt) (created and maintained by [todo.rb](https://github.com/rkumar/todorb), also hosted here)
|
|
77
88
|
|
|
78
89
|
* rbcurse tutorial (WIP - please review and give feedback)
|
|
79
90
|
<http://rbcurse.rubyforge.org/tut0.html>
|
|
@@ -97,8 +108,8 @@ applications.
|
|
|
97
108
|
* labels with mnemonics (hotkeys)
|
|
98
109
|
* Table: multi-column table - with cell selection and editing, horizontal and
|
|
99
110
|
vertical scrolling
|
|
100
|
-
* Scrollpanes which can contain textviews, textareas, listboxes.
|
|
101
|
-
* Splitpanes which can contain scrollpanes, textviews/areas, listboxes
|
|
111
|
+
* Scrollpanes which can contain textviews, textareas, listboxes. (Avoid using).
|
|
112
|
+
* Splitpanes which can contain scrollpanes, textviews/areas, listboxes or splitpanes ... DEPRECATED. Pls use vimplit.
|
|
102
113
|
* MultiContainer = add any number of objects to it (such as tables or text objects) and cycle through them
|
|
103
114
|
(saves screen estate)
|
|
104
115
|
* MultiTextView - have multiple files open for viewing in one component. Since these are readonly files, one can map a lot of single-keys as in vim for operating and cycling through buffers.
|
|
@@ -108,6 +119,7 @@ applications.
|
|
|
108
119
|
* Kill-ring concept of emacs for cut-paste operations
|
|
109
120
|
* Unlimited undo and redo in TextArea (needs to be switched on at present on instance basis)
|
|
110
121
|
* Numeric arguments. (vim: 25dd etc. Or in an editable box, emacs's C-u or Alt-1..9)
|
|
122
|
+
* ScrollForm (testscroller.rb) - a form that takes more fields/objects than can be viewed at a go. Meta keys scroll the form.
|
|
111
123
|
* Various others, too
|
|
112
124
|
|
|
113
125
|
Above may be created using DSL like syntax, or hashes, and modified at
|
|
@@ -115,18 +127,17 @@ runtime. Very flexible unlike ncurses forms and fields.
|
|
|
115
127
|
|
|
116
128
|
## Current work
|
|
117
129
|
|
|
130
|
+
* 2011-09-21 : I intend to rewrite the following widgets: tabbedpane, menu, messagebox. These were some of the earliest programs and the code is a mess. I need to work on KEY-RESIZE, too. Catching Ctrl-arrow keys and shift function keys is required.
|
|
131
|
+
|
|
132
|
+
Old:
|
|
118
133
|
I've just added vi and emacs key bindings to some classes, multiple object containers such as MultiContainer
|
|
119
134
|
and MultiTextView. Emacs like kill-ring in TextArea and TextView. Tabbedpane can have unlimited tabs, we can scroll the tabs. Bunch of other stuff. Multiple keys can be bound to a Proc or symbol as in emacs and vim (dd or C-x C-f).
|
|
120
135
|
|
|
121
|
-
I've made a demo using ScrollForm (testscroller.rb)- a form that takes more fields/objects than
|
|
122
|
-
can be viewed at a go. Meta keys scroll the form.
|
|
123
|
-
Then onto testing what's there, before making a stable
|
|
124
|
-
release.
|
|
125
136
|
|
|
126
137
|
## Sample programs:
|
|
127
138
|
|
|
128
|
-
* test2.rb most widgets (including menus)
|
|
129
|
-
*
|
|
139
|
+
* test2.rb most basic widgets (including menus)
|
|
140
|
+
* sqlm.rb is a ruby sql client demo (using sqlite3-ruby)
|
|
130
141
|
* rfe : file explorer or Finder like app
|
|
131
142
|
* testcombo.rb combos with various insert policies and vertical
|
|
132
143
|
alignments
|
|
@@ -137,18 +148,21 @@ release.
|
|
|
137
148
|
pass 1,2,3,4, or 5 as argument on command line
|
|
138
149
|
ruby test1.rb 1
|
|
139
150
|
ruby test1.rb 2
|
|
140
|
-
* test2.rb most widgets (including menus)
|
|
141
|
-
- partially tested, many widgets, needs thorough testing.
|
|
142
151
|
|
|
143
|
-
* testscroll*.rb - various demos of scrollpanes with listboxes, text areas, tables etc
|
|
144
|
-
|
|
145
|
-
* testsplit*.rb - various splitpanes with scrollpanes and other objects placed inside
|
|
146
152
|
See screenshots on blog.
|
|
147
153
|
|
|
148
154
|
* testtpane.rb - tabbedpane sample with a scrollpane and a textobject.
|
|
149
155
|
|
|
150
156
|
## PROBLEMS, ISSUES
|
|
151
157
|
|
|
158
|
+
## Splitpane
|
|
159
|
+
Deprecated. Please use vimsplit instead. It's cleaner and hopefully easier to use.
|
|
160
|
+
Splitpanes suffered from the problem of the system not knowing which pane the user was
|
|
161
|
+
issuing a command (resize) in (when there were embedded panes).
|
|
162
|
+
|
|
163
|
+
## Scrollpane - Avoid this. Listboxes and textareas already implement scrolling. I was using pads
|
|
164
|
+
to implement a viewport, this was slow esp with scrollpanes within splitpanes, but the copywin() and
|
|
165
|
+
related methods often gave errors or seg-faults.
|
|
152
166
|
|
|
153
167
|
## General terminal related issues.
|
|
154
168
|
|
|
@@ -168,7 +182,7 @@ The following are issues with terminals (or with ncurses-ruby in some cases) not
|
|
|
168
182
|
This is okay under "screen" and "xterm-color" but not under "xterm". You will notice
|
|
169
183
|
this in the message box samples.
|
|
170
184
|
|
|
171
|
-
I am developing and testing under "screen" under OS X
|
|
185
|
+
I am developing and testing under "screen" under OS X Snow Leopard.
|
|
172
186
|
|
|
173
187
|
## SYNOPSIS:
|
|
174
188
|
|
|
@@ -382,59 +396,24 @@ THE following samples are only demonstrative of how widgets are built. See sampl
|
|
|
382
396
|
|
|
383
397
|
* ruby 1.9.1, 1.9.2 (I believe it is working on 1.8.7, 1.8.6 as well).
|
|
384
398
|
|
|
385
|
-
* ncurses
|
|
399
|
+
* ffi-ncurses (>= 0.4.0)
|
|
386
400
|
|
|
387
401
|
(Note: 1.8.6 users: pls report any issues and suggest a fix or alternative if you encounter a method_missing)
|
|
388
402
|
|
|
389
403
|
|
|
390
404
|
## INSTALL:
|
|
391
405
|
|
|
392
|
-
STEP 1.
|
|
393
406
|
(In following commands, use `sudo` if installing gems in readonly are such as /opt/local/).
|
|
394
407
|
|
|
395
|
-
`gem install ncurses`
|
|
396
|
-
|
|
397
|
-
Often this gives compilation errors, or runtime errors when you run the examples.
|
|
398
|
-
If so, please download [ncurses-1.2.4.gem](http://github.com/downloads/rkumar/rbcurse/ncurses-1.2.4.gem) from <http://github.com/rkumar/rbcurse/downloads> and do a:
|
|
399
|
-
|
|
400
|
-
`gem install --local ncurses-1.2.4.gem`.
|
|
401
|
-
|
|
402
|
-
This should have installed an `ncurses.rb` and `ncurses_bin.bundle` in the site directory.
|
|
403
|
-
Goto examples directory and run some examples:
|
|
404
|
-
|
|
405
|
-
ruby rain.rb
|
|
406
|
-
ruby examples.rb
|
|
407
|
-
|
|
408
|
-
STEP 2.
|
|
409
|
-
|
|
410
408
|
`gem install rbcurse`
|
|
411
409
|
|
|
412
|
-
Now go to the the `examples` folder and execute some examples. Each sample writes to a log file named view.log. If the examples folder is readonly, you will have to set `LOGDIR` to a writable folder as below.
|
|
410
|
+
Now go to the the `examples` folder and execute some examples. Each sample writes to a log file named rbc13.log (earlier view.log). If the examples folder is readonly, you will have to set `LOGDIR` to a writable folder as below.
|
|
413
411
|
|
|
414
412
|
cd examples
|
|
415
413
|
ruby test2.rb
|
|
416
414
|
LOGDIR=~/tmp ruby test1.rb
|
|
417
415
|
|
|
418
416
|
|
|
419
|
-
Note: Please use rbcurse gem version 1.1.3 or higher. I have just created this gem, so let me know if there are missing files.
|
|
420
|
-
|
|
421
|
-
### Installing ncurses-ruby on Mac OS X Snow Leopard
|
|
422
|
-
|
|
423
|
-
ncurses-ruby has been failing on OSX Snow Leopard. Please get 1.2.4 or 0.9.2 from <http://github.com/downloads/rkumar/rbcurse/>. Ensure that the examples are working before trying rbcurse.
|
|
424
|
-
|
|
425
|
-
I have uploaded a modified ncurses gem [here](http://github.com/downloads/rkumar/rbcurse/ncurses-0.9.2.gem) .
|
|
426
|
-
Download this and then run:
|
|
427
|
-
|
|
428
|
-
gem install --local ncurses-1.2.4.gem
|
|
429
|
-
OR
|
|
430
|
-
gem install --local ncurses-0.9.2.gem
|
|
431
|
-
|
|
432
|
-
Thanks to Ralf Papenkordt for providing me with a working tar.bz2 file (see download folder).
|
|
433
|
-
|
|
434
|
-
**Update**: I've uploaded a gem for Snow Leopard onto [rubygems.org](http://rubygems.org/gems/snowleopard-ncurses).
|
|
435
|
-
|
|
436
|
-
gem install snowleopard-ncurses
|
|
437
|
-
|
|
438
417
|
## LICENSE:
|
|
439
418
|
|
|
440
419
|
Copyright (c) 2008 -2010 rkumar
|
data/TODO2.txt
CHANGED
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
- 16.3 [x] test splitpane with textareas (2010-01-13) (x2010-01-18)
|
|
29
29
|
- 16.4 [x] test splitpane with one splitpane and 3 textviews (2010-01-13) (x2010-01-18)
|
|
30
30
|
- 16.5 [x] test splitpane with scrollpane and textviews (2010-01-15) (x2010-01-18)
|
|
31
|
-
17 [ ] test2.rb check menu traversal issue - is it slow (2010-01-03)
|
|
32
31
|
18 [x] (A) popups now showing one blak line below. need to adjust (2010-01-05) (x2010-01-06)
|
|
33
32
|
19 [x] make a scrollable form using Pad. Hint: scrollpane does that. (2010-01-06) (x2010-03-07)
|
|
34
33
|
20 [x] (A) investigate crash +splitpane, ht is ht/2-1 and you scroll C-n (2010-01-09) (x2010-01-11)
|
|
@@ -41,75 +40,73 @@
|
|
|
41
40
|
27 [x] (A) TextArea fix direct calls to form.row and form.col (2010-01-14) (x2010-01-14)
|
|
42
41
|
28 [x] (A) TextArea: borders get overwritten * chomp was required when using << (2010-01-14) (x2010-01-14)
|
|
43
42
|
29 [x] what if we don't want to print borders, since that eats an extraline and col. Can we switch off and reclaim the line and col (2010-01-15) (x2010-02-18)
|
|
44
|
-
30 [ ] (O) setformrow col or setrowcol requires 2 iterations for column and row since both are calc separately. thats for each keypress (2010-01-15)
|
|
45
43
|
31 [x] move create_buffer to repaintin TA and TV and others, so that enduser does not have to bother. scroll and split can set internally * All create_buffer calls moved to repaint. Maybe table pending (2010-01-16) (x2010-02-18)
|
|
46
|
-
32 [ ] (O) size changes immediately trigger a buffer resize ...instead set a flag so one resize can be done in repaint. otherwise too many resizes (2010-01-16)
|
|
47
|
-
33 [ ] (O) maybe we should combine set_form_row and col since we call them one after another nowadays (2010-01-16)
|
|
48
|
-
34 [ ] (D) Scrollpane, ensure redraws child only if resized, else it only pans child (2010-01-17)
|
|
49
|
-
35 [ ] Scrollpane shold probably reduce when outer is reduced. (2010-01-17)
|
|
50
44
|
36 [ ] should parent set scrollatrows for lb and tv and ta ? (2010-01-17)
|
|
51
45
|
37 [x] (B) test rtable in splitpane and scrollpanes * done rtable in scrollpane (2010-01-18) (x2010-02-24)
|
|
52
46
|
38 [x] (B) test various widgets inside rtabbedpane (2010-01-19) (x2010-02-22)
|
|
53
|
-
39 [ ] +Scrollpane cursor goes off. need to hide when off (2010-01-19)
|
|
54
|
-
40 [ ] correct gemspec files for master and rb19, remove unneeded files and corrected readme etc (2010-01-22)
|
|
55
47
|
41 [x] Textareas: C-a C-e does not repain which is good, but footer not updated (2010-01-23) (x2010-01-25)
|
|
56
48
|
42 [x] check where we are directly calling wmove and why (2010-01-23) (x2010-01-25)
|
|
57
49
|
43 [x] we need to pass actual highest form down as well as each components absolute coords so cursor display can happen quickly and accurately. * RFED16 branch has absolute positioning (2010-01-23) (x2010-02-18)
|
|
58
50
|
44 [x] TextView: add more vi keys (2010-02-07) (x2010-02-24)
|
|
59
|
-
45 [@] RFED16 branch: clear out all commented code reg buffers (2010-02-18)
|
|
60
51
|
46 [x] RFED16 branch: Redo table as per new simple approach (2010-02-18) (x2010-02-19)
|
|
61
52
|
47 [x] RFED16 branch: Redo tabbedpane as per new simple approach (2010-02-18) (x2010-02-21)
|
|
62
|
-
48 [ ] are we destroying these pads ?? I don;t think so. (2010-02-19)
|
|
63
53
|
49 [x] (A) Tabbing in top of tabbedpane gives funny staggered effect ?? (2010-02-21) (x2010-02-22)
|
|
64
54
|
50 [x] (A) Tabbedpane: scrolling not updating N and P (2010-02-21) (x2010-03-01)
|
|
65
55
|
51 [x] TabbedPane: add on the fly tabs in tabbedpane - what about second level (2010-02-21) (x2010-03-05)
|
|
66
|
-
52 [ ] (B) Table needs multiplier for resizing cols (2010-02-24)
|
|
67
56
|
53 [x] Splitpane needs multiplier for resizing panes (2010-02-24) (x2010-02-26)
|
|
68
57
|
54 [x] Scrollpane needs multiplier for scrolling (2010-02-24) (x2010-02-26)
|
|
69
58
|
55 [x] (1) keymapping: add symbols and test mapping externally (2010-02-27) (x2010-02-27)
|
|
70
59
|
56 [x] (A) Splitpane: add oneTouchExpandable to +splitpane (2010-02-27) (x2010-03-05)
|
|
71
60
|
57 [x] TabbedPane: can we directly add component (2010-02-27) (x2010-03-01)
|
|
72
|
-
58 [ ] make form = nil in widget constructors so nil not to be passed (2010-02-27)
|
|
73
|
-
59 [ ] add a mthod form.add as an alternative to putting form in constructor (2010-02-27)
|
|
74
61
|
60 [x] (A) Textview: should scroll horizontally (2010-02-28) (x2010-03-05)
|
|
75
|
-
61 [ ] (F) how to map : bind w, 12j (to another key binding) * if recogn as keys, then call handle_key on self with each key in array (2010-03-01)
|
|
76
62
|
62 [x] (A) TabbedPane: remove subheading, wastes space (2010-03-01) (x2010-03-02)
|
|
77
63
|
63 [x] (E) some means of editing a string at a location wiht option of C-c or Esc and default, take from commons1.rb (2010-03-05) (x2010-03-06)
|
|
78
64
|
64 [x] (F) TextArea and TextView Field Table etc: yanking and pasting globally (2010-03-05) (x2010-03-10)
|
|
79
65
|
65 [x] (F) textarea needs some undo more than just undelete_line * http://rbcurse.tumblr.com/post/429578665/undo-in-text-widgets (2010-03-05) (x2010-03-12)
|
|
80
66
|
66 [x] (E) Text object should have ability to read in a text file with key (2010-03-05) (x2010-03-12)
|
|
81
|
-
67 [ ] (E) Text objects: execute ex commands ??? * printf '%cs/change this/to that/nwq' '%' | ex file.name (2010-03-05)
|
|
82
|
-
68 [ ] (E) SplitPane: widen splits C-w > < in case of horizontal split, parent has to do it * if parent is SplitPane, check ORIENT, and 1 or 2c, then widen or heighten (2010-03-05)
|
|
83
|
-
69 [ ] (E) SplitPane: binding so that next command acts on higher level splitpane ? (2010-03-05)
|
|
84
67
|
70 [x] (E) rbgetstr: tab completion, as in filename completion etc (2010-03-06) (x2010-03-12)
|
|
85
68
|
71 [x] (D) Demo: using scrollform (2010-03-07) (x2010-03-16)
|
|
86
|
-
72 [ ] TextView: keymaps. p 699 (2010-03-07)
|
|
87
|
-
73 [ ] TextView: freezing an area horiz vertically (2010-03-07)
|
|
88
|
-
74 [
|
|
89
|
-
75 [ ] (A) Do a round of tests and release a new version (2010-03-08)
|
|
69
|
+
72 [ ] (F) TextView: keymaps. p 699 (2010-03-07)
|
|
70
|
+
73 [ ] (F) TextView: freezing an area horiz vertically (2010-03-07)
|
|
71
|
+
74 [x] General: move key bindings to bind_key so user can see what's bound (2010-03-07)
|
|
90
72
|
76 [ ] a Box class = would that help? (2010-03-08)
|
|
91
|
-
77 [ ] (O) Make event objects only if some listener exists (2010-03-08)
|
|
92
73
|
78 [x] (A) Undo: refactor undomanager and undohandler (2010-03-08) (x2010-03-10)
|
|
93
74
|
79 [x] (A) Demo: get sqlc.rb demo running (2010-03-09) (x2010-03-14)
|
|
94
75
|
80 [x] firehandler: can we combine consecutive ones into one, passing an array? (2010-03-09) (x2010-03-12)
|
|
95
76
|
81 [x] (F) Textview: multiple buffer version (2010-03-10) (x2010-03-12)
|
|
96
77
|
82 [x] (F) Textview: partial editable version (2010-03-10) (x2010-03-12)
|
|
97
|
-
83 [
|
|
78
|
+
83 [x] make error_message into a Variable, so app can attach it to a label if required (2010-03-11)
|
|
98
79
|
84 [x] (A) move some edit methods from textarea into module so we can call with diff bindings from textview editable (2010-03-12) (x2010-03-12)
|
|
99
|
-
85 [
|
|
100
|
-
86 [ ] (E) TextView etal: store path so save can be done? (2010-03-12)
|
|
80
|
+
85 [x] (F) how about getting ascii tables in here for sql stuff (2010-03-12)
|
|
101
81
|
87 [x] (E) MultiTextView: list buffers to do (2010-03-12) (x2010-03-15)
|
|
102
82
|
88 [x] (E) TextV+A, when printing a screenful, store actual maxlen for scrolling left (2010-03-12) (x2010-03-13)
|
|
103
|
-
89 [ ] (
|
|
104
|
-
90 [ ] (
|
|
83
|
+
89 [ ] (Z) Scrollpane is just wrong with textobjects, searching doesnt work properly - it doesnt show up (2010-03-13)
|
|
84
|
+
90 [ ] (Z) tabbedpane buttons focus sometimes mixes with table first row focuses (2010-03-14)
|
|
105
85
|
91 [x] (B) tabbedpane: adding new tab dyn, not immediately shown (2010-03-14) (x2010-03-15)
|
|
106
|
-
|
|
107
|
-
93 [ ] (B) tabbedpane: new tabs not really getting focus??? (2010-03-15)
|
|
86
|
+
93 [ ] (Z) tabbedpane: new tabs not really getting focus??? (2010-03-15)
|
|
108
87
|
94 [x] (F) MultiContainer: takes n objects, fills, one can cycle, just as in MultiTextView except that any component can be put. (2010-03-15) (x2010-03-15)
|
|
109
|
-
95 [ ] TabbedWindow is totally off - redo ? (2010-03-16)
|
|
110
|
-
96 [ ] (E) table: yank one or more rows into kill ring as comma delim (2010-03-17)
|
|
88
|
+
95 [ ] (Z) TabbedWindow is totally off - redo ? (2010-03-16)
|
|
111
89
|
97 [x] (A) Scrollform : dont we need some indicators or bars (2010-03-17) (x2010-03-18)
|
|
112
90
|
98 [x] (A) SCrollFOrm: cursor not on first field to start with (2010-03-17) (x2010-03-18)
|
|
113
|
-
99 [ ]
|
|
91
|
+
99 [ ] scrollform demo: add larger objects like textview and test (2010-03-18)
|
|
114
92
|
100 [x] (A) sqlm.rb finish this with multicontainer and table (2010-03-19) (x2010-03-19)
|
|
115
93
|
101 [ ] Menu: simpler rewrite ?? (2010-03-20)
|
|
94
|
+
102 [ ] TabbedPane: rewrite (2011-09-21)
|
|
95
|
+
103 [ ] Messagebox: rewrite (2011-09-21)
|
|
96
|
+
104 [ ] (E) Gen: catching extended keys C-left, S-F10 (2011-09-21)
|
|
97
|
+
105 [ ] (A) Window: combine array into existing constructor (2011-09-21)
|
|
98
|
+
106 [ ] gen: check if that buffering nonsense is still being used? (2011-09-21)
|
|
99
|
+
107 [ ] (F) find_file like microemacs (2011-09-21)
|
|
100
|
+
108 [ ] (F) color schemes (applying at form or app level) (2011-09-21)
|
|
101
|
+
109 [ ] (E) App: stack and flow to be objects so RESIZE can happen (2011-09-21)
|
|
102
|
+
110 [ ] Minor stuff (2011-09-21)
|
|
103
|
+
110.1 [ ] (O) Make event objects only if some listener exists (2010-03-08)
|
|
104
|
+
110.2 [ ] (F) how to map : bind w, 12j (to another key binding) * if recogn as keys, then call handle_key on self with each key in array (2010-03-01)
|
|
105
|
+
110.3 [ ] (E) Text objects: execute ex commands ??? * printf '%cs/change this/to that/nwq' '%' | ex file.name (2010-03-05)
|
|
106
|
+
110.4 [ ] (E) TextView etal: store path so save can be done? (2010-03-12)
|
|
107
|
+
110.5 [ ] (E) table: yank one or more rows into kill ring as comma delim (2010-03-17)
|
|
108
|
+
110.6 [ ] (B) Table needs multiplier for resizing cols (2010-02-24)
|
|
109
|
+
110.7 [ ] TabbedPane: move fun stuff to Util class - dont crowd main classes (2010-03-14)
|
|
110
|
+
110.8 [ ] (O) maybe we should combine set_form_row and col since we call them one after another nowadays (2010-01-16)
|
|
111
|
+
110.9 [ ] (O) size changes immediately trigger a buffer resize ...instead set a flag so one resize can be done in repaint. otherwise too many resizes (2010-01-16)
|
|
112
|
+
110.10 [ ] are we destroying these pads ?? I don;t think so. (2010-02-19)
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.3.0
|
data/examples/abasiclist.rb
CHANGED
|
@@ -20,6 +20,8 @@ App.new do
|
|
|
20
20
|
#lb2= RubyCurses::BasicListbox.new nil, :list => list.shuffle, :justify => :center
|
|
21
21
|
lb2 = basiclist :list => list.shuffle, :justify => :left, :suppress_borders => false
|
|
22
22
|
s.add lb2, :SECOND
|
|
23
|
+
label({:text => "checking overwrite from list", :row => 10, :col => 60})
|
|
24
|
+
label({:text => "checking overwrite from list 1", :row => 11, :col => 60})
|
|
23
25
|
end
|
|
24
26
|
|
|
25
27
|
end # app
|
data/examples/app.rb
CHANGED
|
@@ -14,7 +14,7 @@ Todo:
|
|
|
14
14
|
require 'logger'
|
|
15
15
|
require 'rbcurse'
|
|
16
16
|
|
|
17
|
-
include Ncurses
|
|
17
|
+
#include Ncurses
|
|
18
18
|
include RubyCurses
|
|
19
19
|
include RubyCurses::Utils
|
|
20
20
|
module RubyCurses
|
|
@@ -105,7 +105,7 @@ module RubyCurses
|
|
|
105
105
|
init_ncurses
|
|
106
106
|
end
|
|
107
107
|
unless $log
|
|
108
|
-
$log = Logger.new((File.join(ENV["LOGDIR"] || "./" ,"
|
|
108
|
+
$log = Logger.new((File.join(ENV["LOGDIR"] || "./" ,"rbc13.log")))
|
|
109
109
|
$log.level = Logger::DEBUG
|
|
110
110
|
colors = Ncurses.COLORS
|
|
111
111
|
$log.debug "START #{colors} colors --------- #{$0}"
|
data/examples/app.sample
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
require 'rbcurse/app'
|
|
2
|
+
|
|
3
|
+
App.new do
|
|
4
|
+
header = app_header "rbcurse #{Rbcurse::VERSION}", :text_center => "My Demo", :text_right =>"New Improved!", :color => :black, :bgcolor => :white, :attr => :bold
|
|
5
|
+
message "Press F10 to exit from here, F1 for help, F2 for menu"
|
|
6
|
+
|
|
7
|
+
stack :margin_top => 2, :margin => 5, :width => 30 do
|
|
8
|
+
|
|
9
|
+
end # stack
|
|
10
|
+
end # app
|