-
Notifications
You must be signed in to change notification settings - Fork 13
/
TODO
372 lines (248 loc) · 14 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
**Date: 2009-12-14 12:35**
Subject: scroll and splitpane - handle_keys ( +widgets)
-------------------------------------------------------
new container widgets need to trap handle_keys, not just motion but
passing to contained object, e.g. if contained is **editable**.
* * *
**2009-10-13 00:16**
## subwins to pad copying ##
1. `overwrite()` from subwin to pad (both are same dimensions) was returning -1.
2. I increased dimensions of pad by 2, return 0, but no effect.
3. `copywin` works from subwin to pad (last 2 dimensions given are one less than height and width)
So in tabbedpanes, i can use subwindows. When user switches I can write onto a pad.
Whenevr he enters a tab, i refresh from pad.
Else, the best alternative is that I actually write to pad directly and refresh the subwin
on each update or open-pad. However, we need to make an underlying pad class
that the user is unaware of.
* * *
**2009-10-11 22:42**
## copywin, subwins etc ##
Okay, so i've got `copywin` working with pads and subwins
but `copywin` is very sensitive to dimensions and returns a
-1 (ERR) generously.
`overwrite` with a pad and root window was fine, but the source goes completely
onto the window. Can't scroll etc.
I found even `prefresh` returning a -1 at times.
`prefresh` does *not* require any `update_panel` or `wrefresh` it seems,
and `touchln` was clearing it off.
`copywin` _does_ require `wrefresh` and `update_panel`.
See <http://gist.github.com/207760>
* * *
**2009-10-11 09:48**
## Create pad class ##
We need a pad class like window.
perhaps Pad < Window.
Only then can it be slipped in where Window was used.
* * *
**2009-10-11 09:43**
## Table to use subwin and or pad ##
table with its scrolling should have used a pad, right ?
Currently I repaint each time. However note that tables
are editable.
subwin will prevent overwriting windows.
NOTE: subwin have an issue with panels. You cannot
bring a panel up etc. Have to repaint the whole thing.
* * *
2009-10-03 11:05
1. make compliant with 1.9.1
Note:
TODO_OLD relates to the Application generator I was writing.
There's a lot that works there. Given a table name you can do CRUD functions against it.
However, that uses the ncurses fields and forms. After creating fields in ruby,
i've ditched that, and will perhaps redo that with rbcurses.
This todo relates to rbcurse, our own ruby fields, forms, widgets and application related goodies.
APPS TO DO:
DONE: sql viewer: this will properly test tables with each query sending totally different data struct
or just diff rows. Also, we can address empty tables.
DONE: Something like Pilot file browser - wip, two paned.
Add multiple select operations to Finder
Add construct to sqlc.
MUST DO:
========
+----------+
| TO FIX |
+----------+
listscrollable: search mor than one match in line !
messagebox width of input is 30, how to increase!
List selection methods not firing any changed event on table.
Perhaps: M-; should be select with M-: as add to selection. Like mouse click and Cmd+click
Should navigation select ??
Table: if cell_selection_allowed not true we should be able to select row as a whole (which should be
default).
Textview search: work on case, and wrap around.
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.
Listbox search: since this search sets form col too, it messes with form col here.
Gen: when binding, we should check if that event is fireable. So widgets shold register their events first.
Table: newlines scrood up display (select name, sql from sqlite_master)
TextArea: remove_all (should it not be clear() ) -- should be set_text with blank
handle_keys logic: some cases can return unhandled in which case we must still check furhter. So else
should be taken and put outside the loop and run if no one handled (a flag)
In some cases will use a flag (like textarea, where you don't wanna match old val)
TEXTAREA : test with a wide box, larger than width of rows
Give option of no wrap, and panning
EDITING TABLES:
Page down keeps selection on 3rd row from last. This happens since bounds_check tries to keep
table full.
If you delete a row, then selections get messed, since row selectoin uses indexes into table
also, user may put a hook on on_leave, shoud check for exception and not proceed.
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.
- searching DONE 2009-01-26 22:20
however, check boxes etc should have auto editing.
WHEN we delete a row, what happens. Is its on_leave still fired ? XXX Or the on_leave of the next
row! in such case no on_leave should happen.
EDITING LISTS:
make the keys definable as in table
clean up handle_keys - done to some extent. Not ideal though.
- We are not calling on_leave and on_enter of cell_editor component ??
POPUP LIST:
make edits such (calling editor) so it can defined on a key. In Finder, we press Enter to get into
edit mode.
separate methods in utils for get_selected_color, get_focussed_color etc
Don;t update other widgets unless datachanged or properties changed. As in table.
Properties: redraw only when property change or data change, not each time. Esp for label.
TODO for field and buttons.
fire_handler LIST_COMBO_SELECT <-- nope this is a bad name taken from Tk. LIST_SELECTION_EVENT is proper.
textarea check if print border in initialize. NOPE>
- can't call down up etc directly, since post_key still needs to be called. have to call handle_key KEY_UP etc.
check if this is still true.
1. popup lists/combo lists: correct inconsistency in firing of event. RETURN vs SELECT
sizing of messageboxes
- scrollable Field and List and TextArea/View. programmatic scrolling
setScrollOffset, making a row visible
set_buffer alias set_text or setvalue ?
Action: setting enabled should affect component.
Listeners and event firing.
-----------
## ISSUES
-----------
Some possible bugs in TextArea wrapping.
When a word is carried dowm, it shold gt carried back up too if i pt a space
inside. However, even vim does not do this, btw.
Textarea bug: if line inserted is gt maxlen then it is split but when writing
to disk a space will be added. This is a bug only if the line has NO SPACE in
it.
+----------+
| TO ADD |
+----------+
TABLE:
auto resizeing of columns so they expand to fill total width - recursively add one to each
till max_width reached or total filled.
LISTBOX EDITING:
option to edit on a key: is_editing stuff
EDITING IN TABLES:
Sorting of tables using intermediate view that maps jtable to model - not imp
TABBED:
FORM: on_enter, on_exit - currently the on_enter and leave is for widgets as in ncurses.
- Listbox : status or detail, row m or n.
Search up and down - DONE
- Text Area: INS/OVW
- TextArea: choice of word wrap, col wrap or no wrap.
- TextView: choice of word wrap, col wrap or no wrap.
3. Field and TextArea: OVERWRITE mode,
FIELD justification mode (after tabout),
FIELD - auto_skip (after reaching end),
managing_focus() : true means it will eat a tab (insert a tab in case of textarea).
Tabbedpane needs to look okay if change colors. At least should be able to switch to reverse.
if there is no next, should onleave be fired ?
focus_traversable - bool: tabbing won't get focus, but can be focussed by Enter (default) or hotkey.
FileChooser, FileSaver
RECENTLY DONE:
--------------
WE need to clean up that space between cells also when panning, just in case.
Table doesn't know how many cols displayed, e,g editing, tabbing - DONE
WHEN scrolling, cancel editing.
Table: adhoc queries, need to fill up width
TextView lacks backward and forward searching, search messagebox should have checkbox for backward.
TextArea - that stupid newline i put. DONE but more testing
DefaultListSelectionModel does not fire a ListSelectionEvent - done 2009-02-14 00:27
Table - if more columns than displayable, how about panning ?
Tabbed Pane may want to add OK, or OK_CANCEL buttons. - done
Tabledemo: testtable.rb: checkboxes not showing X (true) when row not focussed! - Done, rel as 0.1.1
Menuitem: disabled, what if no action (not armed). disabled - cyan color. If no
action, that's okay since we can have listeners that will act on index
selected.
LABEL to take ampersand also. ?? No there could be legit ampersands. Also only if label_for.
Each widget coukd hve its own popup menu (like right click) with its own options. Hey, we don't have
a popup menu. 2009-01-21
Delete does not result in any on_enter event firing. But then we are dealing with row???
OUCH - on_enter reqired otherwise editor has old value!
COMBO: either choice of disabling arrow keys for table. or have sep editing option for table
so some fields not accidentally changed. - unbind
COMBO: case insensitive search (llist.combo etc) 2009-01-18 22:13
cell_editors created on demand, not in beginning. thus, we can't attach a hook to a field.
No, there is a simple way as done in testtable
modified should be a method, in most cases will check orig value.
Field: ESC to put back original value. OK. Needed dup!
if selected index is not visible, it needs to scroll down and make that visible - done 2009-01-17 13:36
globally replace RVariable with Variable and remove Variable - 2009-01-17 12:13
listbox searching - done 2009-01-14 13:30
Cancelling edits in lists. DONE. C-c or ESC 2009-01-13 22:12
EDITING IN TABLES:
issue with auto_editing is how to go to next col since arrows are required in editing fields.
currently using alt-tab for next_col
- We are not calling on_leave and on_enter of cell_editor component -done 01-16
on_leave stop any editor that may be active - DONE 2009-01-16 23:55
some cols editable, some not (as in Finder). - TO TEST - DONE 2009-01-16 23:55
>>> Keep option of editing live as in Listbox. add option of automatic editing on enter
on_enter_cell on_leave_cell and other events
Now that lists have editable field/combo/check, try editing multicolumn tables.
All that i need to do, is put celleditor and cellrenderer in TableColumn, and use that
as done in list.
actually there's more: moving into cells. TAB is strictly for movement across fields.
Listbox. when cursor enters, cursor should be shown on selected row which could
be another row, if we tabbed out earlier. Curently, always shows on row 0 when entering a list. DONE
Form was setting cursor after calling on_enter.
REDO Listbox, TextArea and TextView withuth scrollable, selectable.
Field: if set_buffer sets numeric or float we should be intelligent and return edited values in same way,
and not crash.
For toggle, checkbutton etc it is variable, not textvariable
Field to also have change event.
Moved Textarea and Textview to Listscrollabel and now both paint only when modified.
2. cleanup scrollable code esp repaint method.
Its okay to have scrollable and selectable, but call methods in them, rather than pass handlekey to them.
Also don't delegate paint to them.
Actually passing handle_key was an okay idea.
TextView, how about wrapping option ? 2009-01-08 20:56
Newlistbox : if select_mode is single then clear previous selections.
Also move to next selection and previous.
if no focusable widget, stack overflow. XXX Make next_field safer. DONE 2009-01-08 12:58
text components: get set add keymap, get action for keystroke etc
or will this make each widget heavy? TextArea/View may require for attaching actions/movement etc
menu's Exit, throws close without destroying menu (i suspect). It should close menu then app. 2009-01-01 13:16
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.
Save data from TextArea and see whether we've scrood it up or not.
With changes to Listbox (model) now list_variable seems useless.
Add tabbed pane to test2.rb and integrate so i see how it actually integrates.
Togglebutton - selected (bool)
Label should be able to take height and wrap. - DONE 2008-12-30 23:52
alert, confirm boxes in single line. put in test2 - done 2008-12-30 23:53
- TextView and Area: current row, col. INS/OVW
- TextArea : show a $ if newline at end of line. DONE
TextArea: recursive wrap till end of para, otherwise words go out of buffer area. 2008-12-28
cursor position in button, cb and radio - 2008-12-25 19:21
Used ACS_ codes to make better boxes, wonder why I didn't do that before. Was going the lynx way.
Widget - event LEAVE and CHANGED should be separate. Currently validations happen on LEAVE.
- Done. test more.
combo attr for position below, above, centered, on. - DONE
textarea and textview eating alt-keys! - DONE.
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.
Combo - list of 3 is showing only 2 in max visible, need to scroll down for 3rd/: @height helps
- quick dialogs for alert, confirm, etc
=========
Thoughts:
=========
if repaint gets a handle for form.window then it neednt worry about getting initialized with form/window.
in other words, when a widget needs a window ref it shd be given one..
Similaryl how can we remove haing to pass Form. That way one can create independent fields/widgets.
text_variable etc: when set should class register with text_variable to be updated on change so it can repaint.
or should it always repaint by default, if based on Variable.
error messages - should they be popped up ? or choice of status bar and pop up.
- create and fire events only if someones listening. ??
- make a sample data entry form (CRUD), so we can see how things really work.
- filechooser
- simple date widget YYYY-MM-DD using 3 fields
- Action classes (like Java swing) which can be passed to a menu, button, or key. Also, disabling will disable for all.
- toolbar ?
- application class as per QT http://doc.trolltech.com/4.4-snapshot/mainclasses.html
- status bar, main window ?
- allow user to access history and enter from it, for field