tk 0.1.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +2 -0
- data/MANUAL_tcltklib.eng +0 -2
- data/MANUAL_tcltklib.ja +0 -2
- data/README.ActiveTcl +1 -1
- data/README.md +53 -1
- data/ext/tk/extconf.rb +4 -2
- data/ext/tk/old-extconf.rb +0 -1
- data/ext/tk/tcltklib.c +47 -149
- data/ext/tk/tkutil/extconf.rb +0 -2
- data/ext/tk/tkutil/tkutil.c +6 -9
- data/lib/multi-tk.rb +99 -320
- data/lib/remote-tk.rb +8 -25
- data/lib/tk.rb +49 -130
- data/lib/tk/autoload.rb +3 -3
- data/lib/tk/bgerror.rb +2 -2
- data/lib/tk/bindtag.rb +1 -1
- data/lib/tk/canvas.rb +7 -15
- data/lib/tk/canvastag.rb +11 -19
- data/lib/tk/entry.rb +1 -1
- data/lib/tk/font.rb +1 -1
- data/lib/tk/fontchooser.rb +1 -1
- data/lib/tk/grid.rb +4 -4
- data/lib/tk/image.rb +1 -1
- data/lib/tk/itemconfig.rb +4 -4
- data/lib/tk/itemfont.rb +3 -3
- data/lib/tk/listbox.rb +1 -1
- data/lib/tk/menu.rb +4 -4
- data/lib/tk/menuspec.rb +0 -1
- data/lib/tk/msgcat.rb +5 -5
- data/lib/tk/namespace.rb +14 -34
- data/lib/tk/optiondb.rb +3 -74
- data/lib/tk/optionobj.rb +1 -1
- data/lib/tk/scale.rb +3 -3
- data/lib/tk/scrollable.rb +4 -2
- data/lib/tk/selection.rb +5 -4
- data/lib/tk/text.rb +9 -17
- data/lib/tk/textmark.rb +1 -1
- data/lib/tk/texttag.rb +7 -15
- data/lib/tk/timer.rb +2 -2
- data/lib/tk/tk_mac.rb +18 -18
- data/lib/tk/validation.rb +6 -37
- data/lib/tk/variable.rb +10 -8
- data/lib/tk/virtevent.rb +1 -1
- data/lib/tk/winfo.rb +1 -1
- data/lib/tkextlib/blt/barchart.rb +0 -17
- data/lib/tkextlib/blt/bitmap.rb +1 -1
- data/lib/tkextlib/blt/component.rb +40 -40
- data/lib/tkextlib/blt/dragdrop.rb +6 -6
- data/lib/tkextlib/blt/graph.rb +0 -17
- data/lib/tkextlib/blt/stripchart.rb +0 -17
- data/lib/tkextlib/blt/tabset.rb +16 -31
- data/lib/tkextlib/blt/tree.rb +6 -6
- data/lib/tkextlib/blt/treeview.rb +14 -14
- data/lib/tkextlib/blt/watch.rb +1 -1
- data/lib/tkextlib/bwidget/labelentry.rb +6 -14
- data/lib/tkextlib/bwidget/listbox.rb +13 -29
- data/lib/tkextlib/bwidget/notebook.rb +6 -14
- data/lib/tkextlib/bwidget/progressdlg.rb +2 -2
- data/lib/tkextlib/bwidget/spinbox.rb +6 -14
- data/lib/tkextlib/bwidget/tree.rb +19 -35
- data/lib/tkextlib/itcl/incr_tcl.rb +2 -2
- data/lib/tkextlib/itk/incr_tk.rb +7 -29
- data/lib/tkextlib/iwidgets/calendar.rb +0 -15
- data/lib/tkextlib/iwidgets/entryfield.rb +1 -22
- data/lib/tkextlib/iwidgets/notebook.rb +2 -2
- data/lib/tkextlib/iwidgets/promptdialog.rb +1 -1
- data/lib/tkextlib/iwidgets/scrolledcanvas.rb +6 -14
- data/lib/tkextlib/iwidgets/spinner.rb +1 -1
- data/lib/tkextlib/iwidgets/tabnotebook.rb +2 -2
- data/lib/tkextlib/iwidgets/tabset.rb +1 -1
- data/lib/tkextlib/pkg_checker.rb +1 -1
- data/lib/tkextlib/tcllib/crosshair.rb +2 -2
- data/lib/tkextlib/tcllib/ctext.rb +2 -2
- data/lib/tkextlib/tcllib/plotchart.rb +5 -5
- data/lib/tkextlib/tcllib/tablelist_core.rb +3 -3
- data/lib/tkextlib/tcllib/validator.rb +6 -6
- data/lib/tkextlib/tile.rb +1 -2
- data/lib/tkextlib/tile/style.rb +1 -1
- data/lib/tkextlib/tile/treeview.rb +15 -22
- data/lib/tkextlib/tkDND/tkdnd.rb +63 -24
- data/lib/tkextlib/tkHTML/htmlwidget.rb +1 -1
- data/lib/tkextlib/tktable/tktable.rb +2 -2
- data/lib/tkextlib/treectrl/tktreectrl.rb +13 -21
- data/lib/tkextlib/vu/pie.rb +1 -1
- data/sample/binding_sample.rb +2 -2
- data/sample/cmd_res_test.rb +1 -1
- data/sample/demos-en/widget +21 -21
- data/sample/demos-jp/widget +4 -4
- data/sample/multi-ip_sample.rb +0 -3
- data/sample/multi-ip_sample2.rb +1 -1
- data/sample/resource.en +3 -3
- data/sample/resource.ja +3 -3
- data/sample/tcltklib/sample1.rb +2 -2
- data/sample/tkballoonhelp.rb +2 -2
- data/sample/tkextlib/tkHTML/ss.rb +0 -6
- data/sample/tkmulticolumnlist.rb +2 -2
- data/sample/tkmultilistframe.rb +2 -2
- data/sample/tkoptdb.rb +14 -16
- data/tk.gemspec +7 -8
- metadata +13 -15
- data/ChangeLog.tkextlib +0 -949
- data/old-README.tcltklib.ja +0 -159
- data/sample/binstr_usage.rb +0 -46
- data/sample/remote-ip_sample2.rb +0 -57
- data/sample/safe-tk.rb +0 -132
- data/sample/tkoptdb-safeTk.rb +0 -74
- data/sample/tktree.rb +0 -104
- data/sample/tktree.tcl +0 -305
@@ -41,12 +41,12 @@ module Tk
|
|
41
41
|
class ItclObject < TkObject
|
42
42
|
ITCL_CLASSNAME = ''.freeze
|
43
43
|
|
44
|
-
(ITCL_OBJ_ID = ['itclobj'.freeze,
|
44
|
+
(ITCL_OBJ_ID = ['itclobj'.freeze, '00000']).instance_eval{
|
45
45
|
@mutex = Mutex.new
|
46
46
|
def mutex; @mutex; end
|
47
47
|
freeze
|
48
48
|
}
|
49
|
-
ITCL_OBJ_TBL =
|
49
|
+
ITCL_OBJ_TBL = {}
|
50
50
|
|
51
51
|
def initialize(*args)
|
52
52
|
if (@klass = self.class::ITCL_CLASSNAME).empty?
|
data/lib/tkextlib/itk/incr_tk.rb
CHANGED
@@ -147,7 +147,7 @@ module Tk
|
|
147
147
|
|
148
148
|
ComponentID_TBL = TkCore::INTERP.create_table
|
149
149
|
|
150
|
-
(Itk_Component_ID = ['itk:component'.freeze,
|
150
|
+
(Itk_Component_ID = ['itk:component'.freeze, '00000']).instance_eval{
|
151
151
|
@mutex = Mutex.new
|
152
152
|
def mutex; @mutex; end
|
153
153
|
freeze
|
@@ -360,18 +360,7 @@ module Tk
|
|
360
360
|
end
|
361
361
|
end
|
362
362
|
|
363
|
-
|
364
|
-
# unless @widget
|
365
|
-
# begin
|
366
|
-
# @widget = window(tk_call(@master, 'component', @component))
|
367
|
-
# @path = @widget.path
|
368
|
-
# rescue
|
369
|
-
# fail RuntimeError, 'component is not assigned to a widget'
|
370
|
-
# end
|
371
|
-
# end
|
372
|
-
# @widget.bind(*args)
|
373
|
-
#end
|
374
|
-
def bind(context, *args)
|
363
|
+
def bind(context, *args, &block)
|
375
364
|
unless @widget
|
376
365
|
begin
|
377
366
|
@widget = window(tk_call(@master, 'component', @component))
|
@@ -381,26 +370,15 @@ module Tk
|
|
381
370
|
end
|
382
371
|
end
|
383
372
|
# if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
384
|
-
if TkComm._callback_entry?(args[0]) || !
|
373
|
+
if TkComm._callback_entry?(args[0]) || !block
|
385
374
|
cmd = args.shift
|
386
375
|
else
|
387
|
-
cmd =
|
376
|
+
cmd = block
|
388
377
|
end
|
389
378
|
@widget.bind(context, cmd, *args)
|
390
379
|
end
|
391
380
|
|
392
|
-
|
393
|
-
# unless @widget
|
394
|
-
# begin
|
395
|
-
# @widget = window(tk_call(@master, 'component', @component))
|
396
|
-
# @path = @widget.path
|
397
|
-
# rescue
|
398
|
-
# fail RuntimeError, 'component is not assigned to a widget'
|
399
|
-
# end
|
400
|
-
# end
|
401
|
-
# @widget.bind_append(*args)
|
402
|
-
#end
|
403
|
-
def bind_append(context, *args)
|
381
|
+
def bind_append(context, *args, &block)
|
404
382
|
unless @widget
|
405
383
|
begin
|
406
384
|
@widget = window(tk_call(@master, 'component', @component))
|
@@ -410,10 +388,10 @@ module Tk
|
|
410
388
|
end
|
411
389
|
end
|
412
390
|
# if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
413
|
-
if TkComm._callback_entry?(args[0]) || !
|
391
|
+
if TkComm._callback_entry?(args[0]) || !block
|
414
392
|
cmd = args.shift
|
415
393
|
else
|
416
|
-
cmd =
|
394
|
+
cmd = block
|
417
395
|
end
|
418
396
|
@widget.bind_append(context, cmd, *args)
|
419
397
|
end
|
@@ -76,10 +76,6 @@ class Tk::Iwidgets::Calendar
|
|
76
76
|
# array of config-option key (string or symbol)
|
77
77
|
['command']
|
78
78
|
end
|
79
|
-
|
80
|
-
#def initialize(cmd = Proc.new, *args)
|
81
|
-
# _initialize_for_cb_class(CalCmdArgs, cmd, *args)
|
82
|
-
#end
|
83
79
|
end
|
84
80
|
|
85
81
|
def __validation_class_list
|
@@ -87,17 +83,6 @@ class Tk::Iwidgets::Calendar
|
|
87
83
|
end
|
88
84
|
|
89
85
|
Tk::ValidateConfigure.__def_validcmd(binding, CalendarCommand)
|
90
|
-
=begin
|
91
|
-
def command(cmd = Proc.new, args = nil)
|
92
|
-
if cmd.kind_of?(CalendarCommand)
|
93
|
-
configure('command', cmd)
|
94
|
-
elsif args
|
95
|
-
configure('command', [cmd, args])
|
96
|
-
else
|
97
|
-
configure('command', cmd)
|
98
|
-
end
|
99
|
-
end
|
100
|
-
=end
|
101
86
|
|
102
87
|
####################################
|
103
88
|
|
@@ -75,27 +75,6 @@ class Tk::Iwidgets::Entryfield
|
|
75
75
|
end
|
76
76
|
|
77
77
|
Tk::ValidateConfigure.__def_validcmd(binding, EntryfieldValidate)
|
78
|
-
=begin
|
79
|
-
def validate(cmd = Proc.new, args = nil)
|
80
|
-
if cmd.kind_of?(ValidateCmd)
|
81
|
-
configure('validate', cmd)
|
82
|
-
elsif args
|
83
|
-
configure('validate', [cmd, args])
|
84
|
-
else
|
85
|
-
configure('validate', cmd)
|
86
|
-
end
|
87
|
-
end
|
88
|
-
|
89
|
-
def invalid(cmd = Proc.new, args = nil)
|
90
|
-
if cmd.kind_of?(ValidateCmd)
|
91
|
-
configure('invalid', cmd)
|
92
|
-
elsif args
|
93
|
-
configure('invalid', [cmd, args])
|
94
|
-
else
|
95
|
-
configure('invalid', cmd)
|
96
|
-
end
|
97
|
-
end
|
98
|
-
=end
|
99
78
|
|
100
79
|
####################################
|
101
80
|
|
@@ -112,7 +91,7 @@ class Tk::Iwidgets::Entryfield
|
|
112
91
|
def value
|
113
92
|
_fromUTF8(tk_send_without_enc('get'))
|
114
93
|
end
|
115
|
-
def value=
|
94
|
+
def value=(val)
|
116
95
|
tk_send_without_enc('delete', 0, 'end')
|
117
96
|
tk_send_without_enc('insert', 0, _get_eval_enc_str(val))
|
118
97
|
val
|
@@ -118,8 +118,8 @@ class Tk::Iwidgets::Notebook
|
|
118
118
|
self
|
119
119
|
end
|
120
120
|
|
121
|
-
def scrollcommand(cmd=
|
122
|
-
configure_cmd
|
121
|
+
def scrollcommand(cmd=nil, &block)
|
122
|
+
configure_cmd('scrollcommand', cmd || block)
|
123
123
|
self
|
124
124
|
end
|
125
125
|
alias xscrollcommand scrollcommand
|
@@ -108,31 +108,23 @@ class Tk::Iwidgets::Scrolledcanvas
|
|
108
108
|
*tags.collect{|t| tagid(t)}))
|
109
109
|
end
|
110
110
|
|
111
|
-
|
112
|
-
# _bind([path, "bind", tagid(tag)], context, cmd, *args)
|
113
|
-
# self
|
114
|
-
#end
|
115
|
-
def itembind(tag, context, *args)
|
111
|
+
def itembind(tag, context, *args, &block)
|
116
112
|
# if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
117
|
-
if TkComm._callback_entry?(args[0]) || !
|
113
|
+
if TkComm._callback_entry?(args[0]) || !block
|
118
114
|
cmd = args.shift
|
119
115
|
else
|
120
|
-
cmd =
|
116
|
+
cmd = block
|
121
117
|
end
|
122
118
|
_bind([path, "bind", tagid(tag)], context, cmd, *args)
|
123
119
|
self
|
124
120
|
end
|
125
121
|
|
126
|
-
|
127
|
-
# _bind_append([path, "bind", tagid(tag)], context, cmd, *args)
|
128
|
-
# self
|
129
|
-
#end
|
130
|
-
def itembind_append(tag, context, *args)
|
122
|
+
def itembind_append(tag, context, *args, &block)
|
131
123
|
# if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
132
|
-
if TkComm._callback_entry?(args[0]) || !
|
124
|
+
if TkComm._callback_entry?(args[0]) || !block
|
133
125
|
cmd = args.shift
|
134
126
|
else
|
135
|
-
cmd =
|
127
|
+
cmd = block
|
136
128
|
end
|
137
129
|
_bind_append([path, "bind", tagid(tag)], context, cmd, *args)
|
138
130
|
self
|
@@ -124,8 +124,8 @@ class Tk::Iwidgets::Tabnotebook
|
|
124
124
|
self
|
125
125
|
end
|
126
126
|
|
127
|
-
def scrollcommand(cmd=
|
128
|
-
configure_cmd
|
127
|
+
def scrollcommand(cmd=nil, &block)
|
128
|
+
configure_cmd('scrollcommand', cmd || block)
|
129
129
|
self
|
130
130
|
end
|
131
131
|
alias xscrollcommand scrollcommand
|
@@ -106,7 +106,7 @@ class Tk::Iwidgets::Tabset
|
|
106
106
|
return
|
107
107
|
end
|
108
108
|
|
109
|
-
|
109
|
+
return unless @canvas ||= self.winfo_children[0]
|
110
110
|
|
111
111
|
delta = 1 if (delta = cget(:gap)) == 'overlap' ||
|
112
112
|
(delta = self.winfo_pixels(delta) + 1) <= 0
|
data/lib/tkextlib/pkg_checker.rb
CHANGED
@@ -76,10 +76,10 @@ class << Tk::Tcllib::Crosshair
|
|
76
76
|
private :itemcget_tkstring, :itemcget, :itemcget_strict
|
77
77
|
private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
|
78
78
|
|
79
|
-
def
|
79
|
+
def configure(w, slot, value=None)
|
80
80
|
itemconfigure(w, slot, value)
|
81
81
|
end
|
82
|
-
def
|
82
|
+
def configinfo(w, slot = nil)
|
83
83
|
itemconfiginfo(w, slot)
|
84
84
|
end
|
85
85
|
def current_configinfo(w, slot = nil)
|
@@ -150,8 +150,8 @@ class Tk::Tcllib::CText
|
|
150
150
|
tk_call('ctext::findPreviousSpace', @path, idx)
|
151
151
|
end
|
152
152
|
|
153
|
-
def set_update_proc(cmd=
|
154
|
-
tk_call('proc', 'ctext::update', '', cmd)
|
153
|
+
def set_update_proc(cmd=nil, &block)
|
154
|
+
tk_call('proc', 'ctext::update', '', cmd || block)
|
155
155
|
self
|
156
156
|
end
|
157
157
|
|
@@ -709,15 +709,15 @@ module Tk::Tcllib::Plotchart
|
|
709
709
|
end
|
710
710
|
private :_create_chart
|
711
711
|
|
712
|
-
def plot_function(cmd=
|
713
|
-
Tk.ip_eval("proc #{@path}_#{@chart} {x y} {#{install_cmd(cmd)} $x $y}")
|
712
|
+
def plot_function(cmd=nil, &block)
|
713
|
+
Tk.ip_eval("proc #{@path}_#{@chart} {x y} {#{install_cmd(cmd || block)} $x $y}")
|
714
714
|
tk_call_without_enc(@chart, 'plotfunc', "#{@path}_#{@chart}")
|
715
715
|
self
|
716
716
|
end
|
717
717
|
|
718
|
-
def plot_funcont(conts, cmd=
|
718
|
+
def plot_funcont(conts, cmd=nil, &block)
|
719
719
|
conts = array2tk_list(conts) if conts.kind_of?(Array)
|
720
|
-
Tk.ip_eval("proc #{@path}_#{@chart} {x y} {#{install_cmd(cmd)} $x $y}")
|
720
|
+
Tk.ip_eval("proc #{@path}_#{@chart} {x y} {#{install_cmd(cmd || block)} $x $y}")
|
721
721
|
tk_call_without_enc(@chart, 'plotfuncont', "#{@path}_#{@chart}", conts)
|
722
722
|
self
|
723
723
|
end
|
@@ -1360,7 +1360,7 @@ module Tk::Tcllib::Plotchart
|
|
1360
1360
|
class PlotSeries < TkObject
|
1361
1361
|
SeriesID_TBL = TkCore::INTERP.create_table
|
1362
1362
|
|
1363
|
-
(Series_ID = ['series'.freeze,
|
1363
|
+
(Series_ID = ['series'.freeze, '00000']).instance_eval{
|
1364
1364
|
@mutex = Mutex.new
|
1365
1365
|
def mutex; @mutex; end
|
1366
1366
|
freeze
|
@@ -212,7 +212,7 @@ class Tk::Tcllib::Tablelist
|
|
212
212
|
nil
|
213
213
|
else # cmd
|
214
214
|
tk_tcl2ruby(cmd)
|
215
|
-
|
215
|
+
end
|
216
216
|
})
|
217
217
|
end
|
218
218
|
private :__val2ruby_optkeys
|
@@ -888,12 +888,12 @@ class Tk::Tcllib::Tablelist
|
|
888
888
|
end
|
889
889
|
|
890
890
|
def sortcolumn
|
891
|
-
idx = num_or_str(tk_send('
|
891
|
+
idx = num_or_str(tk_send('sortcolumn'))
|
892
892
|
(idx.kind_of?(Fixnum) && idx < 0)? nil: idx
|
893
893
|
end
|
894
894
|
|
895
895
|
def sortcolumnlist
|
896
|
-
simplelist(tk_send('
|
896
|
+
simplelist(tk_send('sortcolumnlist')).map{|col| num_or_str(col)}
|
897
897
|
end
|
898
898
|
|
899
899
|
def sortorder
|
@@ -33,8 +33,8 @@ end
|
|
33
33
|
module Tk::Tcllib::Validator
|
34
34
|
extend TkCore
|
35
35
|
|
36
|
-
def self.attach(widget, color, cmd=
|
37
|
-
tk_call_without_enc('::widget::validator', 'attach', widget, color, cmd)
|
36
|
+
def self.attach(widget, color, cmd=nil, &block)
|
37
|
+
tk_call_without_enc('::widget::validator', 'attach', widget, color, cmd || block)
|
38
38
|
nil
|
39
39
|
end
|
40
40
|
|
@@ -48,17 +48,17 @@ module Tk::Tcllib::Validator
|
|
48
48
|
nil
|
49
49
|
end
|
50
50
|
|
51
|
-
def attach_validator(color, cmd=
|
52
|
-
tk_call_without_enc('::widget::validator', 'attach', @path, color, cmd)
|
51
|
+
def attach_validator(color, cmd=nil, &block)
|
52
|
+
tk_call_without_enc('::widget::validator', 'attach', @path, color, cmd || block)
|
53
53
|
self
|
54
54
|
end
|
55
55
|
|
56
|
-
def detach_validator(color, cmd=
|
56
|
+
def detach_validator(color, cmd=nil)
|
57
57
|
tk_call_without_enc('::widget::validator', 'detach', @path)
|
58
58
|
self
|
59
59
|
end
|
60
60
|
|
61
|
-
def invoke_validator(color, cmd=
|
61
|
+
def invoke_validator(color, cmd=nil)
|
62
62
|
tk_call_without_enc('::widget::validator', 'validate', @path)
|
63
63
|
self
|
64
64
|
end
|
data/lib/tkextlib/tile.rb
CHANGED
@@ -144,7 +144,6 @@ module Tk
|
|
144
144
|
# Tcl/Tk interpreter working under Ruby/Tk.
|
145
145
|
# Please give attention to use this method. It may conflict with
|
146
146
|
# some definitions on Tcl/Tk scripts.
|
147
|
-
klass_name = self.name
|
148
147
|
proc_name = 'LoadImages'
|
149
148
|
if Tk::Tile::USE_TTK_NAMESPACE
|
150
149
|
ns_list = ['::tile']
|
@@ -338,7 +337,7 @@ module Tk
|
|
338
337
|
if script
|
339
338
|
tk_send('instate', state, script)
|
340
339
|
elsif b
|
341
|
-
tk_send('instate', state,
|
340
|
+
tk_send('instate', state, b)
|
342
341
|
else
|
343
342
|
bool(tk_send('instate', state))
|
344
343
|
end
|
data/lib/tkextlib/tile/style.rb
CHANGED
@@ -32,7 +32,7 @@ module Tk::Tile::TreeviewConfig
|
|
32
32
|
if slot
|
33
33
|
slot = slot.to_s
|
34
34
|
|
35
|
-
|
35
|
+
_, real_name = __item_optkey_aliases(tagid(tagOrId)).find{|k, v| k.to_s == slot}
|
36
36
|
if real_name
|
37
37
|
slot = real_name.to_s
|
38
38
|
end
|
@@ -203,7 +203,7 @@ module Tk::Tile::TreeviewConfig
|
|
203
203
|
if slot
|
204
204
|
slot = slot.to_s
|
205
205
|
|
206
|
-
|
206
|
+
_, real_name = __item_optkey_aliases(tagid(tagOrId)).find{|k, v| k.to_s == slot}
|
207
207
|
if real_name
|
208
208
|
slot = real_name.to_s
|
209
209
|
end
|
@@ -939,7 +939,7 @@ class Tk::Tile::Treeview::Tag < TkObject
|
|
939
939
|
|
940
940
|
TagID_TBL = TkCore::INTERP.create_table
|
941
941
|
|
942
|
-
(Tag_ID = ['tile_treeview_tag'.freeze,
|
942
|
+
(Tag_ID = ['tile_treeview_tag'.freeze, '00000']).instance_eval{
|
943
943
|
@mutex = Mutex.new
|
944
944
|
def mutex; @mutex; end
|
945
945
|
freeze
|
@@ -999,21 +999,21 @@ class Tk::Tile::Treeview::Tag < TkObject
|
|
999
999
|
@t.tag_remove(@id, *items)
|
1000
1000
|
end
|
1001
1001
|
|
1002
|
-
def bind(seq, *args)
|
1003
|
-
if TkComm._callback_entry?(args[0]) || !
|
1002
|
+
def bind(seq, *args, &block)
|
1003
|
+
if TkComm._callback_entry?(args[0]) || !block
|
1004
1004
|
cmd = args.shift
|
1005
1005
|
else
|
1006
|
-
cmd =
|
1006
|
+
cmd = block
|
1007
1007
|
end
|
1008
1008
|
@t.tag_bind(@id, seq, cmd, *args)
|
1009
1009
|
self
|
1010
1010
|
end
|
1011
1011
|
|
1012
|
-
def bind_append(seq, *args)
|
1013
|
-
if TkComm._callback_entry?(args[0]) || !
|
1012
|
+
def bind_append(seq, *args, &block)
|
1013
|
+
if TkComm._callback_entry?(args[0]) || !block
|
1014
1014
|
cmd = args.shift
|
1015
1015
|
else
|
1016
|
-
cmd =
|
1016
|
+
cmd = block
|
1017
1017
|
end
|
1018
1018
|
@t.tag_bind_append(@id, seq, cmd, *args)
|
1019
1019
|
self
|
@@ -1191,13 +1191,6 @@ class Tk::Tile::Treeview < TkWindow
|
|
1191
1191
|
Tk::Tile::Treeview::Item.new(self, parent, idx, keys)
|
1192
1192
|
end
|
1193
1193
|
|
1194
|
-
# def instate(spec, cmd=Proc.new)
|
1195
|
-
# tk_send('instate', spec, cmd)
|
1196
|
-
# end
|
1197
|
-
# def state(spec=None)
|
1198
|
-
# tk_send('state', spec)
|
1199
|
-
# end
|
1200
|
-
|
1201
1194
|
def move(item, parent, idx)
|
1202
1195
|
tk_send('move', item, parent, idx)
|
1203
1196
|
self
|
@@ -1280,22 +1273,22 @@ class Tk::Tile::Treeview < TkWindow
|
|
1280
1273
|
}
|
1281
1274
|
end
|
1282
1275
|
|
1283
|
-
def tag_bind(tag, seq, *args)
|
1284
|
-
if TkComm._callback_entry?(args[0]) || !
|
1276
|
+
def tag_bind(tag, seq, *args, &block)
|
1277
|
+
if TkComm._callback_entry?(args[0]) || !block
|
1285
1278
|
cmd = args.shift
|
1286
1279
|
else
|
1287
|
-
cmd =
|
1280
|
+
cmd = block
|
1288
1281
|
end
|
1289
1282
|
_bind([@path, 'tag', 'bind', tag], seq, cmd, *args)
|
1290
1283
|
self
|
1291
1284
|
end
|
1292
1285
|
alias tagbind tag_bind
|
1293
1286
|
|
1294
|
-
def tag_bind_append(tag, seq, *args)
|
1295
|
-
if TkComm._callback_entry?(args[0]) || !
|
1287
|
+
def tag_bind_append(tag, seq, *args, &block)
|
1288
|
+
if TkComm._callback_entry?(args[0]) || !block
|
1296
1289
|
cmd = args.shift
|
1297
1290
|
else
|
1298
|
-
cmd =
|
1291
|
+
cmd = block
|
1299
1292
|
end
|
1300
1293
|
_bind_append([@path, 'tag', 'bind', tag], seq, cmd, *args)
|
1301
1294
|
self
|