rbcurse 1.1.5 → 1.2.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +45 -0
- data/Makefile +1 -1
- data/Manifest.txt +91 -0
- data/NOTES +349 -2
- data/README.markdown +12 -0
- data/VERSION +1 -1
- data/examples/abasiclist.rb +25 -0
- data/examples/alpmenu.rb +42 -0
- data/examples/app.rb +883 -0
- data/examples/appcombo.rb +17 -0
- data/examples/appdirtree.rb +73 -0
- data/examples/appemail.rb +164 -0
- data/examples/appemaillb.rb +308 -0
- data/examples/appgcompose.rb +303 -0
- data/examples/appgmail.rb +951 -0
- data/examples/atree.rb +56 -0
- data/examples/dirtree.rb +78 -0
- data/examples/focusmanager.rb +31 -0
- data/examples/imap.rb +48 -0
- data/examples/menu1.rb +79 -0
- data/examples/multispl.rb +86 -0
- data/examples/rfe.rb +3 -4
- data/examples/rmail.rb +188 -0
- data/examples/s.rb +10 -0
- data/examples/scrollbar.rb +104 -0
- data/examples/splitp.rb +56 -0
- data/examples/table1.rb +30 -0
- data/examples/term.rb +48 -0
- data/examples/term2.rb +54 -0
- data/examples/test1.rb +4 -2
- data/examples/test2.rb +9 -9
- data/examples/testapp.rb +44 -0
- data/examples/testapp2.rb +51 -0
- data/examples/testcombo.rb +2 -2
- data/examples/testgmail.rb +46 -0
- data/examples/testlistbox.rb +0 -1
- data/examples/testmultispl.rb +199 -0
- data/examples/testree.rb +127 -0
- data/examples/testscroller.rb +0 -1
- data/examples/testscrolllb.rb +1 -1
- data/examples/testscrollp.rb +2 -1
- data/examples/testscrollta.rb +1 -1
- data/examples/testscrolltable.rb +1 -2
- data/examples/testsplit.rb +1 -1
- data/examples/testsplit2.rb +1 -1
- data/examples/testsplit3.rb +1 -1
- data/examples/testsplit3_1.rb +1 -1
- data/examples/testsplit3a.rb +1 -1
- data/examples/testsplit3b.rb +1 -1
- data/examples/testsplitta.rb +1 -1
- data/examples/testsplittv.rb +1 -1
- data/examples/testsplittvv.rb +1 -1
- data/examples/testtodo.rb +491 -488
- data/examples/testvimsplit.rb +111 -0
- data/examples/todo.db +0 -0
- data/examples/todocsv.csv +28 -0
- data/examples/viewtodo.rb +408 -403
- data/lib/rbcurse/action.rb +1 -0
- data/lib/rbcurse/app.rb +1294 -0
- data/lib/rbcurse/applicationheader.rb +7 -2
- data/lib/rbcurse/checkboxcellrenderer.rb +0 -12
- data/lib/rbcurse/colormap.rb +34 -8
- data/lib/rbcurse/comboboxcellrenderer.rb +0 -11
- data/lib/rbcurse/defaultlistselectionmodel.rb +23 -7
- data/lib/rbcurse/extras/bottomline.rb +1681 -0
- data/lib/rbcurse/extras/directorylist.rb +445 -0
- data/lib/rbcurse/extras/directorytree.rb +69 -0
- data/lib/rbcurse/extras/divider.rb +310 -0
- data/lib/rbcurse/extras/focusmanager.rb +31 -0
- data/lib/rbcurse/extras/listselectable.rb +222 -0
- data/lib/rbcurse/extras/masterdetail.rb +164 -0
- data/lib/rbcurse/extras/menutree.rb +63 -0
- data/lib/rbcurse/extras/rlink.rb +27 -0
- data/lib/rbcurse/extras/rmenulink.rb +21 -0
- data/lib/rbcurse/extras/scrollbar.rb +134 -0
- data/lib/rbcurse/extras/stdscrwindow.rb +247 -0
- data/lib/rbcurse/extras/tabular.rb +258 -0
- data/lib/rbcurse/extras/tabularwidget.rb +1070 -0
- data/lib/rbcurse/extras/viewer.rb +106 -0
- data/lib/rbcurse/io.rb +137 -80
- data/lib/rbcurse/keylabelprinter.rb +4 -0
- data/lib/rbcurse/listcellrenderer.rb +91 -59
- data/lib/rbcurse/listscrollable.rb +93 -95
- data/lib/rbcurse/listselectable.rb +60 -7
- data/lib/rbcurse/ractionevent.rb +67 -0
- data/lib/rbcurse/rbasiclistbox.rb +688 -0
- data/lib/rbcurse/rcombo.rb +5 -5
- data/lib/rbcurse/rcommandwindow.rb +555 -0
- data/lib/rbcurse/rinputdataevent.rb +12 -0
- data/lib/rbcurse/rlistbox.rb +305 -124
- data/lib/rbcurse/rmenu.rb +99 -46
- data/lib/rbcurse/rmessagebox.rb +13 -6
- data/lib/rbcurse/rmulticontainer.rb +54 -93
- data/lib/rbcurse/rmultisplit.rb +731 -0
- data/lib/rbcurse/rmultitextview.rb +3 -2
- data/lib/rbcurse/rpopupmenu.rb +0 -1
- data/lib/rbcurse/rprogress.rb +117 -0
- data/lib/rbcurse/rscrollpane.rb +2 -1
- data/lib/rbcurse/rsplitpane.rb +94 -20
- data/lib/rbcurse/rsplitpane2.rb +1009 -0
- data/lib/rbcurse/rtabbedpane.rb +3 -2
- data/lib/rbcurse/rtabbedwindow.rb +0 -1
- data/lib/rbcurse/rtable.rb +92 -64
- data/lib/rbcurse/rtextarea.rb +91 -57
- data/lib/rbcurse/rtextview.rb +223 -70
- data/lib/rbcurse/rtree.rb +723 -0
- data/lib/rbcurse/rviewport.rb +2 -1
- data/lib/rbcurse/rvimsplit.rb +768 -0
- data/lib/rbcurse/rwidget.rb +524 -325
- data/lib/rbcurse/table/tablecellrenderer.rb +1 -1
- data/lib/rbcurse/table/tabledatecellrenderer.rb +0 -1
- data/lib/rbcurse/tree/treecellrenderer.rb +137 -0
- data/lib/rbcurse/tree/treemodel.rb +428 -0
- data/lib/rbcurse/vieditable.rb +14 -13
- data/lib/ver/ncurses.rb +6 -0
- data/lib/ver/window.rb +67 -32
- metadata +99 -23
- data/bin/rbcurse +0 -0
- data/examples/rvimsplit.rb +0 -376
- data/examples/todo.rb +0 -1
- data/lib/rbcurse/rform.rb +0 -845
- data/lib/rbcurse/selectable.rb +0 -94
- data/rbcurse.gemspec +0 -188
data/CHANGELOG
CHANGED
@@ -1,3 +1,48 @@
|
|
1
|
+
**2010-09-11**
|
2
|
+
## 1.2.0
|
3
|
+
|
4
|
+
### Additions
|
5
|
+
|
6
|
+
- App class that allows easy application development (like Shoes)
|
7
|
+
- MultiSplit class: Multicolumn widget (like SplitPane but allows many splits).
|
8
|
+
aka Column Browse pattern (like OSX Finder). See examples/testmultisplit.rb
|
9
|
+
- Added Progress Bar class
|
10
|
+
|
11
|
+
- Added methods to Menu (rmenu.rb), so easy creation through DSL. See
|
12
|
+
examples/menu1.rb
|
13
|
+
|
14
|
+
- Added VimSplit - can have multiple splits stacked and flowed
|
15
|
+
- Added Tree - tree control
|
16
|
+
- Added Scrollbar class
|
17
|
+
- Added Tabular - quick readonly tabular data generator that can be used with
|
18
|
+
listboxes or textviews.
|
19
|
+
- Added BasicList - a stripped down, readonly version of Listbox.
|
20
|
+
-
|
21
|
+
|
22
|
+
### Changes
|
23
|
+
|
24
|
+
- Field class now passes InputDataEvent when firing event, not self.
|
25
|
+
Earlier, user trapping :CHANGE would not know what happened (delete,
|
26
|
+
insert, etc) and what char was added, deleted.
|
27
|
+
- List and ListData and ListSelection listener
|
28
|
+
Many changes, new methods, def list(), space bar selects,
|
29
|
+
List listens to selection changes, selectionEvent contains List as source
|
30
|
+
not ListSelectionModel.
|
31
|
+
- Widget checks event names before firing and binding to save time in wrong
|
32
|
+
events.
|
33
|
+
- Listbox, some refactoring of `repaint`. Added convert_value_to_text since
|
34
|
+
we subclass this a lot.
|
35
|
+
- Listcellrenderer: refactoring and changes, will break extending classes!!
|
36
|
+
- Combolist - popup on spacebar
|
37
|
+
- replaced to_print_borders with suppress_borders in list related classes
|
38
|
+
|
39
|
+
### Bugfixes
|
40
|
+
|
41
|
+
- TextArea would crash if user entered long line with no space (line >
|
42
|
+
display length) - fixed
|
43
|
+
|
44
|
+
- Menu items will not show mnemonic highlighted, if disabled.
|
45
|
+
They will not fire if mnemonic key pressed, when disabled.
|
1
46
|
|
2
47
|
**2010-08-30 11:59**
|
3
48
|
## 1.1.4
|
data/Makefile
CHANGED
data/Manifest.txt
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
CHANGELOG
|
2
|
+
History.txt
|
3
|
+
Manifest.txt
|
4
|
+
README.markdown
|
5
|
+
Rakefile
|
6
|
+
lib/rbcurse/action.rb
|
7
|
+
lib/rbcurse/applicationheader.rb
|
8
|
+
lib/rbcurse/celleditor.rb
|
9
|
+
lib/rbcurse/checkboxcellrenderer.rb
|
10
|
+
lib/rbcurse/colormap.rb
|
11
|
+
lib/rbcurse/comboboxcellrenderer.rb
|
12
|
+
lib/rbcurse/defaultlistselectionmodel.rb
|
13
|
+
lib/rbcurse/io.rb
|
14
|
+
lib/rbcurse/keylabelprinter.rb
|
15
|
+
lib/rbcurse/listcellrenderer.rb
|
16
|
+
lib/rbcurse/listeditable.rb
|
17
|
+
lib/rbcurse/listkeys.rb
|
18
|
+
lib/rbcurse/listscrollable.rb
|
19
|
+
lib/rbcurse/listselectable.rb
|
20
|
+
lib/rbcurse/mapper.rb
|
21
|
+
lib/rbcurse/orderedhash.rb
|
22
|
+
lib/rbcurse/rchangeevent.rb
|
23
|
+
lib/rbcurse/rcombo.rb
|
24
|
+
lib/rbcurse/rdialogs.rb
|
25
|
+
lib/rbcurse/rform.rb
|
26
|
+
lib/rbcurse/rinputdataevent.rb
|
27
|
+
lib/rbcurse/rlistbox.rb
|
28
|
+
lib/rbcurse/rmenu.rb
|
29
|
+
lib/rbcurse/rmessagebox.rb
|
30
|
+
lib/rbcurse/rmulticontainer.rb
|
31
|
+
lib/rbcurse/rmultitextview.rb
|
32
|
+
lib/rbcurse/rpopupmenu.rb
|
33
|
+
lib/rbcurse/rscrollform.rb
|
34
|
+
lib/rbcurse/rscrollpane.rb
|
35
|
+
lib/rbcurse/rsplitpane.rb
|
36
|
+
lib/rbcurse/rtabbedpane.rb
|
37
|
+
lib/rbcurse/rtabbedwindow.rb
|
38
|
+
lib/rbcurse/rtable.rb
|
39
|
+
lib/rbcurse/rtextarea.rb
|
40
|
+
lib/rbcurse/rtextview.rb
|
41
|
+
lib/rbcurse/rviewport.rb
|
42
|
+
lib/rbcurse/rwidget.rb
|
43
|
+
lib/rbcurse/scrollable.rb
|
44
|
+
lib/rbcurse/selectable.rb
|
45
|
+
lib/rbcurse/table/tablecellrenderer.rb
|
46
|
+
lib/rbcurse/table/tabledatecellrenderer.rb
|
47
|
+
lib/rbcurse/undomanager.rb
|
48
|
+
lib/rbcurse/vieditable.rb
|
49
|
+
lib/rbcurse.rb
|
50
|
+
lib/ver/keyboard.rb
|
51
|
+
lib/ver/keyboard2.rb
|
52
|
+
lib/ver/ncurses.rb
|
53
|
+
lib/ver/window.rb
|
54
|
+
examples/keytest.rb
|
55
|
+
examples/mpad2.rb
|
56
|
+
examples/newtesttabp.rb
|
57
|
+
examples/qdfilechooser.rb
|
58
|
+
examples/rfe.rb
|
59
|
+
examples/rfe_renderer.rb
|
60
|
+
examples/rvimsplit.rb
|
61
|
+
examples/sqlc.rb
|
62
|
+
examples/sqlm.rb
|
63
|
+
examples/test1.rb
|
64
|
+
examples/test2.rb
|
65
|
+
examples/testchars.rb
|
66
|
+
examples/testcombo.rb
|
67
|
+
examples/testkeypress.rb
|
68
|
+
examples/testmenu.rb
|
69
|
+
examples/testmulticomp.rb
|
70
|
+
examples/testscroller.rb
|
71
|
+
examples/testscrolllb.rb
|
72
|
+
examples/testscrollp.rb
|
73
|
+
examples/testscrollta.rb
|
74
|
+
examples/testscrolltable.rb
|
75
|
+
examples/testsplit.rb
|
76
|
+
examples/testsplit2.rb
|
77
|
+
examples/testsplit3.rb
|
78
|
+
examples/testsplit3_1.rb
|
79
|
+
examples/testsplit3a.rb
|
80
|
+
examples/testsplit3b.rb
|
81
|
+
examples/testsplitta.rb
|
82
|
+
examples/testsplittv.rb
|
83
|
+
examples/testsplittvv.rb
|
84
|
+
examples/testtable.rb
|
85
|
+
examples/testtabp.rb
|
86
|
+
examples/testtestw.rb
|
87
|
+
examples/testtodo.rb
|
88
|
+
examples/testtpane.rb
|
89
|
+
examples/testtpane2.rb
|
90
|
+
examples/testtpanetable.rb
|
91
|
+
examples/viewtodo.rb
|
data/NOTES
CHANGED
@@ -735,13 +735,13 @@ Subject: microemacs user setup tabbedpane
|
|
735
735
|
-----------------------------------------
|
736
736
|
Date: 2010-01-30 00:06
|
737
737
|
|
738
|
-
Micremacs has user setup tabbedpanes.
|
738
|
+
Micremacs has user setup tabbedpanes. (Use F1)
|
739
739
|
Left and right keys are used to move from one tab to another.
|
740
740
|
|
741
741
|
Tab jumps to form associated with a tab. Tab does not cycle between
|
742
742
|
tabs. IN some fields, where there are selectable values (combos) a "v"
|
743
743
|
is shown but i am not clear how to access that list. Pressing Enter
|
744
|
-
opens up the config file.
|
744
|
+
opens up the config file. (Use spacebar)
|
745
745
|
|
746
746
|
* * * * * * * *
|
747
747
|
|
@@ -1652,3 +1652,350 @@ use ffi or ruby-ncurses. For example, i read that mutt can be compiled
|
|
1652
1652
|
for ncurses or slang.
|
1653
1653
|
|
1654
1654
|
* * * * * * * *
|
1655
|
+
|
1656
|
+
Subject: on_enter
|
1657
|
+
-----------------
|
1658
|
+
Date: 2010-09-02 12:12
|
1659
|
+
|
1660
|
+
i think Form calls `on_enter` of a widget and also fires its `:ENTER`.
|
1661
|
+
However, looking at the on_enter of some widget;s looks like they also
|
1662
|
+
fire :ENTER. So things could get fired 2 times.
|
1663
|
+
|
1664
|
+
* * * * * * * *
|
1665
|
+
|
1666
|
+
Subject: making rbcurse easier
|
1667
|
+
------------------------------
|
1668
|
+
Date: 2010-09-05 10:57
|
1669
|
+
|
1670
|
+
Currently making an application in rbcurse, requires a lot of boiler
|
1671
|
+
plate code. Various methods to be called to setup ... heck even I can't
|
1672
|
+
remember them!
|
1673
|
+
|
1674
|
+
I am trying out a wrapper for rbcurse. Much like a file.open block which
|
1675
|
+
does the dirty work of opening and closing a file while the user only
|
1676
|
+
supplies a block.
|
1677
|
+
|
1678
|
+
Then i need to make wrappers for fields and other widgets so they can be
|
1679
|
+
made easily. This way basic screens can be developed rather easily.
|
1680
|
+
|
1681
|
+
The wrapper is called app.rb and it currently resides in examples since
|
1682
|
+
it is very much in progress and trial. it will keep changing, so its
|
1683
|
+
going to remain in examples till it grows up. If you use it, rename it
|
1684
|
+
first, let me know of any improvements or fixes or changes or ideas.
|
1685
|
+
|
1686
|
+
* * * * * * * *
|
1687
|
+
|
1688
|
+
Subject: shoes changed
|
1689
|
+
----------------------
|
1690
|
+
Date: 2010-09-05 15:08
|
1691
|
+
|
1692
|
+
In rbcurse, we use the block to initialize... shoes uses the block as a
|
1693
|
+
changed action. Is that not better, since there is already a config for
|
1694
|
+
doing the setting. Why 2 ways of setting ?
|
1695
|
+
|
1696
|
+
Is it too late to change, or shall we go this way in the App wrapper.
|
1697
|
+
Internally we can bind to CHANGED. or should i have a changed method
|
1698
|
+
which does this.
|
1699
|
+
|
1700
|
+
* * * * * * * *
|
1701
|
+
|
1702
|
+
Subject: uniformity and less surprises
|
1703
|
+
--------------------------------------
|
1704
|
+
Date: 2010-09-07 20:17
|
1705
|
+
|
1706
|
+
we need more uniformity and less surprise. Let 'text' be the one method
|
1707
|
+
with 'def text' and 'def text =', in buttons rename text to label, so
|
1708
|
+
text can be the answer. Same for all widgets. getvalue and get_value etc
|
1709
|
+
sucks.
|
1710
|
+
If a Variable passed in take its value.
|
1711
|
+
thanks to the DSL approach there's this whole get_ set_ nonsense.
|
1712
|
+
|
1713
|
+
We need to move out the DSLish crap everywhere, even if that means a new
|
1714
|
+
major revision.
|
1715
|
+
|
1716
|
+
* * * * * * * *
|
1717
|
+
|
1718
|
+
Subject: testing of widgets
|
1719
|
+
---------------------------
|
1720
|
+
Date: 2010-09-19 10:59
|
1721
|
+
|
1722
|
+
If we keep the model separate, we can test the model out. Helps if the
|
1723
|
+
model is complex like a tree, but what if the model is an inbuilt one
|
1724
|
+
such as a list ?
|
1725
|
+
|
1726
|
+
If the widget keeps UI separate, which includes ncurses, then we can run
|
1727
|
+
tests on it from command line. However, widgets are instantiated with
|
1728
|
+
form and window.!!! How to do change this ?
|
1729
|
+
|
1730
|
+
|
1731
|
+
Can i create objects without passing a form ? and then call methods on
|
1732
|
+
it, like setting data, set_value, add etc. See that events are fired,
|
1733
|
+
exceptions are raised ?
|
1734
|
+
|
1735
|
+
actually even form is okay, but window printing is the issue. we need to
|
1736
|
+
prevent that, windowless form that handles keys sent by a program. but
|
1737
|
+
no ncurses loaded or displayed.
|
1738
|
+
|
1739
|
+
* * * * * * * *
|
1740
|
+
|
1741
|
+
Subject: temporarily leaving ncurses
|
1742
|
+
------------------------------------
|
1743
|
+
Date: 2010-09-20 13:23
|
1744
|
+
|
1745
|
+
If i want to run some command, temporarily leave ncurses using
|
1746
|
+
def_prog_mode do stuff and then return. SEE:
|
1747
|
+
http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/misc.html#TEMPLEAVE
|
1748
|
+
|
1749
|
+
I think vim does this when you type :ls . One can use this to display
|
1750
|
+
bindings, events etc.
|
1751
|
+
|
1752
|
+
* * * * * * * *
|
1753
|
+
|
1754
|
+
Subject: repainting of containers
|
1755
|
+
---------------------------------
|
1756
|
+
Date: 2010-09-22 18:15
|
1757
|
+
|
1758
|
+
Seem to be screwing this up. Either I am painting all in repaint which
|
1759
|
+
is not good. Yet, i do not know which are updated. Perhaps one component
|
1760
|
+
has been externally updated, and the container does not know. So its
|
1761
|
+
repaint required is still false.
|
1762
|
+
|
1763
|
+
So ... if `repaint_required` is true, it should repaint the borders, the
|
1764
|
+
components, resize etc.
|
1765
|
+
|
1766
|
+
If `repaint_required` is *false*, it still must call `repaint()` on all
|
1767
|
+
components, which will repaint if they have been modified. I've done
|
1768
|
+
this in rvimsplit.
|
1769
|
+
|
1770
|
+
* * * * * * * *
|
1771
|
+
|
1772
|
+
Subject: Listbox and CellRenderer
|
1773
|
+
---------------------------------
|
1774
|
+
Date: 2010-09-23 22:25
|
1775
|
+
|
1776
|
+
Often what is displayed in a listbox is quite different from the data in
|
1777
|
+
the list provided. Such as filenames in the list, but a long list is
|
1778
|
+
dislpayed.
|
1779
|
+
There are several ways to handle this.
|
1780
|
+
I am not addressing obvious performance vs memory issues here. Only
|
1781
|
+
implementation issues and their diffculties wrt display and app
|
1782
|
+
programming.
|
1783
|
+
|
1784
|
+
1. Keep file names in list. But use the cell renderer to show complete
|
1785
|
+
info. The repaint method truncates and treats the values from list,
|
1786
|
+
so scrolling can't happen. The main program has a false idea of line
|
1787
|
+
length. So cell renderers should only be used for format or color the
|
1788
|
+
data, changes in length etc should not happen. Else we will have to
|
1789
|
+
rewrite repaint and do length and scolling in renderer.
|
1790
|
+
|
1791
|
+
2. Keep the formatted data in the list. This makes it difficult to do
|
1792
|
+
work on firing the list. We don't have the filenames. We would have
|
1793
|
+
to maintain a backing store. There are additional issues such as if
|
1794
|
+
we are updating a list, the value shown will be the entire formatted
|
1795
|
+
line, and that will be updated into the formatted list.
|
1796
|
+
|
1797
|
+
3. So now we use `convert_value_to_text` to format the data, so scrolling
|
1798
|
+
can happen. Cellrenderer just does coloring based on select focus etc
|
1799
|
+
which was the original purpose. But since the formatted data is not
|
1800
|
+
in the list, movement methods like end of line, forward word don't
|
1801
|
+
work correctly since they consider the original data not the
|
1802
|
+
formatted data.
|
1803
|
+
|
1804
|
+
Currently, Listbox does not have a separation of methods that act on
|
1805
|
+
displayed data and actual (model) data. It assumes one list.
|
1806
|
+
Listbox already is complicated enough with all the editing.
|
1807
|
+
|
1808
|
+
I've gone back and forth with moving the formatting in and out of hte
|
1809
|
+
list, (in appdirtree and directorylist.rb) and i am doing no more. My
|
1810
|
+
suggestion is. ... perhaps you should put formatted data into the list
|
1811
|
+
itself. Have a backing store of the real data (that's what crow and
|
1812
|
+
row_index are for). However, in some case, you will have to face the
|
1813
|
+
difference between the 2 when updating only the model value.
|
1814
|
+
|
1815
|
+
|
1816
|
+
Some of hte performance considerations. If you have very long lists but
|
1817
|
+
only little of the data is seen by user the creating formatted date for
|
1818
|
+
all rows can be wasteful. Cellrenderer and convert_value_to_text only
|
1819
|
+
work on the rows beign displayed. However, they will keep working on the
|
1820
|
+
rows if you keep viewing them over and over. No cacheing etc.
|
1821
|
+
If you put formatted data in the list, there would be no repeated
|
1822
|
+
formatting. In the directory lister demo, there is no cacheing of file
|
1823
|
+
stat objects. Since the speed is fine, i did not bother to do any
|
1824
|
+
cacheing.
|
1825
|
+
|
1826
|
+
One option is to maintain a cache of only those objects on screen.
|
1827
|
+
Populate the cache in the convert_value_to_text loop. Or in
|
1828
|
+
cell_renderer. Clear it every time you get a row_index of 0 and start
|
1829
|
+
over.
|
1830
|
+
This way all operations that require movement over formatted data can
|
1831
|
+
use that cache.
|
1832
|
+
|
1833
|
+
* * * * * * * *
|
1834
|
+
|
1835
|
+
Subject: grabbars and scrollbar focusing
|
1836
|
+
----------------------------------------
|
1837
|
+
Date: 2010-10-07 11:49
|
1838
|
+
|
1839
|
+
|
1840
|
+
|
1841
|
+
* * * * * * * *
|
1842
|
+
|
1843
|
+
Subject: grabbar and scrollbar focusing
|
1844
|
+
---------------------------------------
|
1845
|
+
Date: 2010-10-07 11:49
|
1846
|
+
|
1847
|
+
Some objects like grabbars should not be in the way. they should be
|
1848
|
+
`focusable` on some key, or condition. I am thinking of Alt-Tab.
|
1849
|
+
Should there be some extra attrib for such since focusable will be
|
1850
|
+
false.
|
1851
|
+
|
1852
|
+
I could register such objects with a `FocusManager` array. Upon pressing some
|
1853
|
+
key (say F2), it cycles through these and makes then focusable. Works as
|
1854
|
+
a toggle.
|
1855
|
+
Or on pressing F2, it goes to next object in its array. So it will cycle
|
1856
|
+
between these objects directly setting focus to them. So they will never
|
1857
|
+
come in the TAB order.
|
1858
|
+
|
1859
|
+
This means i don't have to make a parallel `select_next_field` for such
|
1860
|
+
objects since they will have focusable true.
|
1861
|
+
|
1862
|
+
* * * * * * * *
|
1863
|
+
|
1864
|
+
Subject: grabbars and other strange things
|
1865
|
+
------------------------------------------
|
1866
|
+
Date: 2010-10-08 18:25
|
1867
|
+
|
1868
|
+
I've added these grabbars (dividers) for forms that have many panes. These are
|
1869
|
+
borders (much like a scrollbar) that allow user to drag them left right
|
1870
|
+
or up down and re-size panes. Currently, the alternative has been to use
|
1871
|
+
keys such as C-w - and +, which may not be obvious.
|
1872
|
+
|
1873
|
+
However, we don't want these dividers to take focus each time a user
|
1874
|
+
traverses the form. Thus, dividers are not focusable by default. But we
|
1875
|
+
add them to a module FocusManager. When F3 is pressed, the FocusManager
|
1876
|
+
toggles these dividers (or whatever it has in its list), to focusable.
|
1877
|
+
Now the user can tab into these dividers. Once the user is done, he may
|
1878
|
+
press F3 again and make them non-focusable. FocusManager can be used for
|
1879
|
+
amy objects that should only be focusable when user wants them. I may
|
1880
|
+
make scrollbars focusable in a future version.
|
1881
|
+
|
1882
|
+
* * * * * * * *
|
1883
|
+
|
1884
|
+
Subject: stacks and flows - thoughts
|
1885
|
+
------------------------------------
|
1886
|
+
Date: 2010-10-17 22:40
|
1887
|
+
|
1888
|
+
It should be possible to maintain stacks and flows within the app class.
|
1889
|
+
this way, the app can be asked to reposition the widgets and it can do
|
1890
|
+
so. This is required for when we get into using KEY_RESIZE (window
|
1891
|
+
resizing). So this will only be available within App, but then that's
|
1892
|
+
where stacks and flows are, anyway.
|
1893
|
+
Can we liberate S and F from App and make them independent ?
|
1894
|
+
|
1895
|
+
* * * * * * * *
|
1896
|
+
|
1897
|
+
Subject: color_pair added to widget
|
1898
|
+
-----------------------------------
|
1899
|
+
Date: 2010-10-18 23:04
|
1900
|
+
|
1901
|
+
Now we may directly pass a color_pair to a widget when creating. This
|
1902
|
+
way we can create one color_pair and pass it to multiple widgets, rather
|
1903
|
+
than passing actual colors to each. Also, this is a tad more efficient
|
1904
|
+
since the color won't be calculated each time a repaint is done.
|
1905
|
+
|
1906
|
+
* * * * * * * *
|
1907
|
+
|
1908
|
+
Subject: Usage of preferred_size
|
1909
|
+
--------------------------------
|
1910
|
+
Date: 2010-10-20 13:02
|
1911
|
+
|
1912
|
+
when the user may resize a component, or columns in a components, or
|
1913
|
+
user may specify widths or heights, we should use a `preferred_width`
|
1914
|
+
field.
|
1915
|
+
When we calculate width, use `preferred_width` if present, else calculate
|
1916
|
+
it. Program never updates `preferred_width`.
|
1917
|
+
|
1918
|
+
However, the question is what when a user resizes a component or
|
1919
|
+
sub-component. We want to respect that and not overwrite. So currently,
|
1920
|
+
i suggest that we update preferred_width on resizing, dragging etc. This
|
1921
|
+
does mean that the original specified width is lost, so a
|
1922
|
+
`reset_to_preferred_sizes` is not possible.
|
1923
|
+
|
1924
|
+
* * * * * * * *
|
1925
|
+
|
1926
|
+
Subject: single and multiple selection and keys
|
1927
|
+
-----------------------------------------------
|
1928
|
+
Date: 2010-10-28 23:07
|
1929
|
+
|
1930
|
+
If single selection (by spacebar) then pressing spacebar and pressing
|
1931
|
+
Enter should typically have same action. i.e. select current row and
|
1932
|
+
fire_event.(*)
|
1933
|
+
|
1934
|
+
If multiple selection, then Enter typically fires an action for current
|
1935
|
+
row such as opening an item or giving more details for that item.
|
1936
|
+
Spacebar selects multiple items (or Ctrl-Spacebar), and other keys will
|
1937
|
+
execute some action on selected rows (like delete, flag, move etc).
|
1938
|
+
|
1939
|
+
(*) Exceptions: in tree, Enter collapses or expands, and selects current
|
1940
|
+
row, whereas spacebar only selects and displays in other window.
|
1941
|
+
Spacebar does not expand or collapse tree node.
|
1942
|
+
|
1943
|
+
Typically in multiple select, spacebar selects first row (deselecting
|
1944
|
+
others) and Ctrl-Spacebar continues selection. Have to check this out
|
1945
|
+
with Listbox. including `ListSelectable` should take care of most of this.
|
1946
|
+
|
1947
|
+
* * * * * * * *
|
1948
|
+
|
1949
|
+
Subject: rmessagewindow
|
1950
|
+
-----------------------
|
1951
|
+
Date: 2010-11-04 12:23
|
1952
|
+
|
1953
|
+
Regarding bottomline and rmessagewindow
|
1954
|
+
|
1955
|
+
I was thinking that if i try to do bottomline in a separate window that
|
1956
|
+
just pops up and goes off, then i don't have to worry about having a
|
1957
|
+
window handle (since a new window is created with each call). I tried
|
1958
|
+
out this approach with rmessagewindow.
|
1959
|
+
|
1960
|
+
However, first of all one has to press a key to make the message go off.
|
1961
|
+
Secondly, when the window goes off, so does the message. Whatever was
|
1962
|
+
there before remains. Which is great if that's what you need. (But we
|
1963
|
+
already have alert() and rdialog for that).
|
1964
|
+
|
1965
|
+
This is fine for accepting input at screen bottom, but after ask() we
|
1966
|
+
still want to display some message like "file written" and let it be
|
1967
|
+
there. Which means i still have to write to existing window, so my
|
1968
|
+
problem remains. I need to have handle of existing window.
|
1969
|
+
|
1970
|
+
I've added a bottomline object in each window when we create so we can
|
1971
|
+
use it as `@window.ask`, `@window.agree`.
|
1972
|
+
|
1973
|
+
When you use App, you automatically get `ask()` connected to the root
|
1974
|
+
window, but what happens when one App calls another App!!
|
1975
|
+
|
1976
|
+
However, i really like how i can do a 'M-x' (taken from memacs), and
|
1977
|
+
then tab to see available commands. This way user does not need to
|
1978
|
+
remember key combinations.
|
1979
|
+
|
1980
|
+
* * * * * * * *
|
1981
|
+
|
1982
|
+
Subject: gmail style email completion
|
1983
|
+
-------------------------------------
|
1984
|
+
Date: 2010-11-20 13:26
|
1985
|
+
|
1986
|
+
I've just implemented some gmail style email completion.
|
1987
|
+
As you type in a field, values are shown in a window. You can key UP or
|
1988
|
+
DOWN, or keep typing. Pressing ENTER selects highilghted value. You can
|
1989
|
+
enter multiple emails in one field and get help on each.
|
1990
|
+
|
1991
|
+
However, in this case, the window is not modal, so the form below is
|
1992
|
+
painting itself. There are still some old widgets like Label and Field
|
1993
|
+
(perhaps button) that keep repainting redgarldess of whether changed.
|
1994
|
+
This overrides the non-modal window. I've just fixed field but putting a
|
1995
|
+
@repaint_required == true check in repaint.
|
1996
|
+
|
1997
|
+
Also, i think its possible, that rcommandwindow does a repaint and panel
|
1998
|
+
update more often than required. its called in different ways,
|
1999
|
+
interactive and non-interactive. Need to look into that at some time.
|
2000
|
+
|
2001
|
+
* * * * * * * *
|