rbcurse 1.4.1 → 1.5.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +31 -0
- data/README.markdown +69 -11
- data/VERSION +1 -1
- data/lib/rbcurse.rb +5 -5
- metadata +10 -198
- data/Makefile +0 -21
- data/Manifest.txt +0 -91
- data/TODO +0 -372
- data/TODO2.txt +0 -118
- data/examples/README.txt +0 -67
- data/examples/abasiclist.rb +0 -33
- data/examples/alpmenu.rb +0 -42
- data/examples/app.rb +0 -859
- data/examples/app.sample +0 -10
- data/examples/appdirtree.rb +0 -75
- data/examples/appemail.rb +0 -191
- data/examples/appemaillb.rb +0 -308
- data/examples/appgcompose.rb +0 -315
- data/examples/atree.rb +0 -64
- data/examples/common/file.rb +0 -40
- data/examples/common/rmail.rb +0 -257
- data/examples/data.txt +0 -683
- data/examples/data/README.markdown +0 -9
- data/examples/data/brew.txt +0 -38
- data/examples/data/color.2 +0 -37
- data/examples/data/gemlist.txt +0 -60
- data/examples/data/lotr.txt +0 -12
- data/examples/data/ports.txt +0 -136
- data/examples/data/tasks.txt +0 -27
- data/examples/data/todocsv.csv +0 -28
- data/examples/data/unix1.txt +0 -21
- data/examples/data/unix2.txt +0 -11
- data/examples/dbdemo.rb +0 -495
- data/examples/deprecated/appgmail.rb +0 -952
- data/examples/deprecated/splitp.rb +0 -56
- data/examples/deprecated/testscrolllb.rb +0 -86
- data/examples/deprecated/testscrollp.rb +0 -88
- data/examples/deprecated/testscrollta.rb +0 -80
- data/examples/deprecated/testscrolltable.rb +0 -165
- data/examples/deprecated/testsplit.rb +0 -87
- data/examples/deprecated/testsplit2.rb +0 -123
- data/examples/deprecated/testsplit3.rb +0 -215
- data/examples/deprecated/testsplit3_1.rb +0 -244
- data/examples/deprecated/testsplit3a.rb +0 -215
- data/examples/deprecated/testsplit3b.rb +0 -237
- data/examples/deprecated/testsplitta.rb +0 -148
- data/examples/deprecated/testsplittv.rb +0 -142
- data/examples/deprecated/testsplittvv.rb +0 -144
- data/examples/deprecated/testtpane.rb +0 -215
- data/examples/deprecated/testtpane2.rb +0 -145
- data/examples/deprecated/testtpanetable.rb +0 -203
- data/examples/dirtree.rb +0 -88
- data/examples/experimental/resultsetdemo.rb +0 -280
- data/examples/experimental/testmform.rb +0 -35
- data/examples/experimental/testscroller.rb +0 -117
- data/examples/experimental/teststackflow.rb +0 -111
- data/examples/menu1.rb +0 -112
- data/examples/multispl.rb +0 -86
- data/examples/newmessagebox.rb +0 -130
- data/examples/newtabbedwindow.rb +0 -100
- data/examples/newtesttabp.rb +0 -121
- data/examples/qdfilechooser.rb +0 -68
- data/examples/rfe.rb +0 -1195
- data/examples/rfe_renderer.rb +0 -121
- data/examples/sqlc.rb +0 -454
- data/examples/sqlm.rb +0 -437
- data/examples/sqlt.rb +0 -408
- data/examples/status.txt +0 -68
- data/examples/table1.rb +0 -24
- data/examples/term2.rb +0 -84
- data/examples/test1.rb +0 -239
- data/examples/test2.rb +0 -674
- data/examples/testapp.rb +0 -44
- data/examples/testapp2.rb +0 -58
- data/examples/testchars.rb +0 -137
- data/examples/testcombo.rb +0 -91
- data/examples/testkeypress.rb +0 -66
- data/examples/testlistbox.rb +0 -113
- data/examples/testmenu.rb +0 -101
- data/examples/testmulticomp.rb +0 -70
- data/examples/testmulticontainer.rb +0 -94
- data/examples/testmultispl.rb +0 -199
- data/examples/testree.rb +0 -106
- data/examples/testtable.rb +0 -263
- data/examples/testtabp.rb +0 -107
- data/examples/testtodo.rb +0 -584
- data/examples/testvimsplit.rb +0 -112
- data/examples/testwsshortcuts.rb +0 -64
- data/examples/testwsshortcuts2.rb +0 -126
- data/examples/todo.db +0 -0
- data/examples/todo.yml +0 -191
- data/examples/viewtodo.rb +0 -574
- data/lib/rbcurse/action.rb +0 -40
- data/lib/rbcurse/app.rb +0 -1374
- data/lib/rbcurse/applicationheader.rb +0 -102
- data/lib/rbcurse/celleditor.rb +0 -112
- data/lib/rbcurse/checkboxcellrenderer.rb +0 -57
- data/lib/rbcurse/colormap.rb +0 -159
- data/lib/rbcurse/comboboxcellrenderer.rb +0 -30
- data/lib/rbcurse/common/ansiparser.rb +0 -117
- data/lib/rbcurse/common/appmethods.rb +0 -112
- data/lib/rbcurse/common/basestack.rb +0 -407
- data/lib/rbcurse/common/bordertitle.rb +0 -41
- data/lib/rbcurse/common/chunk.rb +0 -177
- data/lib/rbcurse/common/colorparser.rb +0 -71
- data/lib/rbcurse/common/keydefs.rb +0 -30
- data/lib/rbcurse/common/widgetshortcuts.rb +0 -302
- data/lib/rbcurse/defaultlistselectionmodel.rb +0 -79
- data/lib/rbcurse/deprecated/README.markdown +0 -12
- data/lib/rbcurse/deprecated/rscrollpane.rb +0 -512
- data/lib/rbcurse/deprecated/rsplitpane.rb +0 -894
- data/lib/rbcurse/deprecated/rsplitpane2.rb +0 -1009
- data/lib/rbcurse/deprecated/rviewport.rb +0 -204
- data/lib/rbcurse/experimental/README.markdown +0 -14
- data/lib/rbcurse/experimental/resultsettextview.rb +0 -585
- data/lib/rbcurse/experimental/stackflow.rb +0 -478
- data/lib/rbcurse/extras/bottomline.rb +0 -1850
- data/lib/rbcurse/extras/box.rb +0 -58
- data/lib/rbcurse/extras/directorylist.rb +0 -467
- data/lib/rbcurse/extras/directorytree.rb +0 -69
- data/lib/rbcurse/extras/divider.rb +0 -310
- data/lib/rbcurse/extras/focusmanager.rb +0 -31
- data/lib/rbcurse/extras/horizlist.rb +0 -203
- data/lib/rbcurse/extras/listselectable.rb +0 -264
- data/lib/rbcurse/extras/masterdetail.rb +0 -166
- data/lib/rbcurse/extras/menutree.rb +0 -63
- data/lib/rbcurse/extras/multiform.rb +0 -330
- data/lib/rbcurse/extras/multilinelabel.rb +0 -142
- data/lib/rbcurse/extras/newmessagebox.rb +0 -328
- data/lib/rbcurse/extras/newtabbedpane.rb +0 -612
- data/lib/rbcurse/extras/newtabbedwindow.rb +0 -68
- data/lib/rbcurse/extras/padreader.rb +0 -189
- data/lib/rbcurse/extras/rcomboedit.rb +0 -256
- data/lib/rbcurse/extras/resultsetbrowser.rb +0 -281
- data/lib/rbcurse/extras/rlink.rb +0 -27
- data/lib/rbcurse/extras/rmenulink.rb +0 -21
- data/lib/rbcurse/extras/scrollbar.rb +0 -143
- data/lib/rbcurse/extras/statusline.rb +0 -94
- data/lib/rbcurse/extras/stdscrwindow.rb +0 -309
- data/lib/rbcurse/extras/tableextended.rb +0 -40
- data/lib/rbcurse/extras/tabular.rb +0 -264
- data/lib/rbcurse/extras/tabularwidget.rb +0 -1150
- data/lib/rbcurse/extras/textpad.rb +0 -516
- data/lib/rbcurse/extras/viewer.rb +0 -136
- data/lib/rbcurse/io.rb +0 -850
- data/lib/rbcurse/keylabelprinter.rb +0 -178
- data/lib/rbcurse/listcellrenderer.rb +0 -140
- data/lib/rbcurse/listeditable.rb +0 -310
- data/lib/rbcurse/listkeys.rb +0 -37
- data/lib/rbcurse/listscrollable.rb +0 -564
- data/lib/rbcurse/listselectable.rb +0 -142
- data/lib/rbcurse/mapper.rb +0 -130
- data/lib/rbcurse/orderedhash.rb +0 -77
- data/lib/rbcurse/ractionevent.rb +0 -67
- data/lib/rbcurse/rbasiclistbox.rb +0 -768
- data/lib/rbcurse/rchangeevent.rb +0 -27
- data/lib/rbcurse/rcombo.rb +0 -238
- data/lib/rbcurse/rcommandwindow.rb +0 -587
- data/lib/rbcurse/rcontainer.rb +0 -415
- data/lib/rbcurse/rdialogs.rb +0 -451
- data/lib/rbcurse/rinputdataevent.rb +0 -47
- data/lib/rbcurse/rlistbox.rb +0 -1196
- data/lib/rbcurse/rmenu.rb +0 -939
- data/lib/rbcurse/rmessagebox.rb +0 -348
- data/lib/rbcurse/rmulticontainer.rb +0 -304
- data/lib/rbcurse/rmultisplit.rb +0 -722
- data/lib/rbcurse/rmultitextview.rb +0 -306
- data/lib/rbcurse/rpopupmenu.rb +0 -755
- data/lib/rbcurse/rprogress.rb +0 -118
- data/lib/rbcurse/rscrollform.rb +0 -418
- data/lib/rbcurse/rtabbedpane.rb +0 -1158
- data/lib/rbcurse/rtabbedwindow.rb +0 -167
- data/lib/rbcurse/rtable.rb +0 -1718
- data/lib/rbcurse/rtextarea.rb +0 -920
- data/lib/rbcurse/rtextview.rb +0 -761
- data/lib/rbcurse/rtree.rb +0 -780
- data/lib/rbcurse/rvimsplit.rb +0 -763
- data/lib/rbcurse/rwidget.rb +0 -2915
- data/lib/rbcurse/scrollable.rb +0 -301
- data/lib/rbcurse/table/tablecellrenderer.rb +0 -86
- data/lib/rbcurse/table/tabledatecellrenderer.rb +0 -98
- data/lib/rbcurse/tree/treecellrenderer.rb +0 -150
- data/lib/rbcurse/tree/treemodel.rb +0 -428
- data/lib/rbcurse/undomanager.rb +0 -188
- data/lib/rbcurse/vieditable.rb +0 -144
- data/lib/ver/keyboard.rb +0 -150
- data/lib/ver/keyboard2.rb +0 -170
- data/lib/ver/ncurses.rb +0 -218
- data/lib/ver/panel.rb +0 -162
- data/lib/ver/rpad.rb +0 -375
- data/lib/ver/window.rb +0 -882
- data/test/test_rbcurse.rb +0 -0
data/examples/testvimsplit.rb
DELETED
@@ -1,112 +0,0 @@
|
|
1
|
-
# This is a new kind of splitpane, inspired by the vim editor.
|
2
|
-
# I was deeply frustrated with the Java kind of splitpane,
|
3
|
-
# which requires splitpanes within splitpanes to get several split.
|
4
|
-
# This is an attempt at getting many splits, keeping them at one level
|
5
|
-
# and keeping the interface as simple as possible, with minimal input
|
6
|
-
# from user.
|
7
|
-
# It usually takes a listbox or textview or textarea.
|
8
|
-
# It can also take an array, or string or hash.
|
9
|
-
# It supports moving the split, and increasing or decreasing the current box to some extent.
|
10
|
-
# Typically if the split is vertical, add stacks the components, one below the other.
|
11
|
-
# If horizontal, if will flow the components, to the right of previous. This can be overriden by passing
|
12
|
-
# type as :STACK or :FLOW.
|
13
|
-
#
|
14
|
-
# This does not support changing the orientation at run time, that's nice for demos, but a pain
|
15
|
-
# to get right, and results in a lot of extra code, meaning more bugs.
|
16
|
-
# TODO: create a class that contains component array and a pointer so it can give next/prev
|
17
|
-
# i am tired of maintaining this everywhere.
|
18
|
-
require 'rbcurse'
|
19
|
-
require 'rbcurse/rlistbox'
|
20
|
-
require 'rbcurse/rtextview'
|
21
|
-
require 'rbcurse/rvimsplit'
|
22
|
-
|
23
|
-
if $0 == __FILE__
|
24
|
-
class Tester
|
25
|
-
def initialize
|
26
|
-
acolor = $reversecolor
|
27
|
-
end
|
28
|
-
def run
|
29
|
-
@window = VER::Window.root_window
|
30
|
-
@form = Form.new @window
|
31
|
-
|
32
|
-
h = 20; w = 75; t = 3; l = 4
|
33
|
-
|
34
|
-
vf = :H
|
35
|
-
@vim = VimSplit.new @form, {:row => 2, :col => 5, :width => :EXPAND, :height => 25, :orientation => vf, :weight => 0.4}
|
36
|
-
lb = Listbox.new nil, :list => ["ruby","perl","lisp","jaava", "c-blunt"] , :name => "mylist"
|
37
|
-
lb1 = Listbox.new nil, :list => ["roger","borg","haas","tsonga", "kolya","delpotro"] , :name => "mylist1"
|
38
|
-
|
39
|
-
lb2 = Listbox.new nil, :list => `gem list --local`.split("\n") , :name => "mylist2"
|
40
|
-
|
41
|
-
alist = %w[ ruby perl python java jruby macruby rubinius rails rack sinatra pylons django cakephp grails]
|
42
|
-
str = "Hello people of this world.\nThis is a textbox.\nUse arrow keys, j/k/h/l/gg/G/C-a/C-e/C-n/C-p\n"
|
43
|
-
str << alist.join("\n")
|
44
|
-
stfl = vf == :V ? :FLOW : :STACK
|
45
|
-
@vim.add lb, :FIRST, :AUTO
|
46
|
-
@vim.add lb1, :FIRST, :AUTO #nil #0.7:AUTO
|
47
|
-
@vim.add ["mercury","venus","earth","mars","jupiter", "saturn"], :FIRST, :AUTO
|
48
|
-
@vim.add alist, :FIRST, 0.4, stfl
|
49
|
-
#@vim.add alist, :FIRST, nil, stfl
|
50
|
-
@vim.add alist.shuffle, :FIRST, nil, stfl
|
51
|
-
@vim.add lb2, :SECOND, :AUTO
|
52
|
-
@vim.add str, :SECOND, :AUTO
|
53
|
-
ok_button = Button.new @form do
|
54
|
-
text "+"
|
55
|
-
name "+"
|
56
|
-
row 27
|
57
|
-
col 10
|
58
|
-
end
|
59
|
-
#ok_button.command { |form| @vim.weight(@vim.weight + 0.1) }
|
60
|
-
ok_button.command { @vim.increase_weight }
|
61
|
-
|
62
|
-
|
63
|
-
k_button = Button.new @form do
|
64
|
-
text "-"
|
65
|
-
name "-"
|
66
|
-
row 27
|
67
|
-
col 17
|
68
|
-
end
|
69
|
-
#k_button.command { |form| @vim.weight( @vim.weight - 0.1) }
|
70
|
-
k_button.command { |form| @vim.decrease_weight }
|
71
|
-
|
72
|
-
#
|
73
|
-
@help = "F10 to quit. "
|
74
|
-
RubyCurses::Label.new @form, {'text' => @help, "row" => 1, "col" => 2, "color" => "yellow"}
|
75
|
-
@form.repaint
|
76
|
-
@window.wrefresh
|
77
|
-
Ncurses::Panel.update_panels
|
78
|
-
ctr = 0
|
79
|
-
row = 2
|
80
|
-
while((ch = @window.getchar()) != Ncurses::KEY_F10 )
|
81
|
-
ret = @form.handle_key(ch)
|
82
|
-
@window.wrefresh
|
83
|
-
#ret = @vim.handle_key ch
|
84
|
-
if ret == :UNHANDLED
|
85
|
-
str = keycode_tos ch
|
86
|
-
$log.debug " UNHANDLED #{str} by Vim #{ret} "
|
87
|
-
end
|
88
|
-
end
|
89
|
-
|
90
|
-
@window.destroy
|
91
|
-
|
92
|
-
end
|
93
|
-
end
|
94
|
-
include RubyCurses
|
95
|
-
include RubyCurses::Utils
|
96
|
-
# Initialize curses
|
97
|
-
begin
|
98
|
-
# XXX update with new color and kb
|
99
|
-
VER::start_ncurses # this is initializing colors via ColorMap.setup
|
100
|
-
$log = Logger.new("rbc13.log")
|
101
|
-
$log.level = Logger::DEBUG
|
102
|
-
n = Tester.new
|
103
|
-
n.run
|
104
|
-
rescue => ex
|
105
|
-
ensure
|
106
|
-
VER::stop_ncurses
|
107
|
-
p ex if ex
|
108
|
-
puts(ex.backtrace.join("\n")) if ex
|
109
|
-
$log.debug( ex) if ex
|
110
|
-
$log.debug(ex.backtrace.join("\n")) if ex
|
111
|
-
end
|
112
|
-
end
|
data/examples/testwsshortcuts.rb
DELETED
@@ -1,64 +0,0 @@
|
|
1
|
-
# this is a test program, tests out tabbed panes. type F1 to exit
|
2
|
-
#
|
3
|
-
require 'rbcurse'
|
4
|
-
require 'rbcurse/common/widgetshortcuts'
|
5
|
-
|
6
|
-
include RubyCurses
|
7
|
-
|
8
|
-
class SetupMessagebox
|
9
|
-
include RubyCurses::WidgetShortcuts
|
10
|
-
def initialize config={}, &block
|
11
|
-
@window = VER::Window.root_window
|
12
|
-
@form = Form.new @window
|
13
|
-
end
|
14
|
-
def run
|
15
|
-
_create_form
|
16
|
-
@form.repaint
|
17
|
-
@window.wrefresh
|
18
|
-
while ((ch = @window.getchar()) != 999)
|
19
|
-
break if ch == ?\C-q.getbyte(0)
|
20
|
-
@form.handle_key ch
|
21
|
-
@window.wrefresh
|
22
|
-
end
|
23
|
-
end
|
24
|
-
def _create_form
|
25
|
-
widget_shortcuts_init
|
26
|
-
stack :margin_top => 2, :margin_left => 3, :width => 50 , :color => :cyan, :bgcolor => :black do
|
27
|
-
label :text => " Details ", :color => :blue, :attr => :reverse, :width => :expand, :justify => :center
|
28
|
-
blank
|
29
|
-
field :text => "john", :attr => :reverse, :label => "%15s" % ["Name: "]
|
30
|
-
field :label => "%15s" % ["Address: "], :width => 15, :attr => :reverse
|
31
|
-
check :text => "Using version control", :value => true, :onvalue => "yes", :offvalue => "no"
|
32
|
-
check :text => "Upgraded to Lion", :value => false, :onvalue => "yes", :offvalue => "no"
|
33
|
-
blank
|
34
|
-
radio :text => "Linux", :value => "LIN", :group => :os
|
35
|
-
radio :text => "OSX", :value => "OSX", :group => :os
|
36
|
-
radio :text => "Window", :value => "Win", :group => :os
|
37
|
-
flow :margin_top => 2, :margin_left => 4, :item_width => 15 do
|
38
|
-
button :text => "Ok"
|
39
|
-
button :text => "Cancel"
|
40
|
-
button :text => "Apply"
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
end
|
46
|
-
if $0 == __FILE__
|
47
|
-
# Initialize curses
|
48
|
-
begin
|
49
|
-
# XXX update with new color and kb
|
50
|
-
VER::start_ncurses # this is initializing colors via ColorMap.setup
|
51
|
-
$log = Logger.new((File.join(ENV["LOGDIR"] || "./" ,"rbc13.log")))
|
52
|
-
$log.level = Logger::DEBUG
|
53
|
-
tp = SetupMessagebox.new()
|
54
|
-
buttonindex = tp.run
|
55
|
-
$log.debug "XXX: MESSAGEBOX retirned #{buttonindex} "
|
56
|
-
rescue => ex
|
57
|
-
ensure
|
58
|
-
VER::stop_ncurses
|
59
|
-
p ex if ex
|
60
|
-
p(ex.backtrace.join("\n")) if ex
|
61
|
-
$log.debug( ex) if ex
|
62
|
-
$log.debug(ex.backtrace.join("\n")) if ex
|
63
|
-
end
|
64
|
-
end
|
@@ -1,126 +0,0 @@
|
|
1
|
-
# this is a test program, tests out tabbed panes. type F1 to exit
|
2
|
-
#
|
3
|
-
require 'rbcurse'
|
4
|
-
require 'rbcurse/common/widgetshortcuts'
|
5
|
-
|
6
|
-
include RubyCurses
|
7
|
-
include RubyCurses::Utils
|
8
|
-
|
9
|
-
class SetupMessagebox
|
10
|
-
include RubyCurses::WidgetShortcuts
|
11
|
-
def initialize config={}, &block
|
12
|
-
@window = VER::Window.root_window
|
13
|
-
@form = Form.new @window
|
14
|
-
end
|
15
|
-
def run
|
16
|
-
_create_form
|
17
|
-
@form.repaint
|
18
|
-
@window.wrefresh
|
19
|
-
catch(:close) do
|
20
|
-
while ((ch = @window.getchar()) != 999)
|
21
|
-
break if ch == ?\C-q.getbyte(0)
|
22
|
-
@form.handle_key ch
|
23
|
-
@window.wrefresh
|
24
|
-
end
|
25
|
-
end # catch
|
26
|
-
end
|
27
|
-
def _create_form
|
28
|
-
widget_shortcuts_init
|
29
|
-
stack :margin_top => 1, :width => :expand do
|
30
|
-
label :text => " Details ", :color => :cyan, :attr => :reverse, :width => :expand, :justify => :center
|
31
|
-
flow :margin_top => 1, :margin_left => 4, :item_width => 50 do
|
32
|
-
stack :margin_top => 0, :margin_left => 3, :width => 50 , :color => :cyan, :bgcolor => :black do
|
33
|
-
box do
|
34
|
-
field :text => "steve", :attr => :reverse, :label => "%15s" % ["Name: "]
|
35
|
-
field :label => "%15s" % ["Address: "], :width => 15, :attr => :reverse
|
36
|
-
blank
|
37
|
-
check :text => "Using version control", :value => true, :onvalue => "yes", :offvalue => "no" do |eve|
|
38
|
-
unless eve.item.value
|
39
|
-
alert "NO VC! We need to talk"
|
40
|
-
end
|
41
|
-
end
|
42
|
-
check :text => "Upgraded to Lion", :value => false, :onvalue => "yes", :offvalue => "no" do |eve|
|
43
|
-
unless eve.item.value
|
44
|
-
alert "You goin back to Snow Leopard?"
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end # box
|
48
|
-
end
|
49
|
-
stack :margin_top => 0, :margin_left => 3, :width => 50 , :color => :cyan, :bgcolor => :black do
|
50
|
-
box :title => "OS Maintenance", :margin_left => 2 do
|
51
|
-
radio :text => "Linux", :value => "LIN", :group => :os
|
52
|
-
radio :text => "OSX", :value => "OSX", :group => :os
|
53
|
-
radio :text => "Window", :value => "Win", :group => :os
|
54
|
-
blank
|
55
|
-
flow :item_width => 15 do
|
56
|
-
button :text => "Install" do
|
57
|
-
# you can avoid this by giving the radio buttons your own Variable (see test2.rb)
|
58
|
-
choice = @variables[:os].value
|
59
|
-
case choice
|
60
|
-
when ""
|
61
|
-
alert "Select an OS"
|
62
|
-
when "OSX", "LIN"
|
63
|
-
alert "Good choice"
|
64
|
-
else
|
65
|
-
alert "Pfft !"
|
66
|
-
end
|
67
|
-
end
|
68
|
-
button :text => "Uninstall"
|
69
|
-
button :text => "Delete"
|
70
|
-
end
|
71
|
-
end # box
|
72
|
-
end
|
73
|
-
end # flow
|
74
|
-
#button :text => "Execute"
|
75
|
-
text = [" #[reverse]Unix Philosophy #[end] ",
|
76
|
-
"#[fg=green, underline]Eric Raymond#[end] in his book, #[fg=green, underline]The Art of Unix Programming#[end] summarized the Unix philosophy.",
|
77
|
-
" ",
|
78
|
-
"Rule of #[fg=yellow]Modularity#[end]: Write simple parts connected by clean interfaces.",
|
79
|
-
"Rule of #[fg=blue]Clarity#[end]: #[bold]Clarity#[end] is better than cleverness.",
|
80
|
-
"Rule of #[fg=red]Separation#[end]: Separate #[bold]policy#[end] from mechanism; separate interfaces from engines.",
|
81
|
-
"Rule of #[fg=green]Simplicity#[end]: Design for #[bold]simplicity;#[end] add complexity only where you must.",
|
82
|
-
"Rule of #[fg=magenta]Parsimony#[end]: Write a big program only when it is clear by demonstration that nothing else will do.",
|
83
|
-
"Rule of #[fg=cyan]Representation#[end]: Fold knowledge into #[bold]data#[end] so program logic can be stupid and robust"]
|
84
|
-
text << "For more check: #[underline]http://en.wikipedia.org/wiki/Unix_philosophy#Eric_Raymond#[end]"
|
85
|
-
formatted = []
|
86
|
-
#text.each { |line| formatted << @window.convert_to_chunk(line) }
|
87
|
-
|
88
|
-
#textview :text => formatted
|
89
|
-
#textview do |t| t.formatted_text(text, :tmux) end
|
90
|
-
t = textview :title => 'tmux format'
|
91
|
-
t.formatted_text(text, :tmux)
|
92
|
-
t1 = textview :title => 'ansi formatted document'
|
93
|
-
text = File.open("data/color.2","r").readlines
|
94
|
-
t1.formatted_text(text, :ansi)
|
95
|
-
|
96
|
-
flow do
|
97
|
-
#box do
|
98
|
-
button :text => " Ok " do alert "Pressed okay" end
|
99
|
-
button :text => "Cancel" do confirm "Quit?" ; throw :close; end
|
100
|
-
button :text => "Apply "
|
101
|
-
#end
|
102
|
-
end
|
103
|
-
|
104
|
-
end
|
105
|
-
|
106
|
-
end
|
107
|
-
end
|
108
|
-
if $0 == __FILE__
|
109
|
-
# Initialize curses
|
110
|
-
begin
|
111
|
-
# XXX update with new color and kb
|
112
|
-
VER::start_ncurses # this is initializing colors via ColorMap.setup
|
113
|
-
$log = Logger.new((File.join(ENV["LOGDIR"] || "./" ,"rbc13.log")))
|
114
|
-
$log.level = Logger::DEBUG
|
115
|
-
tp = SetupMessagebox.new()
|
116
|
-
buttonindex = tp.run
|
117
|
-
$log.debug "XXX: MESSAGEBOX retirned #{buttonindex} "
|
118
|
-
rescue => ex
|
119
|
-
ensure
|
120
|
-
VER::stop_ncurses
|
121
|
-
p ex if ex
|
122
|
-
p(ex.backtrace.join("\n")) if ex
|
123
|
-
$log.debug( ex) if ex
|
124
|
-
$log.debug(ex.backtrace.join("\n")) if ex
|
125
|
-
end
|
126
|
-
end
|
data/examples/todo.db
DELETED
Binary file
|
data/examples/todo.yml
DELETED
@@ -1,191 +0,0 @@
|
|
1
|
-
---
|
2
|
-
- - FIXME
|
3
|
-
- MSGBOX
|
4
|
-
- 5
|
5
|
-
- "Confirm dialog: box vertical line overwritten in 2 spots"
|
6
|
-
- TODO
|
7
|
-
- - FIXME
|
8
|
-
- MSGBOX
|
9
|
-
- 5
|
10
|
-
- "Confirm dialog: use normal key as hotkey also"
|
11
|
-
- TODO
|
12
|
-
- 2009-01-20 11:44:49.753534 +05:30
|
13
|
-
- - FIXME
|
14
|
-
- MSGBOX
|
15
|
-
- 5
|
16
|
-
- "Confirm dialog: arrow keys not navigating anylonger"
|
17
|
-
- TODO
|
18
|
-
- 2009-01-20 11:45:27.031136 +05:30
|
19
|
-
- - FIXME
|
20
|
-
- GEN
|
21
|
-
- 9
|
22
|
-
- Message Box sizing
|
23
|
-
- TODO
|
24
|
-
- 2009-01-22 20:39:21.220964 +05:30
|
25
|
-
- - DONE
|
26
|
-
- LIST
|
27
|
-
- 5
|
28
|
-
- case insensitive char search in list and combo
|
29
|
-
- TESTED
|
30
|
-
- 2009-02-21 20:43:05.662213 +05:30
|
31
|
-
- - DONE
|
32
|
-
- LIST
|
33
|
-
- 5
|
34
|
-
- case insensitive char search in list and combo
|
35
|
-
- TESTED
|
36
|
-
- 2009-02-21 20:44:29.277384 +05:30
|
37
|
-
- - DONE
|
38
|
-
- TABLE
|
39
|
-
- 5
|
40
|
-
- increase the maxlen of this field please. Let us see how it goes.
|
41
|
-
- TESTED
|
42
|
-
- - DONE
|
43
|
-
- TABLE
|
44
|
-
- 5
|
45
|
-
- Can we disable down arrow in Chkbox in table?
|
46
|
-
- TESTED
|
47
|
-
- 2009-01-19 00:00:00.242912 +05:30
|
48
|
-
- - DONE
|
49
|
-
- TABLE
|
50
|
-
- 0
|
51
|
-
- editing on enter
|
52
|
-
- TESTED
|
53
|
-
- 2009-01-19 01:37:00.242912 +05:30
|
54
|
-
- - DONE
|
55
|
-
- TABLE
|
56
|
-
- 5
|
57
|
-
- cell editors pcol is not being reset each time
|
58
|
-
- TESTED
|
59
|
-
- 2009-01-19 17:47:00.419937 +05:30
|
60
|
-
- - DONE
|
61
|
-
- TABLE
|
62
|
-
- 5
|
63
|
-
- Use TAB for intercell navig. use M-TAB for next f
|
64
|
-
- TESTED
|
65
|
-
- 2009-01-20 00:38:19.606544 +05:30
|
66
|
-
- - DONE
|
67
|
-
- TABLE
|
68
|
-
- 5
|
69
|
-
- Searching
|
70
|
-
- TESTED
|
71
|
-
- 2009-02-21 20:42:10.140948 +05:30
|
72
|
-
- - DONE
|
73
|
-
- TABLE
|
74
|
-
- 3
|
75
|
-
- Columns editable or not
|
76
|
-
- TESTED
|
77
|
-
- 2009-02-21 20:43:10.386261 +05:30
|
78
|
-
- - DONE
|
79
|
-
- TABLE
|
80
|
-
- 1
|
81
|
-
- Any way to start a table with no data and pop late
|
82
|
-
- TODO
|
83
|
-
- 2009-02-21 20:43:33.172668 +05:30
|
84
|
-
- - DONE
|
85
|
-
- TABLE
|
86
|
-
- 3
|
87
|
-
- Columns editable or not
|
88
|
-
- TESTED
|
89
|
-
- 2009-02-21 20:44:33.451462 +05:30
|
90
|
-
- - DONE
|
91
|
-
- TABLE
|
92
|
-
- 1
|
93
|
-
- Any way to start a table with no data and pop late
|
94
|
-
- TODO
|
95
|
-
- 2009-02-21 20:44:48.137930 +05:30
|
96
|
-
- - DONE
|
97
|
-
- GEN
|
98
|
-
- 5
|
99
|
-
- Make widget of Keylabelprinter
|
100
|
-
- TESTED
|
101
|
-
- 2009-01-20 00:38:43.052790 +05:30
|
102
|
-
- - DONE
|
103
|
-
- GEN
|
104
|
-
- 5
|
105
|
-
- "Added Action class shared by Button Menuitem "
|
106
|
-
- TESTED
|
107
|
-
- 2009-01-22 18:08:28.026892 +05:30
|
108
|
-
- - DONE
|
109
|
-
- GEN
|
110
|
-
- 5
|
111
|
-
- "Added PopupMenu 2009-01-22 18:09 "
|
112
|
-
- TESTED
|
113
|
-
- 2009-01-22 18:09:34.437147 +05:30
|
114
|
-
- - TODO
|
115
|
-
- LIST
|
116
|
-
- 0
|
117
|
-
- call on_enter and on_leave of component
|
118
|
-
- TOTEST
|
119
|
-
- 2009-01-19 15:38:27.091120 +05:30
|
120
|
-
- - TODO
|
121
|
-
- LIST
|
122
|
-
- 5
|
123
|
-
- case insensitive char search in list and combo
|
124
|
-
- TESTED
|
125
|
-
- - TODO
|
126
|
-
- TABLE
|
127
|
-
- 3
|
128
|
-
- Columns editable or not
|
129
|
-
- TESTED
|
130
|
-
- - TODO
|
131
|
-
- TABLE
|
132
|
-
- 1
|
133
|
-
- Any way to start a table with no data and pop late
|
134
|
-
- TODO
|
135
|
-
- - TODO
|
136
|
-
- TABLE
|
137
|
-
- 1
|
138
|
-
- table.set_data should check if models already created.
|
139
|
-
- TODO
|
140
|
-
- - TODO
|
141
|
-
- TABLE
|
142
|
-
- 5
|
143
|
-
- Set column_class in TableColumn, to avoid hassles
|
144
|
-
- TODO
|
145
|
-
- - TODO
|
146
|
-
- TABLE
|
147
|
-
- 2
|
148
|
-
- Table sorting and filtering is required - using VIEW
|
149
|
-
- TODO
|
150
|
-
- - TODO
|
151
|
-
- TABLE
|
152
|
-
- 5
|
153
|
-
- Table height and col widths auto sizing or FILLING extra space.
|
154
|
-
- TODO
|
155
|
-
- - TODO
|
156
|
-
- TEXTAREA
|
157
|
-
- 9
|
158
|
-
- "Textarea: wrap options NONE, COLUMN"
|
159
|
-
- TODO
|
160
|
-
- 2009-01-20 01:04:15.084400 +05:30
|
161
|
-
- - TODO
|
162
|
-
- GEN
|
163
|
-
- 5
|
164
|
-
- Modified should check if value changed, not UP etc
|
165
|
-
- TOTEST
|
166
|
-
- - TODO
|
167
|
-
- GEN
|
168
|
-
- 5
|
169
|
-
- Give a decent FileChooser and FileSaver
|
170
|
-
- TODO
|
171
|
-
- - TODO
|
172
|
-
- GEN
|
173
|
-
- 5
|
174
|
-
- Focus Traversable vs focusable
|
175
|
-
- TODO
|
176
|
-
- - TODO
|
177
|
-
- GEN
|
178
|
-
- 5
|
179
|
-
- "Action class: fire event for listeners"
|
180
|
-
- TODO
|
181
|
-
- 2009-01-22 20:09:50.624075 +05:30
|
182
|
-
- - TODO
|
183
|
-
- FIELD
|
184
|
-
- 5
|
185
|
-
- "Field: OVERWRITE Mode"
|
186
|
-
- TODO
|
187
|
-
- - TODO
|
188
|
-
- FIELD
|
189
|
-
- 5
|
190
|
-
- "Field: Auto-skip when reaching end of maxlen"
|
191
|
-
- TODO
|