rbcurse 1.1.1 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +35 -0
- data/Makefile +21 -0
- data/NOTES +1536 -0
- data/README.markdown +21 -15
- data/TODO +372 -0
- data/TODO2.txt +115 -0
- data/VERSION +1 -0
- data/bin/rbcurse +0 -0
- data/examples/README.txt +31 -0
- data/examples/status.txt +68 -0
- data/examples/todo.yml +191 -0
- data/examples/todocsv.csv +28 -0
- data/lib/rbcurse/rlistbox.rb +8 -8
- data/lib/rbcurse/rwidget.rb +7 -1
- data/lib/rbcurse.rb +1 -1
- data/rbcurse.gemspec +183 -0
- metadata +99 -60
- data/Rakefile +0 -30
data/README.markdown
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# rbcurse (for ruby 1.9.1)
|
2
2
|
|
3
|
-
* Version
|
3
|
+
* Version that works with ruby 1.9 (backward compatible with 1.8.7)
|
4
4
|
|
5
|
-
This branch -
|
5
|
+
This branch - master19 - contains major rework on the buffering approach. It only affect
|
6
6
|
programs that have used buffers such as splitpanes, scrollpanes and tabbedpanes.
|
7
|
-
All are fixed.
|
7
|
+
All are fixed. This is the branch that should be used.
|
8
8
|
|
9
9
|
Check downloads at <http://github.com/rkumar/rbcurse/downloads>
|
10
10
|
|
11
|
-
|
11
|
+
test2.rb works - i always give it a quick run after making changes. All the testsplit* and testscroll* examples are working.
|
12
12
|
|
13
13
|
* <http://totalrecall.wordpress.com> - always has some status posted.
|
14
14
|
|
@@ -21,18 +21,18 @@ Some of the samples mentioned below may **not** work. test2.rb works - i always
|
|
21
21
|
|
22
22
|
* Many working demos in examples folder, such as:
|
23
23
|
|
24
|
-
|
24
|
+
* test2.rb (exit with F1, Or Cancel button/Alt-C) contains various
|
25
25
|
widgets. F2 for menubar toggling
|
26
26
|
|
27
|
-
|
27
|
+
* rfe.rb is a ruby file explorer demo.
|
28
28
|
|
29
|
-
|
29
|
+
* sqlc.rb is a ruby sql client _demo_ (using testd.db at
|
30
30
|
<http://www.benegal.org/files/screen/testd.db>)
|
31
31
|
(requires gem sqlite3-ruby)
|
32
32
|
sqlc.rb: uses tabbedpanes - each query opens a new tab
|
33
33
|
sqlm.rb: uses a multi-container - each query opens a new table in the multicontainer
|
34
34
|
|
35
|
-
|
35
|
+
* testtodo.rb is a test TODO application (now using fastercsv)
|
36
36
|
(needs retesting - may not work at all)
|
37
37
|
|
38
38
|
* Screenshots on
|
@@ -45,8 +45,8 @@ Some of the samples mentioned below may **not** work. test2.rb works - i always
|
|
45
45
|
|
46
46
|
See [TODO2.txt](http://github.com/rkumar/rbcurse/blob/rbcurse19/TODO2.txt) (created and maintained by [todoapp.sh](http://github.com/rkumar/todoapp), also hosted here)
|
47
47
|
|
48
|
-
*
|
49
|
-
<http://rubyforge.org/
|
48
|
+
* rbcurse tutorial (WIP - please review and give feedback)
|
49
|
+
<http://rbcurse.rubyforge.org/tut0.html>
|
50
50
|
|
51
51
|
## DESCRIPTION:
|
52
52
|
|
@@ -361,7 +361,7 @@ THE following samples are only demonstrative of how widgets are built. See sampl
|
|
361
361
|
|
362
362
|
STEP 1.
|
363
363
|
|
364
|
-
`sudo gem install ncurses
|
364
|
+
`sudo gem install ncurses`
|
365
365
|
|
366
366
|
If the above fails, then do as follows:
|
367
367
|
|
@@ -395,15 +395,15 @@ STEP 2.
|
|
395
395
|
ruby test2.rb
|
396
396
|
|
397
397
|
|
398
|
-
Note: Please use gem version 1.1.1 or higher. I have just created this gem, so let me know if there are missing files.
|
398
|
+
Note: Please use rbcurse gem version 1.1.1 or higher. I have just created this gem, so let me know if there are missing files.
|
399
399
|
|
400
|
-
### Installing ncurses on Mac OS X Snow Leopard
|
400
|
+
### Installing ruby ncurses on Mac OS X Snow Leopard
|
401
401
|
|
402
402
|
STEP 1.
|
403
403
|
|
404
404
|
ncurses-ruby 1.2.4 is not installing, errors in `make`. I have not found a working solution. Finally, I used ncurses-0.9.1 and made some changes and it is working. Needs to be tested out. I am not sure how I got ncurses-0.9.1 in my gems folder, possible I had done a `sudo port install ncurses`.
|
405
405
|
|
406
|
-
http://trickyco.de/tag/ncurses has a similar procedure
|
406
|
+
<http://trickyco.de/tag/ncurses has a similar procedure>. I made the changes based on my working copy of 1.2.4 from my OS X PPC Machine. Will upload the gem and code.
|
407
407
|
|
408
408
|
trickyco's procedure is as follows:
|
409
409
|
|
@@ -414,7 +414,13 @@ trickyco's procedure is as follows:
|
|
414
414
|
make
|
415
415
|
sudo make install
|
416
416
|
|
417
|
-
See the patch file from http://trickyco.de/tag/ncurses . See other steps as above.
|
417
|
+
See the patch file from [here](http://trickyco.de/tag/ncurses) . See other steps as above.
|
418
|
+
|
419
|
+
If all fails, try this and let me know if it works, or fails.
|
420
|
+
I have uploaded a modified ncurses gem [here](http://github.com/downloads/rkumar/rbcurse/ncurses-0.9.1.gem) .
|
421
|
+
Download this and then run:
|
422
|
+
|
423
|
+
sudo gem install --local ncurses-0.9.1.gem
|
418
424
|
|
419
425
|
## LICENSE:
|
420
426
|
|
data/TODO
ADDED
@@ -0,0 +1,372 @@
|
|
1
|
+
**Date: 2009-12-14 12:35**
|
2
|
+
|
3
|
+
Subject: scroll and splitpane - handle_keys ( +widgets)
|
4
|
+
-------------------------------------------------------
|
5
|
+
|
6
|
+
new container widgets need to trap handle_keys, not just motion but
|
7
|
+
passing to contained object, e.g. if contained is **editable**.
|
8
|
+
|
9
|
+
* * *
|
10
|
+
**2009-10-13 00:16**
|
11
|
+
|
12
|
+
## subwins to pad copying ##
|
13
|
+
|
14
|
+
1. `overwrite()` from subwin to pad (both are same dimensions) was returning -1.
|
15
|
+
2. I increased dimensions of pad by 2, return 0, but no effect.
|
16
|
+
3. `copywin` works from subwin to pad (last 2 dimensions given are one less than height and width)
|
17
|
+
|
18
|
+
So in tabbedpanes, i can use subwindows. When user switches I can write onto a pad.
|
19
|
+
Whenevr he enters a tab, i refresh from pad.
|
20
|
+
|
21
|
+
Else, the best alternative is that I actually write to pad directly and refresh the subwin
|
22
|
+
on each update or open-pad. However, we need to make an underlying pad class
|
23
|
+
that the user is unaware of.
|
24
|
+
|
25
|
+
|
26
|
+
* * *
|
27
|
+
**2009-10-11 22:42**
|
28
|
+
|
29
|
+
## copywin, subwins etc ##
|
30
|
+
|
31
|
+
Okay, so i've got `copywin` working with pads and subwins
|
32
|
+
but `copywin` is very sensitive to dimensions and returns a
|
33
|
+
-1 (ERR) generously.
|
34
|
+
`overwrite` with a pad and root window was fine, but the source goes completely
|
35
|
+
onto the window. Can't scroll etc.
|
36
|
+
I found even `prefresh` returning a -1 at times.
|
37
|
+
|
38
|
+
`prefresh` does *not* require any `update_panel` or `wrefresh` it seems,
|
39
|
+
and `touchln` was clearing it off.
|
40
|
+
`copywin` _does_ require `wrefresh` and `update_panel`.
|
41
|
+
|
42
|
+
See <http://gist.github.com/207760>
|
43
|
+
|
44
|
+
|
45
|
+
* * *
|
46
|
+
**2009-10-11 09:48**
|
47
|
+
|
48
|
+
## Create pad class ##
|
49
|
+
|
50
|
+
We need a pad class like window.
|
51
|
+
perhaps Pad < Window.
|
52
|
+
|
53
|
+
Only then can it be slipped in where Window was used.
|
54
|
+
|
55
|
+
* * *
|
56
|
+
**2009-10-11 09:43**
|
57
|
+
|
58
|
+
## Table to use subwin and or pad ##
|
59
|
+
|
60
|
+
table with its scrolling should have used a pad, right ?
|
61
|
+
Currently I repaint each time. However note that tables
|
62
|
+
are editable.
|
63
|
+
|
64
|
+
subwin will prevent overwriting windows.
|
65
|
+
|
66
|
+
NOTE: subwin have an issue with panels. You cannot
|
67
|
+
bring a panel up etc. Have to repaint the whole thing.
|
68
|
+
|
69
|
+
* * *
|
70
|
+
2009-10-03 11:05
|
71
|
+
1. make compliant with 1.9.1
|
72
|
+
|
73
|
+
Note:
|
74
|
+
|
75
|
+
TODO_OLD relates to the Application generator I was writing.
|
76
|
+
There's a lot that works there. Given a table name you can do CRUD functions against it.
|
77
|
+
|
78
|
+
However, that uses the ncurses fields and forms. After creating fields in ruby,
|
79
|
+
i've ditched that, and will perhaps redo that with rbcurses.
|
80
|
+
|
81
|
+
This todo relates to rbcurse, our own ruby fields, forms, widgets and application related goodies.
|
82
|
+
|
83
|
+
|
84
|
+
APPS TO DO:
|
85
|
+
|
86
|
+
DONE: sql viewer: this will properly test tables with each query sending totally different data struct
|
87
|
+
or just diff rows. Also, we can address empty tables.
|
88
|
+
|
89
|
+
DONE: Something like Pilot file browser - wip, two paned.
|
90
|
+
|
91
|
+
|
92
|
+
Add multiple select operations to Finder
|
93
|
+
Add construct to sqlc.
|
94
|
+
|
95
|
+
MUST DO:
|
96
|
+
========
|
97
|
+
|
98
|
+
+----------+
|
99
|
+
| TO FIX |
|
100
|
+
+----------+
|
101
|
+
listscrollable: search mor than one match in line !
|
102
|
+
|
103
|
+
messagebox width of input is 30, how to increase!
|
104
|
+
List selection methods not firing any changed event on table.
|
105
|
+
|
106
|
+
Perhaps: M-; should be select with M-: as add to selection. Like mouse click and Cmd+click
|
107
|
+
Should navigation select ??
|
108
|
+
|
109
|
+
Table: if cell_selection_allowed not true we should be able to select row as a whole (which should be
|
110
|
+
default).
|
111
|
+
|
112
|
+
Textview search: work on case, and wrap around.
|
113
|
+
TextView's set_form_col does not scroll horiz. That has to be done prior, so set_form_col cannot be used as is expecting that to happen. And example is in C-e.
|
114
|
+
Listbox search: since this search sets form col too, it messes with form col here.
|
115
|
+
|
116
|
+
Gen: when binding, we should check if that event is fireable. So widgets shold register their events first.
|
117
|
+
|
118
|
+
Table: newlines scrood up display (select name, sql from sqlite_master)
|
119
|
+
|
120
|
+
TextArea: remove_all (should it not be clear() ) -- should be set_text with blank
|
121
|
+
|
122
|
+
|
123
|
+
handle_keys logic: some cases can return unhandled in which case we must still check furhter. So else
|
124
|
+
should be taken and put outside the loop and run if no one handled (a flag)
|
125
|
+
|
126
|
+
In some cases will use a flag (like textarea, where you don't wanna match old val)
|
127
|
+
|
128
|
+
TEXTAREA : test with a wide box, larger than width of rows
|
129
|
+
Give option of no wrap, and panning
|
130
|
+
|
131
|
+
|
132
|
+
EDITING TABLES:
|
133
|
+
Page down keeps selection on 3rd row from last. This happens since bounds_check tries to keep
|
134
|
+
table full.
|
135
|
+
|
136
|
+
If you delete a row, then selections get messed, since row selectoin uses indexes into table
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
also, user may put a hook on on_leave, shoud check for exception and not proceed.
|
141
|
+
|
142
|
+
Unlike a field, a field or editing comp in a table can have many exit paths - page up down, up down, next col prev col etc. We need to validate the field in each case and disallow navigation if error raised.
|
143
|
+
|
144
|
+
- searching DONE 2009-01-26 22:20
|
145
|
+
|
146
|
+
however, check boxes etc should have auto editing.
|
147
|
+
|
148
|
+
WHEN we delete a row, what happens. Is its on_leave still fired ? XXX Or the on_leave of the next
|
149
|
+
row! in such case no on_leave should happen.
|
150
|
+
|
151
|
+
EDITING LISTS:
|
152
|
+
|
153
|
+
make the keys definable as in table
|
154
|
+
clean up handle_keys - done to some extent. Not ideal though.
|
155
|
+
- We are not calling on_leave and on_enter of cell_editor component ??
|
156
|
+
|
157
|
+
POPUP LIST:
|
158
|
+
|
159
|
+
make edits such (calling editor) so it can defined on a key. In Finder, we press Enter to get into
|
160
|
+
edit mode.
|
161
|
+
|
162
|
+
separate methods in utils for get_selected_color, get_focussed_color etc
|
163
|
+
|
164
|
+
Don;t update other widgets unless datachanged or properties changed. As in table.
|
165
|
+
Properties: redraw only when property change or data change, not each time. Esp for label.
|
166
|
+
TODO for field and buttons.
|
167
|
+
|
168
|
+
fire_handler LIST_COMBO_SELECT <-- nope this is a bad name taken from Tk. LIST_SELECTION_EVENT is proper.
|
169
|
+
|
170
|
+
textarea check if print border in initialize. NOPE>
|
171
|
+
|
172
|
+
|
173
|
+
- can't call down up etc directly, since post_key still needs to be called. have to call handle_key KEY_UP etc.
|
174
|
+
check if this is still true.
|
175
|
+
|
176
|
+
|
177
|
+
1. popup lists/combo lists: correct inconsistency in firing of event. RETURN vs SELECT
|
178
|
+
|
179
|
+
|
180
|
+
sizing of messageboxes
|
181
|
+
|
182
|
+
|
183
|
+
- scrollable Field and List and TextArea/View. programmatic scrolling
|
184
|
+
setScrollOffset, making a row visible
|
185
|
+
set_buffer alias set_text or setvalue ?
|
186
|
+
|
187
|
+
Action: setting enabled should affect component.
|
188
|
+
Listeners and event firing.
|
189
|
+
|
190
|
+
-----------
|
191
|
+
## ISSUES
|
192
|
+
-----------
|
193
|
+
Some possible bugs in TextArea wrapping.
|
194
|
+
When a word is carried dowm, it shold gt carried back up too if i pt a space
|
195
|
+
inside. However, even vim does not do this, btw.
|
196
|
+
|
197
|
+
|
198
|
+
Textarea bug: if line inserted is gt maxlen then it is split but when writing
|
199
|
+
to disk a space will be added. This is a bug only if the line has NO SPACE in
|
200
|
+
it.
|
201
|
+
|
202
|
+
+----------+
|
203
|
+
| TO ADD |
|
204
|
+
+----------+
|
205
|
+
|
206
|
+
TABLE:
|
207
|
+
auto resizeing of columns so they expand to fill total width - recursively add one to each
|
208
|
+
till max_width reached or total filled.
|
209
|
+
|
210
|
+
LISTBOX EDITING:
|
211
|
+
option to edit on a key: is_editing stuff
|
212
|
+
|
213
|
+
EDITING IN TABLES:
|
214
|
+
Sorting of tables using intermediate view that maps jtable to model - not imp
|
215
|
+
|
216
|
+
TABBED:
|
217
|
+
|
218
|
+
FORM: on_enter, on_exit - currently the on_enter and leave is for widgets as in ncurses.
|
219
|
+
|
220
|
+
- Listbox : status or detail, row m or n.
|
221
|
+
Search up and down - DONE
|
222
|
+
|
223
|
+
- Text Area: INS/OVW
|
224
|
+
- TextArea: choice of word wrap, col wrap or no wrap.
|
225
|
+
- TextView: choice of word wrap, col wrap or no wrap.
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
3. Field and TextArea: OVERWRITE mode,
|
230
|
+
FIELD justification mode (after tabout),
|
231
|
+
FIELD - auto_skip (after reaching end),
|
232
|
+
managing_focus() : true means it will eat a tab (insert a tab in case of textarea).
|
233
|
+
|
234
|
+
|
235
|
+
Tabbedpane needs to look okay if change colors. At least should be able to switch to reverse.
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
if there is no next, should onleave be fired ?
|
240
|
+
|
241
|
+
focus_traversable - bool: tabbing won't get focus, but can be focussed by Enter (default) or hotkey.
|
242
|
+
|
243
|
+
FileChooser, FileSaver
|
244
|
+
|
245
|
+
RECENTLY DONE:
|
246
|
+
--------------
|
247
|
+
WE need to clean up that space between cells also when panning, just in case.
|
248
|
+
Table doesn't know how many cols displayed, e,g editing, tabbing - DONE
|
249
|
+
WHEN scrolling, cancel editing.
|
250
|
+
Table: adhoc queries, need to fill up width
|
251
|
+
TextView lacks backward and forward searching, search messagebox should have checkbox for backward.
|
252
|
+
TextArea - that stupid newline i put. DONE but more testing
|
253
|
+
DefaultListSelectionModel does not fire a ListSelectionEvent - done 2009-02-14 00:27
|
254
|
+
Table - if more columns than displayable, how about panning ?
|
255
|
+
Tabbed Pane may want to add OK, or OK_CANCEL buttons. - done
|
256
|
+
Tabledemo: testtable.rb: checkboxes not showing X (true) when row not focussed! - Done, rel as 0.1.1
|
257
|
+
Menuitem: disabled, what if no action (not armed). disabled - cyan color. If no
|
258
|
+
action, that's okay since we can have listeners that will act on index
|
259
|
+
selected.
|
260
|
+
LABEL to take ampersand also. ?? No there could be legit ampersands. Also only if label_for.
|
261
|
+
Each widget coukd hve its own popup menu (like right click) with its own options. Hey, we don't have
|
262
|
+
a popup menu. 2009-01-21
|
263
|
+
Delete does not result in any on_enter event firing. But then we are dealing with row???
|
264
|
+
OUCH - on_enter reqired otherwise editor has old value!
|
265
|
+
|
266
|
+
COMBO: either choice of disabling arrow keys for table. or have sep editing option for table
|
267
|
+
so some fields not accidentally changed. - unbind
|
268
|
+
|
269
|
+
COMBO: case insensitive search (llist.combo etc) 2009-01-18 22:13
|
270
|
+
cell_editors created on demand, not in beginning. thus, we can't attach a hook to a field.
|
271
|
+
No, there is a simple way as done in testtable
|
272
|
+
modified should be a method, in most cases will check orig value.
|
273
|
+
Field: ESC to put back original value. OK. Needed dup!
|
274
|
+
if selected index is not visible, it needs to scroll down and make that visible - done 2009-01-17 13:36
|
275
|
+
globally replace RVariable with Variable and remove Variable - 2009-01-17 12:13
|
276
|
+
listbox searching - done 2009-01-14 13:30
|
277
|
+
Cancelling edits in lists. DONE. C-c or ESC 2009-01-13 22:12
|
278
|
+
|
279
|
+
EDITING IN TABLES:
|
280
|
+
issue with auto_editing is how to go to next col since arrows are required in editing fields.
|
281
|
+
currently using alt-tab for next_col
|
282
|
+
|
283
|
+
- We are not calling on_leave and on_enter of cell_editor component -done 01-16
|
284
|
+
on_leave stop any editor that may be active - DONE 2009-01-16 23:55
|
285
|
+
some cols editable, some not (as in Finder). - TO TEST - DONE 2009-01-16 23:55
|
286
|
+
>>> Keep option of editing live as in Listbox. add option of automatic editing on enter
|
287
|
+
on_enter_cell on_leave_cell and other events
|
288
|
+
Now that lists have editable field/combo/check, try editing multicolumn tables.
|
289
|
+
All that i need to do, is put celleditor and cellrenderer in TableColumn, and use that
|
290
|
+
as done in list.
|
291
|
+
actually there's more: moving into cells. TAB is strictly for movement across fields.
|
292
|
+
Listbox. when cursor enters, cursor should be shown on selected row which could
|
293
|
+
be another row, if we tabbed out earlier. Curently, always shows on row 0 when entering a list. DONE
|
294
|
+
Form was setting cursor after calling on_enter.
|
295
|
+
|
296
|
+
|
297
|
+
REDO Listbox, TextArea and TextView withuth scrollable, selectable.
|
298
|
+
Field: if set_buffer sets numeric or float we should be intelligent and return edited values in same way,
|
299
|
+
and not crash.
|
300
|
+
For toggle, checkbutton etc it is variable, not textvariable
|
301
|
+
Field to also have change event.
|
302
|
+
Moved Textarea and Textview to Listscrollabel and now both paint only when modified.
|
303
|
+
2. cleanup scrollable code esp repaint method.
|
304
|
+
Its okay to have scrollable and selectable, but call methods in them, rather than pass handlekey to them.
|
305
|
+
Also don't delegate paint to them.
|
306
|
+
Actually passing handle_key was an okay idea.
|
307
|
+
|
308
|
+
TextView, how about wrapping option ? 2009-01-08 20:56
|
309
|
+
Newlistbox : if select_mode is single then clear previous selections.
|
310
|
+
Also move to next selection and previous.
|
311
|
+
if no focusable widget, stack overflow. XXX Make next_field safer. DONE 2009-01-08 12:58
|
312
|
+
|
313
|
+
text components: get set add keymap, get action for keystroke etc
|
314
|
+
or will this make each widget heavy? TextArea/View may require for attaching actions/movement etc
|
315
|
+
|
316
|
+
menu's Exit, throws close without destroying menu (i suspect). It should close menu then app. 2009-01-01 13:16
|
317
|
+
|
318
|
+
if text_variable, when updateing value also puts object name, then it can multiplex across many objcts like a set of checkboxes, like a model ? One such object can be used fr all fields and inside it update a hash.
|
319
|
+
|
320
|
+
Save data from TextArea and see whether we've scrood it up or not.
|
321
|
+
With changes to Listbox (model) now list_variable seems useless.
|
322
|
+
Add tabbed pane to test2.rb and integrate so i see how it actually integrates.
|
323
|
+
Togglebutton - selected (bool)
|
324
|
+
Label should be able to take height and wrap. - DONE 2008-12-30 23:52
|
325
|
+
alert, confirm boxes in single line. put in test2 - done 2008-12-30 23:53
|
326
|
+
- TextView and Area: current row, col. INS/OVW
|
327
|
+
- TextArea : show a $ if newline at end of line. DONE
|
328
|
+
TextArea: recursive wrap till end of para, otherwise words go out of buffer area. 2008-12-28
|
329
|
+
cursor position in button, cb and radio - 2008-12-25 19:21
|
330
|
+
Used ACS_ codes to make better boxes, wonder why I didn't do that before. Was going the lynx way.
|
331
|
+
|
332
|
+
Widget - event LEAVE and CHANGED should be separate. Currently validations happen on LEAVE.
|
333
|
+
- Done. test more.
|
334
|
+
|
335
|
+
combo attr for position below, above, centered, on. - DONE
|
336
|
+
textarea and textview eating alt-keys! - DONE.
|
337
|
+
|
338
|
+
textarea - CHANGE Event must give meaningful details such as offset start/end of change, text added or removed, type of change (ADD/REM/CHANGE) as in Listbox. DONE.
|
339
|
+
|
340
|
+
Combo - list of 3 is showing only 2 in max visible, need to scroll down for 3rd/: @height helps
|
341
|
+
|
342
|
+
- quick dialogs for alert, confirm, etc
|
343
|
+
=========
|
344
|
+
Thoughts:
|
345
|
+
=========
|
346
|
+
|
347
|
+
if repaint gets a handle for form.window then it neednt worry about getting initialized with form/window.
|
348
|
+
in other words, when a widget needs a window ref it shd be given one..
|
349
|
+
Similaryl how can we remove haing to pass Form. That way one can create independent fields/widgets.
|
350
|
+
|
351
|
+
|
352
|
+
text_variable etc: when set should class register with text_variable to be updated on change so it can repaint.
|
353
|
+
or should it always repaint by default, if based on Variable.
|
354
|
+
|
355
|
+
error messages - should they be popped up ? or choice of status bar and pop up.
|
356
|
+
|
357
|
+
- create and fire events only if someones listening. ??
|
358
|
+
|
359
|
+
- make a sample data entry form (CRUD), so we can see how things really work.
|
360
|
+
|
361
|
+
- filechooser
|
362
|
+
- simple date widget YYYY-MM-DD using 3 fields
|
363
|
+
|
364
|
+
- Action classes (like Java swing) which can be passed to a menu, button, or key. Also, disabling will disable for all.
|
365
|
+
|
366
|
+
- toolbar ?
|
367
|
+
|
368
|
+
- application class as per QT http://doc.trolltech.com/4.4-snapshot/mainclasses.html
|
369
|
+
|
370
|
+
- status bar, main window ?
|
371
|
+
|
372
|
+
- allow user to access history and enter from it, for field
|
data/TODO2.txt
ADDED
@@ -0,0 +1,115 @@
|
|
1
|
+
1 [x] (1) buffered version of Listbox (2009-12-26) (x2010-01-18)
|
2
|
+
- 1.1 [x] what form is celleditor using. check and fix (2010-01-04) (x2010-01-05) (x2010-01-07)
|
3
|
+
- 1.2 [x] scrollpane scrollin till 18th row only * Use downarrow to go down (2010-01-04) (x2010-01-05) (x2010-01-07)
|
4
|
+
- 1.3 [x] testscrolllb.rb on enter cursor at pos 0 io 5th or so. Ok in test2.rb (2010-01-05) (x2010-01-18)
|
5
|
+
2 [x] buffered version of TextArea (2009-12-26) (x2010-01-19)
|
6
|
+
- 2.1 [x] cursor position not updated when insert text * just testing indentation (2009-12-27) (x2009-12-31)
|
7
|
+
- 2.1.1 [x] we have to set main forms row and col from rbtextarea (2009-12-28) (x2009-12-31)
|
8
|
+
- 2.1.2 [x] to factor in rscrollpane's coords, so cursor inside scr (2009-12-28) (x2009-12-31)
|
9
|
+
- 2.3 [x] remove var oldcli since not using (2010-01-04) (x2010-01-07)
|
10
|
+
3 [x] rscrollpane needs on_enter and set_form_row etc (2009-12-26) (x2009-12-28)
|
11
|
+
4 [x] check how is cursor managed by rtabbedpane (2009-12-28) (x2009-12-29)
|
12
|
+
- 4.1 [x] rtabbedpane does its own highlighting (2009-12-29) (x2009-12-29)
|
13
|
+
6 [x] make form.set_form_row which bubbles up row and colrather than directly setting row and col (2009-12-29) (x2009-12-31)
|
14
|
+
7 [x] (A) change addrowcol to percolate up too (2009-12-29) (x2010-01-05)
|
15
|
+
8 [x] (A) change direct references to form.row and col to call methods (2009-12-29) (x2010-02-18)
|
16
|
+
10 [x] @scrollpane needs to stop scrolling if no more data - actually it does, i had made the textarea large (2009-12-29) (x2009-12-29)
|
17
|
+
11 [x] (A) new textarea breaks test2.rb. see what on, no display * display happens on focus/keypress in test2.rb * display happens on up down arrow, not left right. check if repaint is called comparing old and new files * Ack listbox is erasing or overwriting new textarea - very strange * now buffered object write to main window, so window does not overwrite (2009-12-31) (x2010-01-03)
|
18
|
+
- 11.1 [x] textarea: footer not showing (2010-01-01) (x2010-01-02)
|
19
|
+
- 11.2 [x] textarea: some flag not updated on a s d f, not showing in testkeypress.rb (2010-01-01) (x2010-01-01)
|
20
|
+
12 [x] (A) review rwidget code regarding printing * which window does textarea print on, is it transferred to main window * now buffered object write to main window, so window does not overwrite (2010-01-03) (x2010-01-03)
|
21
|
+
13 [x] (A) review just print_title and border since they overwrite textarea (2010-01-03) (x2010-01-03)
|
22
|
+
14 [x] copy testwidget to textview and tv to old (2010-01-03) (x2010-01-03)
|
23
|
+
15 [x] buffered version of Table (2010-01-03) (x2010-01-19)
|
24
|
+
16 [x] (2) putting buffered objects in splitpane and testing (2010-01-03) (x2010-02-27)
|
25
|
+
- 16.1 [x] testing textviews inside splitpane (2010-01-06) (x2010-01-13)
|
26
|
+
- 16.1.1 [x] test various keys in splitpane with textview (2010-01-08) (x2010-01-13)
|
27
|
+
- 16.2 [x] add oneTouchExpandable to +splitpane (2010-01-09) (x2010-02-27)
|
28
|
+
- 16.3 [x] test splitpane with textareas (2010-01-13) (x2010-01-18)
|
29
|
+
- 16.4 [x] test splitpane with one splitpane and 3 textviews (2010-01-13) (x2010-01-18)
|
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
|
+
18 [x] (A) popups now showing one blak line below. need to adjust (2010-01-05) (x2010-01-06)
|
33
|
+
19 [x] make a scrollable form using Pad. Hint: scrollpane does that. (2010-01-06) (x2010-03-07)
|
34
|
+
20 [x] (A) investigate crash +splitpane, ht is ht/2-1 and you scroll C-n (2010-01-09) (x2010-01-11)
|
35
|
+
- 20.1 [x] fixed for HORIZ, but do for VERT (2010-01-09) (x2010-01-11)
|
36
|
+
21 [x] test out tabbedpane, and compare code with scroll (newtesttabp.rb) (2010-01-10) (x2010-02-21)
|
37
|
+
22 [x] (A) sudden blank line in FC in splitpane see testsplittv.rb and tvv.rb * that's due to top and left 0 by default in create_buffer (2010-01-11) (x2010-01-12)
|
38
|
+
23 [x] how to pass top left etc to widget so when it does a create_buffer those values are reached * set_buffering does this (2010-01-12) (x2010-02-18)
|
39
|
+
24 [x] add parent attrib, pass parent in child() and first_component, add a method to pushup row and col adding roffset and coloffset at each level (2010-01-12) (x2010-01-13)
|
40
|
+
26 [x] Splitpane: Vert mode, comp 2 doesn't retain cursor when moving (2010-01-13) (x2010-01-13)
|
41
|
+
27 [x] (A) TextArea fix direct calls to form.row and form.col (2010-01-14) (x2010-01-14)
|
42
|
+
28 [x] (A) TextArea: borders get overwritten * chomp was required when using << (2010-01-14) (x2010-01-14)
|
43
|
+
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
|
+
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
|
+
36 [ ] should parent set scrollatrows for lb and tv and ta ? (2010-01-17)
|
51
|
+
37 [x] (B) test rtable in splitpane and scrollpanes * done rtable in scrollpane (2010-01-18) (x2010-02-24)
|
52
|
+
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
|
+
41 [x] Textareas: C-a C-e does not repain which is good, but footer not updated (2010-01-23) (x2010-01-25)
|
56
|
+
42 [x] check where we are directly calling wmove and why (2010-01-23) (x2010-01-25)
|
57
|
+
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
|
+
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
|
+
46 [x] RFED16 branch: Redo table as per new simple approach (2010-02-18) (x2010-02-19)
|
61
|
+
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
|
+
49 [x] (A) Tabbing in top of tabbedpane gives funny staggered effect ?? (2010-02-21) (x2010-02-22)
|
64
|
+
50 [x] (A) Tabbedpane: scrolling not updating N and P (2010-02-21) (x2010-03-01)
|
65
|
+
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
|
+
53 [x] Splitpane needs multiplier for resizing panes (2010-02-24) (x2010-02-26)
|
68
|
+
54 [x] Scrollpane needs multiplier for scrolling (2010-02-24) (x2010-02-26)
|
69
|
+
55 [x] (1) keymapping: add symbols and test mapping externally (2010-02-27) (x2010-02-27)
|
70
|
+
56 [x] (A) Splitpane: add oneTouchExpandable to +splitpane (2010-02-27) (x2010-03-05)
|
71
|
+
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
|
+
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 [x] (A) TabbedPane: remove subheading, wastes space (2010-03-01) (x2010-03-02)
|
77
|
+
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 [x] (F) TextArea and TextView Field Table etc: yanking and pasting globally (2010-03-05) (x2010-03-10)
|
79
|
+
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 [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
|
+
70 [x] (E) rbgetstr: tab completion, as in filename completion etc (2010-03-06) (x2010-03-12)
|
85
|
+
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 [ ] General: move key bindings to bind_key so user can see what's bound (2010-03-07)
|
89
|
+
75 [ ] (A) Do a round of tests and release a new version (2010-03-08)
|
90
|
+
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
|
+
78 [x] (A) Undo: refactor undomanager and undohandler (2010-03-08) (x2010-03-10)
|
93
|
+
79 [x] (A) Demo: get sqlc.rb demo running (2010-03-09) (x2010-03-14)
|
94
|
+
80 [x] firehandler: can we combine consecutive ones into one, passing an array? (2010-03-09) (x2010-03-12)
|
95
|
+
81 [x] (F) Textview: multiple buffer version (2010-03-10) (x2010-03-12)
|
96
|
+
82 [x] (F) Textview: partial editable version (2010-03-10) (x2010-03-12)
|
97
|
+
83 [ ] make error_message into a Variable, so app can attach it to a label if required (2010-03-11)
|
98
|
+
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 [ ] (F) how about getting ascii tables in here for sql stuff (2010-03-12)
|
100
|
+
86 [ ] (E) TextView etal: store path so save can be done? (2010-03-12)
|
101
|
+
87 [x] (E) MultiTextView: list buffers to do (2010-03-12) (x2010-03-15)
|
102
|
+
88 [x] (E) TextV+A, when printing a screenful, store actual maxlen for scrolling left (2010-03-12) (x2010-03-13)
|
103
|
+
89 [ ] (B) Scrollpane is just wrong with textobjects, searching doesnt work properly - it doesnt show up (2010-03-13)
|
104
|
+
90 [ ] (B) tabbedpane buttons focus sometimes mixes with table first row focuses (2010-03-14)
|
105
|
+
91 [x] (B) tabbedpane: adding new tab dyn, not immediately shown (2010-03-14) (x2010-03-15)
|
106
|
+
92 [ ] TabbedPane: move fun stuff to Util class - dont crowd main classes (2010-03-14)
|
107
|
+
93 [ ] (B) tabbedpane: new tabs not really getting focus??? (2010-03-15)
|
108
|
+
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)
|
111
|
+
97 [x] (A) Scrollform : dont we need some indicators or bars (2010-03-17) (x2010-03-18)
|
112
|
+
98 [x] (A) SCrollFOrm: cursor not on first field to start with (2010-03-17) (x2010-03-18)
|
113
|
+
99 [ ] (A) scrollform demo: add larger objects like textview and test (2010-03-18)
|
114
|
+
100 [x] (A) sqlm.rb finish this with multicontainer and table (2010-03-19) (x2010-03-19)
|
115
|
+
101 [ ] Menu: simpler rewrite ?? (2010-03-20)
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.1.3
|
data/bin/rbcurse
ADDED
File without changes
|
data/examples/README.txt
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
README
|
3
|
+
------
|
4
|
+
|
5
|
+
## sqlc.rb
|
6
|
+
|
7
|
+
A sql client using tabbedpanes.
|
8
|
+
|
9
|
+
Enter an sql query in the textbox. Click Run.
|
10
|
+
|
11
|
+
Or Press Enter on the name of a table in the tables listing. Its
|
12
|
+
contents will be shown in a new tab in the tabbedpane.
|
13
|
+
|
14
|
+
Or Press Space on a table. Its columns are shown below. Now select
|
15
|
+
columns and then click Construct. Selected columns will be used to
|
16
|
+
construct a query. Press Run to execute it.
|
17
|
+
|
18
|
+
If you are inside a table, use Alt-TAb to exit.
|
19
|
+
|
20
|
+
## sqlm.rb
|
21
|
+
|
22
|
+
Identical to sqlc.rb. This demo uses a multi-container for multiple
|
23
|
+
resultsets instead of a tabbedpane.
|
24
|
+
|
25
|
+
* * * * *
|
26
|
+
|
27
|
+
Please check the examples with test*.rb - since they are updated.
|
28
|
+
|
29
|
+
## vim:tw=72:ai:formatoptions=tcqln:nocindent:
|
30
|
+
|
31
|
+
|