Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

272 lines (180 sloc) 10.812 kb
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:
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.
Something like Pilot file browser - wip, two paned.
MUST DO:
========
+----------+
| TO FIX |
+----------+
Tabledemo: testtable.rb: checkboxes not showing X (true) when row not focussed!
TextView lacks backward and forward searching, search messagebox should have checkbox for backward.
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 table data nil to start with then tablemodel bindings will all fail! XXX
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
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:
Tabbed Pane may want to add OK, or OK_CANCEL buttons.
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:
--------------
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
Jump to Line
Something went wrong with that request. Please try again.