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
data/lib/tkextlib/blt/tree.rb
CHANGED
@@ -273,7 +273,7 @@ module Tk::BLT
|
|
273
273
|
TreeTagID_TBL.mutex.synchronize{ TreeTagID_TBL.clear }
|
274
274
|
}
|
275
275
|
|
276
|
-
(TreeTag_ID = ['blt_tree_tag'.freeze,
|
276
|
+
(TreeTag_ID = ['blt_tree_tag'.freeze, '00000']).instance_eval{
|
277
277
|
@mutex = Mutex.new
|
278
278
|
def mutex; @mutex; end
|
279
279
|
freeze
|
@@ -431,7 +431,7 @@ module Tk::BLT
|
|
431
431
|
elsif TkComm._callback_entry?(args[-1])
|
432
432
|
cmd = args.pop
|
433
433
|
elsif b
|
434
|
-
cmd =
|
434
|
+
cmd = b
|
435
435
|
else
|
436
436
|
fail ArgumentError, "lack of 'command' argument"
|
437
437
|
end
|
@@ -536,7 +536,7 @@ module Tk::BLT
|
|
536
536
|
|
537
537
|
if !cmd
|
538
538
|
if b
|
539
|
-
cmd =
|
539
|
+
cmd = b
|
540
540
|
else
|
541
541
|
fail ArgumentError, "lack of 'command' argument"
|
542
542
|
end
|
@@ -579,7 +579,7 @@ module Tk::BLT
|
|
579
579
|
|
580
580
|
TreeID_TBL = TkCore::INTERP.create_table
|
581
581
|
|
582
|
-
(Tree_ID = ['blt_tree'.freeze,
|
582
|
+
(Tree_ID = ['blt_tree'.freeze, '00000']).instance_eval{
|
583
583
|
@mutex = Mutex.new
|
584
584
|
def mutex; @mutex; end
|
585
585
|
freeze
|
@@ -600,8 +600,8 @@ module Tk::BLT
|
|
600
600
|
'recurse'=>nil, 'tags'=>nil,
|
601
601
|
|
602
602
|
# sort command
|
603
|
-
'ascii'=>nil, 'decreasing'=>nil, '
|
604
|
-
'integer'=>nil, 'real'=>nil, '
|
603
|
+
'ascii'=>nil, 'decreasing'=>nil, 'dictionary'=>nil,
|
604
|
+
'integer'=>nil, 'real'=>nil, 'reorder'=>nil,
|
605
605
|
}
|
606
606
|
end
|
607
607
|
|
@@ -367,20 +367,20 @@ class Tk::BLT::Treeview
|
|
367
367
|
list(tk_send('bbox', '-screen', *(tags.collect{|tag| tagid(tag)})))
|
368
368
|
end
|
369
369
|
|
370
|
-
def tag_bind(tag, seq, *args)
|
371
|
-
if TkComm._callback_entry?(args[0]) || !
|
370
|
+
def tag_bind(tag, seq, *args, &block)
|
371
|
+
if TkComm._callback_entry?(args[0]) || !block
|
372
372
|
cmd = args.shift
|
373
373
|
else
|
374
|
-
cmd =
|
374
|
+
cmd = block
|
375
375
|
end
|
376
376
|
_bind([@path, 'bind', tagid(tag)], seq, cmd, *args)
|
377
377
|
self
|
378
378
|
end
|
379
|
-
def tag_bind_append(tag, seq, *args)
|
380
|
-
if TkComm._callback_entry?(args[0]) || !
|
379
|
+
def tag_bind_append(tag, seq, *args, &block)
|
380
|
+
if TkComm._callback_entry?(args[0]) || !block
|
381
381
|
cmd = args.shift
|
382
382
|
else
|
383
|
-
cmd =
|
383
|
+
cmd = block
|
384
384
|
end
|
385
385
|
_bind_append([@path, 'bind', tagid(tag)], seq, cmd, *args)
|
386
386
|
self
|
@@ -398,20 +398,20 @@ class Tk::BLT::Treeview
|
|
398
398
|
self
|
399
399
|
end
|
400
400
|
|
401
|
-
def button_bind(tag, seq, *args)
|
402
|
-
if TkComm._callback_entry?(args[0]) || !
|
401
|
+
def button_bind(tag, seq, *args, &block)
|
402
|
+
if TkComm._callback_entry?(args[0]) || !block
|
403
403
|
cmd = args.shift
|
404
404
|
else
|
405
|
-
cmd =
|
405
|
+
cmd = block
|
406
406
|
end
|
407
407
|
_bind([@path, 'button', 'bind', tagid(tag)], seq, cmd, *args)
|
408
408
|
self
|
409
409
|
end
|
410
|
-
def button_bind_append(tag, seq, *args)
|
411
|
-
if TkComm._callback_entry?(args[0]) || !
|
410
|
+
def button_bind_append(tag, seq, *args, &block)
|
411
|
+
if TkComm._callback_entry?(args[0]) || !block
|
412
412
|
cmd = args.shift
|
413
413
|
else
|
414
|
-
cmd =
|
414
|
+
cmd = block
|
415
415
|
end
|
416
416
|
_bind_append([@path, 'button', 'bind', tagid(tag)], seq, cmd, *args)
|
417
417
|
self
|
@@ -1045,7 +1045,7 @@ class Tk::BLT::Treeview::Node < TkObject
|
|
1045
1045
|
|
1046
1046
|
TreeNodeID_TBL = TkCore::INTERP.create_table
|
1047
1047
|
|
1048
|
-
(TreeNode_ID = ['blt_treeview_node'.freeze,
|
1048
|
+
(TreeNode_ID = ['blt_treeview_node'.freeze, '00000']).instance_eval{
|
1049
1049
|
@mutex = Mutex.new
|
1050
1050
|
def mutex; @mutex; end
|
1051
1051
|
freeze
|
@@ -1166,7 +1166,7 @@ class Tk::BLT::Treeview::Tag < TkObject
|
|
1166
1166
|
|
1167
1167
|
TreeTagID_TBL = TkCore::INTERP.create_table
|
1168
1168
|
|
1169
|
-
(TreeTag_ID = ['blt_treeview_tag'.freeze,
|
1169
|
+
(TreeTag_ID = ['blt_treeview_tag'.freeze, '00000']).instance_eval{
|
1170
1170
|
@mutex = Mutex.new
|
1171
1171
|
def mutex; @mutex; end
|
1172
1172
|
freeze
|
data/lib/tkextlib/blt/watch.rb
CHANGED
@@ -15,7 +15,7 @@ module Tk::BLT
|
|
15
15
|
|
16
16
|
WATCH_ID_TBL = TkCore::INTERP.create_table
|
17
17
|
|
18
|
-
(BLT_WATCH_ID = ['blt_watch_id'.freeze,
|
18
|
+
(BLT_WATCH_ID = ['blt_watch_id'.freeze, '00000']).instance_eval{
|
19
19
|
@mutex = Mutex.new
|
20
20
|
def mutex; @mutex; end
|
21
21
|
freeze
|
@@ -39,31 +39,23 @@ class Tk::BWidget::LabelEntry
|
|
39
39
|
end
|
40
40
|
private :__font_optkeys
|
41
41
|
|
42
|
-
|
43
|
-
# _bind([path, 'bind'], *args)
|
44
|
-
# self
|
45
|
-
#end
|
46
|
-
def entrybind(context, *args)
|
42
|
+
def entrybind(context, *args, &block)
|
47
43
|
# if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
48
|
-
if TkComm._callback_entry?(args[0]) || !
|
44
|
+
if TkComm._callback_entry?(args[0]) || !block
|
49
45
|
cmd = args.shift
|
50
46
|
else
|
51
|
-
cmd =
|
47
|
+
cmd = block
|
52
48
|
end
|
53
49
|
_bind([path, 'bind'], context, cmd, *args)
|
54
50
|
self
|
55
51
|
end
|
56
52
|
|
57
|
-
|
58
|
-
# _bind_append([path, 'bind'], *args)
|
59
|
-
# self
|
60
|
-
#end
|
61
|
-
def entrybind_append(context, *args)
|
53
|
+
def entrybind_append(context, *args, &block)
|
62
54
|
#if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
63
|
-
if TkComm._callback_entry?(args[0]) || !
|
55
|
+
if TkComm._callback_entry?(args[0]) || !block
|
64
56
|
cmd = args.shift
|
65
57
|
else
|
66
|
-
cmd =
|
58
|
+
cmd = block
|
67
59
|
end
|
68
60
|
_bind_append([path, 'bind'], context, cmd, *args)
|
69
61
|
self
|
@@ -50,32 +50,24 @@ class Tk::BWidget::ListBox
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
-
|
54
|
-
# _bind_for_event_class(Event_for_Items, [path, 'bindImage'], *args)
|
55
|
-
# self
|
56
|
-
#end
|
57
|
-
def imagebind(context, *args)
|
53
|
+
def imagebind(context, *args, &block)
|
58
54
|
#if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
59
|
-
if TkComm._callback_entry?(args[0]) || !
|
55
|
+
if TkComm._callback_entry?(args[0]) || !block
|
60
56
|
cmd = args.shift
|
61
57
|
else
|
62
|
-
cmd =
|
58
|
+
cmd = block
|
63
59
|
end
|
64
60
|
_bind_for_event_class(Event_for_Items, [path, 'bindImage'],
|
65
61
|
context, cmd, *args)
|
66
62
|
self
|
67
63
|
end
|
68
64
|
|
69
|
-
|
70
|
-
# _bind_append_for_event_class(Event_for_Items, [path, 'bindImage'], *args)
|
71
|
-
# self
|
72
|
-
#end
|
73
|
-
def imagebind_append(context, *args)
|
65
|
+
def imagebind_append(context, *args, &block)
|
74
66
|
#if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
75
|
-
if TkComm._callback_entry?(args[0]) || !
|
67
|
+
if TkComm._callback_entry?(args[0]) || !block
|
76
68
|
cmd = args.shift
|
77
69
|
else
|
78
|
-
cmd =
|
70
|
+
cmd = block
|
79
71
|
end
|
80
72
|
_bind_append_for_event_class(Event_for_Items, [path, 'bindImage'],
|
81
73
|
context, cmd, *args)
|
@@ -91,32 +83,24 @@ class Tk::BWidget::ListBox
|
|
91
83
|
_bindinfo_for_event_class(Event_for_Items, [path, 'bindImage'], *args)
|
92
84
|
end
|
93
85
|
|
94
|
-
|
95
|
-
# _bind_for_event_class(Event_for_Items, [path, 'bindText'], *args)
|
96
|
-
# self
|
97
|
-
#end
|
98
|
-
def textbind(context, *args)
|
86
|
+
def textbind(context, *args, &block)
|
99
87
|
#if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
100
|
-
if TkComm._callback_entry?(args[0]) || !
|
88
|
+
if TkComm._callback_entry?(args[0]) || !block
|
101
89
|
cmd = args.shift
|
102
90
|
else
|
103
|
-
cmd =
|
91
|
+
cmd = block
|
104
92
|
end
|
105
93
|
_bind_for_event_class(Event_for_Items, [path, 'bindText'],
|
106
94
|
context, cmd, *args)
|
107
95
|
self
|
108
96
|
end
|
109
97
|
|
110
|
-
|
111
|
-
# _bind_append_for_event_class(Event_for_Items, [path, 'bindText'], *args)
|
112
|
-
# self
|
113
|
-
#end
|
114
|
-
def textbind_append(context, *args)
|
98
|
+
def textbind_append(context, *args, &block)
|
115
99
|
#if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
116
|
-
if TkComm._callback_entry?(args[0]) || !
|
100
|
+
if TkComm._callback_entry?(args[0]) || !block
|
117
101
|
cmd = args.shift
|
118
102
|
else
|
119
|
-
cmd =
|
103
|
+
cmd = block
|
120
104
|
end
|
121
105
|
_bind_append_for_event_class(Event_for_Items, [path, 'bindText'],
|
122
106
|
context, cmd, *args)
|
@@ -213,7 +197,7 @@ class Tk::BWidget::ListBox::Item
|
|
213
197
|
|
214
198
|
ListItem_TBL = TkCore::INTERP.create_table
|
215
199
|
|
216
|
-
(ListItem_ID = ['bw:item'.freeze,
|
200
|
+
(ListItem_ID = ['bw:item'.freeze, '00000']).instance_eval{
|
217
201
|
@mutex = Mutex.new
|
218
202
|
def mutex; @mutex; end
|
219
203
|
freeze
|
@@ -47,32 +47,24 @@ class Tk::BWidget::NoteBook
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
-
|
51
|
-
# _bind_for_event_class(Event_for_Tabs, [path, 'bindtabs'], *args)
|
52
|
-
# self
|
53
|
-
#end
|
54
|
-
def tabbind(context, *args)
|
50
|
+
def tabbind(context, *args, &block)
|
55
51
|
#if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
56
|
-
if TkComm._callback_entry?(args[0]) || !
|
52
|
+
if TkComm._callback_entry?(args[0]) || !block
|
57
53
|
cmd = args.shift
|
58
54
|
else
|
59
|
-
cmd =
|
55
|
+
cmd = block
|
60
56
|
end
|
61
57
|
_bind_for_event_class(Event_for_Tabs, [path, 'bindtabs'],
|
62
58
|
context, cmd, *args)
|
63
59
|
self
|
64
60
|
end
|
65
61
|
|
66
|
-
|
67
|
-
# _bind_append_for_event_class(Event_for_Tabs, [path, 'bindtabs'], *args)
|
68
|
-
# self
|
69
|
-
#end
|
70
|
-
def tabbind_append(context, *args)
|
62
|
+
def tabbind_append(context, *args, &block)
|
71
63
|
#if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
72
|
-
if TkComm._callback_entry?(args[0]) || !
|
64
|
+
if TkComm._callback_entry?(args[0]) || !block
|
73
65
|
cmd = args.shift
|
74
66
|
else
|
75
|
-
cmd =
|
67
|
+
cmd = block
|
76
68
|
end
|
77
69
|
_bind_append_for_event_class(Event_for_Tabs, [path, 'bindtabs'],
|
78
70
|
context, cmd, *args)
|
@@ -37,7 +37,7 @@ class Tk::BWidget::ProgressDlg
|
|
37
37
|
@keys['textvariable'].value
|
38
38
|
end
|
39
39
|
|
40
|
-
def text=
|
40
|
+
def text=(txt)
|
41
41
|
@keys['textvariable'].value = txt
|
42
42
|
end
|
43
43
|
|
@@ -49,7 +49,7 @@ class Tk::BWidget::ProgressDlg
|
|
49
49
|
@keys['variable'].value
|
50
50
|
end
|
51
51
|
|
52
|
-
def value=
|
52
|
+
def value=(val)
|
53
53
|
@keys['variable'].value = val
|
54
54
|
end
|
55
55
|
|
@@ -43,31 +43,23 @@ class Tk::BWidget::SpinBox
|
|
43
43
|
end
|
44
44
|
private :__tkvariable_optkeys
|
45
45
|
|
46
|
-
|
47
|
-
# _bind([path, 'bind'], *args)
|
48
|
-
# self
|
49
|
-
#end
|
50
|
-
def entrybind(context, *args)
|
46
|
+
def entrybind(context, *args, &block)
|
51
47
|
#if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
52
|
-
if TkComm._callback_entry?(args[0]) || !
|
48
|
+
if TkComm._callback_entry?(args[0]) || !block
|
53
49
|
cmd = args.shift
|
54
50
|
else
|
55
|
-
cmd =
|
51
|
+
cmd = block
|
56
52
|
end
|
57
53
|
_bind([path, 'bind'], context, cmd, *args)
|
58
54
|
self
|
59
55
|
end
|
60
56
|
|
61
|
-
|
62
|
-
# _bind_append([path, 'bind'], *args)
|
63
|
-
# self
|
64
|
-
#end
|
65
|
-
def entrybind_append(context, *args)
|
57
|
+
def entrybind_append(context, *args, &block)
|
66
58
|
#if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
67
|
-
if TkComm._callback_entry?(args[0]) || !
|
59
|
+
if TkComm._callback_entry?(args[0]) || !block
|
68
60
|
cmd = args.shift
|
69
61
|
else
|
70
|
-
cmd =
|
62
|
+
cmd = block
|
71
63
|
end
|
72
64
|
_bind_append([path, 'bind'], context, cmd, *args)
|
73
65
|
self
|
@@ -58,22 +58,22 @@ class Tk::BWidget::Tree
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
-
def areabind(context, *args)
|
62
|
-
if TkComm._callback_entry?(args[0]) || !
|
61
|
+
def areabind(context, *args, &block)
|
62
|
+
if TkComm._callback_entry?(args[0]) || !block
|
63
63
|
cmd = args.shift
|
64
64
|
else
|
65
|
-
cmd =
|
65
|
+
cmd = block
|
66
66
|
end
|
67
67
|
_bind_for_event_class(Event_for_Items, [path, 'bindArea'],
|
68
68
|
context, cmd, *args)
|
69
69
|
self
|
70
70
|
end
|
71
71
|
|
72
|
-
def areabind_append(context, *args)
|
73
|
-
if TkComm._callback_entry?(args[0]) || !
|
72
|
+
def areabind_append(context, *args, &block)
|
73
|
+
if TkComm._callback_entry?(args[0]) || !block
|
74
74
|
cmd = args.shift
|
75
75
|
else
|
76
|
-
cmd =
|
76
|
+
cmd = block
|
77
77
|
end
|
78
78
|
_bind_append_for_event_class(Event_for_Items, [path, 'bindArea'],
|
79
79
|
context, cmd, *args)
|
@@ -89,32 +89,24 @@ class Tk::BWidget::Tree
|
|
89
89
|
_bindinfo_for_event_class(Event_for_Items, [path, 'bindArea'], *args)
|
90
90
|
end
|
91
91
|
|
92
|
-
|
93
|
-
# _bind_for_event_class(Event_for_Items, [path, 'bindImage'], *args)
|
94
|
-
# self
|
95
|
-
#end
|
96
|
-
def imagebind(context, *args)
|
92
|
+
def imagebind(context, *args, &block)
|
97
93
|
#if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
98
|
-
if TkComm._callback_entry?(args[0]) || !
|
94
|
+
if TkComm._callback_entry?(args[0]) || !block
|
99
95
|
cmd = args.shift
|
100
96
|
else
|
101
|
-
cmd =
|
97
|
+
cmd = block
|
102
98
|
end
|
103
99
|
_bind_for_event_class(Event_for_Items, [path, 'bindImage'],
|
104
100
|
context, cmd, *args)
|
105
101
|
self
|
106
102
|
end
|
107
103
|
|
108
|
-
|
109
|
-
# _bind_append_for_event_class(Event_for_Items, [path, 'bindImage'], *args)
|
110
|
-
# self
|
111
|
-
#end
|
112
|
-
def imagebind_append(context, *args)
|
104
|
+
def imagebind_append(context, *args, &block)
|
113
105
|
#if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
114
|
-
if TkComm._callback_entry?(args[0]) || !
|
106
|
+
if TkComm._callback_entry?(args[0]) || !block
|
115
107
|
cmd = args.shift
|
116
108
|
else
|
117
|
-
cmd =
|
109
|
+
cmd = block
|
118
110
|
end
|
119
111
|
_bind_append_for_event_class(Event_for_Items, [path, 'bindImage'],
|
120
112
|
context, cmd, *args)
|
@@ -130,32 +122,24 @@ class Tk::BWidget::Tree
|
|
130
122
|
_bindinfo_for_event_class(Event_for_Items, [path, 'bindImage'], *args)
|
131
123
|
end
|
132
124
|
|
133
|
-
|
134
|
-
# _bind_for_event_class(Event_for_Items, [path, 'bindText'], *args)
|
135
|
-
# self
|
136
|
-
#end
|
137
|
-
def textbind(context, *args)
|
125
|
+
def textbind(context, *args, &block)
|
138
126
|
#if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
139
|
-
if TkComm._callback_entry?(args[0]) || !
|
127
|
+
if TkComm._callback_entry?(args[0]) || !block
|
140
128
|
cmd = args.shift
|
141
129
|
else
|
142
|
-
cmd =
|
130
|
+
cmd = block
|
143
131
|
end
|
144
132
|
_bind_for_event_class(Event_for_Items, [path, 'bindText'],
|
145
133
|
context, cmd, *args)
|
146
134
|
self
|
147
135
|
end
|
148
136
|
|
149
|
-
|
150
|
-
# _bind_append_for_event_class(Event_for_Items, [path, 'bindText'], *args)
|
151
|
-
# self
|
152
|
-
#end
|
153
|
-
def textbind_append(context, *args)
|
137
|
+
def textbind_append(context, *args, &block)
|
154
138
|
#if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
|
155
|
-
if TkComm._callback_entry?(args[0]) || !
|
139
|
+
if TkComm._callback_entry?(args[0]) || !block
|
156
140
|
cmd = args.shift
|
157
141
|
else
|
158
|
-
cmd =
|
142
|
+
cmd = block
|
159
143
|
end
|
160
144
|
_bind_append_for_event_class(Event_for_Items, [path, 'bindText'],
|
161
145
|
context, cmd, *args)
|
@@ -310,7 +294,7 @@ class Tk::BWidget::Tree::Node
|
|
310
294
|
|
311
295
|
TreeNode_TBL = TkCore::INTERP.create_table
|
312
296
|
|
313
|
-
(TreeNode_ID = ['bw:node'.freeze,
|
297
|
+
(TreeNode_ID = ['bw:node'.freeze, '00000']).instance_eval{
|
314
298
|
@mutex = Mutex.new
|
315
299
|
def mutex; @mutex; end
|
316
300
|
freeze
|