canis 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +45 -0
- data/CHANGES +52 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +24 -0
- data/Rakefile +2 -0
- data/canis.gemspec +25 -0
- data/examples/alpmenu.rb +46 -0
- data/examples/app.sample +19 -0
- data/examples/appemail.rb +191 -0
- data/examples/atree.rb +105 -0
- data/examples/bline.rb +181 -0
- data/examples/common/devel.rb +319 -0
- data/examples/common/file.rb +93 -0
- data/examples/data/README.markdown +9 -0
- data/examples/data/brew.txt +38 -0
- data/examples/data/color.2 +37 -0
- data/examples/data/gemlist.txt +59 -0
- data/examples/data/lotr.txt +12 -0
- data/examples/data/ports.txt +136 -0
- data/examples/data/table.txt +37 -0
- data/examples/data/tasks.csv +88 -0
- data/examples/data/tasks.txt +27 -0
- data/examples/data/todo.txt +16 -0
- data/examples/data/todocsv.csv +28 -0
- data/examples/data/unix1.txt +21 -0
- data/examples/data/unix2.txt +11 -0
- data/examples/dbdemo.rb +506 -0
- data/examples/dirtree.rb +177 -0
- data/examples/newtabbedwindow.rb +100 -0
- data/examples/newtesttabp.rb +92 -0
- data/examples/tabular.rb +212 -0
- data/examples/tasks.rb +179 -0
- data/examples/term2.rb +88 -0
- data/examples/testbuttons.rb +307 -0
- data/examples/testcombo.rb +102 -0
- data/examples/testdb.rb +182 -0
- data/examples/testfields.rb +208 -0
- data/examples/testflowlayout.rb +43 -0
- data/examples/testkeypress.rb +98 -0
- data/examples/testlistbox.rb +187 -0
- data/examples/testlistbox1.rb +199 -0
- data/examples/testmessagebox.rb +144 -0
- data/examples/testprogress.rb +116 -0
- data/examples/testree.rb +107 -0
- data/examples/testsplitlayout.rb +53 -0
- data/examples/testsplitlayout1.rb +49 -0
- data/examples/teststacklayout.rb +48 -0
- data/examples/testwsshortcuts.rb +68 -0
- data/examples/testwsshortcuts2.rb +129 -0
- data/lib/canis.rb +16 -0
- data/lib/canis/core/docs/index.txt +104 -0
- data/lib/canis/core/docs/list.txt +16 -0
- data/lib/canis/core/docs/style_help.yml +34 -0
- data/lib/canis/core/docs/tabbedpane.txt +15 -0
- data/lib/canis/core/docs/table.txt +31 -0
- data/lib/canis/core/docs/textpad.txt +48 -0
- data/lib/canis/core/docs/tree.txt +23 -0
- data/lib/canis/core/include/.DS_Store +0 -0
- data/lib/canis/core/include/action.rb +83 -0
- data/lib/canis/core/include/actionmanager.rb +49 -0
- data/lib/canis/core/include/appmethods.rb +179 -0
- data/lib/canis/core/include/bordertitle.rb +49 -0
- data/lib/canis/core/include/canisparser.rb +100 -0
- data/lib/canis/core/include/colorparser.rb +437 -0
- data/lib/canis/core/include/defaultfilerenderer.rb +64 -0
- data/lib/canis/core/include/io.rb +320 -0
- data/lib/canis/core/include/layouts/SplitLayout.rb +161 -0
- data/lib/canis/core/include/layouts/abstractlayout.rb +213 -0
- data/lib/canis/core/include/layouts/flowlayout.rb +104 -0
- data/lib/canis/core/include/layouts/stacklayout.rb +109 -0
- data/lib/canis/core/include/listbindings.rb +89 -0
- data/lib/canis/core/include/listeditable.rb +319 -0
- data/lib/canis/core/include/listoperations.rb +61 -0
- data/lib/canis/core/include/listselectionmodel.rb +388 -0
- data/lib/canis/core/include/multibuffer.rb +173 -0
- data/lib/canis/core/include/ractionevent.rb +73 -0
- data/lib/canis/core/include/rchangeevent.rb +27 -0
- data/lib/canis/core/include/rhistory.rb +95 -0
- data/lib/canis/core/include/rinputdataevent.rb +47 -0
- data/lib/canis/core/include/textdocument.rb +111 -0
- data/lib/canis/core/include/vieditable.rb +175 -0
- data/lib/canis/core/include/widgetmenu.rb +66 -0
- data/lib/canis/core/system/colormap.rb +165 -0
- data/lib/canis/core/system/keydefs.rb +32 -0
- data/lib/canis/core/system/ncurses.rb +237 -0
- data/lib/canis/core/system/panel.rb +129 -0
- data/lib/canis/core/system/window.rb +1081 -0
- data/lib/canis/core/util/ansiparser.rb +119 -0
- data/lib/canis/core/util/app.rb +696 -0
- data/lib/canis/core/util/basestack.rb +412 -0
- data/lib/canis/core/util/defaultcolorparser.rb +84 -0
- data/lib/canis/core/util/extras/README +5 -0
- data/lib/canis/core/util/extras/bottomline.rb +1815 -0
- data/lib/canis/core/util/extras/padreader.rb +192 -0
- data/lib/canis/core/util/focusmanager.rb +31 -0
- data/lib/canis/core/util/helpmanager.rb +160 -0
- data/lib/canis/core/util/oldwidgetshortcuts.rb +304 -0
- data/lib/canis/core/util/promptmenu.rb +235 -0
- data/lib/canis/core/util/rcommandwindow.rb +933 -0
- data/lib/canis/core/util/rdialogs.rb +520 -0
- data/lib/canis/core/util/textutils.rb +74 -0
- data/lib/canis/core/util/viewer.rb +238 -0
- data/lib/canis/core/util/widgetshortcuts.rb +508 -0
- data/lib/canis/core/widgets/applicationheader.rb +103 -0
- data/lib/canis/core/widgets/box.rb +58 -0
- data/lib/canis/core/widgets/divider.rb +310 -0
- data/lib/canis/core/widgets/extras/README.md +12 -0
- data/lib/canis/core/widgets/extras/rtextarea.rb +960 -0
- data/lib/canis/core/widgets/extras/stackflow.rb +474 -0
- data/lib/canis/core/widgets/keylabelprinter.rb +194 -0
- data/lib/canis/core/widgets/listbox.rb +326 -0
- data/lib/canis/core/widgets/listfooter.rb +86 -0
- data/lib/canis/core/widgets/rcombo.rb +210 -0
- data/lib/canis/core/widgets/rcontainer.rb +415 -0
- data/lib/canis/core/widgets/rlink.rb +30 -0
- data/lib/canis/core/widgets/rmenu.rb +970 -0
- data/lib/canis/core/widgets/rmenulink.rb +30 -0
- data/lib/canis/core/widgets/rmessagebox.rb +400 -0
- data/lib/canis/core/widgets/rprogress.rb +118 -0
- data/lib/canis/core/widgets/rtabbedpane.rb +631 -0
- data/lib/canis/core/widgets/rtabbedwindow.rb +70 -0
- data/lib/canis/core/widgets/rwidget.rb +3634 -0
- data/lib/canis/core/widgets/scrollbar.rb +147 -0
- data/lib/canis/core/widgets/statusline.rb +113 -0
- data/lib/canis/core/widgets/table.rb +1072 -0
- data/lib/canis/core/widgets/tabular.rb +264 -0
- data/lib/canis/core/widgets/textpad.rb +1674 -0
- data/lib/canis/core/widgets/tree.rb +690 -0
- data/lib/canis/core/widgets/tree/treecellrenderer.rb +150 -0
- data/lib/canis/core/widgets/tree/treemodel.rb +432 -0
- data/lib/canis/version.rb +3 -0
- metadata +229 -0
@@ -0,0 +1,48 @@
|
|
1
|
+
# #!/usr/bin/env ruby -w
|
2
|
+
# ----------------------------------------------------------------------------- #
|
3
|
+
# File: teststacklayout.rb
|
4
|
+
# Description:
|
5
|
+
# Author: j kepler http://github.com/mare-imbrium/canis/
|
6
|
+
# Date: 2014-05-08 - 23:34
|
7
|
+
# License: MIT
|
8
|
+
# Last update: 2014-05-28 22:09
|
9
|
+
# ----------------------------------------------------------------------------- #
|
10
|
+
|
11
|
+
if __FILE__ == $PROGRAM_NAME
|
12
|
+
require 'canis/core/util/app'
|
13
|
+
require 'canis/core/widgets/listbox'
|
14
|
+
require 'canis/core/include/layouts/stacklayout'
|
15
|
+
App.new do
|
16
|
+
|
17
|
+
|
18
|
+
@form.bind_key(FFI::NCurses::KEY_F3,'view log') {
|
19
|
+
require 'canis/core/util/viewer'
|
20
|
+
Canis::Viewer.view("canis14.log", :close_key => KEY_ENTER, :title => "<Enter> to close")
|
21
|
+
}
|
22
|
+
# if i add form here, it will repaint them first, and have no dimensions
|
23
|
+
lb = Listbox.new @form, :list => ["borodin","berlioz","bernstein","balakirev", "elgar"] , :name => "mylist"
|
24
|
+
lb1 = Listbox.new @form, :list => ["bach","beethoven","mozart","gorecki", "chopin","wagner","grieg","holst"] , :name => "mylist1"
|
25
|
+
|
26
|
+
lb2 = Listbox.new @form, :list => `gem list --local`.split("\n") , :name => "mylist2"
|
27
|
+
=begin
|
28
|
+
|
29
|
+
alist = %w[ ruby perl python java jruby macruby rubinius rails rack sinatra pylons django cakephp grails]
|
30
|
+
str = "Hello, people of Earth.\nI am HAL, a textbox.\nUse arrow keys, j/k/h/l/gg/G/C-a/C-e/C-n/C-p\n"
|
31
|
+
str << alist.join("\n")
|
32
|
+
tv = TextPad.new @form, :name => "text", :text => str.split("\n")
|
33
|
+
=end
|
34
|
+
|
35
|
+
w = Ncurses.COLS-1
|
36
|
+
h = Ncurses.LINES-3
|
37
|
+
#layout = StackLayout.new :height => -1, :top_margin => 1, :bottom_margin => 1, :left_margin => 1
|
38
|
+
layout = StackLayout.new :height_pc => 1.0, :top_margin => 1, :bottom_margin => 1, :left_margin => 1
|
39
|
+
layout.form = @form
|
40
|
+
@form.layout_manager = layout
|
41
|
+
layout.weightage lb, 7
|
42
|
+
#layout.weightage lb1, 9
|
43
|
+
#$status_message.value =" Flow: #{@r.components[0].orientation} | Stack #{@r.components[1].orientation}. Use Ctrl-Space to change "
|
44
|
+
|
45
|
+
|
46
|
+
st = status_line :row => -1
|
47
|
+
end # app
|
48
|
+
end # if
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# this is a test program, tests out tabbed panes. type F1 to exit
|
2
|
+
#
|
3
|
+
require 'canis'
|
4
|
+
require 'canis/core/util/widgetshortcuts'
|
5
|
+
|
6
|
+
include Canis
|
7
|
+
|
8
|
+
class SetupMessagebox
|
9
|
+
include Canis::WidgetShortcuts
|
10
|
+
def initialize config={}, &block
|
11
|
+
@window = Canis::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", :default_button => true do throw :close; end
|
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
|
+
Canis::start_ncurses # this is initializing colors via ColorMap.setup
|
51
|
+
path = File.join(ENV["LOGDIR"] || "./" ,"canis14.log")
|
52
|
+
file = File.open(path, File::WRONLY|File::TRUNC|File::CREAT)
|
53
|
+
$log = Logger.new(path)
|
54
|
+
$log.level = Logger::DEBUG
|
55
|
+
catch(:close) do
|
56
|
+
tp = SetupMessagebox.new()
|
57
|
+
buttonindex = tp.run
|
58
|
+
$log.debug "XXX: MESSAGEBOX retirned #{buttonindex} "
|
59
|
+
end
|
60
|
+
rescue => ex
|
61
|
+
ensure
|
62
|
+
Canis::stop_ncurses
|
63
|
+
p ex if ex
|
64
|
+
p(ex.backtrace.join("\n")) if ex
|
65
|
+
$log.debug( ex) if ex
|
66
|
+
$log.debug(ex.backtrace.join("\n")) if ex
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,129 @@
|
|
1
|
+
# this is a test program, tests out widget shortcuts. type C-q to exit
|
2
|
+
#
|
3
|
+
require 'canis'
|
4
|
+
require 'canis/core/util/widgetshortcuts'
|
5
|
+
|
6
|
+
include Canis
|
7
|
+
include Canis::Utils
|
8
|
+
|
9
|
+
class SetupMessagebox
|
10
|
+
include Canis::WidgetShortcuts
|
11
|
+
def initialize config={}, &block
|
12
|
+
@window = Canis::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 Mavericks", :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
|
+
t.text(text, :content_type => :tmux)
|
93
|
+
t1 = textview :title => 'ansi formatted document'
|
94
|
+
text = File.open("data/color.2","r").readlines
|
95
|
+
#text = `ri -f bs String`.split("\n")
|
96
|
+
#t1.formatted_text(text, :ansi)
|
97
|
+
t1.text(text, :content_type => :ansi)
|
98
|
+
|
99
|
+
flow do
|
100
|
+
#box do
|
101
|
+
button :text => " Ok " do alert "Pressed okay" end
|
102
|
+
button :text => "Cancel" do throw :close if(confirm "Do you wish to Quit?") ; end
|
103
|
+
button :text => "Apply "
|
104
|
+
#end
|
105
|
+
end
|
106
|
+
|
107
|
+
end
|
108
|
+
|
109
|
+
end
|
110
|
+
end
|
111
|
+
if $0 == __FILE__
|
112
|
+
# Initialize curses
|
113
|
+
begin
|
114
|
+
# XXX update with new color and kb
|
115
|
+
Canis::start_ncurses # this is initializing colors via ColorMap.setup
|
116
|
+
$log = Logger.new((File.join(ENV["LOGDIR"] || "./" ,"canis14.log")))
|
117
|
+
$log.level = Logger::DEBUG
|
118
|
+
tp = SetupMessagebox.new()
|
119
|
+
buttonindex = tp.run
|
120
|
+
$log.debug "XXX: MESSAGEBOX retirned #{buttonindex} "
|
121
|
+
rescue => ex
|
122
|
+
ensure
|
123
|
+
Canis::stop_ncurses
|
124
|
+
p ex if ex
|
125
|
+
p(ex.backtrace.join("\n")) if ex
|
126
|
+
$log.debug( ex) if ex
|
127
|
+
$log.debug(ex.backtrace.join("\n")) if ex
|
128
|
+
end
|
129
|
+
end
|
data/lib/canis.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require "canis/version"
|
2
|
+
require 'ffi-ncurses'
|
3
|
+
require 'canis/core/system/ncurses'
|
4
|
+
require 'canis/core/system/window'
|
5
|
+
require 'canis/core/widgets/rwidget'
|
6
|
+
# added textpad here since it is now the basis of so many others 2014-04-09 - 12:57
|
7
|
+
require 'canis/core/widgets/textpad'
|
8
|
+
require 'canis/core/util/rdialogs'
|
9
|
+
|
10
|
+
module Canis
|
11
|
+
# key used to select a row in multiline widgets (earlier was SPACE but conflicted with paging)
|
12
|
+
$row_selector = 'v'.ord
|
13
|
+
# key used to range-select rows in multiline widgets (earlier was CTRL_SPACE )
|
14
|
+
$range_selector = 'V'.ord
|
15
|
+
# Your code goes here...
|
16
|
+
end
|
@@ -0,0 +1,104 @@
|
|
1
|
+
# G E N E R A L H E L P
|
2
|
+
=======================
|
3
|
+
<q> to quit this window. <Space> to scroll.
|
4
|
+
<TAB> goes to next link in help file. Press <ENTER> to open link.
|
5
|
+
|
6
|
+
_____________________________________________________________________
|
7
|
+
## 1. General Help
|
8
|
+
|
9
|
+
F10 - exit application. Also, <C-q>
|
10
|
+
F1 - Help
|
11
|
+
|
12
|
+
In some applications, the following may have been provided:
|
13
|
+
|
14
|
+
? - Should display all the key bindings available
|
15
|
+
for that widget. Alternatively, <M-?>
|
16
|
+
|
17
|
+
Alt-x - additional commands
|
18
|
+
: - additional commands
|
19
|
+
:! - system command
|
20
|
+
<C-x>c - system command
|
21
|
+
|
22
|
+
|
23
|
+
_____________________________________________________________________
|
24
|
+
## 2. Form
|
25
|
+
|
26
|
+
<Tab> and <backtab> navigate between widgets.
|
27
|
+
|
28
|
+
_____________________________________________________________________
|
29
|
+
## 3. Multiline widgets
|
30
|
+
|
31
|
+
In most widgets such as [[list]], [[textpad]], [[table]], and [[tree]] the
|
32
|
+
following vim-bindings are applicable.
|
33
|
+
|
34
|
+
j,k,l,h, gg, G, C-d, C-b, C-e, C-y, w, b, /
|
35
|
+
|
36
|
+
<space> scrolls
|
37
|
+
<Ctrl-Space> scroll up (aka C-@)
|
38
|
+
|
39
|
+
In multiline widgets such as _list_ and _tree_ to move to first item
|
40
|
+
starting with a character, press "f" followed by that character.
|
41
|
+
|
42
|
+
|
43
|
+
_____________________________________________________________________
|
44
|
+
## 4. Editable Widgets
|
45
|
+
|
46
|
+
In _field_ and editable _textarea_, some emacs/Pine keys such as C-e,
|
47
|
+
C-a, C-k (delete till end) are available.
|
48
|
+
|
49
|
+
<C-a> - start of line
|
50
|
+
<C-e> - end of line
|
51
|
+
<C-k> - delete till end of line
|
52
|
+
<M-i> - toggle overwrite mode
|
53
|
+
|
54
|
+
_____________________________________________________________________
|
55
|
+
## 5. Buttons
|
56
|
+
|
57
|
+
_Button_ can be fired using <space>. The default button, if
|
58
|
+
declared, is shown with as > Ok < as against other buttons, shown as [
|
59
|
+
Cancel ]. This can be fired by hitting <ENTER> anywhere on the form
|
60
|
+
(unless the current widget traps <ENTER>).
|
61
|
+
|
62
|
+
Pressing <ENTER> will trigger the default button, even if you are on
|
63
|
+
another button.
|
64
|
+
|
65
|
+
Hotkeys are available using Alt-<key> and will be displayed with an
|
66
|
+
underline if the TERM displays underlines.
|
67
|
+
|
68
|
+
_____________________________________________________________________
|
69
|
+
## 6. Others
|
70
|
+
|
71
|
+
### 6.1 Selection in lists
|
72
|
+
|
73
|
+
Please note that in earlier versions, <SPACE> was used for selection.
|
74
|
+
However, since this conflicts with the scrolling behavior in most
|
75
|
+
multiline widgtes, <SPACE> and <C-SPACE> are now exclusively used for
|
76
|
+
scrolling down and up. The characters "v" and "V" are used for
|
77
|
+
selection. This may be altered by setting "`$row_selector`".
|
78
|
+
|
79
|
+
v - toggle selection
|
80
|
+
V - range select
|
81
|
+
a - select all
|
82
|
+
u - unselect all (should be changed, as conflicts with
|
83
|
+
vim undo)
|
84
|
+
* - invert selection
|
85
|
+
|
86
|
+
- - `ask_unselect`
|
87
|
+
+ - `ask_select`
|
88
|
+
|
89
|
+
### 6.2 Terminal (TERM) settings
|
90
|
+
|
91
|
+
Some terminals (such as xterm) show underlines , however the 256color ones
|
92
|
+
do not.
|
93
|
+
|
94
|
+
Some terminals mess the screen output such as `xterm-256color`. At least
|
95
|
+
while working under `tmux` in `iTerm` (with solarized), this terminal was
|
96
|
+
messing the output.
|
97
|
+
Things are fine with `screen-256color`.
|
98
|
+
|
99
|
+
### 6.3 Other components
|
100
|
+
|
101
|
+
- [[tabbedpane]]
|
102
|
+
_____________________________________________________________________
|
103
|
+
q to quit, gg to goto top. <TAB> goes to next link in help file
|
104
|
+
Press <ENTER> to open link.
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Help for Lists
|
2
|
+
|
3
|
+
Lists support selection, either single or multiple.
|
4
|
+
|
5
|
+
Single selecion is done using "v" which is the visual mark key in vim.
|
6
|
+
In multiple selection, the "v" may be used to select multiple rows.
|
7
|
+
The "V" character may be used for range selection.
|
8
|
+
|
9
|
+
Lists also provide for inversion of selection (*), select all (a) and clear selection (u).
|
10
|
+
These bindings may have been modified by your individual application.
|
11
|
+
|
12
|
+
*Ask_select* and *Ask_Unselect* may be mapped for certain applications
|
13
|
+
allowing a user to give a pattern to select or unselect.
|
14
|
+
|
15
|
+
Lists support all other motion commands of [[Textpad]].
|
16
|
+
|
@@ -0,0 +1,34 @@
|
|
1
|
+
---
|
2
|
+
link:
|
3
|
+
:color: :yellow
|
4
|
+
:bgcolor: :black
|
5
|
+
:attr: :underline
|
6
|
+
bold:
|
7
|
+
:attr: :bold
|
8
|
+
em:
|
9
|
+
:color: :blue
|
10
|
+
:attr: :bold
|
11
|
+
strong:
|
12
|
+
:color: :yellow
|
13
|
+
:attr: :bold
|
14
|
+
code:
|
15
|
+
:color: :cyan
|
16
|
+
:bgcolor: 236
|
17
|
+
h1:
|
18
|
+
:attr: :reverse
|
19
|
+
h2:
|
20
|
+
:color: :green
|
21
|
+
:attr: :bold
|
22
|
+
h3:
|
23
|
+
:color: :yellow
|
24
|
+
key:
|
25
|
+
:color: :red
|
26
|
+
:attr: :bold
|
27
|
+
ul:
|
28
|
+
:color: :blue
|
29
|
+
:bgcolor: :black
|
30
|
+
:attr: :underline
|
31
|
+
wb:
|
32
|
+
:color: :white
|
33
|
+
:_bgcolor: :black
|
34
|
+
:attr: :bold
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Help for TabbedPanes
|
2
|
+
|
3
|
+
TabbedPanes allow multiple forms to occupy one area on the screen.
|
4
|
+
Following are some keys useful on a tabbedpane:
|
5
|
+
<
|
6
|
+
|
7
|
+
<TAB> - navigate between tabs or components
|
8
|
+
<DOWN> - navigate to the components of a tab
|
9
|
+
<UP> - navigate between components on a tab
|
10
|
+
or back to the the tabs
|
11
|
+
<SPACE> - activate the tab under cursor
|
12
|
+
Earlier, <ENTER> would have worked, but now
|
13
|
+
<ENTER> only fires the default button an a page.
|
14
|
+
>
|
15
|
+
(This page needs to be completed)
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Help for Tables
|
2
|
+
|
3
|
+
Tables are multirow components that support columnar information.
|
4
|
+
|
5
|
+
Columns may be resized, or hidden. Keys for this will have to be defined
|
6
|
+
by the application, if appropriate.
|
7
|
+
|
8
|
+
Data may be sorted on column by pressing <ENTER> on the header, if the
|
9
|
+
default table sorter has been enabled, or a custom sorter defined.
|
10
|
+
|
11
|
+
Tables support all or most motion commands of [[Textpad]].
|
12
|
+
|
13
|
+
Tables may be configured to support selection capabilities of [[List]]
|
14
|
+
if required.
|
15
|
+
|
16
|
+
Some operations on tables are as follows:
|
17
|
+
<
|
18
|
+
w - move to next column
|
19
|
+
b - move to previous column
|
20
|
+
<M--> - <Alt-minus> to reduce column width
|
21
|
+
<M-+> - <Alt-plus> to increase column width
|
22
|
+
<=> - press <equal> to size width of column to width of data in current column
|
23
|
+
|
24
|
+
>
|
25
|
+
|
26
|
+
Some basic row addition and editing facilities are also provided, which
|
27
|
+
must be bound to a key, if the application allows editing. It is
|
28
|
+
expected that an application will customize the basic row editing
|
29
|
+
feature for its needs. See |tabular.rb|.
|
30
|
+
|
31
|
+
(This page needs to be completed)
|