summaryrefslogtreecommitdiff
path: root/ext/tk/sample
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/sample')
-rw-r--r--ext/tk/sample/binding_sample.rb36
-rw-r--r--ext/tk/sample/bindtag_sample.rb74
-rw-r--r--ext/tk/sample/cmd_res_test.rb2
-rw-r--r--ext/tk/sample/demos-en/arrow.rb74
-rw-r--r--ext/tk/sample/demos-en/bind.rb22
-rw-r--r--ext/tk/sample/demos-en/bitmap.rb16
-rw-r--r--ext/tk/sample/demos-en/check.rb2
-rw-r--r--ext/tk/sample/demos-en/check2.rb62
-rw-r--r--ext/tk/sample/demos-en/clrpick.rb6
-rw-r--r--ext/tk/sample/demos-en/cscroll.rb22
-rw-r--r--ext/tk/sample/demos-en/ctext.rb42
-rw-r--r--ext/tk/sample/demos-en/dialog2.rb6
-rw-r--r--ext/tk/sample/demos-en/entry3.rb74
-rw-r--r--ext/tk/sample/demos-en/filebox.rb14
-rw-r--r--ext/tk/sample/demos-en/floor.rb724
-rw-r--r--ext/tk/sample/demos-en/floor2.rb724
-rw-r--r--ext/tk/sample/demos-en/icon.rb14
-rw-r--r--ext/tk/sample/demos-en/image3.rb12
-rw-r--r--ext/tk/sample/demos-en/items.rb148
-rw-r--r--ext/tk/sample/demos-en/label.rb4
-rw-r--r--ext/tk/sample/demos-en/labelframe.rb22
-rw-r--r--ext/tk/sample/demos-en/menu.rb50
-rw-r--r--ext/tk/sample/demos-en/menu84.rb80
-rw-r--r--ext/tk/sample/demos-en/menubu.rb2
-rw-r--r--ext/tk/sample/demos-en/msgbox.rb24
-rw-r--r--ext/tk/sample/demos-en/paned1.rb14
-rw-r--r--ext/tk/sample/demos-en/paned2.rb54
-rw-r--r--ext/tk/sample/demos-en/plot.rb28
-rw-r--r--ext/tk/sample/demos-en/puzzle.rb8
-rw-r--r--ext/tk/sample/demos-en/radio2.rb14
-rw-r--r--ext/tk/sample/demos-en/radio3.rb52
-rw-r--r--ext/tk/sample/demos-en/ruler.rb50
-rw-r--r--ext/tk/sample/demos-en/sayings.rb6
-rw-r--r--ext/tk/sample/demos-en/search.rb78
-rw-r--r--ext/tk/sample/demos-en/spin.rb22
-rw-r--r--ext/tk/sample/demos-en/style.rb30
-rw-r--r--ext/tk/sample/demos-en/text.rb18
-rw-r--r--ext/tk/sample/demos-en/twind.rb138
-rw-r--r--ext/tk/sample/demos-en/twind2.rb244
-rw-r--r--ext/tk/sample/demos-en/unicodeout.rb42
-rw-r--r--ext/tk/sample/demos-en/widget246
-rw-r--r--ext/tk/sample/demos-jp/arrow.rb74
-rw-r--r--ext/tk/sample/demos-jp/bind.rb22
-rw-r--r--ext/tk/sample/demos-jp/bitmap.rb16
-rw-r--r--ext/tk/sample/demos-jp/check.rb2
-rw-r--r--ext/tk/sample/demos-jp/check2.rb62
-rw-r--r--ext/tk/sample/demos-jp/clrpick.rb6
-rw-r--r--ext/tk/sample/demos-jp/cscroll.rb22
-rw-r--r--ext/tk/sample/demos-jp/ctext.rb42
-rw-r--r--ext/tk/sample/demos-jp/dialog2.rb6
-rw-r--r--ext/tk/sample/demos-jp/entry3.rb74
-rw-r--r--ext/tk/sample/demos-jp/filebox.rb14
-rw-r--r--ext/tk/sample/demos-jp/floor.rb724
-rw-r--r--ext/tk/sample/demos-jp/floor2.rb724
-rw-r--r--ext/tk/sample/demos-jp/icon.rb14
-rw-r--r--ext/tk/sample/demos-jp/image3.rb12
-rw-r--r--ext/tk/sample/demos-jp/items.rb148
-rw-r--r--ext/tk/sample/demos-jp/label.rb4
-rw-r--r--ext/tk/sample/demos-jp/labelframe.rb22
-rw-r--r--ext/tk/sample/demos-jp/menu.rb50
-rw-r--r--ext/tk/sample/demos-jp/menu84.rb72
-rw-r--r--ext/tk/sample/demos-jp/menu8x.rb72
-rw-r--r--ext/tk/sample/demos-jp/menubu.rb2
-rw-r--r--ext/tk/sample/demos-jp/msgbox.rb24
-rw-r--r--ext/tk/sample/demos-jp/paned1.rb14
-rw-r--r--ext/tk/sample/demos-jp/paned2.rb56
-rw-r--r--ext/tk/sample/demos-jp/plot.rb28
-rw-r--r--ext/tk/sample/demos-jp/puzzle.rb8
-rw-r--r--ext/tk/sample/demos-jp/radio2.rb14
-rw-r--r--ext/tk/sample/demos-jp/radio3.rb52
-rw-r--r--ext/tk/sample/demos-jp/ruler.rb50
-rw-r--r--ext/tk/sample/demos-jp/sayings.rb6
-rw-r--r--ext/tk/sample/demos-jp/search.rb78
-rw-r--r--ext/tk/sample/demos-jp/spin.rb22
-rw-r--r--ext/tk/sample/demos-jp/style.rb42
-rw-r--r--ext/tk/sample/demos-jp/text.rb18
-rw-r--r--ext/tk/sample/demos-jp/twind.rb144
-rw-r--r--ext/tk/sample/demos-jp/twind2.rb220
-rw-r--r--ext/tk/sample/demos-jp/unicodeout.rb44
-rw-r--r--ext/tk/sample/demos-jp/widget292
-rw-r--r--ext/tk/sample/encstr_usage.rb4
-rw-r--r--ext/tk/sample/menubar2.rb10
-rw-r--r--ext/tk/sample/msgs_rb/ru.msg4
-rw-r--r--ext/tk/sample/multi-ip_sample.rb20
-rw-r--r--ext/tk/sample/multi-ip_sample2.rb2
-rw-r--r--ext/tk/sample/optobj_sample.rb20
-rw-r--r--ext/tk/sample/propagate.rb10
-rw-r--r--ext/tk/sample/remote-ip_sample.rb2
-rw-r--r--ext/tk/sample/remote-ip_sample2.rb18
-rw-r--r--ext/tk/sample/safe-tk.rb66
-rw-r--r--ext/tk/sample/tkalignbox.rb80
-rw-r--r--ext/tk/sample/tkballoonhelp.rb4
-rw-r--r--ext/tk/sample/tkbiff.rb12
-rw-r--r--ext/tk/sample/tkbrowse.rb8
-rw-r--r--ext/tk/sample/tkcombobox.rb40
-rw-r--r--ext/tk/sample/tkextlib/ICONS/viewIcons.rb56
-rw-r--r--ext/tk/sample/tkextlib/bwidget/basic.rb118
-rw-r--r--ext/tk/sample/tkextlib/bwidget/demo.rb138
-rw-r--r--ext/tk/sample/tkextlib/bwidget/dnd.rb16
-rw-r--r--ext/tk/sample/tkextlib/bwidget/manager.rb64
-rw-r--r--ext/tk/sample/tkextlib/bwidget/select.rb82
-rw-r--r--ext/tk/sample/tkextlib/bwidget/tmpldlg.rb180
-rw-r--r--ext/tk/sample/tkextlib/bwidget/tree.rb260
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/calendar.rb8
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/combobox.rb16
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/dialogshell.rb2
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/disjointlistbox.rb2
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/entryfield-1.rb18
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/entryfield-2.rb16
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/entryfield-3.rb16
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/extbutton.rb16
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/extfileselectionbox.rb2
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/extfileselectiondialog.rb6
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/fileselectionbox.rb2
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/fileselectiondialog.rb6
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb16
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/labeledwidget.rb4
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/mainwindow.rb82
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/menubar.rb170
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/menubar2.rb24
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/messagebox1.rb6
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/messagebox2.rb6
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/messagedialog.rb8
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/notebook.rb2
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/notebook2.rb2
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/optionmenu.rb2
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/panedwindow.rb2
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/panedwindow2.rb2
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/promptdialog.rb2
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/pushbutton.rb4
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/scrolledframe.rb2
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/scrolledhtml.rb6
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/scrolledlistbox.rb20
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/scrolledtext.rb2
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/selectionbox.rb4
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/selectiondialog.rb2
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/shell.rb8
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/spinint.rb2
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/spinner.rb8
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook.rb2
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook2.rb2
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/toolbar.rb2
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/watch.rb2
-rw-r--r--ext/tk/sample/tkextlib/tcllib/datefield.rb4
-rw-r--r--ext/tk/sample/tkextlib/tcllib/plotdemos1.rb22
-rw-r--r--ext/tk/sample/tkextlib/tcllib/plotdemos2.rb30
-rw-r--r--ext/tk/sample/tkextlib/tcllib/plotdemos3.rb38
-rw-r--r--ext/tk/sample/tkextlib/tcllib/xyplot.rb2
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/hv.rb68
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/ss.rb52
-rw-r--r--ext/tk/sample/tkextlib/tktable/basic.rb26
-rw-r--r--ext/tk/sample/tkextlib/tktable/buttons.rb40
-rw-r--r--ext/tk/sample/tkextlib/tktable/command.rb74
-rw-r--r--ext/tk/sample/tkextlib/tktable/debug.rb24
-rw-r--r--ext/tk/sample/tkextlib/tktable/dynarows.rb34
-rw-r--r--ext/tk/sample/tkextlib/tktable/maxsize.rb18
-rw-r--r--ext/tk/sample/tkextlib/tktable/spreadsheet.rb56
-rw-r--r--ext/tk/sample/tkextlib/tktable/valid.rb18
-rw-r--r--ext/tk/sample/tkextlib/vu/canvItems.rb68
-rw-r--r--ext/tk/sample/tkextlib/vu/canvSticker.rb4
-rw-r--r--ext/tk/sample/tkextlib/vu/canvSticker2.rb24
-rw-r--r--ext/tk/sample/tkextlib/vu/dial.rb78
-rw-r--r--ext/tk/sample/tkextlib/vu/oscilloscope.rb34
-rw-r--r--ext/tk/sample/tkextlib/vu/pie.rb28
-rw-r--r--ext/tk/sample/tkextlib/vu/vu.rb48
-rw-r--r--ext/tk/sample/tkfrom.rb12
-rw-r--r--ext/tk/sample/tkhello.rb8
-rw-r--r--ext/tk/sample/tkline.rb4
-rw-r--r--ext/tk/sample/tkmenubutton.rb38
-rw-r--r--ext/tk/sample/tkmsgcat-load_rb.rb30
-rw-r--r--ext/tk/sample/tkmsgcat-load_rb2.rb30
-rw-r--r--ext/tk/sample/tkmsgcat-load_tk.rb52
-rw-r--r--ext/tk/sample/tkmulticolumnlist.rb284
-rw-r--r--ext/tk/sample/tkmultilistbox.rb156
-rw-r--r--ext/tk/sample/tkmultilistframe.rb246
-rw-r--r--ext/tk/sample/tkoptdb-safeTk.rb6
-rw-r--r--ext/tk/sample/tkoptdb.rb42
-rw-r--r--ext/tk/sample/tktextframe.rb12
-rw-r--r--ext/tk/sample/tktree.rb12
179 files changed, 5018 insertions, 5018 deletions
diff --git a/ext/tk/sample/binding_sample.rb b/ext/tk/sample/binding_sample.rb
index b98cd66a2e..693cc7de2f 100644
--- a/ext/tk/sample/binding_sample.rb
+++ b/ext/tk/sample/binding_sample.rb
@@ -24,17 +24,17 @@ class Button_clone < TkLabel
self.bind('Enter', proc{self.background(self.activebackground)})
self.bind('Leave', proc{
- @press = false
- self.background(self.highlightbackground)
- self.relief('raised')
- })
+ @press = false
+ self.background(self.highlightbackground)
+ self.relief('raised')
+ })
self.bind('ButtonPress-1', proc{@press = true; self.relief('sunken')})
self.bind('ButtonRelease-1', proc{
- self.relief('raised')
- @command.call if @press && @command
- @press = false
- })
+ self.relief('raised')
+ @command.call if @press && @command
+ @press = false
+ })
end
def command(cmd = Proc.new)
@@ -67,20 +67,20 @@ TkFrame.new{|f|
}.pack
TkButton.new(:text=>'normal Button widget',
- :command=>proc{
- puts 'button is clicked!!'
- lbl.text 'button is clicked!!'
- v.numeric += 1
- }){
+ :command=>proc{
+ puts 'button is clicked!!'
+ lbl.text 'button is clicked!!'
+ v.numeric += 1
+ }){
pack(:fill=>:x, :expand=>true)
}
Button_clone.new(:text=>'Label with Button binding',
- :command=>proc{
- puts 'label is clicked!!'
- lbl.text 'label is clicked!!'
- v.numeric += 1
- }){
+ :command=>proc{
+ puts 'label is clicked!!'
+ lbl.text 'label is clicked!!'
+ v.numeric += 1
+ }){
pack(:fill=>:x, :expand=>true)
}
diff --git a/ext/tk/sample/bindtag_sample.rb b/ext/tk/sample/bindtag_sample.rb
index caf7a2d750..8c93b4a260 100644
--- a/ext/tk/sample/bindtag_sample.rb
+++ b/ext/tk/sample/bindtag_sample.rb
@@ -12,9 +12,9 @@ EOT
def set_class_bind
TkButton.bind('ButtonPress-1',
- proc{puts 'bind "ButtonPress-1" of TkButton class'})
+ proc{puts 'bind "ButtonPress-1" of TkButton class'})
TkButton.bind('ButtonRelease-1',
- proc{puts 'bind "ButtonRelease-1" of TkButton class'})
+ proc{puts 'bind "ButtonRelease-1" of TkButton class'})
end
# set root binding
@@ -24,21 +24,21 @@ r.bind('ButtonRelease-1', proc{puts 'bind "ButtonRelease-1" of root widget'})
# set 'all' binding
TkBindTag::ALL.bind('ButtonPress-1',
- proc{puts 'bind "ButtonPress-1" of the tag "all"'})
+ proc{puts 'bind "ButtonPress-1" of the tag "all"'})
TkBindTag::ALL.bind('ButtonRelease-1',
- proc{puts 'bind "ButtonRelease-1" of the tag "all"'})
+ proc{puts 'bind "ButtonRelease-1" of the tag "all"'})
# create buttons
b1 = TkButton.new(:text=>'button-1',
- :command=>proc{puts "command of button-1"}).pack
+ :command=>proc{puts "command of button-1"}).pack
b2 = TkButton.new(:text=>'button-2',
- :command=>proc{puts "command of button-2"}).pack
+ :command=>proc{puts "command of button-2"}).pack
b3 = TkButton.new(:text=>'button-3',
- :command=>proc{puts "command of button-3"}).pack
+ :command=>proc{puts "command of button-3"}).pack
b4 = TkButton.new(:text=>'button-4',
- :command=>proc{puts "command of button-4"}).pack
+ :command=>proc{puts "command of button-4"}).pack
b5 = TkButton.new(:text=>'button-5',
- :command=>proc{puts "command of button-5"}).pack
+ :command=>proc{puts "command of button-5"}).pack
# set button binding
b1.bind('ButtonPress-1', proc{puts 'bind "ButtonPress-1" of button-1'})
@@ -63,35 +63,35 @@ tag1.bind('ButtonRelease-1', proc{puts 'bind "ButtonRelease-1" of tag1'})
tag2 = TkBindTag.new
tag2.bind('ButtonPress-1',
- proc{
- puts 'bind "ButtonPress-1" of tag2'
- puts 'call Tk.callback_continue'
- Tk.callback_continue
- puts 'never see this message'
- })
+ proc{
+ puts 'bind "ButtonPress-1" of tag2'
+ puts 'call Tk.callback_continue'
+ Tk.callback_continue
+ puts 'never see this message'
+ })
tag2.bind('ButtonRelease-1',
- proc{
- puts 'bind "ButtonRelease-1" of tag2'
- puts 'call Tk.callback_continue'
- Tk.callback_continue
- puts 'never see this message'
- })
+ proc{
+ puts 'bind "ButtonRelease-1" of tag2'
+ puts 'call Tk.callback_continue'
+ Tk.callback_continue
+ puts 'never see this message'
+ })
tag3 = TkBindTag.new
tag3.bind('ButtonPress-1',
- proc{
- puts 'bind "ButtonPress-1" of tag3'
- puts 'call Tk.callback_break'
- Tk.callback_break
- puts 'never see this message'
- })
+ proc{
+ puts 'bind "ButtonPress-1" of tag3'
+ puts 'call Tk.callback_break'
+ Tk.callback_break
+ puts 'never see this message'
+ })
tag3.bind('ButtonRelease-1',
- proc{
- puts 'bind "ButtonRelease-1" of tag3'
- puts 'call Tk.callback_break'
- Tk.callback_break
- puts 'never see this message'
- })
+ proc{
+ puts 'bind "ButtonRelease-1" of tag3'
+ puts 'call Tk.callback_break'
+ Tk.callback_break
+ puts 'never see this message'
+ })
# set bindtags
p b1.bindtags
@@ -118,10 +118,10 @@ b5.bindtags([tag1, TkButton, tag2, b5])
# create button to set button class binding
TkButton.new(:text=>'set binding to TkButton class',
- :command=>proc{
- puts 'call "set_class_bind"'
- set_class_bind
- }).pack(:pady=>7)
+ :command=>proc{
+ puts 'call "set_class_bind"'
+ set_class_bind
+ }).pack(:pady=>7)
# start event-loop
Tk.mainloop
diff --git a/ext/tk/sample/cmd_res_test.rb b/ext/tk/sample/cmd_res_test.rb
index 9bbb2044ce..6e954f26ee 100644
--- a/ext/tk/sample/cmd_res_test.rb
+++ b/ext/tk/sample/cmd_res_test.rb
@@ -1,6 +1,6 @@
require 'tk'
TkOptionDB.readfile(File.expand_path('cmd_resource',
- File.dirname(__FILE__)))
+ File.dirname(__FILE__)))
f = TkFrame.new(:class=>'BtnFrame').pack
b = TkButton.new(:parent=>f, :widgetname=>'hello').pack
cmd1 = TkOptionDB.new_proc_class(b, [:show_msg, :bye_msg], 3)
diff --git a/ext/tk/sample/demos-en/arrow.rb b/ext/tk/sample/demos-en/arrow.rb
index 3f07b8e660..b62e1966eb 100644
--- a/ext/tk/sample/demos-en/arrow.rb
+++ b/ext/tk/sample/demos-en/arrow.rb
@@ -13,7 +13,7 @@
# interactively.
#
# Arguments:
-# c - Name of the canvas widget.
+# c - Name of the canvas widget.
def arrowSetup(c)
v = $demo_arrowInfo
@@ -29,59 +29,59 @@ def arrowSetup(c)
# Create the arrow and outline.
c.delete('all')
TkcLine.new(c, v.x1, v.y, v.x2, v.y,
- { 'width'=>10 * v.width,
- 'arrowshape'=>[10*v.a, 10*v.b, 10*v.c],
- 'arrow'=>'last'
- }.update(v.bigLineStyle) )
+ { 'width'=>10 * v.width,
+ 'arrowshape'=>[10*v.a, 10*v.b, 10*v.c],
+ 'arrow'=>'last'
+ }.update(v.bigLineStyle) )
xtip = v.x2 - 10*v.b
deltaY = 10*v.c + 5*v.width
TkcLine.new(c, v.x2, v.y, xtip, v.y + deltaY,
- v.x2 - 10*v.a, v.y, xtip, v.y - deltaY, v.x2, v.y,
- 'width'=>2, 'capstyle'=>'round', 'joinstyle'=>'round')
+ v.x2 - 10*v.a, v.y, xtip, v.y - deltaY, v.x2, v.y,
+ 'width'=>2, 'capstyle'=>'round', 'joinstyle'=>'round')
# Create the boxes for reshaping the line and arrowhead.
TkcRectangle.new(c, v.x2-10*v.a-5, v.y-5, v.x2-10*v.a+5, v.y+5,
- {'tags'=>['box1', $arrowTag_box]}.update(v.boxStyle) )
+ {'tags'=>['box1', $arrowTag_box]}.update(v.boxStyle) )
TkcRectangle.new(c, xtip-5, v.y-deltaY-5, xtip+5, v.y-deltaY+5,
- {'tags'=>['box2', $arrowTag_box]}.update(v.boxStyle) )
+ {'tags'=>['box2', $arrowTag_box]}.update(v.boxStyle) )
TkcRectangle.new(c, v.x1-5, v.y-5*v.width-5, v.x1+5, v.y-5*v.width+5,
- {'tags'=>['box3', $arrowTag_box]}.update(v.boxStyle) )
+ {'tags'=>['box3', $arrowTag_box]}.update(v.boxStyle) )
c.itemconfigure cur, v.activeStyle if cur
# Create three arrows in actual size with the same parameters
TkcLine.new(c, v.x2+50, 0, v.x2+50, 1000, 'width'=>2)
tmp = v.x2+100
TkcLine.new(c, tmp, v.y-125, tmp, v.y-75, 'width'=>v.width,
- 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c])
+ 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c])
TkcLine.new(c, tmp-25, v.y, tmp+25, v.y, 'width'=>v.width,
- 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c])
+ 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c])
TkcLine.new(c, tmp-25, v.y+75, tmp+25, v.y+125, 'width'=>v.width,
- 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c])
+ 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c])
# Create a bunch of other arrows and text items showing the
# current dimensions.
tmp = v.x2+10
TkcLine.new(c, tmp, v.y-5*v.width, tmp, v.y-deltaY,
- 'arrow'=>'both', 'arrowshape'=>v.smallTips)
+ 'arrow'=>'both', 'arrowshape'=>v.smallTips)
TkcText.new(c, v.x2+15, v.y-deltaY+5*v.c, 'text'=>v.c, 'anchor'=>'w')
tmp = v.x1-10
TkcLine.new(c, tmp, v.y-5*v.width, tmp, v.y+5*v.width,
- 'arrow'=>'both', 'arrowshape'=>v.smallTips)
+ 'arrow'=>'both', 'arrowshape'=>v.smallTips)
TkcText.new(c, v.x1-15, v.y, 'text'=>v.width, 'anchor'=>'e')
tmp = v.y+5*v.width+10*v.c+10
TkcLine.new(c, v.x2-10*v.a, tmp, v.x2, tmp,
- 'arrow'=>'both', 'arrowshape'=>v.smallTips)
+ 'arrow'=>'both', 'arrowshape'=>v.smallTips)
TkcText.new(c, v.x2-5*v.a, tmp+5, 'text'=>v.a, 'anchor'=>'n')
tmp = tmp+25
TkcLine.new(c, v.x2-10*v.b, tmp, v.x2, tmp,
- 'arrow'=>'both', 'arrowshape'=>v.smallTips)
+ 'arrow'=>'both', 'arrowshape'=>v.smallTips)
TkcText.new(c, v.x2-5*v.b, tmp+5, 'text'=>v.b, 'anchor'=>'n')
TkcText.new(c, v.x1, 310, 'text'=>"'width'=>#{v.width}", 'anchor'=>'w',
- 'font'=>'-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*')
+ 'font'=>'-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*')
TkcText.new(c, v.x1, 330,
- 'text'=>"'arrowshape'=>[#{v.a}, #{v.b}, #{v.c}]", 'anchor'=>'w',
- 'font'=>'-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*')
+ 'text'=>"'arrowshape'=>[#{v.a}, #{v.b}, #{v.c}]", 'anchor'=>'w',
+ 'font'=>'-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*')
v.count += 1
end
@@ -101,7 +101,7 @@ $arrow_demo = TkToplevel.new {|w|
# label
TkLabel.new($arrow_demo, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left',
- 'text'=>"This widget allows you to experiment with different widths and arrowhead shapes for lines in canvases. To change the line width or the shape of the arrowhead, drag any of the three boxes attached to the oversized arrow. The arrows on the right give examples at normal scale. The text at the bottom shows the configuration options as you'd enter them for a canvas line item."){
+ 'text'=>"This widget allows you to experiment with different widths and arrowhead shapes for lines in canvases. To change the line width or the shape of the arrowhead, drag any of the three boxes attached to the oversized arrow. The arrows on the right give examples at normal scale. The text at the bottom shows the configuration options as you'd enter them for a canvas line item."){
pack('side'=>'top')
}
@@ -125,14 +125,14 @@ $arrow_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
# canvas
$arrow_canvas = TkCanvas.new($arrow_demo, 'width'=>500, 'height'=>350,
- 'relief'=>'sunken', 'borderwidth'=>2)
+ 'relief'=>'sunken', 'borderwidth'=>2)
$arrow_canvas.pack('expand'=>'yes', 'fill'=>'both')
#
unless Struct.const_defined?("ArrowInfo")
$demo_arrowInfo = Struct.new("ArrowInfo", :a, :b, :c, :width, :motionProc,
- :x1, :x2, :y, :smallTips, :count,
- :bigLineStyle, :boxStyle, :activeStyle).new
+ :x1, :x2, :y, :smallTips, :count,
+ :bigLineStyle, :boxStyle, :activeStyle).new
end
$demo_arrowInfo.a = 8
$demo_arrowInfo.b = 10
@@ -161,16 +161,16 @@ $arrowTag_box.bind('Leave', proc{$arrow_canvas.itemconfigure('current', $demo_ar
$arrowTag_box.bind('B1-Enter', proc{})
$arrowTag_box.bind('B1-Leave', proc{})
$arrow_canvas.itembind('box1', '1',
- proc{$demo_arrowInfo.motionProc \
- = proc{|x,y| arrowMove1 $arrow_canvas, x, y}})
+ proc{$demo_arrowInfo.motionProc \
+ = proc{|x,y| arrowMove1 $arrow_canvas, x, y}})
$arrow_canvas.itembind('box2', '1',
- proc{$demo_arrowInfo.motionProc \
- = proc{|x,y| arrowMove2 $arrow_canvas, x, y}})
+ proc{$demo_arrowInfo.motionProc \
+ = proc{|x,y| arrowMove2 $arrow_canvas, x, y}})
$arrow_canvas.itembind('box3', '1',
- proc{$demo_arrowInfo.motionProc \
- = proc{|x,y| arrowMove3 $arrow_canvas, x, y}})
+ proc{$demo_arrowInfo.motionProc \
+ = proc{|x,y| arrowMove3 $arrow_canvas, x, y}})
$arrowTag_box.bind('B1-Motion',
- proc{|x,y| $demo_arrowInfo.motionProc.call(x,y)}, "%x %y")
+ proc{|x,y| $demo_arrowInfo.motionProc.call(x,y)}, "%x %y")
$arrow_canvas.bind('Any-ButtonRelease-1', proc{arrowSetup $arrow_canvas})
# arrowMove1 --
@@ -179,8 +179,8 @@ $arrow_canvas.bind('Any-ButtonRelease-1', proc{arrowSetup $arrow_canvas})
# for the line and arrowhead.
#
# Arguments:
-# c - The name of the canvas window.
-# x, y - The coordinates of the mouse.
+# c - The name of the canvas window.
+# x, y - The coordinates of the mouse.
def arrowMove1(c,x,y)
v = $demo_arrowInfo
@@ -199,8 +199,8 @@ end
# parameters for the line and arrowhead.
#
# Arguments:
-# c - The name of the canvas window.
-# x, y - The coordinates of the mouse.
+# c - The name of the canvas window.
+# x, y - The coordinates of the mouse.
def arrowMove2(c,x,y)
v = $demo_arrowInfo
@@ -223,8 +223,8 @@ end
# controlling parameters for the line and arrowhead.
#
# Arguments:
-# c - The name of the canvas window.
-# x, y - The coordinates of the mouse.
+# c - The name of the canvas window.
+# x, y - The coordinates of the mouse.
def arrowMove3(c,x,y)
v = $demo_arrowInfo
diff --git a/ext/tk/sample/demos-en/bind.rb b/ext/tk/sample/demos-en/bind.rb
index ab2a32de82..0bd1f0ca6f 100644
--- a/ext/tk/sample/demos-en/bind.rb
+++ b/ext/tk/sample/demos-en/bind.rb
@@ -76,34 +76,34 @@ TkText.new($bind_demo){|t|
insert('end', '2. A simple two-dimensional plot that allows you to adjust the positions of the data points.', (d2 = TkTextTag.new(t)) )
insert('end', "\n\n")
insert('end', '3. Anchoring and justification modes for text items.',
- (d3 = TkTextTag.new(t)) )
+ (d3 = TkTextTag.new(t)) )
insert('end', "\n\n")
insert('end', '4. An editor for arrow-head shapes for line items.',
- (d4 = TkTextTag.new(t)) )
+ (d4 = TkTextTag.new(t)) )
insert('end', "\n\n")
insert('end', '5. A ruler with facilities for editing tab stops.',
- (d5 = TkTextTag.new(t)) )
+ (d5 = TkTextTag.new(t)) )
insert('end', "\n\n")
insert('end',
- '6. A grid that demonstrates how canvases can be scrolled.',
- (d6 = TkTextTag.new(t)) )
+ '6. A grid that demonstrates how canvases can be scrolled.',
+ (d6 = TkTextTag.new(t)) )
# binding
[d1, d2, d3, d4, d5, d6].each{|tag|
tag_binding_for_bind_demo(tag, tagstyle_bold, tagstyle_normal)
}
d1.bind('1',
- proc{eval `cat #{[$demo_dir,'items.rb'].join(File::Separator)}`})
+ proc{eval `cat #{[$demo_dir,'items.rb'].join(File::Separator)}`})
d2.bind('1',
- proc{eval `cat #{[$demo_dir,'plot.rb'].join(File::Separator)}`})
+ proc{eval `cat #{[$demo_dir,'plot.rb'].join(File::Separator)}`})
d3.bind('1',
- proc{eval `cat #{[$demo_dir,'ctext.rb'].join(File::Separator)}`})
+ proc{eval `cat #{[$demo_dir,'ctext.rb'].join(File::Separator)}`})
d4.bind('1',
- proc{eval `cat #{[$demo_dir,'arrow.rb'].join(File::Separator)}`})
+ proc{eval `cat #{[$demo_dir,'arrow.rb'].join(File::Separator)}`})
d5.bind('1',
- proc{eval `cat #{[$demo_dir,'ruler.rb'].join(File::Separator)}`})
+ proc{eval `cat #{[$demo_dir,'ruler.rb'].join(File::Separator)}`})
d6.bind('1',
- proc{eval `cat #{[$demo_dir,'cscroll.rb'].join(File::Separator)}`})
+ proc{eval `cat #{[$demo_dir,'cscroll.rb'].join(File::Separator)}`})
TkTextMarkInsert.new(t, '0.0')
configure('state','disabled')
diff --git a/ext/tk/sample/demos-en/bitmap.rb b/ext/tk/sample/demos-en/bitmap.rb
index c81e4ac595..7fd551c7a5 100644
--- a/ext/tk/sample/demos-en/bitmap.rb
+++ b/ext/tk/sample/demos-en/bitmap.rb
@@ -9,19 +9,19 @@
# Create a row of bitmap items in a window.
#
# Arguments:
-# w - The parent window that is to contain the row.
-# args - The names of one or more bitmaps, which will be displayed
-# in a new row across the bottom of w along with their
-# names.
+# w - The parent window that is to contain the row.
+# args - The names of one or more bitmaps, which will be displayed
+# in a new row across the bottom of w along with their
+# names.
def bitmapRow(w,*args)
TkFrame.new(w){|row|
pack('side'=>'top', 'fill'=>'both')
for bitmap in args
TkFrame.new(row){|base|
- pack('side'=>'left', 'fill'=>'both', 'pady'=>'.25c', 'padx'=>'.25c')
- TkLabel.new(base, 'text'=>bitmap, 'width'=>9).pack('side'=>'bottom')
- TkLabel.new(base, 'bitmap'=>bitmap).pack('side'=>'bottom')
+ pack('side'=>'left', 'fill'=>'both', 'pady'=>'.25c', 'padx'=>'.25c')
+ TkLabel.new(base, 'text'=>bitmap, 'width'=>9).pack('side'=>'bottom')
+ TkLabel.new(base, 'bitmap'=>bitmap).pack('side'=>'bottom')
}
end
}
@@ -42,7 +42,7 @@ $bitmap_demo = TkToplevel.new {|w|
# label
TkLabel.new($bitmap_demo,'font'=>$font,'wraplength'=>'4i','justify'=>'left',
- 'text'=>"This window displays all of Tk's built-in bitmaps, along with the names you can use for them in Tcl scripts."){
+ 'text'=>"This window displays all of Tk's built-in bitmaps, along with the names you can use for them in Tcl scripts."){
pack('side'=>'top')
}
diff --git a/ext/tk/sample/demos-en/check.rb b/ext/tk/sample/demos-en/check.rb
index b5def6a89b..971a8fea73 100644
--- a/ext/tk/sample/demos-en/check.rb
+++ b/ext/tk/sample/demos-en/check.rb
@@ -55,7 +55,7 @@ TkFrame.new($check_demo) {|frame|
text 'See Variables'
command proc{
showVars($check_demo,
- ['wipers', wipers], ['brakes', brakes], ['sober', sober])
+ ['wipers', wipers], ['brakes', brakes], ['sober', sober])
}
}.pack('side'=>'left', 'expand'=>'yes')
diff --git a/ext/tk/sample/demos-en/check2.rb b/ext/tk/sample/demos-en/check2.rb
index b01e3ffc93..e2d5982d2d 100644
--- a/ext/tk/sample/demos-en/check2.rb
+++ b/ext/tk/sample/demos-en/check2.rb
@@ -33,35 +33,35 @@ sober = TkVariable.new(0)
# frame
TkFrame.new($check2_demo) {|frame|
TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2),
- :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
+ :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
TkGrid('x',
- TkButton.new(frame, :text=>'See Variables',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{
- showVars($check2_demo,
- ['safety', safety], ['wipers', wipers],
- ['brakes', brakes], ['sober', sober])
- }),
- TkButton.new(frame, :text=>'See Code',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'check2'}),
- TkButton.new(frame, :text=>'Dismiss',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- tmppath = $check2_demo
- $check2_demo = nil
- $showVarsWin[tmppath.path] = nil
- tmppath.destroy
- }),
- :padx=>4, :pady=>4)
+ TkButton.new(frame, :text=>'See Variables',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{
+ showVars($check2_demo,
+ ['safety', safety], ['wipers', wipers],
+ ['brakes', brakes], ['sober', sober])
+ }),
+ TkButton.new(frame, :text=>'See Code',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{showCode 'check2'}),
+ TkButton.new(frame, :text=>'Dismiss',
+ :image=>$image['delete'], :compound=>:left,
+ :command=>proc{
+ tmppath = $check2_demo
+ $check2_demo = nil
+ $showVarsWin[tmppath.path] = nil
+ tmppath.destroy
+ }),
+ :padx=>4, :pady=>4)
frame.grid_columnconfigure(0, :weight=>1)
}.pack('side'=>'bottom', 'fill'=>'x')
# checkbutton
TkCheckButton.new($check2_demo, :text=>'Safety Check', :variable=>safety,
- :relief=>:flat, :onvalue=>'all', :offvalue=>'none',
- :tristatevalue=>'partial'){
+ :relief=>:flat, :onvalue=>'all', :offvalue=>'none',
+ :tristatevalue=>'partial'){
pack('side'=>'top', 'pady'=>2, 'anchor'=>'w')
}
@@ -82,21 +82,21 @@ tristate_check = proc{|n1,n2,op|
begin
if n1 == safety
if safety == 'none'
- wipers.value = 0
- brakes.value = 0
- sober.value = 0
+ wipers.value = 0
+ brakes.value = 0
+ sober.value = 0
elsif safety == 'all'
- wipers.value = 1
- brakes.value = 1
- sober.value = 1
+ wipers.value = 1
+ brakes.value = 1
+ sober.value = 1
end
else
if wipers == 1 && brakes == 1 && sober == 1
- safety.value = 'all'
+ safety.value = 'all'
elsif wipers == 1 || brakes == 1 || sober == 1
- safety.value = 'partial'
+ safety.value = 'partial'
else
- safety.value = 'none'
+ safety.value = 'none'
end
end
ensure
diff --git a/ext/tk/sample/demos-en/clrpick.rb b/ext/tk/sample/demos-en/clrpick.rb
index 72c52a4394..9486fde314 100644
--- a/ext/tk/sample/demos-en/clrpick.rb
+++ b/ext/tk/sample/demos-en/clrpick.rb
@@ -20,7 +20,7 @@ $clrpick_demo = TkToplevel.new {|w|
# label
TkLabel.new($clrpick_demo,'font'=>$font,'wraplength'=>'4i','justify'=>'left',
- 'text'=>"Press the buttons below to choose the foreground and background colors for the widgets in this window.").pack('side'=>'top')
+ 'text'=>"Press the buttons below to choose the foreground and background colors for the widgets in this window.").pack('side'=>'top')
# frame
TkFrame.new($clrpick_demo) {|frame|
@@ -42,7 +42,7 @@ TkFrame.new($clrpick_demo) {|frame|
# button
TkButton.new($clrpick_demo, 'text'=>'Set background color ...') {|b|
command(proc{setColor $clrpick_demo, b, 'background',
- ['background', 'highlightbackground']})
+ ['background', 'highlightbackground']})
pack('side'=>'top', 'anchor'=>'c', 'pady'=>'2m')
}
@@ -55,7 +55,7 @@ def setColor(w,button,name,options)
w.grab
initialColor = button[name]
color = Tk.chooseColor('title'=>"Choose a #{name} color", 'parent'=>w,
- 'initialcolor'=>initialColor)
+ 'initialcolor'=>initialColor)
if color != ""
setColor_helper(w,options,color)
end
diff --git a/ext/tk/sample/demos-en/cscroll.rb b/ext/tk/sample/demos-en/cscroll.rb
index 8250c6e5e6..0838dfbe08 100644
--- a/ext/tk/sample/demos-en/cscroll.rb
+++ b/ext/tk/sample/demos-en/cscroll.rb
@@ -21,7 +21,7 @@ $cscroll_demo = TkToplevel.new {|w|
# label
TkLabel.new($cscroll_demo, 'font'=>$font, 'wraplength'=>'4i',
- 'justify'=>'left', 'text'=>"This window displays a canvas widget that can be scrolled either using the scrollbars or by dragging with button 2 in the canvas. If you click button 1 on one of the rectangles, its indices will be printed on stdout."){
+ 'justify'=>'left', 'text'=>"This window displays a canvas widget that can be scrolled either using the scrollbars or by dragging with button 2 in the canvas. If you click button 1 on one of the rectangles, its indices will be printed on stdout."){
pack('side'=>'top')
}
@@ -54,14 +54,14 @@ end
# canvas
$cscroll_canvas = TkCanvas.new($cscroll_demo,
- 'relief'=>'sunken', 'borderwidth'=>2,
- 'scrollregion'=>['-11c', '-11c', '50c', '20c']
- ) {|c|
+ 'relief'=>'sunken', 'borderwidth'=>2,
+ 'scrollregion'=>['-11c', '-11c', '50c', '20c']
+ ) {|c|
if $tk_version =~ /^4\.[01]/
pack('expand'=>'yes', 'fill'=>'both')
else
grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
end
TkScrollbar.new($cscroll_demo, 'command'=>proc{|*args| c.yview(*args)}) {|vs|
@@ -70,18 +70,18 @@ $cscroll_canvas = TkCanvas.new($cscroll_demo,
pack('side'=>'right', 'fill'=>'y')
else
grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
end
}
TkScrollbar.new($cscroll_demo, 'orient'=>'horiz',
- 'command'=>proc{|*args| c.xview(*args)}) {|hs|
+ 'command'=>proc{|*args| c.xview(*args)}) {|hs|
c.xscrollcommand(proc{|first,last| hs.set first,last})
if $tk_version =~ /^4\.[01]/
pack('side'=>'bottom', 'fill'=>'x')
else
grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
end
}
}
@@ -92,9 +92,9 @@ bg = $cscroll_canvas.configinfo('bg')[4]
y = -10
(0..9).each{|j|
TkcRectangle.new($cscroll_canvas, "#{x}c", "#{y}c", "#{x+2}c", "#{y+2}c",
- 'outline'=>'black', 'fill'=>bg, 'tags'=>'rect')
+ 'outline'=>'black', 'fill'=>bg, 'tags'=>'rect')
TkcText.new($cscroll_canvas, "#{x+1}c", "#{y+1}c",
- 'text'=>"#{i},#{j}", 'anchor'=>'center', 'tags'=>'text')
+ 'text'=>"#{i},#{j}", 'anchor'=>'center', 'tags'=>'text')
y += 3
}
}
@@ -105,7 +105,7 @@ $cscroll_canvas.itembind('all', '1', proc{scrollButton $cscroll_canvas})
$cscroll_canvas.itembind('all', 'Any-Enter', proc{scrollEnter $cscroll_canvas})
$cscroll_canvas.bind('2', proc{|x,y| $cscroll_canvas.scan_mark(x,y)}, '%x %y')
$cscroll_canvas.bind('B2-Motion',
- proc{|x,y| $cscroll_canvas.scan_dragto(x,y)}, '%x %y')
+ proc{|x,y| $cscroll_canvas.scan_dragto(x,y)}, '%x %y')
def scrollEnter(c)
id = c.find_withtag('current')[0].id
diff --git a/ext/tk/sample/demos-en/ctext.rb b/ext/tk/sample/demos-en/ctext.rb
index 13f8de7218..dbb5e32638 100644
--- a/ext/tk/sample/demos-en/ctext.rb
+++ b/ext/tk/sample/demos-en/ctext.rb
@@ -21,7 +21,7 @@ $ctext_demo = TkToplevel.new {|w|
# label
TkLabel.new($ctext_demo, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left',
- 'text'=>"This window displays a string of text to demonstrate the text facilities of canvas widgets. You can click in the boxes to adjust the position of the text relative to its positioning point or change its justification. The text also supports the following simple bindings for editing:
+ 'text'=>"This window displays a string of text to demonstrate the text facilities of canvas widgets. You can click in the boxes to adjust the position of the text relative to its positioning point or change its justification. The text also supports the following simple bindings for editing:
1. You can point, click, and type.
2. You can also select with button 1.
3. You can copy the selection to the mouse position with button 2.
@@ -52,7 +52,7 @@ $ctext_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
# canvas
$ctext_canvas = TkCanvas.new($ctext_demo, 'relief'=>'flat',
- 'borderwidth'=>0, 'width'=>500, 'height'=>350)
+ 'borderwidth'=>0, 'width'=>500, 'height'=>350)
$ctext_canvas.pack('side'=>'top', 'expand'=>'yes', 'fill'=>'both')
# font
@@ -60,37 +60,37 @@ textFont = '-*-Helvetica-Medium-R-Normal--*-240-*-*-*-*-*-*'
# canvas
TkcRectangle.new($ctext_canvas, 245, 195, 255, 205,
- 'outline'=>'black', 'fill'=>'red')
+ 'outline'=>'black', 'fill'=>'red')
$ctag_text = TkcTag.new($ctext_canvas)
$ctag_text.withtag(TkcText.new($ctext_canvas, 250, 200,
- 'text'=>"This is just a string of text to demonstrate the text facilities of canvas widgets. Bindings have been been defined to support editing (see above).",
- 'width'=>440, 'anchor'=>'n',
- 'font'=>'-*-Helvetica-Medium-R-Normal--*-240-*-*-*-*-*-*',
- 'kanjifont'=>'-*--24-*-jisx0208.1983-0',
- 'justify'=>'left') )
+ 'text'=>"This is just a string of text to demonstrate the text facilities of canvas widgets. Bindings have been been defined to support editing (see above).",
+ 'width'=>440, 'anchor'=>'n',
+ 'font'=>'-*-Helvetica-Medium-R-Normal--*-240-*-*-*-*-*-*',
+ 'kanjifont'=>'-*--24-*-jisx0208.1983-0',
+ 'justify'=>'left') )
$ctag_text.bind('1', proc{|x,y| textB1Press $ctext_canvas,x,y}, "%x %y")
$ctag_text.bind('B1-Motion', proc{|x,y| textB1Move $ctext_canvas,x,y}, "%x %y")
$ctag_text.bind('Shift-1',
- proc{|x,y| $ctext_canvas.seleect_adjust 'current', "@#{x},#{y}"},
- "%x %y")
+ proc{|x,y| $ctext_canvas.seleect_adjust 'current', "@#{x},#{y}"},
+ "%x %y")
$ctag_text.bind('Shift-B1-Motion',
- proc{|x,y| textB1Move $ctext_canvas,x,y}, "%x %y")
+ proc{|x,y| textB1Move $ctext_canvas,x,y}, "%x %y")
$ctag_text.bind('KeyPress', proc{|a| textInsert $ctext_canvas,a}, "%A")
$ctag_text.bind('Return', proc{textInsert $ctext_canvas,"\n"})
$ctag_text.bind('Control-h', proc{textBs $ctext_canvas})
$ctag_text.bind('BackSpace', proc{textBs $ctext_canvas})
$ctag_text.bind('Delete', proc{textDel $ctext_canvas})
$ctag_text.bind('2', proc{|x,y| textPaste $ctext_canvas, "@#{x},#{y}"},
- "%x %y")
+ "%x %y")
# Next, create some items that allow the text's anchor position
# to be edited.
def mkTextConfig(w,x,y,option,value,color)
item = TkcRectangle.new(w, x, y, x+30, y+30,
- 'outline'=>'black', 'fill'=>color, 'width'=>1)
+ 'outline'=>'black', 'fill'=>color, 'width'=>1)
item.bind('1', proc{$ctag_text.configure option, value})
w.addtag_withtag('config', item)
end
@@ -108,11 +108,11 @@ mkTextConfig $ctext_canvas, x, y+60, 'anchor', 'ne', color
mkTextConfig $ctext_canvas, x+30, y+60, 'anchor', 'n', color
mkTextConfig $ctext_canvas, x+60, y+60, 'anchor', 'nw', color
item = TkcRectangle.new($ctext_canvas, x+40, y+40, x+50, y+50,
- 'outline'=>'black', 'fill'=>'red')
+ 'outline'=>'black', 'fill'=>'red')
item.bind('1', proc{$ctag_text.configure 'anchor', 'center'})
TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Text Position', 'anchor'=>'s',
- 'font'=>'-*-times-medium-r-normal--*-240-*-*-*-*-*-*',
- 'fill'=>'brown')
+ 'font'=>'-*-times-medium-r-normal--*-240-*-*-*-*-*-*',
+ 'fill'=>'brown')
# Lastly, create some items that allow the text's justification to be
# changed.
@@ -124,14 +124,14 @@ mkTextConfig $ctext_canvas, x, y, 'justify', 'left', color
mkTextConfig $ctext_canvas, x+30, y, 'justify', 'center', color
mkTextConfig $ctext_canvas, x+60, y, 'justify', 'right', color
TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Justification', 'anchor'=>'s',
- 'font'=>'-*-times-medium-r-normal--*-240-*-*-*-*-*-*',
- 'fill'=>'brown')
+ 'font'=>'-*-times-medium-r-normal--*-240-*-*-*-*-*-*',
+ 'fill'=>'brown')
$ctext_canvas.itembind('config', 'Enter', proc{textEnter $ctext_canvas})
$ctext_canvas.itembind('config', 'Leave',
- proc{$ctext_canvas\
- .itemconfigure('current',
- 'fill'=>$textConfigFill)})
+ proc{$ctext_canvas\
+ .itemconfigure('current',
+ 'fill'=>$textConfigFill)})
$textConfigFill = ''
diff --git a/ext/tk/sample/demos-en/dialog2.rb b/ext/tk/sample/demos-en/dialog2.rb
index 21bf25c88d..efc4b714da 100644
--- a/ext/tk/sample/demos-en/dialog2.rb
+++ b/ext/tk/sample/demos-en/dialog2.rb
@@ -27,9 +27,9 @@ class TkDialog_Demo2 < TkDialog
end
ret = TkDialog_Demo2.new('message_config'=>{'wraplength'=>'4i'},
- 'prev_command'=>proc{|dialog|
- Tk.after 100, proc{dialog.grab('global')}
- }).value
+ 'prev_command'=>proc{|dialog|
+ Tk.after 100, proc{dialog.grab('global')}
+ }).value
case ret
when 0
print "\You pressed OK\n"
diff --git a/ext/tk/sample/demos-en/entry3.rb b/ext/tk/sample/demos-en/entry3.rb
index 3ec162e482..415b45f86c 100644
--- a/ext/tk/sample/demos-en/entry3.rb
+++ b/ext/tk/sample/demos-en/entry3.rb
@@ -18,8 +18,8 @@ $entry3_demo = TkToplevel.new {|w|
}
TkLabel.new($entry3_demo,
- :font=>$font, :wraplength=>'5i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
+ :font=>$font, :wraplength=>'5i', :justify=>:left,
+ :text=><<EOL).pack(:side=>:top)
Four different entries are displayed below. You can add characters \
by pointing, clicking and typing, though each is constrained in what \
it will accept. The first only accepts integers or the empty string \
@@ -38,13 +38,13 @@ TkFrame.new($entry3_demo){|f|
pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{
- $entry3_demo.destroy
- $entry3_demo = nil
- }).pack(:side=>:left, :expand=>true)
+ $entry3_demo.destroy
+ $entry3_demo = nil
+ }).pack(:side=>:left, :expand=>true)
TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{
- showCode 'entry3'
- }).pack(:side=>:left, :expand=>true)
+ showCode 'entry3'
+ }).pack(:side=>:left, :expand=>true)
}
# focusAndFlash --
@@ -54,32 +54,32 @@ TkFrame.new($entry3_demo){|f|
# 2.5Hz).
#
# Arguments:
-# widget - entry widget to flash
-# fg - Initial foreground colour
-# bg - Initial background colour
-# count - Counter to control the number of times flashed
+# widget - entry widget to flash
+# fg - Initial foreground colour
+# bg - Initial background colour
+# count - Counter to control the number of times flashed
def focusAndFlash(widget, fg, bg, count=5)
return if count <= 0
TkTimer.new(200, count,
- proc{widget.configure(:foreground=>bg, :background=>fg)},
- proc{widget.configure(:foreground=>fg, :background=>bg)}
- ).start
+ proc{widget.configure(:foreground=>bg, :background=>fg)},
+ proc{widget.configure(:foreground=>fg, :background=>bg)}
+ ).start
widget.focus(true)
end
l1 = TkLabelFrame.new($entry3_demo, :text=>"Integer Entry")
TkEntry.new(l1, :validate=>:focus,
- :vcmd=>[
- proc{|s| s == '' || /^[+-]?\d+$/ =~ s }, '%P'
- ]) {|e|
+ :vcmd=>[
+ proc{|s| s == '' || /^[+-]?\d+$/ =~ s }, '%P'
+ ]) {|e|
invalidcommand [proc{|w| focusAndFlash(w, e.fg, e.bg)}, '%W']
pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m')
}
l2 = TkLabelFrame.new($entry3_demo, :text=>"Length-Constrained Entry")
TkEntry.new(l2, :validate=>:key, :invcmd=>proc{Tk.bell},
- :vcmd=>[proc{|s| s.length < 10}, '%P']
- ).pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m')
+ :vcmd=>[proc{|s| s.length < 10}, '%P']
+ ).pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m')
### PHONE NUMBER ENTRY ###
# Note that the source to this is quite a bit longer as the behaviour
@@ -101,7 +101,7 @@ Hash[*(%w(abc 2 def 3 ghi 4 jkl 5 mno 6 pqrs 7 tuv 8 wxyz 9))].each{|chars, n|
# Skip over fixed characters in a phone-number string when moving left.
#
# Arguments:
-# widget - The entry widget containing the phone-number.
+# widget - The entry widget containing the phone-number.
def phoneSkipLeft(widget)
idx = widget.index('insert')
if idx == 8
@@ -121,7 +121,7 @@ end
# Skip over fixed characters in a phone-number string when moving right.
#
# Arguments:
-# widget - The entry widget containing the phone-number.
+# widget - The entry widget containing the phone-number.
# add - Offset to add to index before calculation (used by validation.)
def phoneSkipRight(widget, add = 0)
idx = widget.index('insert')
@@ -145,14 +145,14 @@ end
#
# widget - entry widget to validate
# vmode - The widget's validation mode
-# idx - The index where replacement is to occur
+# idx - The index where replacement is to occur
# char - The character (or string, though that will always be
-# refused) to be overwritten at that point.
+# refused) to be overwritten at that point.
def validatePhoneChange(widget, vmode, idx, char)
return true if idx == nil
Tk.after_idle(proc{widget.configure(:validate=>vmode,
- :invcmd=>proc{Tk.bell})})
+ :invcmd=>proc{Tk.bell})})
if !(idx<3 || idx==6 || idx==7 || idx==11 || idx>15) && char =~ /[0-9A-Za-z]/
widget.delete(idx)
widget.insert(idx, $phoneNumberMap[char] || char)
@@ -167,17 +167,17 @@ end
l3 = TkLabelFrame.new($entry3_demo, :text=>"US Phone-Number Entry")
TkEntry.new(l3, :validate=>:key, :invcmd=>proc{Tk.bell},
- :textvariable=>entry3content,
- :vcmd=>[
- proc{|w,v,i,s| validatePhoneChange(w,v,i,s)},
- "%W %v %i %S"
- ]){|e|
+ :textvariable=>entry3content,
+ :vcmd=>[
+ proc{|w,v,i,s| validatePhoneChange(w,v,i,s)},
+ "%W %v %i %S"
+ ]){|e|
# Click to focus goes to the first editable character...
bind('FocusIn', proc{|d,w|
- if d != "NotifyAncestor"
- w.cursor = 3
- Tk.after_idle(proc{w.selection_clear})
- end
+ if d != "NotifyAncestor"
+ w.cursor = 3
+ Tk.after_idle(proc{w.selection_clear})
+ end
}, '%d %W')
bind('Left', proc{|w| phoneSkipLeft(w)}, '%W')
bind('Right', proc{|w| phoneSkipRight(w)}, '%W')
@@ -186,10 +186,10 @@ TkEntry.new(l3, :validate=>:key, :invcmd=>proc{Tk.bell},
l4 = TkLabelFrame.new($entry3_demo, :text=>"Password Entry")
TkEntry.new(l4, :validate=>:key, :show=>'*',
- :vcmd=>[
- proc{|s| s.length <= 8},
- '%P'
- ]).pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m')
+ :vcmd=>[
+ proc{|s| s.length <= 8},
+ '%P'
+ ]).pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m')
TkFrame.new($entry3_demo){|f|
lower
diff --git a/ext/tk/sample/demos-en/filebox.rb b/ext/tk/sample/demos-en/filebox.rb
index 7caaaf0ede..36b19de557 100644
--- a/ext/tk/sample/demos-en/filebox.rb
+++ b/ext/tk/sample/demos-en/filebox.rb
@@ -19,7 +19,7 @@ $filebox_demo = TkToplevel.new {|w|
# label
TkLabel.new($filebox_demo,'font'=>$font,'wraplength'=>'4i','justify'=>'left',
- 'text'=>"Enter a file name in the entry box or click on the \"Browse\" buttons to select a file name using the file selection dialog.").pack('side'=>'top')
+ 'text'=>"Enter a file name in the entry box or click on the \"Browse\" buttons to select a file name using the file selection dialog.").pack('side'=>'top')
# frame
TkFrame.new($filebox_demo) {|frame|
@@ -48,7 +48,7 @@ TkFrame.new($filebox_demo) {|frame|
pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x')
TkButton.new(f, 'text'=>'Browse ...',
- 'command'=>proc{fileDialog $filebox_demo,e,type})\
+ 'command'=>proc{fileDialog $filebox_demo,e,type})\
.pack('side'=>'left')
}
@@ -59,9 +59,9 @@ TkFrame.new($filebox_demo) {|frame|
$tk_strictMotif = TkVarAccess.new('tk_strictMotif')
if ($tk_platform['platform'] == 'unix')
TkCheckButton.new($filebox_demo,
- 'text'=>'Use Motif Style Dialog',
- 'variable'=>$tk_strictMotif,
- 'onvalue'=>1, 'offvalue'=>0 ).pack('anchor'=>'c')
+ 'text'=>'Use Motif Style Dialog',
+ 'variable'=>$tk_strictMotif,
+ 'onvalue'=>1, 'offvalue'=>0 ).pack('anchor'=>'c')
end
def fileDialog(w,ent,operation)
@@ -85,8 +85,8 @@ def fileDialog(w,ent,operation)
file = Tk.getOpenFile('filetypes'=>types, 'parent'=>w)
else
file = Tk.getSaveFile('filetypes'=>types, 'parent'=>w,
- 'initialfile'=>'Untitled',
- 'defaultextension'=>'.txt')
+ 'initialfile'=>'Untitled',
+ 'defaultextension'=>'.txt')
end
if file != ""
ent.delete 0, 'end'
diff --git a/ext/tk/sample/demos-en/floor.rb b/ext/tk/sample/demos-en/floor.rb
index db4d59fe73..15c56a154e 100644
--- a/ext/tk/sample/demos-en/floor.rb
+++ b/ext/tk/sample/demos-en/floor.rb
@@ -12,8 +12,8 @@
# visible.
#
# Arguments:
-# w - Name of the canvas window.
-# active - Number of active floor (1, 2, or 3).
+# w - Name of the canvas window.
+# active - Number of active floor (1, 2, or 3).
def floorDisplay(w,active)
return if $activeFloor == active
@@ -63,7 +63,7 @@ end
# highlighted.
#
# Arguments:
-# w - The name of the canvas window.
+# w - The name of the canvas window.
def newRoom(w)
id = w.find_withtag('current')[0]
@@ -76,8 +76,8 @@ end
# It highlights the current room and unhighlights any previous room.
#
# Arguments:
-# w - The canvas window displaying the floorplan.
-# args - Not used.
+# w - The canvas window displaying the floorplan.
+# args - Not used.
def roomChanged(w,*args)
w.delete('highlight')
@@ -94,24 +94,24 @@ end
# floor.
#
# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
+# w - The canvas window.
+# fill - Fill color to use for the floor's background.
+# outline - Color to use for the floor's outline.
def floor_bg1(w,fill,outline)
TkcPolygon.new(w,347,80,349,82,351,84,353,85,363,92,375,99,386,104,
- 386,129,398,129,398,162,484,162,484,129,559,129,559,133,725,
- 133,725,129,802,129,802,389,644,389,644,391,559,391,559,327,
- 508,327,508,311,484,311,484,278,395,278,395,288,400,288,404,
- 288,409,290,413,292,418,297,421,302,422,309,421,318,417,325,
- 411,330,405,332,397,333,344,333,340,334,336,336,335,338,332,
- 342,331,347,332,351,334,354,336,357,341,359,340,360,335,363,
- 331,365,326,366,304,366,304,355,258,355,258,387,60,387,60,391,
- 0,391,0,337,3,337,3,114,8,114,8,25,30,25,30,5,93,5,98,5,104,7,
- 110,10,116,16,119,20,122,28,123,32,123,68,220,68,220,34,221,
- 22,223,17,227,13,231,8,236,4,242,2,246,0,260,0,283,1,300,5,
- 321,14,335,22,348,25,365,29,363,39,358,48,352,56,337,70,
- 344,76,347,80, 'tags'=>['floor1','bg'], 'fill'=>fill)
+ 386,129,398,129,398,162,484,162,484,129,559,129,559,133,725,
+ 133,725,129,802,129,802,389,644,389,644,391,559,391,559,327,
+ 508,327,508,311,484,311,484,278,395,278,395,288,400,288,404,
+ 288,409,290,413,292,418,297,421,302,422,309,421,318,417,325,
+ 411,330,405,332,397,333,344,333,340,334,336,336,335,338,332,
+ 342,331,347,332,351,334,354,336,357,341,359,340,360,335,363,
+ 331,365,326,366,304,366,304,355,258,355,258,387,60,387,60,391,
+ 0,391,0,337,3,337,3,114,8,114,8,25,30,25,30,5,93,5,98,5,104,7,
+ 110,10,116,16,119,20,122,28,123,32,123,68,220,68,220,34,221,
+ 22,223,17,227,13,231,8,236,4,242,2,246,0,260,0,283,1,300,5,
+ 321,14,335,22,348,25,365,29,363,39,358,48,352,56,337,70,
+ 344,76,347,80, 'tags'=>['floor1','bg'], 'fill'=>fill)
TkcLine.new(w,386,129,398,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
TkcLine.new(w,258,355,258,387, 'fill'=>outline, 'tags'=>['floor1','bg'])
TkcLine.new(w,60,387,60,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
@@ -218,17 +218,17 @@ end
# floor.
#
# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
+# w - The canvas window.
+# fill - Fill color to use for the floor's background.
+# outline - Color to use for the floor's outline.
def floor_bg2(w,fill,outline)
TkcPolygon.new(w,559,129,484,129,484,162,398,162,398,129,315,129,
- 315,133,176,133,176,129,96,129,96,133,3,133,3,339,0,339,0,391,
- 60,391,60,387,258,387,258,329,350,329,350,311,395,311,395,280,
- 484,280,484,311,508,311,508,327,558,327,558,391,644,391,644,
- 367,802,367,802,129,725,129,725,133,559,133,559,129,
- 'tags'=>['floor2','bg'], 'fill'=>fill)
+ 315,133,176,133,176,129,96,129,96,133,3,133,3,339,0,339,0,391,
+ 60,391,60,387,258,387,258,329,350,329,350,311,395,311,395,280,
+ 484,280,484,311,508,311,508,327,558,327,558,391,644,391,644,
+ 367,802,367,802,129,725,129,725,133,559,133,559,129,
+ 'tags'=>['floor2','bg'], 'fill'=>fill)
TkcLine.new(w,350,311,350,329, 'fill'=>outline, 'tags'=>['floor2','bg'])
TkcLine.new(w,398,129,398,162, 'fill'=>outline, 'tags'=>['floor2','bg'])
TkcLine.new(w,802,367,802,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
@@ -273,17 +273,17 @@ end
# floor.
#
# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
+# w - The canvas window.
+# fill - Fill color to use for the floor's background.
+# outline - Color to use for the floor's outline.
def floor_bg3(w,fill,outline)
TkcPolygon.new(w,159,300,107,300,107,248,159,248,159,129,96,129,96,
- 133,21,133,21,331,0,331,0,391,60,391,60,370,159,370,159,300,
- 'tags'=>['floor3','bg'], 'fill'=>fill)
+ 133,21,133,21,331,0,331,0,391,60,391,60,370,159,370,159,300,
+ 'tags'=>['floor3','bg'], 'fill'=>fill)
TkcPolygon.new(w,258,370,258,329,350,329,350,311,399,311,399,129,
- 315,129,315,133,176,133,176,129,159,129,159,370,258,370,
- 'tags'=>['floor3','bg'], 'fill'=>fill)
+ 315,129,315,133,176,133,176,129,159,129,159,370,258,370,
+ 'tags'=>['floor3','bg'], 'fill'=>fill)
TkcLine.new(w,96,133,96,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
TkcLine.new(w,176,129,96,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
TkcLine.new(w,176,129,176,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
@@ -303,7 +303,7 @@ def floor_bg3(w,fill,outline)
TkcLine.new(w,21,331,21,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
TkcLine.new(w,96,133,21,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
TkcLine.new(w,107,300,159,300,159,248,107,248,107,300,
- 'fill'=>outline, 'tags'=>['floor3','bg'])
+ 'fill'=>outline, 'tags'=>['floor3','bg'])
end
# floor_fg1 --
@@ -312,321 +312,321 @@ end
# floor (office outlines and numbers).
#
# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
+# w - The canvas window.
+# color - Color to use for drawing foreground information.
def floor_fg1(w,color)
i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '101'
$floorItems['101'] = i
TkcText.new(w,358,209, 'text'=>'101', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'Pub Lift1'
$floorItems['Pub Lift1'] = i
TkcText.new(w,323,223, 'text'=>'Pub Lift1', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'Priv Lift1'
$floorItems['Priv Lift1'] = i
TkcText.new(w,323,188, 'text'=>'Priv Lift1', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,42,389,42,337,1,337,1,389,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '110'
$floorItems['110'] = i
TkcText.new(w,21.5,363, 'text'=>'110', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,59,389,59,385,90,385,90,337,44,337,44,389,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '109'
$floorItems['109'] = i
TkcText.new(w,67,363, 'text'=>'109', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,51,300,51,253,6,253,6,300,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '111'
$floorItems['111'] = i
TkcText.new(w,28.5,276.5, 'text'=>'111', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,98,248,98,309,79,309,79,248,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '117B'
$floorItems['117B'] = i
TkcText.new(w,88.5,278.5, 'text'=>'117B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,51,251,51,204,6,204,6,251,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '112'
$floorItems['112'] = i
TkcText.new(w,28.5,227.5, 'text'=>'112', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,6,156,51,156,51,203,6,203,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '113'
$floorItems['113'] = i
TkcText.new(w,28.5,179.5, 'text'=>'113', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,85,169,79,169,79,192,85,192,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '117A'
$floorItems['117A'] = i
TkcText.new(w,82,180.5, 'text'=>'117A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,77,302,77,168,53,168,53,302,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '117'
$floorItems['117'] = i
TkcText.new(w,65,235, 'text'=>'117', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,51,155,51,115,6,115,6,155,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '114'
$floorItems['114'] = i
TkcText.new(w,28.5,135, 'text'=>'114', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,95,115,53,115,53,168,95,168,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '115'
$floorItems['115'] = i
TkcText.new(w,74,141.5, 'text'=>'115', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,87,113,87,27,10,27,10,113,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '116'
$floorItems['116'] = i
TkcText.new(w,48.5,70, 'text'=>'116', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,89,91,128,91,128,113,89,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '118'
$floorItems['118'] = i
TkcText.new(w,108.5,102, 'text'=>'118', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,178,128,178,132,216,132,216,91,
- 163,91,163,112,149,112,149,128,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 163,91,163,112,149,112,149,128,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '120'
$floorItems['120'] = i
TkcText.new(w,189.5,111.5, 'text'=>'120', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,79,193,87,193,87,169,136,169,136,192,
- 156,192,156,169,175,169,175,246,79,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 156,192,156,169,175,169,175,246,79,246,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '122'
$floorItems['122'] = i
TkcText.new(w,131,207.5, 'text'=>'122', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,138,169,154,169,154,191,138,191,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '121'
$floorItems['121'] = i
TkcText.new(w,146,180, 'text'=>'121', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,99,300,126,300,126,309,99,309,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '106A'
$floorItems['106A'] = i
TkcText.new(w,112.5,304.5, 'text'=>'106A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,128,299,128,309,150,309,150,248,99,248,99,299,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '105'
$floorItems['105'] = i
TkcText.new(w,124.5,278.5, 'text'=>'105', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,174,309,174,300,152,300,152,309,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '106B'
$floorItems['106B'] = i
TkcText.new(w,163,304.5, 'text'=>'106B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,176,299,176,309,216,309,216,248,152,248,152,299,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '104'
$floorItems['104'] = i
TkcText.new(w,184,278.5, 'text'=>'104', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,138,385,138,337,91,337,91,385,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '108'
$floorItems['108'] = i
TkcText.new(w,114.5,361, 'text'=>'108', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,256,337,140,337,140,385,256,385,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '107'
$floorItems['107'] = i
TkcText.new(w,198,361, 'text'=>'107', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,300,353,300,329,260,329,260,353,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'Smoking'
$floorItems['Smoking'] = i
TkcText.new(w,280,341, 'text'=>'Smoking', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,314,135,314,170,306,170,306,246,177,246,177,135,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '123'
$floorItems['123'] = i
TkcText.new(w,245.5,190.5, 'text'=>'123', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,217,248,301,248,301,326,257,326,257,310,217,310,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '103'
$floorItems['103'] = i
TkcText.new(w,259,287, 'text'=>'103', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,396,188,377,188,377,169,316,169,316,131,396,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '124'
$floorItems['124'] = i
TkcText.new(w,356,150, 'text'=>'124', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,397,226,407,226,407,189,377,189,377,246,397,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '125'
$floorItems['125'] = i
TkcText.new(w,392,217.5, 'text'=>'125', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,399,187,409,187,409,207,474,207,474,164,399,164,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '126'
$floorItems['126'] = i
TkcText.new(w,436.5,185.5, 'text'=>'126', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,409,209,409,229,399,229,399,253,
- 486,253,486,239,474,239,474,209,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 486,253,486,239,474,239,474,209,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '127'
$floorItems['127'] = i
TkcText.new(w,436.5,'231', 'text'=>'127', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,501,164,501,174,495,174,495,188,
- 490,188,490,204,476,204,476,164,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 490,188,490,204,476,204,476,164,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'MShower'
$floorItems['MShower'] = i
TkcText.new(w,488.5,'184', 'text'=>'MShower', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,497,176,513,176,513,204,492,204,492,190,497,190,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'Closet'
$floorItems['Closet'] = i
TkcText.new(w,502.5,190, 'text'=>'Closet', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,476,237,476,206,513,206,513,254,488,254,488,237,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'WShower'
$floorItems['WShower'] = i
TkcText.new(w,494.5,230, 'text'=>'WShower', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,486,131,558,131,558,135,724,135,724,166,
- 697,166,697,275,553,275,531,254,515,254,
- 515,174,503,174,503,161,486,161,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 697,166,697,275,553,275,531,254,515,254,
+ 515,174,503,174,503,161,486,161,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '130'
$floorItems['130'] = i
TkcText.new(w,638.5,205, 'text'=>'130', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,308,242,339,242,339,248,342,248,
- 342,246,397,246,397,276,393,276,
- 393,309,300,309,300,248,308,248,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 342,246,397,246,397,276,393,276,
+ 393,309,300,309,300,248,308,248,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '102'
$floorItems['102'] = i
TkcText.new(w,367.5,278.5, 'text'=>'102', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,397,255,486,255,486,276,397,276,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '128'
$floorItems['128'] = i
TkcText.new(w,441.5,265.5, 'text'=>'128', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,510,309,486,309,486,255,530,255,
- 552,277,561,277,561,325,510,325,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 552,277,561,277,561,325,510,325,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '129'
$floorItems['129'] = i
TkcText.new(w,535.5,293, 'text'=>'129', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,696,281,740,281,740,387,642,387,
- 642,389,561,389,561,277,696,277,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 642,389,561,389,561,277,696,277,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '133'
$floorItems['133'] = i
TkcText.new(w,628.5,335, 'text'=>'133', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,742,387,742,281,800,281,800,387,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '132'
$floorItems['132'] = i
TkcText.new(w,771,334, 'text'=>'132', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,800,168,800,280,699,280,699,168,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '134'
$floorItems['134'] = i
TkcText.new(w,749.5,224, 'text'=>'134', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,726,131,726,166,800,166,800,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '135'
$floorItems['135'] = i
TkcText.new(w,763,148.5, 'text'=>'135', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,340,360,335,363,331,365,326,366,304,366,
- 304,312,396,312,396,288,400,288,404,288,
- 409,290,413,292,418,297,421,302,422,309,
- 421,318,417,325,411,330,405,332,397,333,
- 344,333,340,334,336,336,335,338,332,342,
- 331,347,332,351,334,354,336,357,341,359,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 304,312,396,312,396,288,400,288,404,288,
+ 409,290,413,292,418,297,421,302,422,309,
+ 421,318,417,325,411,330,405,332,397,333,
+ 344,333,340,334,336,336,335,338,332,342,
+ 331,347,332,351,334,354,336,357,341,359,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'Ramona Stair'
$floorItems['Ramona Stair'] = i
TkcText.new(w,368,323, 'text'=>'Ramona Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,30,23,30,5,93,5,98,5,104,7,110,10,116,16,119,20,
- 122,28,123,32,123,68,220,68,220,87,90,87,90,23,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 122,28,123,32,123,68,220,68,220,87,90,87,90,23,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'University Stair'
$floorItems['University Stair'] = i
TkcText.new(w,155,77.5, 'text'=>'University Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,282,37,295,40,312,49,323,56,337,70,352,56,
- 358,48,363,39,365,29,348,25,335,22,321,14,
- 300,5,283,1,260,0,246,0,242,2,236,4,231,8,
- 227,13,223,17,221,22,220,34,260,34,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 358,48,363,39,365,29,348,25,335,22,321,14,
+ 300,5,283,1,260,0,246,0,242,2,236,4,231,8,
+ 227,13,223,17,221,22,220,34,260,34,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'Plaza Stair'
$floorItems['Plaza Stair'] = i
TkcText.new(w,317.5,28.5, 'text'=>'Plaza Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,220,34,260,34,282,37,295,40,312,49,
- 323,56,337,70,350,83,365,94,377,100,
- 386,104,386,128,220,128,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 323,56,337,70,350,83,365,94,377,100,
+ 386,104,386,128,220,128,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'Plaza Deck'
$floorItems['Plaza Deck'] = i
TkcText.new(w,303,81, 'text'=>'Plaza Deck', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,257,336,77,336,6,336,6,301,77,301,77,310,257,310,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '106'
$floorItems['106'] = i
TkcText.new(w,131.5,318.5, 'text'=>'106', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,146,110,162,110,162,91,130,91,130,115,95,115,
- 95,128,114,128,114,151,157,151,157,153,112,153,
- 112,130,97,130,97,168,175,168,175,131,146,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 95,128,114,128,114,151,157,151,157,153,112,153,
+ 112,130,97,130,97,168,175,168,175,131,146,131,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '119'
$floorItems['119'] = i
TkcText.new(w,143.5,133, 'text'=>'119', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
TkcLine.new(w,155,191,155,189, 'fill'=>color, 'tags'=>['floor1','wall'])
TkcLine.new(w,155,177,155,169, 'fill'=>color, 'tags'=>['floor1','wall'])
TkcLine.new(w,96,129,96,169, 'fill'=>color, 'tags'=>['floor1','wall'])
@@ -793,327 +793,327 @@ end
# floor (office outlines and numbers).
#
# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
+# w - The canvas window.
+# color - Color to use for drawing foreground information.
def floor_fg2(w,color)
i = TkcPolygon.new(w,748,188,755,188,755,205,758,205,758,222,
- 800,222,800,168,748,168,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 800,222,800,168,748,168,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '238'
$floorItems['238'] = i
TkcText.new(w,774,195, 'text'=>'238', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,726,188,746,188,746,166,800,166,800,131,726,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '237'
$floorItems['237'] = i
TkcText.new(w,763,148.5, 'text'=>'237', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,497,187,497,204,559,204,559,324,641,324,
- 643,324,643,291,641,291,641,205,696,205,
- 696,291,694,291,694,314,715,314,715,291,
- 715,205,755,205,755,190,724,190,724,187,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 643,324,643,291,641,291,641,205,696,205,
+ 696,291,694,291,694,314,715,314,715,291,
+ 715,205,755,205,755,190,724,190,724,187,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '246'
$floorItems['246'] = i
TkcText.new(w,600,264, 'text'=>'246', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,694,279,643,279,643,314,694,314,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '247'
$floorItems['247'] = i
TkcText.new(w,668.5,296.5, 'text'=>'247', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,232,250,308,250,308,242,339,242,339,246,
- 397,246,397,255,476,255,476,250,482,250,559,250,
- 559,274,482,274,482,278,396,278,396,274,232,274,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 397,246,397,255,476,255,476,250,482,250,559,250,
+ 559,274,482,274,482,278,396,278,396,274,232,274,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '202'
$floorItems['202'] = i
TkcText.new(w,285.5,260, 'text'=>'202', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,53,228,53,338,176,338,233,338,233,196,
- 306,196,306,180,175,180,175,169,156,169,
- 156,196,176,196,176,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 306,196,306,180,175,180,175,169,156,169,
+ 156,196,176,196,176,228,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '206'
$floorItems['206'] = i
TkcText.new(w,143,267, 'text'=>'206', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,51,277,6,277,6,338,51,338,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '212'
$floorItems['212'] = i
TkcText.new(w,28.5,307.5, 'text'=>'212', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,557,276,486,276,486,309,510,309,510,325,557,325,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '245'
$floorItems['245'] = i
TkcText.new(w,521.5,300.5, 'text'=>'245', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,560,389,599,389,599,326,560,326,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '244'
$floorItems['244'] = i
TkcText.new(w,579.5,357.5, 'text'=>'244', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,601,389,601,326,643,326,643,389,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '243'
$floorItems['243'] = i
TkcText.new(w,622,357.5, 'text'=>'243', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,688,316,645,316,645,365,688,365,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '242'
$floorItems['242'] = i
TkcText.new(w,666.5,340.5, 'text'=>'242', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,802,367,759,367,759,226,802,226,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = 'Barbecue Deck'
$floorItems['Barbecue Deck'] = i
TkcText.new(w,780.5,296.5, 'text'=>'Barbecue Deck', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,755,262,755,314,717,314,717,262,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '240'
$floorItems['240'] = i
TkcText.new(w,736,288, 'text'=>'240', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,755,316,689,316,689,365,755,365,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '241'
$floorItems['241'] = i
TkcText.new(w,722,340.5, 'text'=>'241', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,755,206,717,206,717,261,755,261,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '239'
$floorItems['239'] = i
TkcText.new(w,736,233.5, 'text'=>'239', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,695,277,643,277,643,206,695,206,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '248'
$floorItems['248'] = i
TkcText.new(w,669,241.5, 'text'=>'248', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,676,135,676,185,724,185,724,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '236'
$floorItems['236'] = i
TkcText.new(w,700,160, 'text'=>'236', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,675,135,635,135,635,145,628,145,628,185,675,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '235'
$floorItems['235'] = i
TkcText.new(w,651.5,160, 'text'=>'235', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,626,143,633,143,633,135,572,135,
- 572,143,579,143,579,185,626,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 572,143,579,143,579,185,626,185,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '234'
$floorItems['234'] = i
TkcText.new(w,606,160, 'text'=>'234', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,557,135,571,135,571,145,578,145,
- 578,185,527,185,527,131,557,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 578,185,527,185,527,131,557,131,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '233'
$floorItems['233'] = i
TkcText.new(w,552.5,158, 'text'=>'233', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,476,249,557,249,557,205,476,205,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '230'
$floorItems['230'] = i
TkcText.new(w,516.5,227, 'text'=>'230', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,476,164,486,164,486,131,525,131,525,185,476,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '232'
$floorItems['232'] = i
TkcText.new(w,500.5,158, 'text'=>'232', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,476,186,495,186,495,204,476,204,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '229'
$floorItems['229'] = i
TkcText.new(w,485.5,195, 'text'=>'229', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,474,207,409,207,409,187,399,187,399,164,474,164,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '227'
$floorItems['227'] = i
TkcText.new(w,436.5,185.5, 'text'=>'227', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,399,228,399,253,474,253,474,209,409,209,409,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '228'
$floorItems['228'] = i
TkcText.new(w,436.5,231, 'text'=>'228', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,397,246,397,226,407,226,407,189,377,189,377,246,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '226'
$floorItems['226'] = i
TkcText.new(w,392,217.5, 'text'=>'226', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,377,169,316,169,316,131,397,131,397,188,377,188,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '225'
$floorItems['225'] = i
TkcText.new(w,356.5,150, 'text'=>'225', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,234,198,306,198,306,249,234,249,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '224'
$floorItems['224'] = i
TkcText.new(w,270,223.5, 'text'=>'224', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,270,179,306,179,306,170,314,170,314,135,270,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '223'
$floorItems['223'] = i
TkcText.new(w,292,157, 'text'=>'223', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,268,179,221,179,221,135,268,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '222'
$floorItems['222'] = i
TkcText.new(w,244.5,157, 'text'=>'222', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,177,179,219,179,219,135,177,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '221'
$floorItems['221'] = i
TkcText.new(w,198,157, 'text'=>'221', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,299,327,349,327,349,284,341,284,341,276,299,276,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '204'
$floorItems['204'] = i
TkcText.new(w,324,301.5, 'text'=>'204', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,234,276,297,276,297,327,257,327,257,338,234,338,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '205'
$floorItems['205'] = i
TkcText.new(w,265.5,307, 'text'=>'205', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,256,385,256,340,212,340,212,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '207'
$floorItems['207'] = i
TkcText.new(w,234,362.5, 'text'=>'207', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,210,340,164,340,164,385,210,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '208'
$floorItems['208'] = i
TkcText.new(w,187,362.5, 'text'=>'208', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,115,340,162,340,162,385,115,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '209'
$floorItems['209'] = i
TkcText.new(w,138.5,362.5, 'text'=>'209', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,89,228,89,156,53,156,53,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '217'
$floorItems['217'] = i
TkcText.new(w,71,192, 'text'=>'217', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,89,169,97,169,97,190,89,190,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '217A'
$floorItems['217A'] = i
TkcText.new(w,93,179.5, 'text'=>'217A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,89,156,89,168,95,168,95,135,53,135,53,156,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '216'
$floorItems['216'] = i
TkcText.new(w,71,145.5, 'text'=>'216', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,51,179,51,135,6,135,6,179,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '215'
$floorItems['215'] = i
TkcText.new(w,28.5,157, 'text'=>'215', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,51,227,6,227,6,180,51,180,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '214'
$floorItems['214'] = i
TkcText.new(w,28.5,203.5, 'text'=>'214', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,51,275,6,275,6,229,51,229,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '213'
$floorItems['213'] = i
TkcText.new(w,28.5,252, 'text'=>'213', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,114,340,67,340,67,385,114,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '210'
$floorItems['210'] = i
TkcText.new(w,90.5,362.5, 'text'=>'210', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,59,389,59,385,65,385,65,340,1,340,1,389,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '211'
$floorItems['211'] = i
TkcText.new(w,33,364.5, 'text'=>'211', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,393,309,350,309,350,282,342,282,342,276,393,276,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '203'
$floorItems['203'] = i
TkcText.new(w,367.5,292.5, 'text'=>'203', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,99,191,91,191,91,226,174,226,174,198,
- 154,198,154,192,109,192,109,169,99,169,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 154,198,154,192,109,192,109,169,99,169,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '220'
$floorItems['220'] = i
TkcText.new(w,132.5,208.5, 'text'=>'220', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = 'Priv Lift2'
$floorItems['Priv Lift2'] = i
TkcText.new(w,323,188, 'text'=>'Priv Lift2', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = 'Pub Lift 2'
$floorItems['Pub Lift 2'] = i
TkcText.new(w,323,223, 'text'=>'Pub Lift 2', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '218'
$floorItems['218'] = i
TkcText.new(w,136,149.5, 'text'=>'218', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '219'
$floorItems['219'] = i
TkcText.new(w,132.5,180, 'text'=>'219', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '201'
$floorItems['201'] = i
TkcText.new(w,358,209, 'text'=>'201', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
TkcLine.new(w,641,186,678,186, 'fill'=>color, 'tags'=>['floor2','wall'])
TkcLine.new(w,757,350,757,367, 'fill'=>color, 'tags'=>['floor2','wall'])
TkcLine.new(w,634,133,634,144, 'fill'=>color, 'tags'=>['floor2','wall'])
@@ -1275,215 +1275,215 @@ end
# floor (office outlines and numbers).
#
# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
+# w - The canvas window.
+# color - Color to use for drawing foreground information.
def floor_fg3(w,color)
i = TkcPolygon.new(w,89,228,89,180,70,180,70,228,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '316'
$floorItems['316'] = i
TkcText.new(w,79.5,204, 'text'=>'316', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,115,368,162,368,162,323,115,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '309'
$floorItems['309'] = i
TkcText.new(w,138.5,345.5, 'text'=>'309', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,164,323,164,368,211,368,211,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '308'
$floorItems['308'] = i
TkcText.new(w,187.5,345.5, 'text'=>'308', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,256,368,212,368,212,323,256,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '307'
$floorItems['307'] = i
TkcText.new(w,234,345.5, 'text'=>'307', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,244,276,297,276,297,327,260,327,260,321,244,321,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '305'
$floorItems['305'] = i
TkcText.new(w,270.5,301.5, 'text'=>'305', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,251,219,251,203,244,203,244,219,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '324B'
$floorItems['324B'] = i
TkcText.new(w,247.5,211, 'text'=>'324B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,251,249,244,249,244,232,251,232,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '324A'
$floorItems['324A'] = i
TkcText.new(w,247.5,240.5, 'text'=>'324A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,223,135,223,179,177,179,177,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '320'
$floorItems['320'] = i
TkcText.new(w,200,157, 'text'=>'320', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,114,368,114,323,67,323,67,368,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '310'
$floorItems['310'] = i
TkcText.new(w,90.5,345.5, 'text'=>'310', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,23,277,23,321,68,321,68,277,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '312'
$floorItems['312'] = i
TkcText.new(w,45.5,299, 'text'=>'312', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,23,229,68,229,68,275,23,275,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '313'
$floorItems['313'] = i
TkcText.new(w,45.5,252, 'text'=>'313', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,68,227,23,227,23,180,68,180,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '314'
$floorItems['314'] = i
TkcText.new(w,40.5,203.5, 'text'=>'314', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,95,179,95,135,23,135,23,179,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '315'
$floorItems['315'] = i
TkcText.new(w,59,157, 'text'=>'315', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,99,226,99,204,91,204,91,226,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '316B'
$floorItems['316B'] = i
TkcText.new(w,95,215, 'text'=>'316B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,91,202,99,202,99,180,91,180,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '316A'
$floorItems['316A'] = i
TkcText.new(w,95,191, 'text'=>'316A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,97,169,109,169,109,192,154,192,154,198,
- 174,198,174,226,101,226,101,179,97,179,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 174,198,174,226,101,226,101,179,97,179,
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '319'
$floorItems['319'] = i
TkcText.new(w,141.5,209, 'text'=>'319', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,65,368,58,368,58,389,1,389,1,333,23,333,23,323,65,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '311'
$floorItems['311'] = i
TkcText.new(w,29.5,361, 'text'=>'311', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '318'
$floorItems['318'] = i
TkcText.new(w,132.5,180, 'text'=>'318', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '317'
$floorItems['317'] = i
TkcText.new(w,136,149.5, 'text'=>'317', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,274,194,274,221,306,221,306,194,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '323'
$floorItems['323'] = i
TkcText.new(w,290,207.5, 'text'=>'323', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,306,222,274,222,274,249,306,249,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '325'
$floorItems['325'] = i
TkcText.new(w,290,235.5, 'text'=>'325', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,263,179,224,179,224,135,263,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '321'
$floorItems['321'] = i
TkcText.new(w,243.5,157, 'text'=>'321', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,314,169,306,169,306,192,273,192,
- 264,181,264,135,314,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 264,181,264,135,314,135,
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '322'
$floorItems['322'] = i
TkcText.new(w,293.5,163.5, 'text'=>'322', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = 'Pub Lift3'
$floorItems['Pub Lift3'] = i
TkcText.new(w,323,223, 'text'=>'Pub Lift3', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = 'Priv Lift3'
$floorItems['Priv Lift3'] = i
TkcText.new(w,323,188, 'text'=>'Priv Lift3', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,350,284,376,284,376,276,397,276,397,309,350,309,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '303'
$floorItems['303'] = i
TkcText.new(w,373.5,292.5, 'text'=>'303', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,272,203,272,249,252,249,252,230,
- 244,230,244,221,252,221,252,203,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 244,230,244,221,252,221,252,203,
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '324'
$floorItems['324'] = i
TkcText.new(w,262,226, 'text'=>'324', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,299,276,299,327,349,327,349,284,341,284,341,276,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '304'
$floorItems['304'] = i
TkcText.new(w,324,301.5, 'text'=>'304', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '301'
$floorItems['301'] = i
TkcText.new(w,358,209, 'text'=>'301', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,397,246,377,246,377,185,397,185,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '327'
$floorItems['327'] = i
TkcText.new(w,387,215.5, 'text'=>'327', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,316,131,316,169,377,169,377,185,397,185,397,131,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '326'
$floorItems['326'] = i
TkcText.new(w,365.5,150, 'text'=>'326', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,308,251,242,251,242,274,342,274,342,282,375, 282,
- 375,274,397,274,397,248,339,248,339,242,308,242,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 375,274,397,274,397,248,339,248,339,242,308,242,
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '302'
$floorItems['302'] = i
TkcText.new(w,319.5,261, 'text'=>'302', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,70,321,242,321,242,200,259,200,259,203,272,203,
- 272,193,263,180,242,180,175,180,175,169,156,169,
- 156,196,177,196,177,228,107,228,70,228,70,275,107,275,
- 107,248,160,248,160,301,107,301,107,275,70,275,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 272,193,263,180,242,180,175,180,175,169,156,169,
+ 156,196,177,196,177,228,107,228,70,228,70,275,107,275,
+ 107,248,160,248,160,301,107,301,107,275,70,275,
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '306'
$floorItems['306'] = i
TkcText.new(w,200.5,284.5, 'text'=>'306', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
TkcLine.new(w,341,275,341,283, 'fill'=>color, 'tags'=>['floor3','wall'])
TkcLine.new(w,162,197,155,197, 'fill'=>color, 'tags'=>['floor3','wall'])
TkcLine.new(w,396,247,399,247, 'fill'=>color, 'tags'=>['floor3','wall'])
@@ -1592,7 +1592,7 @@ $floor_demo = TkToplevel.new {|w|
# label
TkLabel.new($floor_demo, 'font'=>$font, 'wraplength'=>'8i', 'justify'=>'left',
- 'text'=>"This window contains a canvas widget showing the floorplan of Digital Equipment Corporation's Western Research Laboratory. It has three levels. At any given time one of the levels is active, meaning that you can see its room structure. To activate a level, click the left mouse button anywhere on it. As the mouse moves over the active level, the room under the mouse lights up and its room number appears in the \"Room:\" entry. You can also type a room number in the entry and the room will light up."){
+ 'text'=>"This window contains a canvas widget showing the floorplan of Digital Equipment Corporation's Western Research Laboratory. It has three levels. At any given time one of the levels is active, meaning that you can see its room structure. To activate a level, click the left mouse button anywhere on it. As the mouse moves over the active level, the room under the mouse lights up and its room number appears in the \"Room:\" entry. You can also type a room number in the entry and the room will light up."){
pack('side'=>'top')
}
@@ -1621,12 +1621,12 @@ $floorItems = {}
# canvas
if $tk_version =~ /^4\.[01]/
$floor_canvas_frame = TkFrame.new($floor_demo,'bd'=>2,'relief'=>'sunken',
- 'highlightthickness'=>2)
+ 'highlightthickness'=>2)
$floor_canvas = TkCanvas.new($floor_canvas_frame,
- 'width'=>900, 'height'=>500, 'borderwidth'=>0,
- 'highlightthickness'=>0) {|c|
+ 'width'=>900, 'height'=>500, 'borderwidth'=>0,
+ 'highlightthickness'=>0) {|c|
TkScrollbar.new($floor_demo, 'orient'=>'horiz',
- 'command'=>proc{|*args| c.xview(*args)}){|hs|
+ 'command'=>proc{|*args| c.xview(*args)}){|hs|
c.xscrollcommand(proc{|first,last| hs.set first,last})
pack('side'=>'bottom', 'fill'=>'x')
}
@@ -1647,20 +1647,20 @@ else
TkFrame.new(f, 'bd'=>2, 'relief'=>'sunken') {|f1|
$floor_canvas = TkCanvas.new(f1, 'width'=>900, 'height'=>500,
- 'borderwidth'=>0,
- 'highlightthickness'=>0) {
- xscrollcommand(proc{|first,last| h.set first,last})
- yscrollcommand(proc{|first,last| v.set first,last})
- pack('expand'=>'yes', 'fill'=>'both')
+ 'borderwidth'=>0,
+ 'highlightthickness'=>0) {
+ xscrollcommand(proc{|first,last| h.set first,last})
+ yscrollcommand(proc{|first,last| v.set first,last})
+ pack('expand'=>'yes', 'fill'=>'both')
}
grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
}
v.grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
h.grid('padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
@@ -1677,7 +1677,7 @@ end
$currentRoom = TkVariable.new
$floor_entry = TkEntry.new($floor_canvas, 'width'=>10, 'relief'=>'sunken',
- 'bd'=>2, 'textvariable'=>$currentRoom)
+ 'bd'=>2, 'textvariable'=>$currentRoom)
# Choose colors, then fill in the floorplan.
@@ -1714,7 +1714,7 @@ $floor_canvas.itembind('room', 'Enter', proc{newRoom $floor_canvas})
$floor_canvas.itembind('room', 'Leave', proc{$currentRoom.value = ''})
$floor_canvas.bind('2', proc{|x,y| $floor_canvas.scan_mark x,y}, '%x %y')
$floor_canvas.bind('B2-Motion',
- proc{|x,y| $floor_canvas.scan_dragto x,y}, '%x %y')
+ proc{|x,y| $floor_canvas.scan_dragto x,y}, '%x %y')
$floor_canvas.bind('Destroy', proc{$currentRoom.unset})
$currentRoom.value = ''
$currentRoom.trace('w',proc{roomChanged $floor_canvas})
diff --git a/ext/tk/sample/demos-en/floor2.rb b/ext/tk/sample/demos-en/floor2.rb
index 7e418066d4..ab8659a628 100644
--- a/ext/tk/sample/demos-en/floor2.rb
+++ b/ext/tk/sample/demos-en/floor2.rb
@@ -12,8 +12,8 @@
# visible.
#
# Arguments:
-# w - Name of the canvas window.
-# active - Number of active floor (1, 2, or 3).
+# w - Name of the canvas window.
+# active - Number of active floor (1, 2, or 3).
def floorDisplay2(w,active)
return if $activeFloor2 == active
@@ -63,7 +63,7 @@ end
# highlighted.
#
# Arguments:
-# w - The name of the canvas window.
+# w - The name of the canvas window.
def newRoom2(w)
id = w.find_withtag('current')[0]
@@ -76,8 +76,8 @@ end
# It highlights the current room and unhighlights any previous room.
#
# Arguments:
-# w - The canvas window displaying the floorplan.
-# args - Not used.
+# w - The canvas window displaying the floorplan.
+# args - Not used.
def roomChanged2(w,*args)
w.delete('highlight')
@@ -94,24 +94,24 @@ end
# floor.
#
# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
+# w - The canvas window.
+# fill - Fill color to use for the floor's background.
+# outline - Color to use for the floor's outline.
def floor2_bg1(w,fill,outline)
w.create(TkcPolygon,347,80,349,82,351,84,353,85,363,92,375,99,386,104,
- 386,129,398,129,398,162,484,162,484,129,559,129,559,133,725,
- 133,725,129,802,129,802,389,644,389,644,391,559,391,559,327,
- 508,327,508,311,484,311,484,278,395,278,395,288,400,288,404,
- 288,409,290,413,292,418,297,421,302,422,309,421,318,417,325,
- 411,330,405,332,397,333,344,333,340,334,336,336,335,338,332,
- 342,331,347,332,351,334,354,336,357,341,359,340,360,335,363,
- 331,365,326,366,304,366,304,355,258,355,258,387,60,387,60,391,
- 0,391,0,337,3,337,3,114,8,114,8,25,30,25,30,5,93,5,98,5,104,7,
- 110,10,116,16,119,20,122,28,123,32,123,68,220,68,220,34,221,
- 22,223,17,227,13,231,8,236,4,242,2,246,0,260,0,283,1,300,5,
- 321,14,335,22,348,25,365,29,363,39,358,48,352,56,337,70,
- 344,76,347,80, 'tags'=>['floor1','bg'], 'fill'=>fill)
+ 386,129,398,129,398,162,484,162,484,129,559,129,559,133,725,
+ 133,725,129,802,129,802,389,644,389,644,391,559,391,559,327,
+ 508,327,508,311,484,311,484,278,395,278,395,288,400,288,404,
+ 288,409,290,413,292,418,297,421,302,422,309,421,318,417,325,
+ 411,330,405,332,397,333,344,333,340,334,336,336,335,338,332,
+ 342,331,347,332,351,334,354,336,357,341,359,340,360,335,363,
+ 331,365,326,366,304,366,304,355,258,355,258,387,60,387,60,391,
+ 0,391,0,337,3,337,3,114,8,114,8,25,30,25,30,5,93,5,98,5,104,7,
+ 110,10,116,16,119,20,122,28,123,32,123,68,220,68,220,34,221,
+ 22,223,17,227,13,231,8,236,4,242,2,246,0,260,0,283,1,300,5,
+ 321,14,335,22,348,25,365,29,363,39,358,48,352,56,337,70,
+ 344,76,347,80, 'tags'=>['floor1','bg'], 'fill'=>fill)
w.create(TkcLine,386,129,398,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
w.create(TkcLine,258,355,258,387, 'fill'=>outline, 'tags'=>['floor1','bg'])
w.create(TkcLine,60,387,60,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
@@ -218,17 +218,17 @@ end
# floor.
#
# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
+# w - The canvas window.
+# fill - Fill color to use for the floor's background.
+# outline - Color to use for the floor's outline.
def floor2_bg2(w,fill,outline)
w.create(TkcPolygon,559,129,484,129,484,162,398,162,398,129,315,129,
- 315,133,176,133,176,129,96,129,96,133,3,133,3,339,0,339,0,391,
- 60,391,60,387,258,387,258,329,350,329,350,311,395,311,395,280,
- 484,280,484,311,508,311,508,327,558,327,558,391,644,391,644,
- 367,802,367,802,129,725,129,725,133,559,133,559,129,
- 'tags'=>['floor2','bg'], 'fill'=>fill)
+ 315,133,176,133,176,129,96,129,96,133,3,133,3,339,0,339,0,391,
+ 60,391,60,387,258,387,258,329,350,329,350,311,395,311,395,280,
+ 484,280,484,311,508,311,508,327,558,327,558,391,644,391,644,
+ 367,802,367,802,129,725,129,725,133,559,133,559,129,
+ 'tags'=>['floor2','bg'], 'fill'=>fill)
w.create(TkcLine,350,311,350,329, 'fill'=>outline, 'tags'=>['floor2','bg'])
w.create(TkcLine,398,129,398,162, 'fill'=>outline, 'tags'=>['floor2','bg'])
w.create(TkcLine,802,367,802,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
@@ -273,17 +273,17 @@ end
# floor.
#
# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
+# w - The canvas window.
+# fill - Fill color to use for the floor's background.
+# outline - Color to use for the floor's outline.
def floor2_bg3(w,fill,outline)
w.create(TkcPolygon,159,300,107,300,107,248,159,248,159,129,96,129,96,
- 133,21,133,21,331,0,331,0,391,60,391,60,370,159,370,159,300,
- 'tags'=>['floor3','bg'], 'fill'=>fill)
+ 133,21,133,21,331,0,331,0,391,60,391,60,370,159,370,159,300,
+ 'tags'=>['floor3','bg'], 'fill'=>fill)
w.create(TkcPolygon,258,370,258,329,350,329,350,311,399,311,399,129,
- 315,129,315,133,176,133,176,129,159,129,159,370,258,370,
- 'tags'=>['floor3','bg'], 'fill'=>fill)
+ 315,129,315,133,176,133,176,129,159,129,159,370,258,370,
+ 'tags'=>['floor3','bg'], 'fill'=>fill)
w.create(TkcLine,96,133,96,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
w.create(TkcLine,176,129,96,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
w.create(TkcLine,176,129,176,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
@@ -303,7 +303,7 @@ def floor2_bg3(w,fill,outline)
w.create(TkcLine,21,331,21,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
w.create(TkcLine,96,133,21,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
w.create(TkcLine,107,300,159,300,159,248,107,248,107,300,
- 'fill'=>outline, 'tags'=>['floor3','bg'])
+ 'fill'=>outline, 'tags'=>['floor3','bg'])
end
# floor2_fg1 --
@@ -312,321 +312,321 @@ end
# floor (office outlines and numbers).
#
# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
+# w - The canvas window.
+# color - Color to use for drawing foreground information.
def floor2_fg1(w,color)
i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '101'
$floorItems2['101'] = i
w.create(TkcText,358,209, 'text'=>'101', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'Pub Lift1'
$floorItems2['Pub Lift1'] = i
w.create(TkcText,323,223, 'text'=>'Pub Lift1', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'Priv Lift1'
$floorItems2['Priv Lift1'] = i
w.create(TkcText,323,188, 'text'=>'Priv Lift1', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,42,389,42,337,1,337,1,389,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '110'
$floorItems2['110'] = i
w.create(TkcText,21.5,363, 'text'=>'110', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,59,389,59,385,90,385,90,337,44,337,44,389,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '109'
$floorItems2['109'] = i
w.create(TkcText,67,363, 'text'=>'109', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,51,300,51,253,6,253,6,300,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '111'
$floorItems2['111'] = i
w.create(TkcText,28.5,276.5, 'text'=>'111', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,98,248,98,309,79,309,79,248,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '117B'
$floorItems2['117B'] = i
w.create(TkcText,88.5,278.5, 'text'=>'117B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,51,251,51,204,6,204,6,251,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '112'
$floorItems2['112'] = i
w.create(TkcText,28.5,227.5, 'text'=>'112', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,6,156,51,156,51,203,6,203,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '113'
$floorItems2['113'] = i
w.create(TkcText,28.5,179.5, 'text'=>'113', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,85,169,79,169,79,192,85,192,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '117A'
$floorItems2['117A'] = i
w.create(TkcText,82,180.5, 'text'=>'117A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,77,302,77,168,53,168,53,302,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '117'
$floorItems2['117'] = i
w.create(TkcText,65,235, 'text'=>'117', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,51,155,51,115,6,115,6,155,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '114'
$floorItems2['114'] = i
w.create(TkcText,28.5,135, 'text'=>'114', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,95,115,53,115,53,168,95,168,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '115'
$floorItems2['115'] = i
w.create(TkcText,74,141.5, 'text'=>'115', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,87,113,87,27,10,27,10,113,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '116'
$floorItems2['116'] = i
w.create(TkcText,48.5,70, 'text'=>'116', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,89,91,128,91,128,113,89,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '118'
$floorItems2['118'] = i
w.create(TkcText,108.5,102, 'text'=>'118', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,178,128,178,132,216,132,216,91,
- 163,91,163,112,149,112,149,128,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 163,91,163,112,149,112,149,128,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '120'
$floorItems2['120'] = i
w.create(TkcText,189.5,111.5, 'text'=>'120', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,79,193,87,193,87,169,136,169,136,192,
- 156,192,156,169,175,169,175,246,79,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 156,192,156,169,175,169,175,246,79,246,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '122'
$floorItems2['122'] = i
w.create(TkcText,131,207.5, 'text'=>'122', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,138,169,154,169,154,191,138,191,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '121'
$floorItems2['121'] = i
w.create(TkcText,146,180, 'text'=>'121', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,99,300,126,300,126,309,99,309,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '106A'
$floorItems2['106A'] = i
w.create(TkcText,112.5,304.5, 'text'=>'106A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,128,299,128,309,150,309,150,248,99,248,99,299,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '105'
$floorItems2['105'] = i
w.create(TkcText,124.5,278.5, 'text'=>'105', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,174,309,174,300,152,300,152,309,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '106B'
$floorItems2['106B'] = i
w.create(TkcText,163,304.5, 'text'=>'106B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,176,299,176,309,216,309,216,248,152,248,152,299,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '104'
$floorItems2['104'] = i
w.create(TkcText,184,278.5, 'text'=>'104', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,138,385,138,337,91,337,91,385,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '108'
$floorItems2['108'] = i
w.create(TkcText,114.5,361, 'text'=>'108', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,256,337,140,337,140,385,256,385,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '107'
$floorItems2['107'] = i
w.create(TkcText,198,361, 'text'=>'107', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,300,353,300,329,260,329,260,353,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'Smoking'
$floorItems2['Smoking'] = i
w.create(TkcText,280,341, 'text'=>'Smoking', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,314,135,314,170,306,170,306,246,177,246,177,135,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '123'
$floorItems2['123'] = i
w.create(TkcText,245.5,190.5, 'text'=>'123', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,217,248,301,248,301,326,257,326,257,310,217,310,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '103'
$floorItems2['103'] = i
w.create(TkcText,259,287, 'text'=>'103', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,396,188,377,188,377,169,316,169,316,131,396,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '124'
$floorItems2['124'] = i
w.create(TkcText,356,150, 'text'=>'124', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,397,226,407,226,407,189,377,189,377,246,397,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '125'
$floorItems2['125'] = i
w.create(TkcText,392,217.5, 'text'=>'125', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,399,187,409,187,409,207,474,207,474,164,399,164,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '126'
$floorItems2['126'] = i
w.create(TkcText,436.5,185.5, 'text'=>'126', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,409,209,409,229,399,229,399,253,
- 486,253,486,239,474,239,474,209,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 486,253,486,239,474,239,474,209,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '127'
$floorItems2['127'] = i
w.create(TkcText,436.5,'231', 'text'=>'127', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,501,164,501,174,495,174,495,188,
- 490,188,490,204,476,204,476,164,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 490,188,490,204,476,204,476,164,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'MShower'
$floorItems2['MShower'] = i
w.create(TkcText,488.5,'184', 'text'=>'MShower', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,497,176,513,176,513,204,492,204,492,190,497,190,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'Closet'
$floorItems2['Closet'] = i
w.create(TkcText,502.5,190, 'text'=>'Closet', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,476,237,476,206,513,206,513,254,488,254,488,237,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'WShower'
$floorItems2['WShower'] = i
w.create(TkcText,494.5,230, 'text'=>'WShower', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,486,131,558,131,558,135,724,135,724,166,
- 697,166,697,275,553,275,531,254,515,254,
- 515,174,503,174,503,161,486,161,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 697,166,697,275,553,275,531,254,515,254,
+ 515,174,503,174,503,161,486,161,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '130'
$floorItems2['130'] = i
w.create(TkcText,638.5,205, 'text'=>'130', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,308,242,339,242,339,248,342,248,
- 342,246,397,246,397,276,393,276,
- 393,309,300,309,300,248,308,248,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 342,246,397,246,397,276,393,276,
+ 393,309,300,309,300,248,308,248,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '102'
$floorItems2['102'] = i
w.create(TkcText,367.5,278.5, 'text'=>'102', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,397,255,486,255,486,276,397,276,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '128'
$floorItems2['128'] = i
w.create(TkcText,441.5,265.5, 'text'=>'128', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,510,309,486,309,486,255,530,255,
- 552,277,561,277,561,325,510,325,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 552,277,561,277,561,325,510,325,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '129'
$floorItems2['129'] = i
w.create(TkcText,535.5,293, 'text'=>'129', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,696,281,740,281,740,387,642,387,
- 642,389,561,389,561,277,696,277,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 642,389,561,389,561,277,696,277,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '133'
$floorItems2['133'] = i
w.create(TkcText,628.5,335, 'text'=>'133', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,742,387,742,281,800,281,800,387,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '132'
$floorItems2['132'] = i
w.create(TkcText,771,334, 'text'=>'132', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,800,168,800,280,699,280,699,168,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '134'
$floorItems2['134'] = i
w.create(TkcText,749.5,224, 'text'=>'134', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,726,131,726,166,800,166,800,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '135'
$floorItems2['135'] = i
w.create(TkcText,763,148.5, 'text'=>'135', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,340,360,335,363,331,365,326,366,304,366,
- 304,312,396,312,396,288,400,288,404,288,
- 409,290,413,292,418,297,421,302,422,309,
- 421,318,417,325,411,330,405,332,397,333,
- 344,333,340,334,336,336,335,338,332,342,
- 331,347,332,351,334,354,336,357,341,359,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 304,312,396,312,396,288,400,288,404,288,
+ 409,290,413,292,418,297,421,302,422,309,
+ 421,318,417,325,411,330,405,332,397,333,
+ 344,333,340,334,336,336,335,338,332,342,
+ 331,347,332,351,334,354,336,357,341,359,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'Ramona Stair'
$floorItems2['Ramona Stair'] = i
w.create(TkcText,368,323, 'text'=>'Ramona Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,30,23,30,5,93,5,98,5,104,7,110,10,116,16,119,20,
- 122,28,123,32,123,68,220,68,220,87,90,87,90,23,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 122,28,123,32,123,68,220,68,220,87,90,87,90,23,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'University Stair'
$floorItems2['University Stair'] = i
w.create(TkcText,155,77.5, 'text'=>'University Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,282,37,295,40,312,49,323,56,337,70,352,56,
- 358,48,363,39,365,29,348,25,335,22,321,14,
- 300,5,283,1,260,0,246,0,242,2,236,4,231,8,
- 227,13,223,17,221,22,220,34,260,34,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 358,48,363,39,365,29,348,25,335,22,321,14,
+ 300,5,283,1,260,0,246,0,242,2,236,4,231,8,
+ 227,13,223,17,221,22,220,34,260,34,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'Plaza Stair'
$floorItems2['Plaza Stair'] = i
w.create(TkcText,317.5,28.5, 'text'=>'Plaza Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,220,34,260,34,282,37,295,40,312,49,
- 323,56,337,70,350,83,365,94,377,100,
- 386,104,386,128,220,128,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 323,56,337,70,350,83,365,94,377,100,
+ 386,104,386,128,220,128,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'Plaza Deck'
$floorItems2['Plaza Deck'] = i
w.create(TkcText,303,81, 'text'=>'Plaza Deck', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,257,336,77,336,6,336,6,301,77,301,77,310,257,310,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '106'
$floorItems2['106'] = i
w.create(TkcText,131.5,318.5, 'text'=>'106', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,146,110,162,110,162,91,130,91,130,115,95,115,
- 95,128,114,128,114,151,157,151,157,153,112,153,
- 112,130,97,130,97,168,175,168,175,131,146,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 95,128,114,128,114,151,157,151,157,153,112,153,
+ 112,130,97,130,97,168,175,168,175,131,146,131,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '119'
$floorItems2['119'] = i
w.create(TkcText,143.5,133, 'text'=>'119', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
w.create(TkcLine,155,191,155,189, 'fill'=>color, 'tags'=>['floor1','wall'])
w.create(TkcLine,155,177,155,169, 'fill'=>color, 'tags'=>['floor1','wall'])
w.create(TkcLine,96,129,96,169, 'fill'=>color, 'tags'=>['floor1','wall'])
@@ -793,327 +793,327 @@ end
# floor (office outlines and numbers).
#
# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
+# w - The canvas window.
+# color - Color to use for drawing foreground information.
def floor2_fg2(w,color)
i = TkcPolygon.new(w,748,188,755,188,755,205,758,205,758,222,
- 800,222,800,168,748,168,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 800,222,800,168,748,168,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '238'
$floorItems2['238'] = i
w.create(TkcText,774,195, 'text'=>'238', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,726,188,746,188,746,166,800,166,800,131,726,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '237'
$floorItems2['237'] = i
w.create(TkcText,763,148.5, 'text'=>'237', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,497,187,497,204,559,204,559,324,641,324,
- 643,324,643,291,641,291,641,205,696,205,
- 696,291,694,291,694,314,715,314,715,291,
- 715,205,755,205,755,190,724,190,724,187,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 643,324,643,291,641,291,641,205,696,205,
+ 696,291,694,291,694,314,715,314,715,291,
+ 715,205,755,205,755,190,724,190,724,187,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '246'
$floorItems2['246'] = i
w.create(TkcText,600,264, 'text'=>'246', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,694,279,643,279,643,314,694,314,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '247'
$floorItems2['247'] = i
w.create(TkcText,668.5,296.5, 'text'=>'247', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,232,250,308,250,308,242,339,242,339,246,
- 397,246,397,255,476,255,476,250,482,250,559,250,
- 559,274,482,274,482,278,396,278,396,274,232,274,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 397,246,397,255,476,255,476,250,482,250,559,250,
+ 559,274,482,274,482,278,396,278,396,274,232,274,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '202'
$floorItems2['202'] = i
w.create(TkcText,285.5,260, 'text'=>'202', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,53,228,53,338,176,338,233,338,233,196,
- 306,196,306,180,175,180,175,169,156,169,
- 156,196,176,196,176,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 306,196,306,180,175,180,175,169,156,169,
+ 156,196,176,196,176,228,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '206'
$floorItems2['206'] = i
w.create(TkcText,143,267, 'text'=>'206', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,51,277,6,277,6,338,51,338,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '212'
$floorItems2['212'] = i
w.create(TkcText,28.5,307.5, 'text'=>'212', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,557,276,486,276,486,309,510,309,510,325,557,325,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '245'
$floorItems2['245'] = i
w.create(TkcText,521.5,300.5, 'text'=>'245', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,560,389,599,389,599,326,560,326,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '244'
$floorItems2['244'] = i
w.create(TkcText,579.5,357.5, 'text'=>'244', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,601,389,601,326,643,326,643,389,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '243'
$floorItems2['243'] = i
w.create(TkcText,622,357.5, 'text'=>'243', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,688,316,645,316,645,365,688,365,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '242'
$floorItems2['242'] = i
w.create(TkcText,666.5,340.5, 'text'=>'242', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,802,367,759,367,759,226,802,226,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = 'Barbecue Deck'
$floorItems2['Barbecue Deck'] = i
w.create(TkcText,780.5,296.5, 'text'=>'Barbecue Deck', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,755,262,755,314,717,314,717,262,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '240'
$floorItems2['240'] = i
w.create(TkcText,736,288, 'text'=>'240', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,755,316,689,316,689,365,755,365,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '241'
$floorItems2['241'] = i
w.create(TkcText,722,340.5, 'text'=>'241', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,755,206,717,206,717,261,755,261,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '239'
$floorItems2['239'] = i
w.create(TkcText,736,233.5, 'text'=>'239', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,695,277,643,277,643,206,695,206,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '248'
$floorItems2['248'] = i
w.create(TkcText,669,241.5, 'text'=>'248', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,676,135,676,185,724,185,724,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '236'
$floorItems2['236'] = i
w.create(TkcText,700,160, 'text'=>'236', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,675,135,635,135,635,145,628,145,628,185,675,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '235'
$floorItems2['235'] = i
w.create(TkcText,651.5,160, 'text'=>'235', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,626,143,633,143,633,135,572,135,
- 572,143,579,143,579,185,626,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 572,143,579,143,579,185,626,185,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '234'
$floorItems2['234'] = i
w.create(TkcText,606,160, 'text'=>'234', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,557,135,571,135,571,145,578,145,
- 578,185,527,185,527,131,557,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 578,185,527,185,527,131,557,131,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '233'
$floorItems2['233'] = i
w.create(TkcText,552.5,158, 'text'=>'233', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,476,249,557,249,557,205,476,205,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '230'
$floorItems2['230'] = i
w.create(TkcText,516.5,227, 'text'=>'230', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,476,164,486,164,486,131,525,131,525,185,476,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '232'
$floorItems2['232'] = i
w.create(TkcText,500.5,158, 'text'=>'232', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,476,186,495,186,495,204,476,204,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '229'
$floorItems2['229'] = i
w.create(TkcText,485.5,195, 'text'=>'229', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,474,207,409,207,409,187,399,187,399,164,474,164,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '227'
$floorItems2['227'] = i
w.create(TkcText,436.5,185.5, 'text'=>'227', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,399,228,399,253,474,253,474,209,409,209,409,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '228'
$floorItems2['228'] = i
w.create(TkcText,436.5,231, 'text'=>'228', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,397,246,397,226,407,226,407,189,377,189,377,246,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '226'
$floorItems2['226'] = i
w.create(TkcText,392,217.5, 'text'=>'226', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,377,169,316,169,316,131,397,131,397,188,377,188,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '225'
$floorItems2['225'] = i
w.create(TkcText,356.5,150, 'text'=>'225', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,234,198,306,198,306,249,234,249,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '224'
$floorItems2['224'] = i
w.create(TkcText,270,223.5, 'text'=>'224', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,270,179,306,179,306,170,314,170,314,135,270,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '223'
$floorItems2['223'] = i
w.create(TkcText,292,157, 'text'=>'223', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,268,179,221,179,221,135,268,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '222'
$floorItems2['222'] = i
w.create(TkcText,244.5,157, 'text'=>'222', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,177,179,219,179,219,135,177,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '221'
$floorItems2['221'] = i
w.create(TkcText,198,157, 'text'=>'221', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,299,327,349,327,349,284,341,284,341,276,299,276,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '204'
$floorItems2['204'] = i
w.create(TkcText,324,301.5, 'text'=>'204', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,234,276,297,276,297,327,257,327,257,338,234,338,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '205'
$floorItems2['205'] = i
w.create(TkcText,265.5,307, 'text'=>'205', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,256,385,256,340,212,340,212,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '207'
$floorItems2['207'] = i
w.create(TkcText,234,362.5, 'text'=>'207', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,210,340,164,340,164,385,210,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '208'
$floorItems2['208'] = i
w.create(TkcText,187,362.5, 'text'=>'208', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,115,340,162,340,162,385,115,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '209'
$floorItems2['209'] = i
w.create(TkcText,138.5,362.5, 'text'=>'209', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,89,228,89,156,53,156,53,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '217'
$floorItems2['217'] = i
w.create(TkcText,71,192, 'text'=>'217', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,89,169,97,169,97,190,89,190,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '217A'
$floorItems2['217A'] = i
w.create(TkcText,93,179.5, 'text'=>'217A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,89,156,89,168,95,168,95,135,53,135,53,156,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '216'
$floorItems2['216'] = i
w.create(TkcText,71,145.5, 'text'=>'216', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,51,179,51,135,6,135,6,179,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '215'
$floorItems2['215'] = i
w.create(TkcText,28.5,157, 'text'=>'215', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,51,227,6,227,6,180,51,180,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '214'
$floorItems2['214'] = i
w.create(TkcText,28.5,203.5, 'text'=>'214', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,51,275,6,275,6,229,51,229,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '213'
$floorItems2['213'] = i
w.create(TkcText,28.5,252, 'text'=>'213', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,114,340,67,340,67,385,114,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '210'
$floorItems2['210'] = i
w.create(TkcText,90.5,362.5, 'text'=>'210', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,59,389,59,385,65,385,65,340,1,340,1,389,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '211'
$floorItems2['211'] = i
w.create(TkcText,33,364.5, 'text'=>'211', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,393,309,350,309,350,282,342,282,342,276,393,276,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '203'
$floorItems2['203'] = i
w.create(TkcText,367.5,292.5, 'text'=>'203', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,99,191,91,191,91,226,174,226,174,198,
- 154,198,154,192,109,192,109,169,99,169,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 154,198,154,192,109,192,109,169,99,169,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '220'
$floorItems2['220'] = i
w.create(TkcText,132.5,208.5, 'text'=>'220', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = 'Priv Lift2'
$floorItems2['Priv Lift2'] = i
w.create(TkcText,323,188, 'text'=>'Priv Lift2', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = 'Pub Lift 2'
$floorItems2['Pub Lift 2'] = i
w.create(TkcText,323,223, 'text'=>'Pub Lift 2', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '218'
$floorItems2['218'] = i
w.create(TkcText,136,149.5, 'text'=>'218', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '219'
$floorItems2['219'] = i
w.create(TkcText,132.5,180, 'text'=>'219', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '201'
$floorItems2['201'] = i
w.create(TkcText,358,209, 'text'=>'201', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
w.create(TkcLine,641,186,678,186, 'fill'=>color, 'tags'=>['floor2','wall'])
w.create(TkcLine,757,350,757,367, 'fill'=>color, 'tags'=>['floor2','wall'])
w.create(TkcLine,634,133,634,144, 'fill'=>color, 'tags'=>['floor2','wall'])
@@ -1275,215 +1275,215 @@ end
# floor (office outlines and numbers).
#
# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
+# w - The canvas window.
+# color - Color to use for drawing foreground information.
def floor2_fg3(w,color)
i = TkcPolygon.new(w,89,228,89,180,70,180,70,228,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '316'
$floorItems2['316'] = i
w.create(TkcText,79.5,204, 'text'=>'316', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,115,368,162,368,162,323,115,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '309'
$floorItems2['309'] = i
w.create(TkcText,138.5,345.5, 'text'=>'309', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,164,323,164,368,211,368,211,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '308'
$floorItems2['308'] = i
w.create(TkcText,187.5,345.5, 'text'=>'308', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,256,368,212,368,212,323,256,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '307'
$floorItems2['307'] = i
w.create(TkcText,234,345.5, 'text'=>'307', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,244,276,297,276,297,327,260,327,260,321,244,321,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '305'
$floorItems2['305'] = i
w.create(TkcText,270.5,301.5, 'text'=>'305', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,251,219,251,203,244,203,244,219,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '324B'
$floorItems2['324B'] = i
w.create(TkcText,247.5,211, 'text'=>'324B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,251,249,244,249,244,232,251,232,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '324A'
$floorItems2['324A'] = i
w.create(TkcText,247.5,240.5, 'text'=>'324A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,223,135,223,179,177,179,177,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '320'
$floorItems2['320'] = i
w.create(TkcText,200,157, 'text'=>'320', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,114,368,114,323,67,323,67,368,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '310'
$floorItems2['310'] = i
w.create(TkcText,90.5,345.5, 'text'=>'310', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,23,277,23,321,68,321,68,277,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '312'
$floorItems2['312'] = i
w.create(TkcText,45.5,299, 'text'=>'312', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,23,229,68,229,68,275,23,275,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '313'
$floorItems2['313'] = i
w.create(TkcText,45.5,252, 'text'=>'313', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,68,227,23,227,23,180,68,180,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '314'
$floorItems2['314'] = i
w.create(TkcText,40.5,203.5, 'text'=>'314', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,95,179,95,135,23,135,23,179,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '315'
$floorItems2['315'] = i
w.create(TkcText,59,157, 'text'=>'315', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,99,226,99,204,91,204,91,226,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '316B'
$floorItems2['316B'] = i
w.create(TkcText,95,215, 'text'=>'316B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,91,202,99,202,99,180,91,180,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '316A'
$floorItems2['316A'] = i
w.create(TkcText,95,191, 'text'=>'316A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,97,169,109,169,109,192,154,192,154,198,
- 174,198,174,226,101,226,101,179,97,179,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 174,198,174,226,101,226,101,179,97,179,
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '319'
$floorItems2['319'] = i
w.create(TkcText,141.5,209, 'text'=>'319', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,65,368,58,368,58,389,1,389,1,333,23,333,23,323,65,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '311'
$floorItems2['311'] = i
w.create(TkcText,29.5,361, 'text'=>'311', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '318'
$floorItems2['318'] = i
w.create(TkcText,132.5,180, 'text'=>'318', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '317'
$floorItems2['317'] = i
w.create(TkcText,136,149.5, 'text'=>'317', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,274,194,274,221,306,221,306,194,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '323'
$floorItems2['323'] = i
w.create(TkcText,290,207.5, 'text'=>'323', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,306,222,274,222,274,249,306,249,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '325'
$floorItems2['325'] = i
w.create(TkcText,290,235.5, 'text'=>'325', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,263,179,224,179,224,135,263,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '321'
$floorItems2['321'] = i
w.create(TkcText,243.5,157, 'text'=>'321', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,314,169,306,169,306,192,273,192,
- 264,181,264,135,314,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 264,181,264,135,314,135,
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '322'
$floorItems2['322'] = i
w.create(TkcText,293.5,163.5, 'text'=>'322', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = 'Pub Lift3'
$floorItems2['Pub Lift3'] = i
w.create(TkcText,323,223, 'text'=>'Pub Lift3', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = 'Priv Lift3'
$floorItems2['Priv Lift3'] = i
w.create(TkcText,323,188, 'text'=>'Priv Lift3', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,350,284,376,284,376,276,397,276,397,309,350,309,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '303'
$floorItems2['303'] = i
w.create(TkcText,373.5,292.5, 'text'=>'303', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,272,203,272,249,252,249,252,230,
- 244,230,244,221,252,221,252,203,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 244,230,244,221,252,221,252,203,
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '324'
$floorItems2['324'] = i
w.create(TkcText,262,226, 'text'=>'324', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,299,276,299,327,349,327,349,284,341,284,341,276,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '304'
$floorItems2['304'] = i
w.create(TkcText,324,301.5, 'text'=>'304', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '301'
$floorItems2['301'] = i
w.create(TkcText,358,209, 'text'=>'301', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,397,246,377,246,377,185,397,185,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '327'
$floorItems2['327'] = i
w.create(TkcText,387,215.5, 'text'=>'327', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,316,131,316,169,377,169,377,185,397,185,397,131,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '326'
$floorItems2['326'] = i
w.create(TkcText,365.5,150, 'text'=>'326', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,308,251,242,251,242,274,342,274,342,282,375, 282,
- 375,274,397,274,397,248,339,248,339,242,308,242,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 375,274,397,274,397,248,339,248,339,242,308,242,
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '302'
$floorItems2['302'] = i
w.create(TkcText,319.5,261, 'text'=>'302', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,70,321,242,321,242,200,259,200,259,203,272,203,
- 272,193,263,180,242,180,175,180,175,169,156,169,
- 156,196,177,196,177,228,107,228,70,228,70,275,107,275,
- 107,248,160,248,160,301,107,301,107,275,70,275,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 272,193,263,180,242,180,175,180,175,169,156,169,
+ 156,196,177,196,177,228,107,228,70,228,70,275,107,275,
+ 107,248,160,248,160,301,107,301,107,275,70,275,
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '306'
$floorItems2['306'] = i
w.create(TkcText,200.5,284.5, 'text'=>'306', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
w.create(TkcLine,341,275,341,283, 'fill'=>color, 'tags'=>['floor3','wall'])
w.create(TkcLine,162,197,155,197, 'fill'=>color, 'tags'=>['floor3','wall'])
w.create(TkcLine,396,247,399,247, 'fill'=>color, 'tags'=>['floor3','wall'])
@@ -1592,7 +1592,7 @@ $floor2_demo = TkToplevel.new {|w|
# label
TkLabel.new($floor2_demo, 'font'=>$font, 'wraplength'=>'8i', 'justify'=>'left',
- 'text'=>"This window contains a canvas widget showing the floorplan of Digital Equipment Corporation's Western Research Laboratory. It has three levels. At any given time one of the levels is active, meaning that you can see its room structure. To activate a level, click the left mouse button anywhere on it. As the mouse moves over the active level, the room under the mouse lights up and its room number appears in the \"Room:\" entry. You can also type a room number in the entry and the room will light up."){
+ 'text'=>"This window contains a canvas widget showing the floorplan of Digital Equipment Corporation's Western Research Laboratory. It has three levels. At any given time one of the levels is active, meaning that you can see its room structure. To activate a level, click the left mouse button anywhere on it. As the mouse moves over the active level, the room under the mouse lights up and its room number appears in the \"Room:\" entry. You can also type a room number in the entry and the room will light up."){
pack('side'=>'top')
}
@@ -1621,12 +1621,12 @@ $floorItems2 = {}
# canvas
if $tk_version =~ /^4\.[01]/
$floor2_canvas_frame = TkFrame.new($floor2_demo,'bd'=>2,'relief'=>'sunken',
- 'highlightthickness'=>2)
+ 'highlightthickness'=>2)
$floor2_canvas = TkCanvas.new($floor2_canvas_frame,
- 'width'=>900, 'height'=>500, 'borderwidth'=>0,
- 'highlightthickness'=>0) {|c|
+ 'width'=>900, 'height'=>500, 'borderwidth'=>0,
+ 'highlightthickness'=>0) {|c|
TkScrollbar.new($floor2_demo, 'orient'=>'horiz',
- 'command'=>proc{|*args| c.xview(*args)}){|hs|
+ 'command'=>proc{|*args| c.xview(*args)}){|hs|
c.xscrollcommand(proc{|first,last| hs.set first,last})
pack('side'=>'bottom', 'fill'=>'x')
}
@@ -1647,20 +1647,20 @@ else
TkFrame.new(f, 'bd'=>2, 'relief'=>'sunken') {|f1|
$floor2_canvas = TkCanvas.new(f1, 'width'=>900, 'height'=>500,
- 'borderwidth'=>0,
- 'highlightthickness'=>0) {
- xscrollcommand(proc{|first,last| h.set first,last})
- yscrollcommand(proc{|first,last| v.set first,last})
- pack('expand'=>'yes', 'fill'=>'both')
+ 'borderwidth'=>0,
+ 'highlightthickness'=>0) {
+ xscrollcommand(proc{|first,last| h.set first,last})
+ yscrollcommand(proc{|first,last| v.set first,last})
+ pack('expand'=>'yes', 'fill'=>'both')
}
grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
}
v.grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
h.grid('padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
@@ -1677,7 +1677,7 @@ end
$currentRoom2 = TkVariable.new
$floor2_entry = TkEntry.new($floor2_canvas, 'width'=>10, 'relief'=>'sunken',
- 'bd'=>2, 'textvariable'=>$currentRoom2)
+ 'bd'=>2, 'textvariable'=>$currentRoom2)
# Choose colors, then fill in the floorplan.
@@ -1714,7 +1714,7 @@ $floor2_canvas.itembind('room', 'Enter', proc{newRoom2 $floor2_canvas})
$floor2_canvas.itembind('room', 'Leave', proc{$currentRoom2.value = ''})
$floor2_canvas.bind('2', proc{|x,y| $floor2_canvas.scan_mark x,y}, '%x %y')
$floor2_canvas.bind('B2-Motion',
- proc{|x,y| $floor2_canvas.scan_dragto x,y}, '%x %y')
+ proc{|x,y| $floor2_canvas.scan_dragto x,y}, '%x %y')
$floor2_canvas.bind('Destroy', proc{$currentRoom2.unset})
$currentRoom2.value = ''
$currentRoom2.trace('w',proc{roomChanged2 $floor2_canvas})
diff --git a/ext/tk/sample/demos-en/icon.rb b/ext/tk/sample/demos-en/icon.rb
index 0acf8c041a..58aca2df07 100644
--- a/ext/tk/sample/demos-en/icon.rb
+++ b/ext/tk/sample/demos-en/icon.rb
@@ -50,14 +50,14 @@ TkFrame.new($icon_demo) {|frame|
flagup = \
TkBitmapImage.new('file'=>[$demo_dir,'..',
'images','flagup.xbm'].join(File::Separator),
- 'maskfile'=>\
- [$demo_dir,'..','images','flagup.xbm'].join(File::Separator))
+ 'maskfile'=>\
+ [$demo_dir,'..','images','flagup.xbm'].join(File::Separator))
flagdown = \
TkBitmapImage.new('file'=>[$demo_dir,'..',
'images','flagdown.xbm'].join(File::Separator),
- 'maskfile'=>\
- [$demo_dir,'..',
- 'images','flagdown.xbm'].join(File::Separator))
+ 'maskfile'=>\
+ [$demo_dir,'..',
+ 'images','flagdown.xbm'].join(File::Separator))
# create variable
letters = TkVariable.new
@@ -67,14 +67,14 @@ TkFrame.new($icon_demo, 'borderwidth'=>10){|w|
TkFrame.new(w) {|f|
TkRadioButton.new(f){
bitmap '@' + [$demo_dir,'..',
- 'images','letters.xbm'].join(File::Separator)
+ 'images','letters.xbm'].join(File::Separator)
variable letters
value 'full'
}.pack('side'=>'top', 'expand'=>'yes')
TkRadioButton.new(f){
bitmap '@' + [$demo_dir,'..',
- 'images','noletter.xbm'].join(File::Separator)
+ 'images','noletter.xbm'].join(File::Separator)
variable letters
value 'empty'
}.pack('side'=>'top', 'expand'=>'yes')
diff --git a/ext/tk/sample/demos-en/image3.rb b/ext/tk/sample/demos-en/image3.rb
index d7d823ccf2..d77cc0f99c 100644
--- a/ext/tk/sample/demos-en/image3.rb
+++ b/ext/tk/sample/demos-en/image3.rb
@@ -33,7 +33,7 @@ end
# listbox from the directory named in the demo's entry.
#
# Arguments:
-# w - Name of the toplevel window of the demo.
+# w - Name of the toplevel window of the demo.
def selectAndLoadDir(w, lbox)
dir = Tk.chooseDirectory(:initialdir=>$dirName, :parent=>w, :mustexist=>true)
if dir.length > 0
@@ -90,11 +90,11 @@ image3_f = TkFrame.new($image3_demo).pack(:fill=>:both, :expand=>true)
image3_df = TkLabelFrame.new($image3_demo, :text=>'Directory:')
image3_ff = TkLabelFrame.new($image3_demo, :text=>'File:',
- :padx=>'2m', :pady=>'2m')
+ :padx=>'2m', :pady=>'2m')
image3_lbx = TkListbox.new(image3_ff, :width=>20, :height=>10) {
pack(:side=>:left, :fill=>:y, :expand=>true)
yscrollbar(TkScrollbar.new(image3_ff).pack(:side=>:left, :fill=>:y,
- :expand=>true))
+ :expand=>true))
insert(0, *(%w(earth.gif earthris.gif teapot.ppm)))
bind('Double-1', proc{|x,y| loadImage(self, x, y)}, '%x %y')
}
@@ -105,7 +105,7 @@ image3_ent = TkEntry.new(image3_df, :width=>30, :textvariable=>$dirName){
}
TkButton.new(image3_df, :pady=>0, :padx=>'2m', :text=>"Select Dir.",
- :command=>proc{selectAndLoadDir(image3_ent, image3_lbx)}) {
+ :command=>proc{selectAndLoadDir(image3_ent, image3_lbx)}) {
pack(:side=>:left, :fill=>:y, :padx=>[0, '2m'], :pady=>'2m')
}
@@ -114,8 +114,8 @@ image3_if = TkLabelFrame.new($image3_demo, :text=>'Image:') {|f|
}
Tk.grid(image3_df, '-',
- :sticky=>:ew, :padx=>'1m', :pady=>'1m', :in=>image3_f)
+ :sticky=>:ew, :padx=>'1m', :pady=>'1m', :in=>image3_f)
Tk.grid(image3_ff, image3_if,
- :sticky=>:nw, :padx=>'1m', :pady=>'1m', :in=>image3_f)
+ :sticky=>:nw, :padx=>'1m', :pady=>'1m', :in=>image3_f)
TkGrid.columnconfigure(image3_f, 1, :weight=>1)
diff --git a/ext/tk/sample/demos-en/items.rb b/ext/tk/sample/demos-en/items.rb
index 81b447878c..8ab7668a07 100644
--- a/ext/tk/sample/demos-en/items.rb
+++ b/ext/tk/sample/demos-en/items.rb
@@ -74,11 +74,11 @@ TkFrame.new($items_demo) {|cf|
else
c.grid('in'=>cf, 'row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
vs.grid('row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
hs.grid('row'=>1, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
TkGrid.rowconfigure(cf, 0, 'weight'=>1, 'minsize'=>0)
TkGrid.columnconfigure(cf, 0, 'weight'=>1, 'minsize'=>0)
@@ -114,126 +114,126 @@ $tag_item = TkcGroup.new(cvs)
# Set up demos within each of the areas of the grid.
TkcText.new(cvs, '5c', '.2c', 'text'=>'Lines', 'anchor'=>'n')
TkcLine.new(cvs, '1c', '1c', '3c', '1c', '1c', '4c', '3c', '4c',
- 'width'=>2, 'fill'=>blue, 'capstyle'=>'butt',
- 'join'=>'miter', 'tags'=>$tag_item )
+ 'width'=>2, 'fill'=>blue, 'capstyle'=>'butt',
+ 'join'=>'miter', 'tags'=>$tag_item )
TkcLine.new(cvs, '4.67c','1c','4.67c','4c', 'arrow'=>'last', 'tags'=>$tag_item)
TkcLine.new(cvs, '6.33c','1c','6.33c','4c', 'arrow'=>'both', 'tags'=>$tag_item)
TkcLine.new(cvs, '5c','6c','9c','6c','9c','1c','8c','1c','8c','4.8c','8.8c',
- '4.8c','8.8c','1.2c','8.2c','1.2c','8.2c','4.6c','8.6c','4.6c',
- '8.6c','1.4c','8.4c','1.4c','8.4c','4.4c',
- 'width'=>3, 'fill'=>red, 'tags'=>$tag_item )
+ '4.8c','8.8c','1.2c','8.2c','1.2c','8.2c','4.6c','8.6c','4.6c',
+ '8.6c','1.4c','8.4c','1.4c','8.4c','4.4c',
+ 'width'=>3, 'fill'=>red, 'tags'=>$tag_item )
TkcLine.new(cvs, '1c','5c','7c','5c','7c','7c','9c','7c', 'width'=>'.5c',
- 'stipple'=>'@'+[$demo_dir,'..',
- 'images','gray25.xbm'].join(File::Separator),
- 'arrow'=>'both', 'arrowshape'=>'15 15 7', 'tags'=>$tag_item )
+ 'stipple'=>'@'+[$demo_dir,'..',
+ 'images','gray25.xbm'].join(File::Separator),
+ 'arrow'=>'both', 'arrowshape'=>'15 15 7', 'tags'=>$tag_item )
TkcLine.new(cvs, '1c','7c','1.75c','5.8c','2.5c','7c','3.25c','5.8c','4c','7c',
- 'width'=>'.5c', 'capstyle'=>'round', 'join'=>'round',
- 'tags'=>$tag_item )
+ 'width'=>'.5c', 'capstyle'=>'round', 'join'=>'round',
+ 'tags'=>$tag_item )
TkcText.new(cvs, '15c', '.2c',
- 'text'=>'Curves (smoothed lines)', 'anchor'=>'n')
+ 'text'=>'Curves (smoothed lines)', 'anchor'=>'n')
TkcLine.new(cvs, '11c','4c','11.5c','1c','13.5c','1c','14c','4c',
- 'smooth'=>'on', 'fill'=>blue, 'tags'=>$tag_item )
+ 'smooth'=>'on', 'fill'=>blue, 'tags'=>$tag_item )
TkcLine.new(cvs, '15.5c','1c','19.5c','1.5c','15.5c','4.5c','19.5c','4c',
- 'smooth'=>'on', 'arrow'=>'both', 'width'=>3, 'tags'=>$tag_item )
+ 'smooth'=>'on', 'arrow'=>'both', 'width'=>3, 'tags'=>$tag_item )
TkcLine.new(cvs, '12c','6c','13.5c','4.5c','16.5c','7.5c','18c','6c',
- '16.5c','4.5c','13.5c','7.5c','12c','6c',
- 'smooth'=>'on', 'width'=>'3m', 'capstyle'=>'round',
- 'stipple'=>'@'+[$demo_dir, '..',
- 'images', 'gray25.xbm'].join(File::Separator),
- 'fill'=>red, 'tags'=>$tag_item )
+ '16.5c','4.5c','13.5c','7.5c','12c','6c',
+ 'smooth'=>'on', 'width'=>'3m', 'capstyle'=>'round',
+ 'stipple'=>'@'+[$demo_dir, '..',
+ 'images', 'gray25.xbm'].join(File::Separator),
+ 'fill'=>red, 'tags'=>$tag_item )
TkcText.new(cvs, '25c', '.2c', 'text'=>'Polygons', 'anchor'=>'n')
TkcPolygon.new(cvs, '21c','1.0c','22.5c','1.75c','24c','1.0c','23.25c','2.5c',
- '24c','4.0c','22.5c','3.25c','21c','4.0c','21.75c','2.5c',
- 'fill'=>'green', 'outline'=>'black', 'width'=>4,
- 'tags'=>$tag_item )
+ '24c','4.0c','22.5c','3.25c','21c','4.0c','21.75c','2.5c',
+ 'fill'=>'green', 'outline'=>'black', 'width'=>4,
+ 'tags'=>$tag_item )
TkcPolygon.new(cvs, '25c','4c','25c','4c','25c','1c','26c','1c','27c','4c',
- '28c','1c','29c','1c','29c','4c','29c','4c',
- 'fill'=>red, 'smooth'=>'on', 'tags'=> $tag_item)
+ '28c','1c','29c','1c','29c','4c','29c','4c',
+ 'fill'=>red, 'smooth'=>'on', 'tags'=> $tag_item)
TkcPolygon.new(cvs, '22c','4.5c','25c','4.5c','25c','6.75c','28c','6.75c',
- '28c','5.25c','24c','5.25c','24c','6.0c','26c','6c','26c',
- '7.5c','22c','7.5c',
- 'stipple'=>'@' + [$demo_dir, '..',
+ '28c','5.25c','24c','5.25c','24c','6.0c','26c','6c','26c',
+ '7.5c','22c','7.5c',
+ 'stipple'=>'@' + [$demo_dir, '..',
'images', 'gray25.xbm'].join(File::Separator),
- 'outline'=>'black', 'tags'=>$tag_item )
+ 'outline'=>'black', 'tags'=>$tag_item )
TkcText.new(cvs, '5c', '8.2c', 'text'=>'Rectangles', 'anchor'=>'n')
TkcRectangle.new(cvs, '1c','9.5c','4c','12.5c',
- 'outline'=>red, 'width'=>'3m', 'tags'=>$tag_item)
+ 'outline'=>red, 'width'=>'3m', 'tags'=>$tag_item)
TkcRectangle.new(cvs, '0.5c','13.5c','4.5c','15.5c',
- 'fill'=>green, 'tags'=>$tag_item )
+ 'fill'=>green, 'tags'=>$tag_item )
TkcRectangle.new(cvs, '6c','10c','9c','15c', 'outline'=>'',
- 'stipple'=>'@'+[$demo_dir,'..',
- 'images','gray25.xbm'].join(File::Separator),
- 'fill'=>blue, 'tags'=>$tag_item )
+ 'stipple'=>'@'+[$demo_dir,'..',
+ 'images','gray25.xbm'].join(File::Separator),
+ 'fill'=>blue, 'tags'=>$tag_item )
TkcText.new(cvs, '15c', '8.2c', 'text'=>'Ovals', 'anchor'=>'n')
TkcOval.new(cvs, '11c','9.5c','14c','12.5c',
- 'outline'=>red, 'width'=>'3m', 'tags'=>$tag_item)
+ 'outline'=>red, 'width'=>'3m', 'tags'=>$tag_item)
TkcOval.new(cvs, '10.5c','13.5c','14.5c','15.5c',
- 'fill'=>green, 'tags'=>$tag_item )
+ 'fill'=>green, 'tags'=>$tag_item )
TkcOval.new(cvs, '16c','10c','19c','15c', 'outline'=>'',
- 'stipple'=>'@'+[$demo_dir,'..',
- 'images','gray25.xbm'].join(File::Separator),
- 'fill'=>blue, 'tags'=>$tag_item )
+ 'stipple'=>'@'+[$demo_dir,'..',
+ 'images','gray25.xbm'].join(File::Separator),
+ 'fill'=>blue, 'tags'=>$tag_item )
TkcText.new(cvs, '25c', '8.2c', 'text'=>'Text', 'anchor'=>'n')
TkcRectangle.new(cvs, '22.4c','8.9c','22.6c','9.1c')
TkcText.new(cvs, '22.5c', '9c', 'anchor'=>'n', 'font'=>font1, 'width'=>'4c',
- 'text'=>'A short string of text, word-wrapped, justified left, and anchored north (at the top). The rectangles show the anchor points for each piece of text.', 'tags'=>$tag_item )
+ 'text'=>'A short string of text, word-wrapped, justified left, and anchored north (at the top). The rectangles show the anchor points for each piece of text.', 'tags'=>$tag_item )
TkcRectangle.new(cvs, '25.4c','10.9c','25.6c','11.1c')
TkcText.new(cvs, '25.5c', '11c', 'anchor'=>'w', 'font'=>font1, 'fill'=>blue,
- 'text'=>"Several lines,\n each centered\nindividually,\nand all anchored\nat the left edge.", 'justify'=>'center', 'tags'=>$tag_item )
+ 'text'=>"Several lines,\n each centered\nindividually,\nand all anchored\nat the left edge.", 'justify'=>'center', 'tags'=>$tag_item )
TkcRectangle.new(cvs, '24.9c','13.9c','25.1c','14.1c')
if $tk_version =~ /^4\.[01]/
TkcText.new(cvs, '25c', '14c', 'anchor'=>'c', 'font'=>font2, 'fill'=>red,
- 'stipple'=>'@' + [$demo_dir, '..',
+ 'stipple'=>'@' + [$demo_dir, '..',
'images', 'grey.5'].join(File::Separator),
- 'text'=>'Stippled characters', 'tags'=>$tag_item )
+ 'text'=>'Stippled characters', 'tags'=>$tag_item )
else
TkcText.new(cvs, '25c', '14c', 'anchor'=>'c', 'font'=>font2, 'fill'=>red,
- 'stipple'=>'gray50', 'text'=>'Stippled characters',
- 'tags'=>$tag_item )
+ 'stipple'=>'gray50', 'text'=>'Stippled characters',
+ 'tags'=>$tag_item )
end
TkcText.new(cvs, '5c', '16.2c', 'text'=>'Arcs', 'anchor'=>'n')
TkcArc.new(cvs, '0.5c','17c','7c','20c', 'fill'=>green, 'outline'=>'black',
- 'start'=>45, 'extent'=>270, 'style'=>'pieslice', 'tags'=>$tag_item)
+ 'start'=>45, 'extent'=>270, 'style'=>'pieslice', 'tags'=>$tag_item)
#TkcArc.new(cvs, '6.5c','17c','9.5c','20c', 'width'=>'4m', 'style'=>'arc',
-# 'outline'=>blue, 'start'=>135, 'extent'=>270,
-# 'outlinestipple'=>'@' + ['images', 'grey.25'].join(File::Separator),
-# 'tags'=>$tag_item)
+# 'outline'=>blue, 'start'=>135, 'extent'=>270,
+# 'outlinestipple'=>'@' + ['images', 'grey.25'].join(File::Separator),
+# 'tags'=>$tag_item)
TkcArc.new(cvs, '6.5c','17c','9.5c','20c', 'width'=>'4m', 'style'=>'arc',
- 'outline'=>blue, 'start'=>135, 'extent'=>270,
- 'outlinestipple'=>'@'+[$demo_dir, '..',
+ 'outline'=>blue, 'start'=>135, 'extent'=>270,
+ 'outlinestipple'=>'@'+[$demo_dir, '..',
'images','gray25.xbm'].join(File::Separator),
- 'tags'=>$tag_item)
+ 'tags'=>$tag_item)
TkcArc.new(cvs, '0.5c','20c','9.5c','24c', 'width'=>'4m', 'style'=>'pieslice',
- 'fill'=>'', 'outline'=>red, 'start'=>225, 'extent'=>90,
- 'tags'=>$tag_item)
+ 'fill'=>'', 'outline'=>red, 'start'=>225, 'extent'=>90,
+ 'tags'=>$tag_item)
TkcArc.new(cvs, '5.5c','20.5c','9.5c','23.5c', 'width'=>'4m', 'style'=>'chord',
- 'fill'=>blue, 'outline'=>'', 'start'=>45, 'extent'=>270,
- 'tags'=>$tag_item)
+ 'fill'=>blue, 'outline'=>'', 'start'=>45, 'extent'=>270,
+ 'tags'=>$tag_item)
TkcText.new(cvs, '15c', '16.2c', 'text'=>'Bitmaps', 'anchor'=>'n')
#TkcBitmap.new(cvs, '13c','20c',
-# 'bitmap'=>'@' + ['images', 'face'].join(File::Separator),
-# 'tags'=>$tag_item)
+# 'bitmap'=>'@' + ['images', 'face'].join(File::Separator),
+# 'tags'=>$tag_item)
TkcBitmap.new(cvs, '13c','20c',
- 'bitmap'=>'@' + [$demo_dir, '..',
+ 'bitmap'=>'@' + [$demo_dir, '..',
'images', 'face.xbm'].join(File::Separator),
- 'tags'=>$tag_item)
+ 'tags'=>$tag_item)
#TkcBitmap.new(cvs, '17c','18.5c',
-# 'bitmap'=>'@' + ['images', 'noletters'].join(File::Separator),
-# 'tags'=>$tag_item)
+# 'bitmap'=>'@' + ['images', 'noletters'].join(File::Separator),
+# 'tags'=>$tag_item)
TkcBitmap.new(cvs, '17c','18.5c',
- 'bitmap'=>'@' + [$demo_dir, '..',
- 'images', 'noletter.xbm'].join(File::Separator),
- 'tags'=>$tag_item)
+ 'bitmap'=>'@' + [$demo_dir, '..',
+ 'images', 'noletter.xbm'].join(File::Separator),
+ 'tags'=>$tag_item)
#TkcBitmap.new(cvs, '17c','21.5c',
-# 'bitmap'=>'@' + ['images', 'letters'].join(File::Separator),
-# 'tags'=>$tag_item)
+# 'bitmap'=>'@' + ['images', 'letters'].join(File::Separator),
+# 'tags'=>$tag_item)
#
TkcBitmap.new(cvs, '17c','21.5c') {
bitmap '@' + [$demo_dir, '..', 'images', 'letters.xbm'].join(File::Separator)
@@ -249,17 +249,17 @@ TkButton.new(cvs) {|b|
text 'Press Me'
command proc{butPress cvs, red}
TkcWindow.new(cvs, '21c','18c',
- 'window'=>b, 'anchor'=>'nw', 'tags'=>$tag_item)
+ 'window'=>b, 'anchor'=>'nw', 'tags'=>$tag_item)
}
TkEntry.new(cvs, 'width'=>20, 'relief'=>'sunken') {|e|
insert 'end', 'Edit this text'
TkcWindow.new(cvs, '21c','21c',
- 'window'=>e, 'anchor'=>'nw', 'tags'=>$tag_item)
+ 'window'=>e, 'anchor'=>'nw', 'tags'=>$tag_item)
}
TkScale.new(cvs, 'from'=>0, 'to'=>100, 'length'=>'6c', 'sliderlength'=>'.4c',
- 'width'=>'.5c', 'tickinterval'=>0 ) {|scl|
+ 'width'=>'.5c', 'tickinterval'=>0 ) {|scl|
TkcWindow.new(cvs, '28.5c','17.5c',
- 'window'=>scl, 'anchor'=>'n', 'tags'=>$tag_item)
+ 'window'=>scl, 'anchor'=>'n', 'tags'=>$tag_item)
}
TkcText.new(cvs, '21c', '17.9c', 'text'=>'Button:', 'anchor'=>'sw')
TkcText.new(cvs, '21c', '20.9c', 'text'=>'Entry:', 'anchor'=>'sw')
@@ -324,7 +324,7 @@ def itemStroke(c,x,y)
if $areaX1 != x && $areaY1 != y
c.delete 'area'
c.addtag_withtag 'area', TkcRectangle.new(c, $areaX1, $areaY1, x, y,
- '-outline', 'black')
+ '-outline', 'black')
$areaX2 = x
$areaY2 = y
end
@@ -369,6 +369,6 @@ end
def butPress(w,color)
i = TkcText.new(w, '25c', '18.1c',
- 'text'=>'Ouch!!', 'fill'=>color, 'anchor'=>'n')
+ 'text'=>'Ouch!!', 'fill'=>color, 'anchor'=>'n')
Tk.after(500, proc{w.delete i})
end
diff --git a/ext/tk/sample/demos-en/label.rb b/ext/tk/sample/demos-en/label.rb
index 96f76d35f1..55e07a5ebc 100644
--- a/ext/tk/sample/demos-en/label.rb
+++ b/ext/tk/sample/demos-en/label.rb
@@ -50,12 +50,12 @@ TkFrame.new($label_demo) {|frame|
f_left = TkFrame.new($label_demo)
f_right = TkFrame.new($label_demo)
[f_left, f_right].each{|w| w.pack('side'=>'left', 'expand'=>'yes',
- 'padx'=>10, 'pady'=>10, 'fill'=>'both')}
+ 'padx'=>10, 'pady'=>10, 'fill'=>'both')}
# label
[ TkLabel.new(f_left, 'text'=>'First label'),
TkLabel.new(f_left, 'text'=>'Second label, raised',
- 'relief'=>'raised'),
+ 'relief'=>'raised'),
TkLabel.new(f_left, 'text'=>'Third label, sunken', 'relief'=>'sunken')
].each{|w| w.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2, 'anchor'=>'w')}
diff --git a/ext/tk/sample/demos-en/labelframe.rb b/ext/tk/sample/demos-en/labelframe.rb
index 8636a4a9b9..842a4f6c04 100644
--- a/ext/tk/sample/demos-en/labelframe.rb
+++ b/ext/tk/sample/demos-en/labelframe.rb
@@ -19,8 +19,8 @@ $labelframe_demo = TkToplevel.new {|w|
# Some information
TkLabel.new($labelframe_demo,
- :font=>$font, :wraplength=>'4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
+ :font=>$font, :wraplength=>'4i', :justify=>:left,
+ :text=><<EOL).pack(:side=>:top)
Labelframes are used to group related widgets together. \
The label may be either plain text or another widget. \
If your Tk library linked to Ruby doesn't include a 'labelframe' widget, \
@@ -33,28 +33,28 @@ TkFrame.new($labelframe_demo){|f|
pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{
- $labelframe_demo.destroy
- $labelframe_demo = nil
- }).pack(:side=>:left, :expand=>true)
+ $labelframe_demo.destroy
+ $labelframe_demo = nil
+ }).pack(:side=>:left, :expand=>true)
TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{
- showCode 'labelframe'
- }).pack(:side=>:left, :expand=>true)
+ showCode 'labelframe'
+ }).pack(:side=>:left, :expand=>true)
}
# Demo area
w = TkFrame.new($labelframe_demo).pack(:side=>:bottom, :fill=>:both,
- :expand=>true)
+ :expand=>true)
# A group of radiobuttons in a labelframe
TkLabelFrame.new(w, :text=>'Value',
- :padx=>2, :pady=>2) {|f|
+ :padx=>2, :pady=>2) {|f|
grid(:row=>0, :column=>0, :pady=>'2m', :padx=>'2m')
v = TkVariable.new
(1..4).each{|i|
TkRadiobutton.new(f, :text=>"This is value #{i}",
- :variable=>v, :value=>i) {
+ :variable=>v, :value=>i) {
pack(:side=>:top, :fill=>:x, :pady=>2)
}
}
@@ -77,7 +77,7 @@ end
TkLabelFrame.new(w, :pady=>2, :padx=>2){|f|
TkCheckButton.new(f, :widgetname=>'cb', :variable=>$lfdummy,
- :text=>"Use this option.", :padx=>0) {|cb|
+ :text=>"Use this option.", :padx=>0) {|cb|
command proc{lfEnableButtons(f)}
f.labelwidget(cb)
}
diff --git a/ext/tk/sample/demos-en/menu.rb b/ext/tk/sample/demos-en/menu.rb
index c29f6e90da..d835d145eb 100644
--- a/ext/tk/sample/demos-en/menu.rb
+++ b/ext/tk/sample/demos-en/menu.rb
@@ -77,8 +77,8 @@ TkMenubutton.new($menu_frame, 'text'=>'Basic', 'underline'=>0) {|m|
add('command', 'label'=>'Long entry that does nothing')
['A','B','C','D','E','F','G'].each{|c|
add('command', 'label'=>"Print letter \"#{c}\"",
- 'underline'=>14, 'accelerator'=>"Meta+#{c}",
- 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
+ 'underline'=>14, 'accelerator'=>"Meta+#{c}",
+ 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
$menu_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"})
}
}
@@ -89,17 +89,17 @@ TkMenubutton.new($menu_frame, 'text'=>'Cascades', 'underline'=>0) {|m|
TkMenu.new(m, 'tearoff'=>false) {|cascade_menu|
m.configure('menu'=>cascade_menu)
add('command', 'label'=>'Print hello',
- 'command'=>proc{print "Hello\n"},
- 'accelerator'=>"#{modifier}+H", 'underline'=>6)
+ 'command'=>proc{print "Hello\n"},
+ 'accelerator'=>"#{modifier}+H", 'underline'=>6)
$menu_demo.bind("#{modifier}-h", proc{print "Hello\n"})
add('command', 'label'=>'Print goodbye',
- 'command'=>proc{print "Goodbye\n"},
- 'accelerator'=>"#{modifier}+G", 'underline'=>6)
+ 'command'=>proc{print "Goodbye\n"},
+ 'accelerator'=>"#{modifier}+G", 'underline'=>6)
$menu_demo.bind("#{modifier}-g", proc{print "Goodbye\n"})
TkMenu.new(m, 'tearoff'=>false) {|cascade_check|
cascade_menu.add('cascade', 'label'=>'Check buttons',
- 'menu'=>cascade_check, 'underline'=>0)
+ 'menu'=>cascade_check, 'underline'=>0)
oil = TkVariable.new(0)
add('check', 'label'=>'Oil checked', 'variable'=>oil)
trans = TkVariable.new(0)
@@ -110,18 +110,18 @@ TkMenubutton.new($menu_frame, 'text'=>'Cascades', 'underline'=>0) {|m|
add('check', 'label'=>'Lights checked', 'variable'=>lights)
add('separator')
add('command', 'label'=>'Show current values',
- 'command'=>proc{showVars($menu_demo,
- ['oil', oil],
- ['trans', trans],
- ['brakes', brakes],
- ['lights', lights])} )
+ 'command'=>proc{showVars($menu_demo,
+ ['oil', oil],
+ ['trans', trans],
+ ['brakes', brakes],
+ ['lights', lights])} )
invoke 1
invoke 3
}
TkMenu.new(m, 'tearoff'=>false) {|cascade_radio|
cascade_menu.add('cascade', 'label'=>'Radio buttons',
- 'menu'=>cascade_radio, 'underline'=>0)
+ 'menu'=>cascade_radio, 'underline'=>0)
pointSize = TkVariable.new
add('radio', 'label'=>'10 point', 'variable'=>pointSize, 'value'=>10)
add('radio', 'label'=>'14 point', 'variable'=>pointSize, 'value'=>14)
@@ -135,9 +135,9 @@ TkMenubutton.new($menu_frame, 'text'=>'Cascades', 'underline'=>0) {|m|
add('radio', 'label'=>'Italic', 'variable'=>style, 'value'=>'italic')
add('separator')
add('command', 'label'=>'Show current values',
- 'command'=>proc{showVars($menu_demo,
- ['pointSize', pointSize],
- ['style', style])} )
+ 'command'=>proc{showVars($menu_demo,
+ ['pointSize', pointSize],
+ ['style', style])} )
invoke 1
invoke 7
}
@@ -149,15 +149,15 @@ TkMenubutton.new($menu_frame, 'text'=>'Icons', 'underline'=>0) {|m|
TkMenu.new(m, 'tearoff'=>false) {|icon_menu|
m.configure('menu'=>icon_menu)
add('command',
- 'bitmap'=>'@'+[$demo_dir,'..',
- 'images','pattern.xbm'].join(File::Separator),
- 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry',
- 'text'=>'The menu entry you invoked displays a bitmap rather than a text string. Other than this, it is just like any other menu entry.',
- 'bitmap'=>'', 'default'=>0,
- 'buttons'=>'Dismiss')} )
+ 'bitmap'=>'@'+[$demo_dir,'..',
+ 'images','pattern.xbm'].join(File::Separator),
+ 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry',
+ 'text'=>'The menu entry you invoked displays a bitmap rather than a text string. Other than this, it is just like any other menu entry.',
+ 'bitmap'=>'', 'default'=>0,
+ 'buttons'=>'Dismiss')} )
['info', 'questhead', 'error'].each{|icon|
add('command', 'bitmap'=>icon,
- 'command'=>proc{print "You invoked the #{icon} bitmap\n"})
+ 'command'=>proc{print "You invoked the #{icon} bitmap\n"})
}
}
}
@@ -169,7 +169,7 @@ TkMenubutton.new($menu_frame, 'text'=>'More', 'underline'=>0) {|m|
[ 'An entry','Another entry','Does nothing','Does almost nothing',
'Make life meaningful' ].each{|i|
add('command', 'label'=>i,
- 'command'=>proc{print "You invoked \"#{i}\"\n"})
+ 'command'=>proc{print "You invoked \"#{i}\"\n"})
}
}
}
@@ -180,7 +180,7 @@ TkMenubutton.new($menu_frame, 'text'=>'Colors', 'underline'=>0) {|m|
m.configure('menu'=>colors_menu)
['red', 'orange', 'yellow', 'green', 'blue'].each{|c|
add('command', 'label'=>c, 'background'=>c,
- 'command'=>proc{print "You invoked \"#{c}\"\n"})
+ 'command'=>proc{print "You invoked \"#{c}\"\n"})
}
}
}
diff --git a/ext/tk/sample/demos-en/menu84.rb b/ext/tk/sample/demos-en/menu84.rb
index 8f7be97707..cb616d8461 100644
--- a/ext/tk/sample/demos-en/menu84.rb
+++ b/ext/tk/sample/demos-en/menu84.rb
@@ -35,9 +35,9 @@ TkLabel.new($menu84_demo,'font'=>$font,'wraplength'=>'4i','justify'=>'left') {
menustatus = TkVariable.new(" ")
TkFrame.new($menu84_demo) {|frame|
TkLabel.new(frame, 'textvariable'=>menustatus, 'relief'=>'sunken',
- 'bd'=>1, 'font'=>['Helvetica', '10'],
- 'anchor'=>'w').pack('side'=>'left', 'padx'=>2,
- 'expand'=>true, 'fill'=>'both')
+ 'bd'=>1, 'font'=>['Helvetica', '10'],
+ 'anchor'=>'w').pack('side'=>'left', 'padx'=>2,
+ 'expand'=>true, 'fill'=>'both')
pack('side'=>'bottom', 'fill'=>'x', 'pady'=>2)
}
@@ -91,8 +91,8 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
add('command', 'label'=>'Long entry that does nothing')
['A','B','C','D','E','F','G'].each{|c|
add('command', 'label'=>"Print letter \"#{c}\"",
- 'underline'=>14, 'accelerator'=>"Meta+#{c}",
- 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
+ 'underline'=>14, 'accelerator'=>"Meta+#{c}",
+ 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
$menu84_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"})
}
}
@@ -110,7 +110,7 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
TkMenu.new(m, 'tearoff'=>false) {|cascade_check|
m.add('cascade', 'label'=>'Check buttons',
- 'menu'=>cascade_check, 'underline'=>0)
+ 'menu'=>cascade_check, 'underline'=>0)
oil = TkVariable.new(0)
add('check', 'label'=>'Oil checked', 'variable'=>oil)
trans = TkVariable.new(0)
@@ -121,18 +121,18 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
add('check', 'label'=>'Lights checked', 'variable'=>lights)
add('separator')
add('command', 'label'=>'Show current values',
- 'command'=>proc{showVars($menu84_demo,
- ['oil', oil],
- ['trans', trans],
- ['brakes', brakes],
- ['lights', lights])} )
+ 'command'=>proc{showVars($menu84_demo,
+ ['oil', oil],
+ ['trans', trans],
+ ['brakes', brakes],
+ ['lights', lights])} )
invoke 1
invoke 3
}
TkMenu.new(m, 'tearoff'=>false) {|cascade_radio|
m.add('cascade', 'label'=>'Radio buttons',
- 'menu'=>cascade_radio, 'underline'=>0)
+ 'menu'=>cascade_radio, 'underline'=>0)
pointSize = TkVariable.new
add('radio', 'label'=>'10 point', 'variable'=>pointSize, 'value'=>10)
add('radio', 'label'=>'14 point', 'variable'=>pointSize, 'value'=>14)
@@ -146,9 +146,9 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
add('radio', 'label'=>'Italic', 'variable'=>style, 'value'=>'italic')
add('separator')
add('command', 'label'=>'Show current values',
- 'command'=>proc{showVars($menu84_demo,
- ['pointSize', pointSize],
- ['style', style])} )
+ 'command'=>proc{showVars($menu84_demo,
+ ['pointSize', pointSize],
+ ['style', style])} )
invoke 1
invoke 7
}
@@ -158,14 +158,14 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
$menu84_frame.add('cascade', 'label'=>'Icons', 'menu'=>m, 'underline'=>0)
add('command', 'hidemargin'=>1,
'bitmap'=>'@'+[$demo_dir,'..',
- 'images','pattern.xbm'].join(File::Separator),
+ 'images','pattern.xbm'].join(File::Separator),
'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry',
- 'text'=>'The menu entry you invoked displays a bitmap rather than a text string. Other than this, it is just like any other menu entry.',
- 'bitmap'=>'', 'default'=>0,
- 'buttons'=>'Dismiss')} )
+ 'text'=>'The menu entry you invoked displays a bitmap rather than a text string. Other than this, it is just like any other menu entry.',
+ 'bitmap'=>'', 'default'=>0,
+ 'buttons'=>'Dismiss')} )
['info', 'questhead', 'error'].each{|icon|
add('command', 'bitmap'=>icon, 'hidemargin'=>1,
- 'command'=>proc{print "You invoked the #{icon} bitmap\n"})
+ 'command'=>proc{print "You invoked the #{icon} bitmap\n"})
}
entryconfigure(2, :columnbreak=>true)
@@ -176,38 +176,38 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
[ 'An entry','Another entry','Does nothing','Does almost nothing',
'Make life meaningful' ].each{|i|
add('command', 'label'=>i,
- 'command'=>proc{print "You invoked \"#{i}\"\n"})
+ 'command'=>proc{print "You invoked \"#{i}\"\n"})
}
m.entryconfigure('Does almost nothing',
- 'bitmap'=>'questhead', 'compound'=>'left',
- 'command'=>proc{
- TkDialog.new('title'=>'Compound Menu Entry',
- 'message'=>'The menu entry you invoked'+
- 'displays both a bitmap and '+
- 'a text string. Other than '+
- 'this, it isjust like any '+
- 'other menu entry.',
- 'buttons'=>['OK'], 'bitmap'=>'')
- })
+ 'bitmap'=>'questhead', 'compound'=>'left',
+ 'command'=>proc{
+ TkDialog.new('title'=>'Compound Menu Entry',
+ 'message'=>'The menu entry you invoked'+
+ 'displays both a bitmap and '+
+ 'a text string. Other than '+
+ 'this, it isjust like any '+
+ 'other menu entry.',
+ 'buttons'=>['OK'], 'bitmap'=>'')
+ })
}
TkMenu.new($menu84_frame) {|m|
$menu84_frame.add('cascade', 'label'=>'Colors', 'menu'=>m, 'underline'=>0)
['red', 'orange', 'yellow', 'green', 'blue'].each{|c|
add('command', 'label'=>c, 'background'=>c,
- 'command'=>proc{print "You invoked \"#{c}\"\n"})
+ 'command'=>proc{print "You invoked \"#{c}\"\n"})
}
}
$menu84_demo.menu($menu84_frame)
TkMenu.bind('<MenuSelect>', proc{|w|
- begin
- label = w.entrycget('active', 'label')
- rescue
- label = " "
- end
- menustatus.value = label
- Tk.update(true)
- }, '%W')
+ begin
+ label = w.entrycget('active', 'label')
+ rescue
+ label = " "
+ end
+ menustatus.value = label
+ Tk.update(true)
+ }, '%W')
diff --git a/ext/tk/sample/demos-en/menubu.rb b/ext/tk/sample/demos-en/menubu.rb
index cc1ccafa76..e2ddd07bc6 100644
--- a/ext/tk/sample/demos-en/menubu.rb
+++ b/ext/tk/sample/demos-en/menubu.rb
@@ -187,7 +187,7 @@ TkFrame.new(center) {|f|
menubuttonoptions = TkVariable.new
mbutton = TkMenubutton.new(f)
options = optionMenu(mbutton, menubuttonoptions,
- 'one', 'two', 'three')
+ 'one', 'two', 'three')
mbutton.pack('side'=>'left', 'padx'=>25, 'pady'=>25)
paletteColor = TkVariable.new
colors = ['Black','red4','DarkGreen','NavyBlue', 'gray75',
diff --git a/ext/tk/sample/demos-en/msgbox.rb b/ext/tk/sample/demos-en/msgbox.rb
index 4152477e67..aab1b619cf 100644
--- a/ext/tk/sample/demos-en/msgbox.rb
+++ b/ext/tk/sample/demos-en/msgbox.rb
@@ -20,7 +20,7 @@ $msgbox_demo = TkToplevel.new {|w|
# label
TkLabel.new($msgbox_demo, 'font'=>$font, 'wraplength'=>'4i', 'justify'=>'left',
- 'text'=>"Choose the icon and type option of the message box. Then press the \"Message Box\" button to see the message box.").pack('side'=>'top')
+ 'text'=>"Choose the icon and type option of the message box. Then press the \"Message Box\" button to see the message box.").pack('side'=>'top')
# frame
TkFrame.new($msgbox_demo) {|frame|
@@ -48,9 +48,9 @@ TkFrame.new($msgbox_demo) {|frame|
$msgbox_leftframe = TkFrame.new($msgbox_demo)
$msgbox_rightframe = TkFrame.new($msgbox_demo)
$msgbox_leftframe .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
- 'pady'=>'.5c', 'padx'=>'.5c')
+ 'pady'=>'.5c', 'padx'=>'.5c')
$msgbox_rightframe.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
- 'pady'=>'.5c', 'padx'=>'.5c')
+ 'pady'=>'.5c', 'padx'=>'.5c')
TkLabel.new($msgbox_leftframe, 'text'=>'Icon').pack('side'=>'top')
TkFrame.new($msgbox_leftframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\
@@ -59,9 +59,9 @@ TkFrame.new($msgbox_leftframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\
$msgboxIcon = TkVariable.new('info')
['error', 'info', 'question', 'warning'].each {|icon|
TkRadioButton.new($msgbox_leftframe, 'text'=>icon, 'variable'=>$msgboxIcon,
- 'relief'=>'flat', 'value'=>icon, 'width'=>16,
- 'anchor'=>'w').pack('side'=>'top', 'pady'=>2,
- 'anchor'=>'w', 'fill'=>'x')
+ 'relief'=>'flat', 'value'=>icon, 'width'=>16,
+ 'anchor'=>'w').pack('side'=>'top', 'pady'=>2,
+ 'anchor'=>'w', 'fill'=>'x')
}
TkLabel.new($msgbox_rightframe, 'text'=>'Type').pack('side'=>'top')
@@ -72,17 +72,17 @@ $msgboxType = TkVariable.new('ok')
['abortretryignore', 'ok', 'okcancel',
'retrycancel', 'yesno', 'yesnocancel'].each {|type|
TkRadioButton.new($msgbox_rightframe, 'text'=>type, 'variable'=>$msgboxType,
- 'relief'=>'flat', 'value'=>type, 'width'=>16,
- 'anchor'=>'w').pack('side'=>'top', 'pady'=>2,
- 'anchor'=>'w', 'fill'=>'x')
+ 'relief'=>'flat', 'value'=>type, 'width'=>16,
+ 'anchor'=>'w').pack('side'=>'top', 'pady'=>2,
+ 'anchor'=>'w', 'fill'=>'x')
}
def showMessageBox(w)
button = Tk.messageBox('icon'=>$msgboxIcon.value, 'type'=>$msgboxType.value,
- 'title'=>'Message', 'parent'=>w,
- 'message'=>"This is a \"#{$msgboxType.value}\" type messagebox with the \"#{$msgboxIcon.value}\" icon")
+ 'title'=>'Message', 'parent'=>w,
+ 'message'=>"This is a \"#{$msgboxType.value}\" type messagebox with the \"#{$msgboxIcon.value}\" icon")
Tk.messageBox('icon'=>'info', 'type'=>'ok', 'parent'=>w,
- 'message'=>"You have selected \"#{button}\"")
+ 'message'=>"You have selected \"#{button}\"")
end
diff --git a/ext/tk/sample/demos-en/paned1.rb b/ext/tk/sample/demos-en/paned1.rb
index 8c25de0ef3..48ba86de02 100644
--- a/ext/tk/sample/demos-en/paned1.rb
+++ b/ext/tk/sample/demos-en/paned1.rb
@@ -17,8 +17,8 @@ $paned1_demo = TkToplevel.new {|w|
}
TkLabel.new($paned1_demo,
- :font=>$font, :wraplength=>'4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
+ :font=>$font, :wraplength=>'4i', :justify=>:left,
+ :text=><<EOL).pack(:side=>:top)
The sash between the two coloured windows below can be used to divide the area between them. Use the left mouse button to resize without redrawing by just moving the sash, and use the middle mouse button to resize opaquely (always redrawing the windows in each position.)
If your Tk library linked to Ruby doesn't include a 'panedwindow', this demo doesn't work. Please use later version of Tk which supports a 'panedwindow'.
EOL
@@ -28,13 +28,13 @@ TkFrame.new($paned1_demo){|f|
pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{
- $paned1_demo.destroy
- $paned1_demo = nil
- }).pack(:side=>:left, :expand=>true)
+ $paned1_demo.destroy
+ $paned1_demo = nil
+ }).pack(:side=>:left, :expand=>true)
TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{
- showCode 'paned1'
- }).pack(:side=>:left, :expand=>true)
+ showCode 'paned1'
+ }).pack(:side=>:left, :expand=>true)
}
TkPanedwindow.new($paned1_demo){|f|
diff --git a/ext/tk/sample/demos-en/paned2.rb b/ext/tk/sample/demos-en/paned2.rb
index 53c19c0ffa..5911cadab6 100644
--- a/ext/tk/sample/demos-en/paned2.rb
+++ b/ext/tk/sample/demos-en/paned2.rb
@@ -17,8 +17,8 @@ $paned2_demo = TkToplevel.new {|w|
}
TkLabel.new($paned2_demo,
- :font=>$font, :wraplength=>'4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
+ :font=>$font, :wraplength=>'4i', :justify=>:left,
+ :text=><<EOL).pack(:side=>:top)
The sash between the two scrolled windows below can be used to divide the area between them. Use the left mouse button to resize without redrawing by just moving the sash, and use the middle mouse button to resize opaquely (always redrawing the windows in each position.)
If your Tk library linked to Ruby doesn't include a 'panedwindow', this demo doesn't work. Please use later version of Tk which supports a 'panedwindow'.
EOL
@@ -28,13 +28,13 @@ TkFrame.new($paned2_demo){|f|
pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{
- $paned2_demo.destroy
- $paned2_demo = nil
- }).pack(:side=>:left, :expand=>true)
+ $paned2_demo.destroy
+ $paned2_demo = nil
+ }).pack(:side=>:left, :expand=>true)
TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{
- showCode 'paned2'
- }).pack(:side=>:left, :expand=>true)
+ showCode 'paned2'
+ }).pack(:side=>:left, :expand=>true)
}
paneList = TkVariable.new # define as normal variable (not array)
@@ -65,28 +65,28 @@ TkPanedwindow.new($paned2_demo, :orient=>:vertical){|f|
pack(:side=>:top, :expand=>true, :fill=>:both, :pady=>2, :padx=>'2m')
add(TkFrame.new(f){|paned2_top|
- TkListbox.new(paned2_top, :listvariable=>paneList) {
- # Invert the first item to highlight it
- itemconfigure(0, :background=>self.cget(:foreground),
- :foreground=>self.cget(:background) )
- yscrollbar(TkScrollbar.new(paned2_top).pack(:side=>:right,
- :fill=>:y))
- pack(:fill=>:both, :expand=>true)
- }
+ TkListbox.new(paned2_top, :listvariable=>paneList) {
+ # Invert the first item to highlight it
+ itemconfigure(0, :background=>self.cget(:foreground),
+ :foreground=>self.cget(:background) )
+ yscrollbar(TkScrollbar.new(paned2_top).pack(:side=>:right,
+ :fill=>:y))
+ pack(:fill=>:both, :expand=>true)
+ }
},
TkFrame.new(f, :height=>120) {|paned2_bottom|
- # The bottom window is a text widget with scrollbar
- paned2_xscr = TkScrollbar.new(paned2_bottom)
- paned2_yscr = TkScrollbar.new(paned2_bottom)
- paned2_text = TkText.new(paned2_bottom, :width=>30, :wrap=>:non) {
- insert('1.0', "This is just a normal text widget")
- xscrollbar(paned2_xscr)
- yscrollbar(paned2_yscr)
- }
- Tk.grid(paned2_text, paned2_yscr, :sticky=>'nsew')
- Tk.grid(paned2_xscr, :sticky=>'nsew')
- TkGrid.columnconfigure(paned2_bottom, 0, :weight=>1)
- TkGrid.rowconfigure(paned2_bottom, 0, :weight=>1)
+ # The bottom window is a text widget with scrollbar
+ paned2_xscr = TkScrollbar.new(paned2_bottom)
+ paned2_yscr = TkScrollbar.new(paned2_bottom)
+ paned2_text = TkText.new(paned2_bottom, :width=>30, :wrap=>:non) {
+ insert('1.0', "This is just a normal text widget")
+ xscrollbar(paned2_xscr)
+ yscrollbar(paned2_yscr)
+ }
+ Tk.grid(paned2_text, paned2_yscr, :sticky=>'nsew')
+ Tk.grid(paned2_xscr, :sticky=>'nsew')
+ TkGrid.columnconfigure(paned2_bottom, 0, :weight=>1)
+ TkGrid.rowconfigure(paned2_bottom, 0, :weight=>1)
} )
}
diff --git a/ext/tk/sample/demos-en/plot.rb b/ext/tk/sample/demos-en/plot.rb
index fb887011a7..6d01deeef5 100644
--- a/ext/tk/sample/demos-en/plot.rb
+++ b/ext/tk/sample/demos-en/plot.rb
@@ -21,7 +21,7 @@ $plot_demo = TkToplevel.new {|w|
# label
TkLabel.new($plot_demo, 'font'=>$font, 'wraplength'=>'4i', 'justify'=>'left',
- 'text'=>"This window displays a canvas widget containing a simple 2-dimensional plot. You can doctor the data by dragging any of the points with mouse button 1."){
+ 'text'=>"This window displays a canvas widget containing a simple 2-dimensional plot. You can doctor the data by dragging any of the points with mouse button 1."){
pack('side'=>'top')
}
@@ -54,39 +54,39 @@ $plot_canvas.pack('side'=>'top', 'fill'=>'x')
TkcLine.new($plot_canvas, 100, 250, 400, 250, 'width'=>2)
TkcLine.new($plot_canvas, 100, 250, 100, 50, 'width'=>2)
TkcText.new($plot_canvas, 225, 20,
- 'text'=>"A Simple Plot", 'font'=>plotFont, 'fill'=>'brown')
+ 'text'=>"A Simple Plot", 'font'=>plotFont, 'fill'=>'brown')
(0..10).each {|i|
x = 100 + (i * 30)
TkcLine.new($plot_canvas, x, 250, x, 245, 'width'=>2)
TkcText.new($plot_canvas, x, 254,
- 'text'=>10*i, 'font'=>plotFont, 'anchor'=>'n')
+ 'text'=>10*i, 'font'=>plotFont, 'anchor'=>'n')
}
(0..5).each {|i|
y = 250 - (i * 40)
TkcLine.new($plot_canvas, 100, y, 105, y, 'width'=>2)
TkcText.new($plot_canvas, 96, y,
- 'text'=>"#{i*50}.0", 'font'=>plotFont, 'anchor'=>'e')
+ 'text'=>"#{i*50}.0", 'font'=>plotFont, 'anchor'=>'e')
}
for xx, yy in [[12,56],[20,94],[33,98],[32,120],[61,180],[75,160],[98,223]]
x = 100 + (3*xx)
y = 250 - (4*yy)/5
item = TkcOval.new($plot_canvas, x-6, y-6, x+6, y+6,
- 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
+ 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
item.addtag 'point'
end
$plot_canvas.itembind('point', 'Any-Enter',
- proc{$plot_canvas.itemconfigure 'current','fill','red'})
+ proc{$plot_canvas.itemconfigure 'current','fill','red'})
$plot_canvas.itembind('point', 'Any-Leave',
- proc{$plot_canvas.itemconfigure 'current','fill','SkyBlue2'})
+ proc{$plot_canvas.itemconfigure 'current','fill','SkyBlue2'})
$plot_canvas.itembind('point', '1',
- proc{|x,y| plotDown $plot_canvas,x,y}, "%x %y")
+ proc{|x,y| plotDown $plot_canvas,x,y}, "%x %y")
$plot_canvas.itembind('point', 'ButtonRelease-1',
- proc{$plot_canvas.dtag 'selected'})
+ proc{$plot_canvas.dtag 'selected'})
$plot_canvas.bind('B1-Motion',
- proc{|x,y| plotMove $plot_canvas,x,y}, "%x %y")
+ proc{|x,y| plotMove $plot_canvas,x,y}, "%x %y")
$plot = {'lastX'=>0, 'lastY'=>0}
@@ -95,8 +95,8 @@ $plot = {'lastX'=>0, 'lastY'=>0}
# data points. It sets up state to allow the point to be dragged.
#
# Arguments:
-# w - The canvas window.
-# x, y - The coordinates of the mouse press.
+# w - The canvas window.
+# x, y - The coordinates of the mouse press.
def plotDown (w, x, y)
w.dtag 'selected'
@@ -111,8 +111,8 @@ end
# current item.
#
# Arguments:
-# w - The canvas window.
-# x, y - The coordinates of the mouse.
+# w - The canvas window.
+# x, y - The coordinates of the mouse.
def plotMove (w, x, y)
w.move 'selected', x - $plot['lastX'], y - $plot['lastY']
diff --git a/ext/tk/sample/demos-en/puzzle.rb b/ext/tk/sample/demos-en/puzzle.rb
index d206efe34b..0885cf2975 100644
--- a/ext/tk/sample/demos-en/puzzle.rb
+++ b/ext/tk/sample/demos-en/puzzle.rb
@@ -88,7 +88,7 @@ order = [3,1,6,2,5,7,15,13,4,11,8,9,14,10,12]
highlightthickness 0
command def_puzzleswitch_proc(w, num)
}.place('relx'=>$xpos[num], 'rely'=>$ypos[num],
- 'relwidth'=>0.25, 'relheight'=>0.25)
+ 'relwidth'=>0.25, 'relheight'=>0.25)
}
$xpos['space'] = 0.75
$ypos['space'] = 0.75
@@ -105,9 +105,9 @@ def puzzleSwitch(w, num)
&& ($xpos[num] >= ($xpos['space'] - 0.26)) \
&& ($xpos[num] <= ($xpos['space'] + 0.26))) \
|| (($xpos[num] >= ($xpos['space'] - 0.01)) \
- && ($xpos[num] <= ($xpos['space'] + 0.01)) \
- && ($ypos[num] >= ($ypos['space'] - 0.26)) \
- && ($ypos[num] <= ($ypos['space'] + 0.26)))
+ && ($xpos[num] <= ($xpos['space'] + 0.01)) \
+ && ($ypos[num] >= ($ypos['space'] - 0.26)) \
+ && ($ypos[num] <= ($ypos['space'] + 0.26)))
tmp = $xpos['space']
$xpos['space'] = $xpos[num]
$xpos[num] = tmp
diff --git a/ext/tk/sample/demos-en/radio2.rb b/ext/tk/sample/demos-en/radio2.rb
index 090e75c2cb..2b56ccc9b1 100644
--- a/ext/tk/sample/demos-en/radio2.rb
+++ b/ext/tk/sample/demos-en/radio2.rb
@@ -54,18 +54,18 @@ TkFrame.new($radio2_demo) {|frame|
text 'See Variables'
command proc{
showVars($radio2_demo,
- ['size', size], ['color', color], ['compound', align])
+ ['size', size], ['color', color], ['compound', align])
}
}.pack('side'=>'left', 'expand'=>'yes')
}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
# frame
f_left = TkLabelFrame.new($radio2_demo, 'text'=>'Point Size',
- 'pady'=>2, 'padx'=>2)
+ 'pady'=>2, 'padx'=>2)
f_mid = TkLabelFrame.new($radio2_demo, 'text'=>'Color',
- 'pady'=>2, 'padx'=>2)
+ 'pady'=>2, 'padx'=>2)
f_right = TkLabelFrame.new($radio2_demo, 'text'=>'Alignment',
- 'pady'=>2, 'padx'=>2)
+ 'pady'=>2, 'padx'=>2)
f_left.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
f_mid.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
f_right.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
@@ -91,14 +91,14 @@ f_right.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
}
label = TkLabel.new(f_right, 'text'=>'Label', 'bitmap'=>'questhead',
- 'compound'=>'left')
+ 'compound'=>'left')
label.configure('width'=>TkWinfo.reqwidth(label), 'compound'=>'top')
label.height(TkWinfo.reqheight(label))
abtn = ['Top', 'Left', 'Right', 'Bottom'].collect{|a|
lower = a.downcase
TkRadioButton.new(f_right, 'text'=>a, 'variable'=>align, 'relief'=>'flat',
- 'value'=>lower, 'indicatoron'=>0, 'width'=>7,
- 'command'=>proc{label.compound(align.value)})
+ 'value'=>lower, 'indicatoron'=>0, 'width'=>7,
+ 'command'=>proc{label.compound(align.value)})
}
Tk.grid('x', abtn[0])
diff --git a/ext/tk/sample/demos-en/radio3.rb b/ext/tk/sample/demos-en/radio3.rb
index ca0453416c..70c4abb3b5 100644
--- a/ext/tk/sample/demos-en/radio3.rb
+++ b/ext/tk/sample/demos-en/radio3.rb
@@ -36,43 +36,43 @@ align = TkVariable.new
# frame
TkFrame.new($radio3_demo) {|frame|
TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2),
- :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
+ :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
TkGrid('x',
- TkButton.new(frame, :text=>'See Variables',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{
- showVars($radio3_demo, ['size', size],
- ['color', color], ['compound', align])
- }),
- TkButton.new(frame, :text=>'See Code',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'radio3'}),
- TkButton.new(frame, :text=>'Dismiss',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- tmppath = $radio3_demo
- $radio3_demo = nil
- $showVarsWin[tmppath.path] = nil
- tmppath.destroy
- }),
- :padx=>4, :pady=>4)
+ TkButton.new(frame, :text=>'See Variables',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{
+ showVars($radio3_demo, ['size', size],
+ ['color', color], ['compound', align])
+ }),
+ TkButton.new(frame, :text=>'See Code',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{showCode 'radio3'}),
+ TkButton.new(frame, :text=>'Dismiss',
+ :image=>$image['delete'], :compound=>:left,
+ :command=>proc{
+ tmppath = $radio3_demo
+ $radio3_demo = nil
+ $showVarsWin[tmppath.path] = nil
+ tmppath.destroy
+ }),
+ :padx=>4, :pady=>4)
frame.grid_columnconfigure(0, :weight=>1)
TkGrid(frame, :row=>3, :column=>0, :columnspan=>3, :sticky=>'nsew')
}
# frame
f_left = TkLabelFrame.new($radio3_demo, 'text'=>'Point Size',
- 'pady'=>2, 'padx'=>2)
+ 'pady'=>2, 'padx'=>2)
f_mid = TkLabelFrame.new($radio3_demo, 'text'=>'Color',
- 'pady'=>2, 'padx'=>2)
+ 'pady'=>2, 'padx'=>2)
f_right = TkLabelFrame.new($radio3_demo, 'text'=>'Alignment',
- 'pady'=>2, 'padx'=>2)
+ 'pady'=>2, 'padx'=>2)
f_left .grid('column'=>0, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c', 'rowspan'=>2)
f_mid .grid('column'=>1, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c', 'rowspan'=>2)
f_right.grid('column'=>2, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c')
TkButton.new($radio3_demo, 'text'=>'Tristate',
- 'command'=>proc{size.value = 'multi'; color.value = 'multi'}){
+ 'command'=>proc{size.value = 'multi'; color.value = 'multi'}){
grid('column'=>2, 'row'=>2, 'pady'=>'.5c', 'padx'=>'.5c')
}
@@ -100,13 +100,13 @@ TkButton.new($radio3_demo, 'text'=>'Tristate',
}
label = TkLabel.new(f_right, 'text'=>'Label', 'bitmap'=>'questhead',
- 'compound'=>'left')
+ 'compound'=>'left')
label.configure('width'=>TkWinfo.reqwidth(label), 'compound'=>'top')
label.height(TkWinfo.reqheight(label))
a_btn = ['Top', 'Left', 'Right', 'Bottom'].collect{|a|
TkRadioButton.new(f_right, 'text'=>a, 'variable'=>align, 'relief'=>'flat',
- 'value'=>a.downcase, 'indicatoron'=>0, 'width'=>7,
- 'command'=>proc{label.compound(align.value)})
+ 'value'=>a.downcase, 'indicatoron'=>0, 'width'=>7,
+ 'command'=>proc{label.compound(align.value)})
}
Tk.grid('x', a_btn[0])
diff --git a/ext/tk/sample/demos-en/ruler.rb b/ext/tk/sample/demos-en/ruler.rb
index 03a00b75b6..4299d57b4f 100644
--- a/ext/tk/sample/demos-en/ruler.rb
+++ b/ext/tk/sample/demos-en/ruler.rb
@@ -11,8 +11,8 @@
# represent a tab stop.
#
# Arguments:
-# c - The canvas window.
-# x, y - Coordinates at which to create the tab stop.
+# c - The canvas window.
+# x, y - Coordinates at which to create the tab stop.
def rulerMkTab(c,x,y)
v = $demo_rulerInfo
@@ -34,7 +34,7 @@ $ruler_demo = TkToplevel.new {|w|
# label
TkLabel.new($ruler_demo, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left',
- 'text'=>"This canvas widget shows a mock-up of a ruler. You can create tab stops by dragging them out of the well to the right of the ruler. You can also drag existing tab stops. If you drag a tab stop far enough up or down so that it turns dim, it will be deleted when you release the mouse button."){
+ 'text'=>"This canvas widget shows a mock-up of a ruler. You can create tab stops by dragging them out of the well to the right of the ruler. You can also drag existing tab stops. If you drag a tab stop far enough up or down so that it turns dim, it will be deleted when you release the mouse button."){
pack('side'=>'top')
}
@@ -63,8 +63,8 @@ $ruler_canvas.pack('side'=>'top', 'fill'=>'x')
#
unless Struct.const_defined?("RulerInfo")
$demo_rulerInfo = Struct.new("RulerInfo", :grid, :left, :right, :x, :y,
- :top, :bottom, :size, :normalStyle,
- :activeStyle, :deleteStyle).new
+ :top, :bottom, :size, :normalStyle,
+ :activeStyle, :deleteStyle).new
end
$demo_rulerInfo.grid = '.25c'
$demo_rulerInfo.left = TkWinfo.fpixels($ruler_canvas, '1c')
@@ -86,7 +86,7 @@ else
end
TkcLine.new($ruler_canvas,
- '1c', '0.5c', '1c', '1c', '13c', '1c', '13c', '0.5c', 'width'=>1)
+ '1c', '0.5c', '1c', '1c', '13c', '1c', '13c', '0.5c', 'width'=>1)
(0..11).each{|i|
x = i+1
TkcLine.new($ruler_canvas, "#{x}c", '1c', "#{x}c", '0.6c', 'width'=>1)
@@ -99,22 +99,22 @@ TkcLine.new($ruler_canvas,
$rulerTag_well = TkcTag.new($ruler_canvas)
$ruler_canvas\
.addtag_withtag($rulerTag_well,
- TkcRectangle.new($ruler_canvas,
- '13.2c', '1c', '13.8c', '0.5c',
- 'outline'=>'black',
- 'fill'=>($ruler_canvas\
- .configinfo('background'))[4]) )
+ TkcRectangle.new($ruler_canvas,
+ '13.2c', '1c', '13.8c', '0.5c',
+ 'outline'=>'black',
+ 'fill'=>($ruler_canvas\
+ .configinfo('background'))[4]) )
$ruler_canvas\
.addtag_withtag($rulerTag_well,
- rulerMkTab($ruler_canvas,
- TkWinfo.pixels($ruler_canvas, '13.5c'),
- TkWinfo.pixels($ruler_canvas, '.65c') ) )
+ rulerMkTab($ruler_canvas,
+ TkWinfo.pixels($ruler_canvas, '13.5c'),
+ TkWinfo.pixels($ruler_canvas, '.65c') ) )
$rulerTag_well.bind('1', proc{|x,y| rulerNewTab($ruler_canvas,x,y)}, '%x %y')
$ruler_canvas.itembind('tab', '1',
- proc{|x,y| rulerSelectTab($ruler_canvas,x,y)}, '%x %y')
+ proc{|x,y| rulerSelectTab($ruler_canvas,x,y)}, '%x %y')
$ruler_canvas.bind('B1-Motion',
- proc{|x,y| rulerMoveTab($ruler_canvas,x,y)}, '%x %y')
+ proc{|x,y| rulerMoveTab($ruler_canvas,x,y)}, '%x %y')
$ruler_canvas.bind('Any-ButtonRelease-1', proc{rulerReleaseTab($ruler_canvas)})
# rulerNewTab --
@@ -122,8 +122,8 @@ $ruler_canvas.bind('Any-ButtonRelease-1', proc{rulerReleaseTab($ruler_canvas)})
# triangle object and adding tags to it to give it tab behavior.
#
# Arguments:
-# c - The canvas window.
-# x, y - The coordinates of the tab stop.
+# c - The canvas window.
+# x, y - The coordinates of the tab stop.
def rulerNewTab(c,x,y)
v = $demo_rulerInfo
@@ -140,9 +140,9 @@ end
# be dragged interactively.
#
# Arguments:
-# c - The canvas widget.
-# x, y - The coordinates of the mouse (identifies the point by
-# which the tab was picked up for dragging).
+# c - The canvas widget.
+# x, y - The coordinates of the mouse (identifies the point by
+# which the tab was picked up for dragging).
def rulerSelectTab(c,x,y)
v = $demo_rulerInfo
@@ -159,8 +159,8 @@ end
# it is about to be dragged out of the ruler.
#
# Arguments:
-# c - The canvas widget.
-# x, y - The coordinates of the mouse.
+# c - The canvas widget.
+# x, y - The coordinates of the mouse.
def rulerMoveTab(c,x,y)
v = $demo_rulerInfo
@@ -187,8 +187,8 @@ end
# it was dragged out of the ruler.
#
# Arguments:
-# c - The canvas widget.
-# x, y - The coordinates of the mouse.
+# c - The canvas widget.
+# x, y - The coordinates of the mouse.
def rulerReleaseTab(c)
v = $demo_rulerInfo
diff --git a/ext/tk/sample/demos-en/sayings.rb b/ext/tk/sample/demos-en/sayings.rb
index 4ba3097bed..cef0f4ecf4 100644
--- a/ext/tk/sample/demos-en/sayings.rb
+++ b/ext/tk/sample/demos-en/sayings.rb
@@ -69,11 +69,11 @@ TkFrame.new($sayings_demo, 'borderwidth'=>10) {|w|
else
sayings_lbox.grid('row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
sv.grid('row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
sh.grid('row'=>1, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
TkGrid.rowconfigure(w, 0, 'weight'=>1, 'minsize'=>0)
TkGrid.columnconfigure(w, 0, 'weight'=>1, 'minsize'=>0)
end
diff --git a/ext/tk/sample/demos-en/search.rb b/ext/tk/sample/demos-en/search.rb
index 59a8117bb7..3d3b4aecc8 100644
--- a/ext/tk/sample/demos-en/search.rb
+++ b/ext/tk/sample/demos-en/search.rb
@@ -13,9 +13,9 @@
# not affected, however.
#
# Arguments:
-# w - The window into which to load the file. Must be a
-# text widget.
-# file - The name of the file to load. Must be readable.
+# w - The window into which to load the file. Must be a
+# text widget.
+# file - The name of the file to load. Must be readable.
def textLoadFile(w,file)
w.delete('1.0', 'end')
@@ -31,10 +31,10 @@ end
# apply a given tag to each instance found.
#
# Arguments:
-# w - The window in which to search. Must be a text widget.
-# string - The string to search for. The search is done using
-# exact matching only; no special characters.
-# tag - Tag to apply to each instance of a matching string.
+# w - The window in which to search. Must be a text widget.
+# string - The string to search for. The search is done using
+# exact matching only; no special characters.
+# tag - Tag to apply to each instance of a matching string.
def textSearch(w, string, tag)
tag.remove('0.0', 'end')
@@ -55,15 +55,15 @@ end
# deleted) then it doesn't reschedule itself.
#
# Arguments:
-# cmd1 - Command to execute when method is called.
-# sleep1 - Ms to sleep after executing cmd1 before executing cmd2.
-# cmd2 - Command to execute in the *next* invocation of this method.
-# sleep2 - Ms to sleep after executing cmd2 before executing cmd1 again.
+# cmd1 - Command to execute when method is called.
+# sleep1 - Ms to sleep after executing cmd1 before executing cmd2.
+# cmd2 - Command to execute in the *next* invocation of this method.
+# sleep2 - Ms to sleep after executing cmd2 before executing cmd1 again.
def textToggle(cmd1,sleep1,cmd2,sleep2)
sleep_list = [sleep2, sleep1]
TkAfter.new(proc{sleep = sleep_list.shift; sleep_list.push(sleep); sleep},
- -1, cmd1, cmd2).start(sleep1)
+ -1, cmd1, cmd2).start(sleep1)
end
# toplevel widget
@@ -100,35 +100,35 @@ $search_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
# frame
TkFrame.new($search_demo) {|f|
TkLabel.new(f, 'text'=>'File name:',
- 'width'=>13, 'anchor'=>'w').pack('side'=>'left')
+ 'width'=>13, 'anchor'=>'w').pack('side'=>'left')
$search_fileName = TkVariable.new
TkEntry.new(f, 'width'=>40,
- 'textvariable'=>$search_fileName) {
+ 'textvariable'=>$search_fileName) {
pack('side'=>'left')
bind('Return', proc{textLoadFile($search_text, $search_fileName.value)
- $search_string_entry.focus})
+ $search_string_entry.focus})
focus
}
TkButton.new(f, 'text'=>'Load File',
- 'command'=>proc{textLoadFile($search_text,
- $search_fileName.value)})\
+ 'command'=>proc{textLoadFile($search_text,
+ $search_fileName.value)})\
.pack('side'=>'left', 'pady'=>5, 'padx'=>10)
}.pack('side'=>'top', 'fill'=>'x')
TkFrame.new($search_demo) {|f|
TkLabel.new(f, 'text'=>'Search string:',
- 'width'=>13, 'anchor'=>'w').pack('side'=>'left')
+ 'width'=>13, 'anchor'=>'w').pack('side'=>'left')
$search_searchString = TkVariable.new
$search_string_entry = TkEntry.new(f, 'width'=>40,
- 'textvariable'=>$search_searchString) {
+ 'textvariable'=>$search_searchString) {
pack('side'=>'left')
bind('Return', proc{textSearch($search_text, $search_searchString.value,
- $search_Tag)})
+ $search_Tag)})
}
TkButton.new(f, 'text'=>'Highlight',
- 'command'=>proc{textSearch($search_text,
- $search_searchString.value,
- $search_Tag)}) {
+ 'command'=>proc{textSearch($search_text,
+ $search_searchString.value,
+ $search_Tag)}) {
pack('side'=>'left', 'pady'=>5, 'padx'=>10)
}
}.pack('side'=>'top', 'fill'=>'x')
@@ -146,24 +146,24 @@ $search_text = TkText.new($search_demo, 'setgrid'=>true, 'wrap'=>'word') {|t|
if TkWinfo.depth($search_demo) > 1
textToggle(proc{
- $search_Tag.configure('background'=>'#ce5555',
- 'foreground'=>'white')
- },
- 800,
- proc{
- $search_Tag.configure('background'=>'', 'foreground'=>'')
- },
- 200 )
+ $search_Tag.configure('background'=>'#ce5555',
+ 'foreground'=>'white')
+ },
+ 800,
+ proc{
+ $search_Tag.configure('background'=>'', 'foreground'=>'')
+ },
+ 200 )
else
textToggle(proc{
- $search_Tag.configure('background'=>'black',
- 'foreground'=>'white')
- },
- 800,
- proc{
- $search_Tag.configure('background'=>'', 'foreground'=>'')
- },
- 200 )
+ $search_Tag.configure('background'=>'black',
+ 'foreground'=>'white')
+ },
+ 800,
+ proc{
+ $search_Tag.configure('background'=>'', 'foreground'=>'')
+ },
+ 200 )
end
$search_text.insert('1.0', "\
This window demonstrates how to use the tagging facilities in text \
diff --git a/ext/tk/sample/demos-en/spin.rb b/ext/tk/sample/demos-en/spin.rb
index 5d32454170..58616b1e02 100644
--- a/ext/tk/sample/demos-en/spin.rb
+++ b/ext/tk/sample/demos-en/spin.rb
@@ -16,8 +16,8 @@ $spin_demo = TkToplevel.new {|w|
}
TkLabel.new($spin_demo,
- :font=>$font, :wraplength=>'5i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
+ :font=>$font, :wraplength=>'5i', :justify=>:left,
+ :text=><<EOL).pack(:side=>:top)
Three different spin-boxes are displayed below. \
You can add characters by pointing, clicking and typing. \
The normal Motif editing characters are supported, along with \
@@ -38,13 +38,13 @@ TkFrame.new($spin_demo){|f|
pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{
- $spin_demo.destroy
- $spin_demo = nil
- }).pack(:side=>:left, :expand=>true)
+ $spin_demo.destroy
+ $spin_demo = nil
+ }).pack(:side=>:left, :expand=>true)
TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{
- showCode 'spin'
- }).pack(:side=>:left, :expand=>true)
+ showCode 'spin'
+ }).pack(:side=>:left, :expand=>true)
}
australianCities = [
@@ -54,10 +54,10 @@ australianCities = [
[
TkSpinbox.new($spin_demo, :from=>1, :to=>10, :width=>10, :validate=>:key,
- :validatecommand=>[
- proc{|s| s == '' || /^[+-]?\d+$/ =~ s }, '%P'
- ]),
+ :validatecommand=>[
+ proc{|s| s == '' || /^[+-]?\d+$/ =~ s }, '%P'
+ ]),
TkSpinbox.new($spin_demo, :from=>0, :to=>3, :increment=>0.5,
- :format=>'%05.2f', :width=>10),
+ :format=>'%05.2f', :width=>10),
TkSpinbox.new($spin_demo, :values=>australianCities, :width=>10)
].each{|sbox| sbox.pack(:side=>:top, :pady=>5, :padx=>10)}
diff --git a/ext/tk/sample/demos-en/style.rb b/ext/tk/sample/demos-en/style.rb
index def83d1a2f..5ed11aa459 100644
--- a/ext/tk/sample/demos-en/style.rb
+++ b/ext/tk/sample/demos-en/style.rb
@@ -65,13 +65,13 @@ TkText.new($style_demo){|t|
# unless $style_demo_do_first
# $style_demo_do_first = true
# Tk.tk_call('font', 'create', '@bigascii',
-# '-copy', '-*-Courier-Bold-R-Normal--*-140-*-*-*-*-*-*')
+# '-copy', '-*-Courier-Bold-R-Normal--*-140-*-*-*-*-*-*')
# Tk.tk_call('font', 'create', '@smallascii',
-# '-copy', '-Adobe-Helvetica-Bold-R-Normal-*-100-*')
+# '-copy', '-Adobe-Helvetica-Bold-R-Normal-*-100-*')
# Tk.tk_call('font', 'create', '@cBigFont',
-# '-compound', '@bigascii @msg_knj')
+# '-compound', '@bigascii @msg_knj')
# Tk.tk_call('font', 'create', '@cSmallFont',
-# '-compound', '@smallascii @kanji')
+# '-compound', '@smallascii @kanji')
# end
# style_tag_big = TkTextTag.new(t, 'font'=>'@cBigFont')
# style_tag_small = TkTextTag.new(t, 'font'=>'@cSmallFont')
@@ -85,24 +85,24 @@ TkText.new($style_demo){|t|
style_tag_sunken = TkTextTag.new(t, 'relief'=>'sunken', 'borderwidth'=>1)
else
style_tag_color1 = TkTextTag.new(t, 'background'=>'black',
- 'foreground'=>'white')
+ 'foreground'=>'white')
style_tag_color2 = TkTextTag.new(t, 'background'=>'black',
- 'foreground'=>'white')
+ 'foreground'=>'white')
style_tag_raised = TkTextTag.new(t, 'background'=>'white',
- 'relief'=>'raised', 'borderwidth'=>1)
+ 'relief'=>'raised', 'borderwidth'=>1)
style_tag_sunken = TkTextTag.new(t, 'background'=>'white',
- 'relief'=>'sunken', 'borderwidth'=>1)
+ 'relief'=>'sunken', 'borderwidth'=>1)
end
#
if $tk_version =~ /^4\.[01]/
style_tag_bgstipple = TkTextTag.new(t, 'background'=>'black',
- 'borderwidth'=>0,
- 'bgstipple'=>'gray25')
+ 'borderwidth'=>0,
+ 'bgstipple'=>'gray25')
else
style_tag_bgstipple = TkTextTag.new(t, 'background'=>'black',
- 'borderwidth'=>0,
- 'bgstipple'=>'gray12')
+ 'borderwidth'=>0,
+ 'bgstipple'=>'gray12')
end
style_tag_fgstipple = TkTextTag.new(t, 'fgstipple'=>'gray50')
style_tag_underline = TkTextTag.new(t, 'underline'=>'on')
@@ -112,10 +112,10 @@ TkText.new($style_demo){|t|
style_tag_super = TkTextTag.new(t, 'offset'=>'4p', 'font'=>'-Adobe-Courier-Medium-R-Normal--*-100-*-*-*-*-*-*')
style_tag_sub = TkTextTag.new(t, 'offset'=>'-2p', 'font'=>'-Adobe-Courier-Medium-R-Normal--*-100-*-*-*-*-*-*')
style_tag_margins = TkTextTag.new(t, 'lmargin1'=>'12m', 'lmargin2'=>'6m',
- 'rmargin'=>'10m')
+ 'rmargin'=>'10m')
style_tag_spacing = TkTextTag.new(t, 'spacing1'=>'10p', 'spacing2'=>'2p',
- 'lmargin1'=>'12m', 'lmargin2'=>'6m',
- 'rmargin'=>'10m')
+ 'lmargin1'=>'12m', 'lmargin2'=>'6m',
+ 'rmargin'=>'10m')
#
insert('end', 'Text widgets like this one allow you to display information in a
diff --git a/ext/tk/sample/demos-en/text.rb b/ext/tk/sample/demos-en/text.rb
index 2ed53e6938..4bb4b6bc7e 100644
--- a/ext/tk/sample/demos-en/text.rb
+++ b/ext/tk/sample/demos-en/text.rb
@@ -102,16 +102,16 @@ a new line by inserting a newline character to the right of the insertion
cursor. Control-t transposes the two characters on either side of the
insertion cursor. #{
if undo_support
- undo_text = "Control-z undoes the last editing action performed,\nand "
- case $tk_platform['platform']
- when "unix", "macintosh"
- undo_text << "Control-Shift-z"
- else # 'windows'
- undo_text << "Control-y"
- end
- undo_text << "redoes undone edits."
+ undo_text = "Control-z undoes the last editing action performed,\nand "
+ case $tk_platform['platform']
+ when "unix", "macintosh"
+ undo_text << "Control-Shift-z"
+ else # 'windows'
+ undo_text << "Control-y"
+ end
+ undo_text << "redoes undone edits."
else
- ""
+ ""
end
}
diff --git a/ext/tk/sample/demos-en/twind.rb b/ext/tk/sample/demos-en/twind.rb
index c841b7c317..24a4bcf706 100644
--- a/ext/tk/sample/demos-en/twind.rb
+++ b/ext/tk/sample/demos-en/twind.rb
@@ -40,10 +40,10 @@ $twind_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
# frame
$twind_text = nil
TkFrame.new($twind_demo, 'highlightthickness'=>2, 'borderwidth'=>2,
- 'relief'=>'sunken') {|f|
+ 'relief'=>'sunken') {|f|
$twind_text = TkText.new(f, 'setgrid'=>'true', 'font'=>$font,
- 'width'=>'70', 'height'=>35, 'wrap'=>'word',
- 'highlightthickness'=>0, 'borderwidth'=>0 ){|t|
+ 'width'=>'70', 'height'=>35, 'wrap'=>'word',
+ 'highlightthickness'=>0, 'borderwidth'=>0 ){|t|
TkScrollbar.new(f) {|s|
command proc{|*args| t.yview(args)}
t.yscrollcommand proc{|first,last| s.set first,last}
@@ -53,16 +53,16 @@ TkFrame.new($twind_demo, 'highlightthickness'=>2, 'borderwidth'=>2,
#
$tag_center = TkTextTag.new($twind_text,
- 'justify' =>'center',
- 'spacing1'=>'5m',
- 'spacing3'=>'5m' )
+ 'justify' =>'center',
+ 'spacing1'=>'5m',
+ 'spacing3'=>'5m' )
$tag_buttons = TkTextTag.new($twind_text,
- 'lmargin1'=>'1c',
- 'lmargin2'=>'1c',
- 'rmargin' =>'1c',
- 'spacing1'=>'3m',
- 'spacing2'=>0,
- 'spacing3'=>0 )
+ 'lmargin1'=>'1c',
+ 'lmargin2'=>'1c',
+ 'rmargin' =>'1c',
+ 'spacing1'=>'3m',
+ 'spacing2'=>0,
+ 'spacing3'=>0 )
$twind_text.insert('end', "A text widget can contain other widgets embedded ")
$twind_text.insert('end', "it. These are called \"embedded windows\", ")
@@ -70,42 +70,42 @@ $twind_text.insert('end', "and they can consist of arbitrary widgets. ")
$twind_text.insert('end', "For example, here are two embedded button ")
$twind_text.insert('end', "widgets. You can click on the first button to ")
TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {
- #text 'ON'
- text 'Turn On'
- command proc{textWindOn $twind_text,$twind_buttons}
- cursor 'top_left_arrow'
- })
+ 'window'=>TkButton.new($twind_text) {
+ #text 'ON'
+ text 'Turn On'
+ command proc{textWindOn $twind_text,$twind_buttons}
+ cursor 'top_left_arrow'
+ })
$twind_text.insert('end', " horizontal scrolling, which also turns off ")
$twind_text.insert('end', "word wrapping. Or, you can click on the second ")
$twind_text.insert('end', "button to\n")
TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {
- #text 'OFF'
- text 'Turn Off'
- command proc{textWindOff $twind_text}
- cursor 'top_left_arrow'
- })
+ 'window'=>TkButton.new($twind_text) {
+ #text 'OFF'
+ text 'Turn Off'
+ command proc{textWindOff $twind_text}
+ cursor 'top_left_arrow'
+ })
$twind_text.insert('end', " horizontal scrolling and turn back on word wrapping.\n\n")
$twind_text.insert('end', "Or, here is another example. If you ")
TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {
- text 'Click Here'
- command proc{textWindPlot $twind_text}
- cursor 'top_left_arrow'
- })
+ 'window'=>TkButton.new($twind_text) {
+ text 'Click Here'
+ command proc{textWindPlot $twind_text}
+ cursor 'top_left_arrow'
+ })
$twind_text.insert('end', " a canvas displaying an x-y plot will appear right here.")
$mark_plot = TkTextMark.new($twind_text, 'insert')
$mark_plot.gravity='left'
$twind_text.insert('end', " You can drag the data points around with the mouse, ")
$twind_text.insert('end', "or you can click here to ")
TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {
- text 'Delete'
- command proc{textWindDel $twind_text}
- cursor 'top_left_arrow'
- })
+ 'window'=>TkButton.new($twind_text) {
+ text 'Delete'
+ command proc{textWindDel $twind_text}
+ cursor 'top_left_arrow'
+ })
$twind_text.insert('end', " the plot again.\n\n")
$twind_text.insert('end', "You may also find it useful to put embedded windows in ")
@@ -123,27 +123,27 @@ $twind_text.insert('end', "to restore the short string.\n")
TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {|b|
- text 'Default'
- command proc{embDefBg $twind_text}
- cursor 'top_left_arrow'
- $tag_buttons.add('end')
- },
- 'padx'=>3 )
+ 'window'=>TkButton.new($twind_text) {|b|
+ text 'Default'
+ command proc{embDefBg $twind_text}
+ cursor 'top_left_arrow'
+ $tag_buttons.add('end')
+ },
+ 'padx'=>3 )
embToggle = TkVariable.new('Short')
TkTextWindow.new($twind_text, 'end',
- 'window'=>TkCheckButton.new($twind_text) {
- textvariable embToggle
- indicatoron 0
- variable embToggle
- onvalue 'A much longer string'
- offvalue 'Short'
- cursor 'top_left_arrow'
- pady 5
- padx 2
- },
- 'padx'=>3,
- 'pady'=>2 )
+ 'window'=>TkCheckButton.new($twind_text) {
+ textvariable embToggle
+ indicatoron 0
+ variable embToggle
+ onvalue 'A much longer string'
+ offvalue 'Short'
+ cursor 'top_left_arrow'
+ pady 5
+ padx 2
+ },
+ 'padx'=>3,
+ 'pady'=>2 )
[ 'AntiqueWhite3', 'Bisque1', 'Bisque2', 'Bisque3', 'Bisque4',
'SlateBlue3', 'RoyalBlue1', 'SteelBlue2', 'DeepSkyBlue3', 'LightBlue1',
@@ -151,13 +151,13 @@ TkTextWindow.new($twind_text, 'end',
'Yellow1', 'IndianRed1', 'IndianRed2', 'Tan1', 'Tan4'
].each{|twind_color|
TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {
- text twind_color
- cursor 'top_left_arrow'
- command proc{$twind_text.bg twind_color}
- },
- 'padx'=>3,
- 'pady'=>2 )
+ 'window'=>TkButton.new($twind_text) {
+ text twind_color
+ cursor 'top_left_arrow'
+ command proc{$twind_text.bg twind_color}
+ },
+ 'padx'=>3,
+ 'pady'=>2 )
}
#
@@ -211,39 +211,39 @@ def textWindPlot (t)
TkcLine.new($twind_plot, 100, 250, 400, 250, 'width'=>2)
TkcLine.new($twind_plot, 100, 250, 100, 50, 'width'=>2)
TkcText.new($twind_plot, 225, 20,
- 'text'=>"A Simple Plot", 'font'=>font, 'fill'=>'brown')
+ 'text'=>"A Simple Plot", 'font'=>font, 'fill'=>'brown')
(0..10).each {|i|
x = 100 + (i * 30)
TkcLine.new($twind_plot, x, 250, x, 245, 'width'=>2)
TkcText.new($twind_plot, x, 254,
- 'text'=>10*i, 'font'=>font, 'anchor'=>'n')
+ 'text'=>10*i, 'font'=>font, 'anchor'=>'n')
}
(0..5).each {|i|
y = 250 - (i * 40)
TkcLine.new($twind_plot, 100, y, 105, y, 'width'=>2)
TkcText.new($twind_plot, 96, y,
- 'text'=>"#{i*50}.0", 'font'=>font, 'anchor'=>'e')
+ 'text'=>"#{i*50}.0", 'font'=>font, 'anchor'=>'e')
}
for xx, yy in [[12,56],[20,94],[33,98],[32,120],[61,180],[75,160],[98,223]]
x = 100 + (3*xx)
y = 250 - (4*yy)/5
item = TkcOval.new($twind_plot, x-6, y-6, x+6, y+6,
- 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
+ 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
item.addtag 'point'
end
$twind_plot.itembind('point', 'Any-Enter',
- proc{$twind_plot.itemconfigure 'current', 'fill', 'red'})
+ proc{$twind_plot.itemconfigure 'current', 'fill', 'red'})
$twind_plot.itembind('point', 'Any-Leave',
- proc{$twind_plot.itemconfigure 'current', 'fill', 'SkyBlue2'})
+ proc{$twind_plot.itemconfigure 'current', 'fill', 'SkyBlue2'})
$twind_plot.itembind('point', '1',
- proc{|x,y| embPlotDown $twind_plot,x,y}, "%x %y")
+ proc{|x,y| embPlotDown $twind_plot,x,y}, "%x %y")
$twind_plot.itembind('point', 'ButtonRelease-1',
- proc{$twind_plot.dtag 'selected'})
+ proc{$twind_plot.dtag 'selected'})
$twind_plot.bind('B1-Motion',
- proc{|x,y| embPlotMove $twind_plot,x,y}, "%x %y")
+ proc{|x,y| embPlotMove $twind_plot,x,y}, "%x %y")
while ($twind_text.get($mark_plot) =~ /[ \t\n]/)
$twind_text.delete $mark_plot
end
diff --git a/ext/tk/sample/demos-en/twind2.rb b/ext/tk/sample/demos-en/twind2.rb
index 95b11a799f..c42e0999d7 100644
--- a/ext/tk/sample/demos-en/twind2.rb
+++ b/ext/tk/sample/demos-en/twind2.rb
@@ -18,20 +18,20 @@ $twind2_demo = TkToplevel.new {|w|
# frame
$twind2_buttons = TkFrame.new($twind2_demo) {|frame|
TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2),
- :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
+ :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
TkGrid('x',
- TkButton.new(frame, :text=>'See Code',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'twind2'}),
- TkButton.new(frame, :text=>'Dismiss',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- tmppath = $twind2_demo
- $twind2_demo = nil
- $showVarsWin[tmppath.path] = nil
- tmppath.destroy
- }),
- :padx=>4, :pady=>4)
+ TkButton.new(frame, :text=>'See Code',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{showCode 'twind2'}),
+ TkButton.new(frame, :text=>'Dismiss',
+ :image=>$image['delete'], :compound=>:left,
+ :command=>proc{
+ tmppath = $twind2_demo
+ $twind2_demo = nil
+ $showVarsWin[tmppath.path] = nil
+ tmppath.destroy
+ }),
+ :padx=>4, :pady=>4)
frame.grid_columnconfigure(0, :weight=>1)
}
$twind2_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
@@ -39,11 +39,11 @@ $twind2_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
# frame
$twind2_text = nil
TkFrame.new($twind2_demo, 'highlightthickness'=>2, 'borderwidth'=>2,
- 'relief'=>'sunken') {|f|
+ 'relief'=>'sunken') {|f|
$twind2_text = TkText.new(f, 'setgrid'=>true, 'font'=>$font,
- # 'width'=>'70', 'height'=>35, 'wrap'=>'word',
- 'width'=>'70', 'height'=>35, 'wrap'=>'char',
- 'highlightthickness'=>0, 'borderwidth'=>0 ){|t|
+ # 'width'=>'70', 'height'=>35, 'wrap'=>'word',
+ 'width'=>'70', 'height'=>35, 'wrap'=>'char',
+ 'highlightthickness'=>0, 'borderwidth'=>0 ){|t|
TkScrollbar.new(f) {|s|
command proc{|*args| t.yview(*args)}
t.yscrollcommand proc{|first,last| s.set first,last}
@@ -53,26 +53,26 @@ TkFrame.new($twind2_demo, 'highlightthickness'=>2, 'borderwidth'=>2,
# text tags
$tag2_center = TkTextTag.new($twind2_text,
- 'justify' =>'center',
- 'spacing1'=>'5m',
- 'spacing3'=>'5m' )
+ 'justify' =>'center',
+ 'spacing1'=>'5m',
+ 'spacing3'=>'5m' )
$tag2_buttons = TkTextTag.new($twind2_text,
- 'lmargin1'=>'1c',
- 'lmargin2'=>'1c',
- 'rmargin' =>'1c',
- 'spacing1'=>'3m',
- 'spacing2'=>0,
- 'spacing3'=>0 )
+ 'lmargin1'=>'1c',
+ 'lmargin2'=>'1c',
+ 'rmargin' =>'1c',
+ 'spacing1'=>'3m',
+ 'spacing2'=>0,
+ 'spacing3'=>0 )
# insert text
$twind2_text.insert('end',
- 'A text widget can contain many different kinds of items, ')
+ 'A text widget can contain many different kinds of items, ')
$twind2_text.insert('end',
- "both active and passive. It can lay these out in various ")
+ "both active and passive. It can lay these out in various ")
$twind2_text.insert('end',
- "ways, with wrapping, tabs, centering, etc. In addition, ")
+ "ways, with wrapping, tabs, centering, etc. In addition, ")
$twind2_text.insert('end',
- "when the contents are too big for the window, smooth ")
+ "when the contents are too big for the window, smooth ")
$twind2_text.insert('end', "scrolling in all directions is provided.\n\n")
$twind2_text.insert('end', "A text widget can contain other widgets embedded ")
@@ -81,59 +81,59 @@ $twind2_text.insert('end', "and they can consist of arbitrary widgets. ")
$twind2_text.insert('end', "For example, here are two embedded button ")
$twind2_text.insert('end', "widgets. You can click on the first button to ")
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text) {
- text 'ON'
- command proc{textWindOn2 $twind2_text,$twind2_buttons}
- cursor 'top_left_arrow'
- })
+ 'window'=>TkButton.new($twind2_text) {
+ text 'ON'
+ command proc{textWindOn2 $twind2_text,$twind2_buttons}
+ cursor 'top_left_arrow'
+ })
$twind2_text.insert('end', " horizontal scrolling, which also turns off ")
$twind2_text.insert('end', "word wrapping. Or, you can click on the second ")
$twind2_text.insert('end', "button to\n")
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text) {
- text 'OFF'
- command proc{textWindOff2 $twind2_text}
- cursor 'top_left_arrow'
- })
+ 'window'=>TkButton.new($twind2_text) {
+ text 'OFF'
+ command proc{textWindOff2 $twind2_text}
+ cursor 'top_left_arrow'
+ })
$twind2_text.insert('end',
- " horizontal scrolling and turn back on word wrapping.\n\n")
+ " horizontal scrolling and turn back on word wrapping.\n\n")
$twind2_text.insert('end', "Or, here is another example. If you ")
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text) {
- text 'Click Here'
- command proc{textWindPlot2 $twind2_text}
- cursor 'top_left_arrow'
- })
+ 'window'=>TkButton.new($twind2_text) {
+ text 'Click Here'
+ command proc{textWindPlot2 $twind2_text}
+ cursor 'top_left_arrow'
+ })
$twind2_text.insert('end',
- " a canvas displaying an x-y plot will appear right here.")
+ " a canvas displaying an x-y plot will appear right here.")
$mark2_plot = TkTextMark.new($twind2_text, 'insert')
$mark2_plot.gravity='left'
$twind2_text.insert('end',
- " You can drag the data points around with the mouse, ")
+ " You can drag the data points around with the mouse, ")
$twind2_text.insert('end', "or you can click here to ")
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text) {
- text 'Delete'
- command proc{textWindDel2 $twind2_text}
- cursor 'top_left_arrow'
- })
+ 'window'=>TkButton.new($twind2_text) {
+ text 'Delete'
+ command proc{textWindDel2 $twind2_text}
+ cursor 'top_left_arrow'
+ })
$twind2_text.insert('end', " the plot again.\n\n")
$twind2_text.insert('end',
- "You may also find it useful to put embedded windows in ")
+ "You may also find it useful to put embedded windows in ")
$twind2_text.insert('end',
- "a text without any actual text. In this case the ")
+ "a text without any actual text. In this case the ")
$twind2_text.insert('end', "text widget acts like a geometry manager. For ")
$twind2_text.insert('end',
- "example, here is a collection of buttons laid out ")
+ "example, here is a collection of buttons laid out ")
$twind2_text.insert('end',
- "neatly into rows by the text widget. These buttons ")
+ "neatly into rows by the text widget. These buttons ")
$twind2_text.insert('end',
- "can be used to change the background color of the ")
+ "can be used to change the background color of the ")
$twind2_text.insert('end', "text widget (\"Default\" restores the color to ")
$twind2_text.insert('end',
- "its default). If you click on the button labeled ")
+ "its default). If you click on the button labeled ")
$twind2_text.insert('end', "\"Short\", it changes to a longer string so that ")
$twind2_text.insert('end', "you can see how the text widget automatically ")
$twind2_text.insert('end', "changes the layout. Click on the button again ")
@@ -147,18 +147,18 @@ btn_default = TkButton.new($twind2_text) {|b|
TkTextWindow.new($twind2_text, 'end', 'window'=>btn_default, 'padx'=>3)
embToggle = TkVariable.new('Short')
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkCheckButton.new($twind2_text) {
- textvariable embToggle
- indicatoron 0
- variable embToggle
- onvalue 'A much longer string'
- offvalue 'Short'
- cursor 'top_left_arrow'
- pady 5
- padx 2
- },
- 'padx'=>3,
- 'pady'=>2 )
+ 'window'=>TkCheckButton.new($twind2_text) {
+ textvariable embToggle
+ indicatoron 0
+ variable embToggle
+ onvalue 'A much longer string'
+ offvalue 'Short'
+ cursor 'top_left_arrow'
+ pady 5
+ padx 2
+ },
+ 'padx'=>3,
+ 'pady'=>2 )
[ 'AntiqueWhite3', 'Bisque1', 'Bisque2', 'Bisque3', 'Bisque4',
'SlateBlue3', 'RoyalBlue1', 'SteelBlue2', 'DeepSkyBlue3', 'LightBlue1',
@@ -166,13 +166,13 @@ TkTextWindow.new($twind2_text, 'end',
'Yellow1', 'IndianRed1', 'IndianRed2', 'Tan1', 'Tan4'
].each{|twind_color|
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text) {
- text twind_color
- cursor 'top_left_arrow'
- command proc{$twind2_text.bg twind_color}
- },
- 'padx'=>3,
- 'pady'=>2 )
+ 'window'=>TkButton.new($twind2_text) {
+ text twind_color
+ cursor 'top_left_arrow'
+ command proc{$twind2_text.bg twind_color}
+ },
+ 'padx'=>3,
+ 'pady'=>2 )
}
$tag2_buttons.add(btn_default, 'end')
@@ -186,55 +186,55 @@ $twind2_text.insert('end', "\nYou can also change the usual border width and ")
$twind2_text.insert('end', "highlightthickness and padding.\n")
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Big borders",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinBigB2 $twind2_text
- }))
+ 'window'=>TkButton.new($twind2_text, :text=>"Big borders",
+ :cursor=>'top_left_arrow',
+ 'command'=>proc{
+ textWinBigB2 $twind2_text
+ }))
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Small borders",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinSmallB2 $twind2_text
- }))
+ 'window'=>TkButton.new($twind2_text, :text=>"Small borders",
+ :cursor=>'top_left_arrow',
+ 'command'=>proc{
+ textWinSmallB2 $twind2_text
+ }))
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Big highlight",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinBigH2 $twind2_text
- }))
+ 'window'=>TkButton.new($twind2_text, :text=>"Big highlight",
+ :cursor=>'top_left_arrow',
+ 'command'=>proc{
+ textWinBigH2 $twind2_text
+ }))
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Small highlight",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinSmallH2 $twind2_text
- }))
+ 'window'=>TkButton.new($twind2_text, :text=>"Small highlight",
+ :cursor=>'top_left_arrow',
+ 'command'=>proc{
+ textWinSmallH2 $twind2_text
+ }))
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Big pad",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinBigP2 $twind2_text
- }))
+ 'window'=>TkButton.new($twind2_text, :text=>"Big pad",
+ :cursor=>'top_left_arrow',
+ 'command'=>proc{
+ textWinBigP2 $twind2_text
+ }))
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Small pad",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinSmallP2 $twind2_text
- }))
+ 'window'=>TkButton.new($twind2_text, :text=>"Small pad",
+ :cursor=>'top_left_arrow',
+ 'command'=>proc{
+ textWinSmallP2 $twind2_text
+ }))
$twind2_text.insert('end',
- "\n\nFinally, images fit comfortably in text widgets too:")
+ "\n\nFinally, images fit comfortably in text widgets too:")
TkTextImage.new($twind2_text, 'end',
- 'image'=>TkBitmapImage.new(:file=>[
- $demo_dir, '..',
- 'images', 'face.xbm'
- ].join(File::Separator)))
+ 'image'=>TkBitmapImage.new(:file=>[
+ $demo_dir, '..',
+ 'images', 'face.xbm'
+ ].join(File::Separator)))
# methods
def textWinBigB2(w)
@@ -308,39 +308,39 @@ def textWindPlot2 (t)
TkcLine.new($twind2_plot, 100, 250, 400, 250, 'width'=>2)
TkcLine.new($twind2_plot, 100, 250, 100, 50, 'width'=>2)
TkcText.new($twind2_plot, 225, 20,
- 'text'=>"A Simple Plot", 'font'=>font, 'fill'=>'brown')
+ 'text'=>"A Simple Plot", 'font'=>font, 'fill'=>'brown')
(0..10).each {|i|
x = 100 + (i * 30)
TkcLine.new($twind2_plot, x, 250, x, 245, 'width'=>2)
TkcText.new($twind2_plot, x, 254,
- 'text'=>10*i, 'font'=>font, 'anchor'=>'n')
+ 'text'=>10*i, 'font'=>font, 'anchor'=>'n')
}
(0..5).each {|i|
y = 250 - (i * 40)
TkcLine.new($twind2_plot, 100, y, 105, y, 'width'=>2)
TkcText.new($twind2_plot, 96, y,
- 'text'=>"#{i*50}.0", 'font'=>font, 'anchor'=>'e')
+ 'text'=>"#{i*50}.0", 'font'=>font, 'anchor'=>'e')
}
for xx, yy in [[12,56],[20,94],[33,98],[32,120],[61,180],[75,160],[98,223]]
x = 100 + (3*xx)
y = 250 - (4*yy)/5
item = TkcOval.new($twind2_plot, x-6, y-6, x+6, y+6,
- 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
+ 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
item.addtag 'point'
end
$twind2_plot.itembind('point', 'Any-Enter',
- proc{$twind2_plot.itemconfigure 'current', 'fill', 'red'})
+ proc{$twind2_plot.itemconfigure 'current', 'fill', 'red'})
$twind2_plot.itembind('point', 'Any-Leave',
- proc{$twind2_plot.itemconfigure 'current', 'fill', 'SkyBlue2'})
+ proc{$twind2_plot.itemconfigure 'current', 'fill', 'SkyBlue2'})
$twind2_plot.itembind('point', '1',
- proc{|x,y| embPlotDown2 $twind2_plot,x,y}, "%x %y")
+ proc{|x,y| embPlotDown2 $twind2_plot,x,y}, "%x %y")
$twind2_plot.itembind('point', 'ButtonRelease-1',
- proc{$twind2_plot.dtag 'selected'})
+ proc{$twind2_plot.dtag 'selected'})
$twind2_plot.bind('B1-Motion',
- proc{|x,y| embPlotMove2 $twind2_plot,x,y}, "%x %y")
+ proc{|x,y| embPlotMove2 $twind2_plot,x,y}, "%x %y")
while ($twind2_text.get($mark2_plot) =~ /[ \t\n]/)
$twind2_text.delete $mark2_plot
end
diff --git a/ext/tk/sample/demos-en/unicodeout.rb b/ext/tk/sample/demos-en/unicodeout.rb
index 7bb951c93c..07e3bf52b5 100644
--- a/ext/tk/sample/demos-en/unicodeout.rb
+++ b/ext/tk/sample/demos-en/unicodeout.rb
@@ -17,8 +17,8 @@ $unicodeout_demo = TkToplevel.new {|w|
}
TkLabel.new($unicodeout_demo,
- :font=>$font, :wraplength=>'5.4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
+ :font=>$font, :wraplength=>'5.4i', :justify=>:left,
+ :text=><<EOL).pack(:side=>:top)
This is a sample of Tk's support for languages that use non-Western \
character sets. However, what you will actually see below depends \
largely on what character sets you have installed, and what you see \
@@ -40,18 +40,18 @@ TkFrame.new($unicodeout_demo){|f|
pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{
- $unicodeout_demo.destroy
- $unicodeout_demo = nil
- }).pack(:side=>:left, :expand=>true)
+ $unicodeout_demo.destroy
+ $unicodeout_demo = nil
+ }).pack(:side=>:left, :expand=>true)
TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{
- showCode 'unicodeout'
- }).pack(:side=>:left, :expand=>true)
+ showCode 'unicodeout'
+ }).pack(:side=>:left, :expand=>true)
}
wait_msg = TkLabel.new($unicodeout_demo,
- :text=>"Please wait while loading fonts...",
- :font=>"Helvetica 12 italic").pack
+ :text=>"Please wait while loading fonts...",
+ :font=>"Helvetica 12 italic").pack
class Unicodeout_SampleFrame < TkFrame
@@font = $font
@@ -71,10 +71,10 @@ class Unicodeout_SampleFrame < TkFrame
def add_sample(lang, *args)
sample_txt = Tk::UTF8_String(args.join(''))
l = TkLabel.new(self, :font=>@@font, :text=>lang+':',
- :anchor=>:nw, :pady=>0)
+ :anchor=>:nw, :pady=>0)
#s = TkLabel.new(self, :font=>@@font, :text=>sample_txt,
s = TkLabel.new(self, :font=>TkFont.new(@@font), :text=>sample_txt,
- :anchor=>:nw, :width=>30, :pady=>0)
+ :anchor=>:nw, :width=>30, :pady=>0)
Tk.grid(l, s, :sticky=>:ew, :pady=>0)
l.grid_config(:padx, '1m')
end
@@ -90,23 +90,23 @@ $unicodeout_demo.cursor('watch')
Tk.update
f.add_sample('Arabic',
- '\uFE94\uFEF4\uFE91\uFEAE\uFECC\uFEDF\uFE8D\uFE94',
- '\uFEE4\uFEE0\uFEDC\uFEDF\uFE8D')
+ '\uFE94\uFEF4\uFE91\uFEAE\uFECC\uFEDF\uFE8D\uFE94',
+ '\uFEE4\uFEE0\uFEDC\uFEDF\uFE8D')
f.add_sample('Trad. Chinese', '\u4E2D\u570B\u7684\u6F22\u5B57')
f.add_sample('Simpl. Chinese', '\u6C49\u8BED')
f.add_sample('Greek',
- '\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AE ',
- '\u03B3\u03BB\u03CE\u03C3\u03C3\u03B1')
+ '\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AE ',
+ '\u03B3\u03BB\u03CE\u03C3\u03C3\u03B1')
f.add_sample('Hebrew',
- '\u05DD\u05D9\u05DC\u05E9\u05D5\u05E8\u05D9 ',
- '\u05DC\u05D9\u05D0\u05E8\u05E9\u05D9')
+ '\u05DD\u05D9\u05DC\u05E9\u05D5\u05E8\u05D9 ',
+ '\u05DC\u05D9\u05D0\u05E8\u05E9\u05D9')
f.add_sample('Japanese',
- '\u65E5\u672C\u8A9E\u306E\u3072\u3089\u304C\u306A, ',
- '\u6F22\u5B57\u3068\u30AB\u30BF\u30AB\u30CA')
+ '\u65E5\u672C\u8A9E\u306E\u3072\u3089\u304C\u306A, ',
+ '\u6F22\u5B57\u3068\u30AB\u30BF\u30AB\u30CA')
f.add_sample('Korean', '\uB300\uD55C\uBBFC\uAD6D\uC758 \uD55C\uAE00')
f.add_sample('Russian',
- '\u0420\u0443\u0441\u0441\u043A\u0438\u0439 ',
- '\u044F\u0437\u044B\u043A')
+ '\u0420\u0443\u0441\u0441\u043A\u0438\u0439 ',
+ '\u044F\u0437\u044B\u043A')
wait_msg.destroy
$unicodeout_demo.cursor(oldCursor)
diff --git a/ext/tk/sample/demos-en/widget b/ext/tk/sample/demos-en/widget
index f529792e78..133d151d46 100644
--- a/ext/tk/sample/demos-en/widget
+++ b/ext/tk/sample/demos-en/widget
@@ -103,11 +103,11 @@ end
#
TkMenubar.new($root,
- [[['File', 0],
- ['About ... ', proc{aboutBox}, 0, '<F1>'],
- '---',
- ['Quit', proc{exit}, 0, 'Meta-Q']
- ]]).pack('side'=>'top', 'fill'=>'x')
+ [[['File', 0],
+ ['About ... ', proc{aboutBox}, 0, '<F1>'],
+ '---',
+ ['Quit', proc{exit}, 0, 'Meta-Q']
+ ]]).pack('side'=>'top', 'fill'=>'x')
$root.bind('F1', proc{aboutBox})
$root.bind('Meta-q', proc{exit})
@@ -141,7 +141,7 @@ if $tk_version =~ /^4\.[01]/
else
textFrame = TkFrame.new($root)
scr = TkScrollbar.new($root, 'orient'=>'vertical',
- 'highlightthickness'=>0, 'takefocus'=>1) {
+ 'highlightthickness'=>0, 'takefocus'=>1) {
pack('in'=>textFrame, 'side'=>'right', 'fill'=>'y', 'padx'=>1)
}
txt = TkText.new($root) {
@@ -166,11 +166,11 @@ else
statusBar = TkFrame.new($root) {|f|
$statusBarLabel = \
TkLabel.new(f, 'text'=>" ", 'relief'=>'sunken', 'bd'=>1, 'anchor'=>'w',
- 'font'=>'-*-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*') \
- .pack('side'=>'left', 'padx'=>2, 'expand'=>'yes', 'fill'=>'both')
+ 'font'=>'-*-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*') \
+ .pack('side'=>'left', 'padx'=>2, 'expand'=>'yes', 'fill'=>'both')
TkLabel.new(f, 'width'=>8, 'relief'=>'sunken', 'bd'=>1, 'anchor'=>'w',
- 'font'=>'-*-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*') \
- .pack('side'=>'left', 'padx'=>2)
+ 'font'=>'-*-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*') \
+ .pack('side'=>'left', 'padx'=>2)
}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>2)
end
@@ -188,53 +188,53 @@ tag_demospace = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c')
if TkWinfo.depth($root) == 1
tag_demo = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c',
- 'underline'=>1)
+ 'underline'=>1)
$tag_visited = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c',
- 'underline'=>1)
+ 'underline'=>1)
tag_hot = TkTextTag.new(txt, 'background'=>'black', 'foreground'=>'white')
else
tag_demo = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c',
- 'foreground'=>'blue', 'underline'=>1)
+ 'foreground'=>'blue', 'underline'=>1)
$tag_visited = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c',
- 'foreground'=>'#303080', 'underline'=>1)
+ 'foreground'=>'#303080', 'underline'=>1)
# tag_hot = TkTextTag.new(txt, 'relief'=>'raised', 'borderwidth'=>1,
-# 'background'=>'SeaGreen3')
+# 'background'=>'SeaGreen3')
tag_hot = TkTextTag.new(txt, 'borderwidth'=>1, 'foreground'=>'red')
end
#tag_demo.bind('Button-1', proc{invoke txt, txt.index('current')})
tag_demo.bind('ButtonRelease-1',
- proc{|x,y|invoke txt, txt.index("@#{x},#{y}")}, '%x %y')
+ proc{|x,y|invoke txt, txt.index("@#{x},#{y}")}, '%x %y')
lastLine = TkVariable.new("")
newLine = TkVariable.new("")
tag_demo.bind('Enter', proc{|x,y|
- lastLine.value = txt.index("@#{x},#{y} linestart")
- tag_hot.add(lastLine.value, "#{lastLine.value} lineend")
- showStatus txt, txt.index("@#{x},#{y}")
- },
- '%x %y')
+ lastLine.value = txt.index("@#{x},#{y} linestart")
+ tag_hot.add(lastLine.value, "#{lastLine.value} lineend")
+ showStatus txt, txt.index("@#{x},#{y}")
+ },
+ '%x %y')
tag_demo.bind('Leave',
- proc{
- tag_hot.remove('1.0','end')
- txt.configure('cursor','xterm')
- $statusBarLabel.configure('text'=>"")
- })
+ proc{
+ tag_hot.remove('1.0','end')
+ txt.configure('cursor','xterm')
+ $statusBarLabel.configure('text'=>"")
+ })
tag_demo.bind('Motion', proc{|x, y|
- newLine.value = txt.index("@#{x},#{y} linestart")
- if newLine.value != lastLine.value
- tag_hot.remove('1.0','end')
- lastLine.value = newLine.value
- if ( txt.tag_names("@#{x},#{y}").find{|t|
- t.kind_of?(String) && t =~ /^demo-/
- } )
- tag_hot.add(lastLine.value,
- "#{lastLine.value} lineend -1 chars")
- end
- end
- showStatus txt, txt.index("@#{x},#{y}")
- },
- '%x %y')
+ newLine.value = txt.index("@#{x},#{y} linestart")
+ if newLine.value != lastLine.value
+ tag_hot.remove('1.0','end')
+ lastLine.value = newLine.value
+ if ( txt.tag_names("@#{x},#{y}").find{|t|
+ t.kind_of?(String) && t =~ /^demo-/
+ } )
+ tag_hot.add(lastLine.value,
+ "#{lastLine.value} lineend -1 chars")
+ end
+ end
+ showStatus txt, txt.index("@#{x},#{y}")
+ },
+ '%x %y')
# Create the text for the text widget.
@@ -308,8 +308,8 @@ txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "2. With scrollbars.\n", tag_demo, "demo-entry2")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end',
- "3. Validated entries and password fields. (if supported)\n",
- tag_demo, "demo-entry3")
+ "3. Validated entries and password fields. (if supported)\n",
+ tag_demo, "demo-entry3")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "4. Spin-boxes. (if supported)\n", tag_demo, "demo-spin")
txt.insert('end', " \n ", tag_demospace)
@@ -406,7 +406,7 @@ scr.focus
# new demo window.
#
# Arguments:
-# w - The name of the window to position.
+# w - The name of the window to position.
def positionWindow(w)
w.geometry('+300+300')
@@ -417,8 +417,8 @@ end
# updates the display whenever any of the variables changes.
#
# Arguments:
-# w - Name of new window to create for display.
-# args - Any number of names of variables.
+# w - Name of new window to create for display.
+# args - Any number of names of variables.
$showVarsWin = {}
def showVars1(parent, *args)
@@ -442,10 +442,10 @@ def showVars1(parent, *args)
}
args.each{|vnam,vbody|
TkFrame.new(w){|f|
- #TkLabel.new(f, 'text'=>"#{vnam}: ").pack('side'=>'left')
- TkLabel.new(f, 'text'=>"#{vnam}: ",'width'=>len+2).pack('side'=>'left')
- TkLabel.new(f, 'textvariable'=>vbody, 'anchor'=>'w')\
- .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x')
+ #TkLabel.new(f, 'text'=>"#{vnam}: ").pack('side'=>'left')
+ TkLabel.new(f, 'text'=>"#{vnam}: ",'width'=>len+2).pack('side'=>'left')
+ TkLabel.new(f, 'textvariable'=>vbody, 'anchor'=>'w')\
+ .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x')
}.pack('side'=>'top', 'anchor'=>'w', 'fill'=>'x')
}
TkButton.new(w) {
@@ -467,11 +467,11 @@ def showVars2(parent, *args)
title "Variable values"
TkLabelFrame.new(w, :text=>"Variable values:",
- :font=>{:family=>'Helvetica', :size=>14}){|f|
+ :font=>{:family=>'Helvetica', :size=>14}){|f|
args.each{|vnam,vbody|
- TkGrid(TkLabel.new(f, :text=>"#{vnam}: ", :anchor=>'w'),
- TkLabel.new(f, :textvariable=>vbody, :anchor=>'w'),
- :padx=>2, :pady=>2, :sticky=>'w')
+ TkGrid(TkLabel.new(f, :text=>"#{vnam}: ", :anchor=>'w'),
+ TkLabel.new(f, :textvariable=>vbody, :anchor=>'w'),
+ :padx=>2, :pady=>2, :sticky=>'w')
}
f.grid(:sticky=>'news', :padx=>4)
@@ -479,7 +479,7 @@ def showVars2(parent, *args)
f.grid_rowconfig(100, :weight=>1)
}
TkButton.new(w, :text=>"OK", :width=>8, :default=>:active,
- :command=>proc{w.destroy}){|b|
+ :command=>proc{w.destroy}){|b|
w.bind('Return', proc{b.invoke})
w.bind('Escape', proc{b.invoke})
@@ -503,8 +503,8 @@ end
# It is responsible for invoking the demonstration.
#
# Arguments:
-# txt - Name of text widget
-# index - The index of the character that the user clicked on.
+# txt - Name of text widget
+# index - The index of the character that the user clicked on.
def invoke (txt, index)
tag = txt.tag_names(index).find{|t| t.kind_of?(String) && t =~ /^demo-/}
@@ -524,8 +524,8 @@ end
# showStatus --
#
-# Show the name of the demo program in the status bar. This procedure
-# is called when the user moves the cursor over a demo description.
+# Show the name of the demo program in the status bar. This procedure
+# is called when the user moves the cursor over a demo description.
#
def showStatus (txt, index)
@@ -537,7 +537,7 @@ def showStatus (txt, index)
else
demoname = tag[5..-1]
$statusBarLabel.configure('text',
- "Run the \"#{demoname}\" sample program")
+ "Run the \"#{demoname}\" sample program")
newcursor = 'hand2'
end
txt.configure('cursor'=>newcursor) if cursor != newcursor
@@ -548,8 +548,8 @@ end
# a demonstration and allows it to be edited and reinvoked.
#
# Arguments:
-# demo - The name of the demonstration's window, which can be
-# used to derive the name of the file containing its code.
+# demo - The name of the demonstration's window, which can be
+# used to derive the name of the file containing its code.
def showCode1(demo)
file = "#{demo}.rb"
@@ -560,8 +560,8 @@ def showCode1(demo)
TkButton.new(f) {
text "Dismiss"
command proc{
- $code_window.destroy
- $code_window = nil
+ $code_window.destroy
+ $code_window = nil
}
}.pack('side'=>'left', 'expand'=>'yes', 'pady'=>2)
TkButton.new(f) {
@@ -574,44 +574,44 @@ def showCode1(demo)
if $tk_version =~ /^4\.[01]/
s = TkScrollbar.new($code_window, 'orient'=>'vertical')
$code_text = TkText.new($code_window) {
- height 40
- setgrid 'yes'
- yscrollcommand proc{|first,last| s.set first,last}
+ height 40
+ setgrid 'yes'
+ yscrollcommand proc{|first,last| s.set first,last}
}
s.command(proc{|*args| $code_text.yview(*args)})
s.pack('side'=>'right', 'fill'=>'y')
$code_text.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'both')
else
TkFrame.new($code_window) {|f|
- pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1)
-
- hs = TkScrollbar.new($code_window, 'highlightthickness'=>0,
- 'orient'=>'horizontal')
- vs = TkScrollbar.new($code_window, 'highlightthickness'=>0,
- 'orient'=>'vertical')
- $code_text = TkText.new($code_window) {|t|
- height 40
- wrap 'word'
- xscrollcommand proc{|first,last| hs.set first,last}
- yscrollcommand proc{|first,last| vs.set first,last}
- setgrid 'yes'
- highlightthickness 0
- pady 2
- padx 3
- hs.command(proc{|*args| $code_text.xview(*args)})
- vs.command(proc{|*args| $code_text.yview(*args)})
- }
-
- $code_text.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- vs.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
-# xs.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
-# 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1)
+
+ hs = TkScrollbar.new($code_window, 'highlightthickness'=>0,
+ 'orient'=>'horizontal')
+ vs = TkScrollbar.new($code_window, 'highlightthickness'=>0,
+ 'orient'=>'vertical')
+ $code_text = TkText.new($code_window) {|t|
+ height 40
+ wrap 'word'
+ xscrollcommand proc{|first,last| hs.set first,last}
+ yscrollcommand proc{|first,last| vs.set first,last}
+ setgrid 'yes'
+ highlightthickness 0
+ pady 2
+ padx 3
+ hs.command(proc{|*args| $code_text.xview(*args)})
+ vs.command(proc{|*args| $code_text.yview(*args)})
+ }
+
+ $code_text.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ vs.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+# xs.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
+# 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
# JKC 2001-07-26: segfaults under 1.7.1 (2001-06-19) [i686-linux]
- TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
- TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
+ TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
+ TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
}
end
else
@@ -638,8 +638,8 @@ def showCode2(demo)
$code_window = TkToplevel.new(nil)
tf = TkFrame.new($code_window)
$code_text = TkText.new(tf, :font=>'Courier 10', :height=>30,
- :wrap=>'word', :bd=>1, :setgrid=>true,
- :highlightthickness=>0, :pady=>2, :padx=>3)
+ :wrap=>'word', :bd=>1, :setgrid=>true,
+ :highlightthickness=>0, :pady=>2, :padx=>3)
xscr = TkScrollbar.new(tf, :bd=>1){assign($code_text)}
yscr = TkScrollbar.new(tf, :bd=>1){assign($code_text)}
TkGrid($code_text, yscr, :sticky=>'news')
@@ -650,17 +650,17 @@ def showCode2(demo)
bf = TkFrame.new($code_window)
b_dis = TkButton.new(bf, :text=>'Dismiss', :default=>:active,
- :command=>proc{
- $code_window.destroy
- $code_window = nil
- },
- :image=>$image['delete'], :compound=>:left)
+ :command=>proc{
+ $code_window.destroy
+ $code_window = nil
+ },
+ :image=>$image['delete'], :compound=>:left)
b_prn = TkButton.new(bf, :text=>'Print Code',
- :command=>proc{printCode($code_text, file)},
- :image=>$image['print'], :compound=>:left)
+ :command=>proc{printCode($code_text, file)},
+ :image=>$image['print'], :compound=>:left)
b_run = TkButton.new(bf, :text=>'Rerun Demo',
- :command=>proc{eval($code_text.get('1.0','end'))},
- :image=>$image['refresh'], :compound=>:left)
+ :command=>proc{eval($code_text.get('1.0','end'))},
+ :image=>$image['refresh'], :compound=>:left)
TkGrid('x', b_run, b_prn, b_dis, :padx=>4, :pady=>[6,4])
bf.grid_columnconfigure(0, :weight=>1)
@@ -671,8 +671,8 @@ def showCode2(demo)
$code_window.grid_rowconfigure(0, :weight=>1)
$code_window.bind('Return', proc{|win|
- b_dis.invoke unless win.kind_of?(TkText)
- }, '%W')
+ b_dis.invoke unless win.kind_of?(TkText)
+ }, '%W')
$code_window.bindinfo('Return').each{|cmd, arg|
$code_window.bind_append('Escape', cmd, arg)
}
@@ -704,8 +704,8 @@ end
# Much thanks to Arjen Markus for this.
#
# Arguments:
-# txt - Name of text widget containing code to print
-# file - Name of the original file (implicitly for title)
+# txt - Name of text widget containing code to print
+# file - Name of the original file (implicitly for title)
def printCode(txt, file)
code = txt.get('1.0', 'end - 1c')
@@ -721,24 +721,24 @@ def printCode(txt, file)
when 'unix'
msg = `lp -c #{fname}`
unless $?.exitstatus == 0
- Tk.messageBox(:title=>'Print spooling failure',
- :message=>'Print spooling probably failed: ' + msg)
+ Tk.messageBox(:title=>'Print spooling failure',
+ :message=>'Print spooling probably failed: ' + msg)
end
when 'windows'
begin
- printTextWin32(fname)
+ printTextWin32(fname)
rescue => e
- Tk.messageBox(:title=>'Print spooling failure',
- :message=>'Print spooling probably failed: ' +
- e.message)
+ Tk.messageBox(:title=>'Print spooling failure',
+ :message=>'Print spooling probably failed: ' +
+ e.message)
end
when 'macintosh'
Tk.messageBox(:title=>'Operation not Implemented',
- :message=>'Oops, sorry: not implemented yet!')
+ :message=>'Oops, sorry: not implemented yet!')
else
Tk.messageBox(:title=>'Operation not Implemented',
- :message=>'Wow! Unknown platform: ' +
- Tk::TCL_PLATFORM('platform'))
+ :message=>'Wow! Unknown platform: ' +
+ Tk::TCL_PLATFORM('platform'))
end
ensure
File.delete(fname)
@@ -749,7 +749,7 @@ end
# Print a file under Windows
#
# Arguments:
-# filename - Name of the file
+# filename - Name of the file
#
def printTextWin32(fname)
require 'win32/registry'
@@ -780,12 +780,12 @@ end
#
def aboutBox
Tk.messageBox('icon'=>'info', 'type'=>'ok', 'title'=>'About Widget Demo',
- 'message'=>"Ruby/Tk widget demonstration Ver.1.4.3-en\n\n" +
+ 'message'=>"Ruby/Tk widget demonstration Ver.1.4.3-en\n\n" +
"based on demos of Tk8.1 -- 8.5 " +
- "( Copyright:: " +
- "(c) 1996-1997 Sun Microsystems, Inc. / " +
+ "( Copyright:: " +
+ "(c) 1996-1997 Sun Microsystems, Inc. / " +
"(c) 1997-2000 Ajuba Solutions, Inc. / " +
- "(c) 2001-2003 Donal K. Fellows )\n\n" +
+ "(c) 2001-2003 Donal K. Fellows )\n\n" +
"Your Ruby & Tk Version ::\n" +
"Ruby#{RUBY_VERSION}(#{RUBY_RELEASE_DATE})[#{RUBY_PLATFORM}] / Tk#{$tk_patchlevel}#{(Tk::JAPANIZED_TK)? '-jp': ''}")
end
@@ -809,7 +809,7 @@ if no_launcher
loop do
count = 0
$root.winfo_children.each{|w|
- count += 1 if w.kind_of?(TkToplevel)
+ count += 1 if w.kind_of?(TkToplevel)
}
$root.destroy if count == 0
end
diff --git a/ext/tk/sample/demos-jp/arrow.rb b/ext/tk/sample/demos-jp/arrow.rb
index 70fe346b65..477a0abf6f 100644
--- a/ext/tk/sample/demos-jp/arrow.rb
+++ b/ext/tk/sample/demos-jp/arrow.rb
@@ -9,7 +9,7 @@
# interactively.
#
# Arguments:
-# c - Name of the canvas widget.
+# c - Name of the canvas widget.
def arrowSetup(c)
v = $demo_arrowInfo
@@ -25,59 +25,59 @@ def arrowSetup(c)
# Create the arrow and outline.
c.delete('all')
TkcLine.new(c, v.x1, v.y, v.x2, v.y,
- { 'width'=>10 * v.width,
- 'arrowshape'=>[10*v.a, 10*v.b, 10*v.c],
- 'arrow'=>'last'
- }.update(v.bigLineStyle) )
+ { 'width'=>10 * v.width,
+ 'arrowshape'=>[10*v.a, 10*v.b, 10*v.c],
+ 'arrow'=>'last'
+ }.update(v.bigLineStyle) )
xtip = v.x2 - 10*v.b
deltaY = 10*v.c + 5*v.width
TkcLine.new(c, v.x2, v.y, xtip, v.y + deltaY,
- v.x2 - 10*v.a, v.y, xtip, v.y - deltaY, v.x2, v.y,
- 'width'=>2, 'capstyle'=>'round', 'joinstyle'=>'round')
+ v.x2 - 10*v.a, v.y, xtip, v.y - deltaY, v.x2, v.y,
+ 'width'=>2, 'capstyle'=>'round', 'joinstyle'=>'round')
# Create the boxes for reshaping the line and arrowhead.
TkcRectangle.new(c, v.x2-10*v.a-5, v.y-5, v.x2-10*v.a+5, v.y+5,
- {'tags'=>['box1', $arrowTag_box]}.update(v.boxStyle) )
+ {'tags'=>['box1', $arrowTag_box]}.update(v.boxStyle) )
TkcRectangle.new(c, xtip-5, v.y-deltaY-5, xtip+5, v.y-deltaY+5,
- {'tags'=>['box2', $arrowTag_box]}.update(v.boxStyle) )
+ {'tags'=>['box2', $arrowTag_box]}.update(v.boxStyle) )
TkcRectangle.new(c, v.x1-5, v.y-5*v.width-5, v.x1+5, v.y-5*v.width+5,
- {'tags'=>['box3', $arrowTag_box]}.update(v.boxStyle) )
+ {'tags'=>['box3', $arrowTag_box]}.update(v.boxStyle) )
c.itemconfigure cur, v.activeStyle if cur
# Create three arrows in actual size with the same parameters
TkcLine.new(c, v.x2+50, 0, v.x2+50, 1000, 'width'=>2)
tmp = v.x2+100
TkcLine.new(c, tmp, v.y-125, tmp, v.y-75, 'width'=>v.width,
- 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c])
+ 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c])
TkcLine.new(c, tmp-25, v.y, tmp+25, v.y, 'width'=>v.width,
- 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c])
+ 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c])
TkcLine.new(c, tmp-25, v.y+75, tmp+25, v.y+125, 'width'=>v.width,
- 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c])
+ 'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c])
# Create a bunch of other arrows and text items showing the
# current dimensions.
tmp = v.x2+10
TkcLine.new(c, tmp, v.y-5*v.width, tmp, v.y-deltaY,
- 'arrow'=>'both', 'arrowshape'=>v.smallTips)
+ 'arrow'=>'both', 'arrowshape'=>v.smallTips)
TkcText.new(c, v.x2+15, v.y-deltaY+5*v.c, 'text'=>v.c, 'anchor'=>'w')
tmp = v.x1-10
TkcLine.new(c, tmp, v.y-5*v.width, tmp, v.y+5*v.width,
- 'arrow'=>'both', 'arrowshape'=>v.smallTips)
+ 'arrow'=>'both', 'arrowshape'=>v.smallTips)
TkcText.new(c, v.x1-15, v.y, 'text'=>v.width, 'anchor'=>'e')
tmp = v.y+5*v.width+10*v.c+10
TkcLine.new(c, v.x2-10*v.a, tmp, v.x2, tmp,
- 'arrow'=>'both', 'arrowshape'=>v.smallTips)
+ 'arrow'=>'both', 'arrowshape'=>v.smallTips)
TkcText.new(c, v.x2-5*v.a, tmp+5, 'text'=>v.a, 'anchor'=>'n')
tmp = tmp+25
TkcLine.new(c, v.x2-10*v.b, tmp, v.x2, tmp,
- 'arrow'=>'both', 'arrowshape'=>v.smallTips)
+ 'arrow'=>'both', 'arrowshape'=>v.smallTips)
TkcText.new(c, v.x2-5*v.b, tmp+5, 'text'=>v.b, 'anchor'=>'n')
TkcText.new(c, v.x1, 310, 'text'=>"'width'=>#{v.width}", 'anchor'=>'w',
- 'font'=>'-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*')
+ 'font'=>'-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*')
TkcText.new(c, v.x1, 330,
- 'text'=>"'arrowshape'=>[#{v.a}, #{v.b}, #{v.c}]", 'anchor'=>'w',
- 'font'=>'-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*')
+ 'text'=>"'arrowshape'=>[#{v.a}, #{v.b}, #{v.c}]", 'anchor'=>'w',
+ 'font'=>'-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*')
v.count += 1
end
@@ -97,7 +97,7 @@ $arrow_demo = TkToplevel.new {|w|
# label À¸À®
TkLabel.new($arrow_demo, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left',
- 'text'=>"¤³¤Î widget ¤Ç¡¢¥­¥ã¥ó¥Ð¥¹¤Ç»È¤ï¤ì¤ë¥é¥¤¥ó¤Ë¤Ä¤¤¤ÆÍÍ¡¹¤ÊÉý¤äÌð°õ¤ÎƬ¤Î·Á¤ò»î¤·¤Æ¤ß¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£Àþ¤ÎÉý¤äÌð°õ¤Î·Á¤òÊѤ¨¤ë¤Ë¤Ï¡¢³ÈÂ礵¤ì¤¿Ìð°õ¤Ë¤Ä¤¤¤Æ¤¤¤ë 3¤Ä¤Î»Í³Ñ¤ò¥É¥é¥Ã¥°¤·¤Æ¤¯¤À¤µ¤¤¡£±¦Â¦¤ÎÌð°õ¤ÏÉáÄ̤ÎÂ礭¤µ¤Ç¤Î¥µ¥ó¥×¥ë¤ò¼¨¤·¤Æ¤¤¤Þ¤¹¡£²¼¤Î¥Æ¥­¥¹¥È¤Ï¥é¥¤¥ó¥¢¥¤¥Æ¥à¤ËÂФ¹¤ëÀßÄꥪ¥×¥·¥ç¥ó¤Ç¤¹¡£"){
+ 'text'=>"¤³¤Î widget ¤Ç¡¢¥­¥ã¥ó¥Ð¥¹¤Ç»È¤ï¤ì¤ë¥é¥¤¥ó¤Ë¤Ä¤¤¤ÆÍÍ¡¹¤ÊÉý¤äÌð°õ¤ÎƬ¤Î·Á¤ò»î¤·¤Æ¤ß¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£Àþ¤ÎÉý¤äÌð°õ¤Î·Á¤òÊѤ¨¤ë¤Ë¤Ï¡¢³ÈÂ礵¤ì¤¿Ìð°õ¤Ë¤Ä¤¤¤Æ¤¤¤ë 3¤Ä¤Î»Í³Ñ¤ò¥É¥é¥Ã¥°¤·¤Æ¤¯¤À¤µ¤¤¡£±¦Â¦¤ÎÌð°õ¤ÏÉáÄ̤ÎÂ礭¤µ¤Ç¤Î¥µ¥ó¥×¥ë¤ò¼¨¤·¤Æ¤¤¤Þ¤¹¡£²¼¤Î¥Æ¥­¥¹¥È¤Ï¥é¥¤¥ó¥¢¥¤¥Æ¥à¤ËÂФ¹¤ëÀßÄꥪ¥×¥·¥ç¥ó¤Ç¤¹¡£"){
pack('side'=>'top')
}
@@ -122,14 +122,14 @@ $arrow_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
# canvas ÀßÄê
$arrow_canvas = TkCanvas.new($arrow_demo, 'width'=>500, 'height'=>350,
- 'relief'=>'sunken', 'borderwidth'=>2)
+ 'relief'=>'sunken', 'borderwidth'=>2)
$arrow_canvas.pack('expand'=>'yes', 'fill'=>'both')
# ÃÍÀßÄê
unless Struct.const_defined?("ArrowInfo")
$demo_arrowInfo = Struct.new("ArrowInfo", :a, :b, :c, :width, :motionProc,
- :x1, :x2, :y, :smallTips, :count,
- :bigLineStyle, :boxStyle, :activeStyle).new
+ :x1, :x2, :y, :smallTips, :count,
+ :bigLineStyle, :boxStyle, :activeStyle).new
end
$demo_arrowInfo.a = 8
$demo_arrowInfo.b = 10
@@ -158,16 +158,16 @@ $arrowTag_box.bind('Leave', proc{$arrow_canvas.itemconfigure('current', $demo_ar
$arrowTag_box.bind('B1-Enter', proc{})
$arrowTag_box.bind('B1-Leave', proc{})
$arrow_canvas.itembind('box1', '1',
- proc{$demo_arrowInfo.motionProc \
- = proc{|x,y| arrowMove1 $arrow_canvas, x, y}})
+ proc{$demo_arrowInfo.motionProc \
+ = proc{|x,y| arrowMove1 $arrow_canvas, x, y}})
$arrow_canvas.itembind('box2', '1',
- proc{$demo_arrowInfo.motionProc \
- = proc{|x,y| arrowMove2 $arrow_canvas, x, y}})
+ proc{$demo_arrowInfo.motionProc \
+ = proc{|x,y| arrowMove2 $arrow_canvas, x, y}})
$arrow_canvas.itembind('box3', '1',
- proc{$demo_arrowInfo.motionProc \
- = proc{|x,y| arrowMove3 $arrow_canvas, x, y}})
+ proc{$demo_arrowInfo.motionProc \
+ = proc{|x,y| arrowMove3 $arrow_canvas, x, y}})
$arrowTag_box.bind('B1-Motion',
- proc{|x,y| $demo_arrowInfo.motionProc.call(x,y)}, "%x %y")
+ proc{|x,y| $demo_arrowInfo.motionProc.call(x,y)}, "%x %y")
$arrow_canvas.bind('Any-ButtonRelease-1', proc{arrowSetup $arrow_canvas})
# arrowMove1 --
@@ -176,8 +176,8 @@ $arrow_canvas.bind('Any-ButtonRelease-1', proc{arrowSetup $arrow_canvas})
# for the line and arrowhead.
#
# Arguments:
-# c - The name of the canvas window.
-# x, y - The coordinates of the mouse.
+# c - The name of the canvas window.
+# x, y - The coordinates of the mouse.
def arrowMove1(c,x,y)
v = $demo_arrowInfo
@@ -196,8 +196,8 @@ end
# parameters for the line and arrowhead.
#
# Arguments:
-# c - The name of the canvas window.
-# x, y - The coordinates of the mouse.
+# c - The name of the canvas window.
+# x, y - The coordinates of the mouse.
def arrowMove2(c,x,y)
v = $demo_arrowInfo
@@ -220,8 +220,8 @@ end
# controlling parameters for the line and arrowhead.
#
# Arguments:
-# c - The name of the canvas window.
-# x, y - The coordinates of the mouse.
+# c - The name of the canvas window.
+# x, y - The coordinates of the mouse.
def arrowMove3(c,x,y)
v = $demo_arrowInfo
diff --git a/ext/tk/sample/demos-jp/bind.rb b/ext/tk/sample/demos-jp/bind.rb
index eebd62fc09..70127424c5 100644
--- a/ext/tk/sample/demos-jp/bind.rb
+++ b/ext/tk/sample/demos-jp/bind.rb
@@ -73,34 +73,34 @@ TkText.new($bind_demo){|t|
insert('end', '2. ´Êñ¤Ê 2¼¡¸µ¤Î¥×¥í¥Ã¥È¡£¥Ç¡¼¥¿¤òɽ¤¹ÅÀ¤òÆ°¤«¤¹¤³¤È¤¬¤Ç¤­¤ë¡£', (d2 = TkTextTag.new(t)) )
insert('end', "\n\n")
insert('end', '3. ¥Æ¥­¥¹¥È¥¢¥¤¥Æ¥à¤Î¥¢¥ó¥«¡¼¤È¹Ô·¤¨¡£',
- (d3 = TkTextTag.new(t)) )
+ (d3 = TkTextTag.new(t)) )
insert('end', "\n\n")
insert('end', '4. ¥é¥¤¥ó¥¢¥¤¥Æ¥à¤Î¤¿¤á¤ÎÌð°õ¤ÎƬ¤Î·Á¤Î¥¨¥Ç¥£¥¿¡£',
- (d4 = TkTextTag.new(t)) )
+ (d4 = TkTextTag.new(t)) )
insert('end', "\n\n")
insert('end', '5. ¥¿¥Ö¥¹¥È¥Ã¥×¤òÊѹ¹¤¹¤ë¤¿¤á¤Îµ¡Ç½¤Ä¤­¤Î¥ë¡¼¥é¡¼¡£',
- (d5 = TkTextTag.new(t)) )
+ (d5 = TkTextTag.new(t)) )
insert('end', "\n\n")
insert('end',
- '6. ¥­¥ã¥ó¥Ð¥¹¤¬¤É¤¦¤ä¤Ã¤Æ¥¹¥¯¥í¡¼¥ë¤¹¤ë¤Î¤«¤ò¼¨¤¹¥°¥ê¥Ã¥É¡£',
- (d6 = TkTextTag.new(t)) )
+ '6. ¥­¥ã¥ó¥Ð¥¹¤¬¤É¤¦¤ä¤Ã¤Æ¥¹¥¯¥í¡¼¥ë¤¹¤ë¤Î¤«¤ò¼¨¤¹¥°¥ê¥Ã¥É¡£',
+ (d6 = TkTextTag.new(t)) )
# binding
[d1, d2, d3, d4, d5, d6].each{|tag|
tag_binding_for_bind_demo(tag, tagstyle_bold, tagstyle_normal)
}
d1.bind('1',
- proc{eval `cat #{[$demo_dir,'items.rb'].join(File::Separator)}`})
+ proc{eval `cat #{[$demo_dir,'items.rb'].join(File::Separator)}`})
d2.bind('1',
- proc{eval `cat #{[$demo_dir,'plot.rb'].join(File::Separator)}`})
+ proc{eval `cat #{[$demo_dir,'plot.rb'].join(File::Separator)}`})
d3.bind('1',
- proc{eval `cat #{[$demo_dir,'ctext.rb'].join(File::Separator)}`})
+ proc{eval `cat #{[$demo_dir,'ctext.rb'].join(File::Separator)}`})
d4.bind('1',
- proc{eval `cat #{[$demo_dir,'arrow.rb'].join(File::Separator)}`})
+ proc{eval `cat #{[$demo_dir,'arrow.rb'].join(File::Separator)}`})
d5.bind('1',
- proc{eval `cat #{[$demo_dir,'ruler.rb'].join(File::Separator)}`})
+ proc{eval `cat #{[$demo_dir,'ruler.rb'].join(File::Separator)}`})
d6.bind('1',
- proc{eval `cat #{[$demo_dir,'cscroll.rb'].join(File::Separator)}`})
+ proc{eval `cat #{[$demo_dir,'cscroll.rb'].join(File::Separator)}`})
TkTextMarkInsert.new(t, '0.0')
configure('state','disabled')
diff --git a/ext/tk/sample/demos-jp/bitmap.rb b/ext/tk/sample/demos-jp/bitmap.rb
index 644b960815..b71c67d3fd 100644
--- a/ext/tk/sample/demos-jp/bitmap.rb
+++ b/ext/tk/sample/demos-jp/bitmap.rb
@@ -6,19 +6,19 @@
# Create a row of bitmap items in a window.
#
# Arguments:
-# w - The parent window that is to contain the row.
-# args - The names of one or more bitmaps, which will be displayed
-# in a new row across the bottom of w along with their
-# names.
+# w - The parent window that is to contain the row.
+# args - The names of one or more bitmaps, which will be displayed
+# in a new row across the bottom of w along with their
+# names.
def bitmapRow(w,*args)
TkFrame.new(w){|row|
pack('side'=>'top', 'fill'=>'both')
for bitmap in args
TkFrame.new(row){|base|
- pack('side'=>'left', 'fill'=>'both', 'pady'=>'.25c', 'padx'=>'.25c')
- TkLabel.new(base, 'text'=>bitmap, 'width'=>9).pack('side'=>'bottom')
- TkLabel.new(base, 'bitmap'=>bitmap).pack('side'=>'bottom')
+ pack('side'=>'left', 'fill'=>'both', 'pady'=>'.25c', 'padx'=>'.25c')
+ TkLabel.new(base, 'text'=>bitmap, 'width'=>9).pack('side'=>'bottom')
+ TkLabel.new(base, 'bitmap'=>bitmap).pack('side'=>'bottom')
}
end
}
@@ -39,7 +39,7 @@ $bitmap_demo = TkToplevel.new {|w|
# label À¸À®
TkLabel.new($bitmap_demo,'font'=>$font,'wraplength'=>'4i','justify'=>'left',
- 'text'=>"¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤Ï¡¢Tk ¤ËÁȤ߹þ¤Þ¤ì¤¿¤¹¤Ù¤Æ¤Î¥Ó¥Ã¥È¥Þ¥Ã¥×¤¬¡¢¤½¤ì¤é¤Î̾Á°¤È¶¦¤Ëɽ¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£Tcl ¤Î¥¹¥¯¥ê¥×¥ÈÃæ¤Ç¤Ï¡¢¤½¤ì¤¾¤ì¤Î̾Á°¤òÍѤ¤¤Æ»²¾È¤·¤Þ¤¹¡£"){
+ 'text'=>"¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤Ï¡¢Tk ¤ËÁȤ߹þ¤Þ¤ì¤¿¤¹¤Ù¤Æ¤Î¥Ó¥Ã¥È¥Þ¥Ã¥×¤¬¡¢¤½¤ì¤é¤Î̾Á°¤È¶¦¤Ëɽ¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£Tcl ¤Î¥¹¥¯¥ê¥×¥ÈÃæ¤Ç¤Ï¡¢¤½¤ì¤¾¤ì¤Î̾Á°¤òÍѤ¤¤Æ»²¾È¤·¤Þ¤¹¡£"){
pack('side'=>'top')
}
diff --git a/ext/tk/sample/demos-jp/check.rb b/ext/tk/sample/demos-jp/check.rb
index 88e90c71d0..be675b9042 100644
--- a/ext/tk/sample/demos-jp/check.rb
+++ b/ext/tk/sample/demos-jp/check.rb
@@ -52,7 +52,7 @@ TkFrame.new($check_demo) {|frame|
text 'ÊÑ¿ô»²¾È'
command proc{
showVars($check_demo,
- ['wipers', wipers], ['brakes', brakes], ['sober', sober])
+ ['wipers', wipers], ['brakes', brakes], ['sober', sober])
}
}.pack('side'=>'left', 'expand'=>'yes')
diff --git a/ext/tk/sample/demos-jp/check2.rb b/ext/tk/sample/demos-jp/check2.rb
index 63d3bf9398..5d0c74a743 100644
--- a/ext/tk/sample/demos-jp/check2.rb
+++ b/ext/tk/sample/demos-jp/check2.rb
@@ -33,35 +33,35 @@ sober = TkVariable.new(0)
# frame À¸À®
TkFrame.new($check2_demo) {|frame|
TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2),
- :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
+ :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
TkGrid('x',
- TkButton.new(frame, :text=>'ÊÑ¿ô»²¾È',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{
- showVars($check2_demo,
- ['safety', safety], ['wipers', wipers],
- ['brakes', brakes], ['sober', sober])
- }),
- TkButton.new(frame, :text=>'¥³¡¼¥É»²¾È',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'check2'}),
- TkButton.new(frame, :text=>'ÊĤ¸¤ë',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- tmppath = $check2_demo
- $check2_demo = nil
- $showVarsWin[tmppath.path] = nil
- tmppath.destroy
- }),
- :padx=>4, :pady=>4)
+ TkButton.new(frame, :text=>'ÊÑ¿ô»²¾È',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{
+ showVars($check2_demo,
+ ['safety', safety], ['wipers', wipers],
+ ['brakes', brakes], ['sober', sober])
+ }),
+ TkButton.new(frame, :text=>'¥³¡¼¥É»²¾È',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{showCode 'check2'}),
+ TkButton.new(frame, :text=>'ÊĤ¸¤ë',
+ :image=>$image['delete'], :compound=>:left,
+ :command=>proc{
+ tmppath = $check2_demo
+ $check2_demo = nil
+ $showVarsWin[tmppath.path] = nil
+ tmppath.destroy
+ }),
+ :padx=>4, :pady=>4)
frame.grid_columnconfigure(0, :weight=>1)
}.pack('side'=>'bottom', 'fill'=>'x')
# checkbutton À¸À®
TkCheckButton.new($check2_demo, :text=>'°ÂÁ´À­¸¡ºº', :variable=>safety,
- :relief=>:flat, :onvalue=>'all', :offvalue=>'none',
- :tristatevalue=>'partial'){
+ :relief=>:flat, :onvalue=>'all', :offvalue=>'none',
+ :tristatevalue=>'partial'){
pack('side'=>'top', 'pady'=>2, 'anchor'=>'w')
}
@@ -82,21 +82,21 @@ tristate_check = proc{|n1,n2,op|
begin
if n1 == safety
if safety == 'none'
- wipers.value = 0
- brakes.value = 0
- sober.value = 0
+ wipers.value = 0
+ brakes.value = 0
+ sober.value = 0
elsif safety == 'all'
- wipers.value = 1
- brakes.value = 1
- sober.value = 1
+ wipers.value = 1
+ brakes.value = 1
+ sober.value = 1
end
else
if wipers == 1 && brakes == 1 && sober == 1
- safety.value = 'all'
+ safety.value = 'all'
elsif wipers == 1 || brakes == 1 || sober == 1
- safety.value = 'partial'
+ safety.value = 'partial'
else
- safety.value = 'none'
+ safety.value = 'none'
end
end
ensure
diff --git a/ext/tk/sample/demos-jp/clrpick.rb b/ext/tk/sample/demos-jp/clrpick.rb
index 284611a774..de8cd80fcd 100644
--- a/ext/tk/sample/demos-jp/clrpick.rb
+++ b/ext/tk/sample/demos-jp/clrpick.rb
@@ -17,7 +17,7 @@ $clrpick_demo = TkToplevel.new {|w|
# label À¸À®
TkLabel.new($clrpick_demo,'font'=>$font,'wraplength'=>'4i','justify'=>'left',
- 'text'=>"°Ê²¼¤Î¥Ü¥¿¥ó¤ò²¡¤·¤Æ¡¢¤³¤Î¥¦¥£¥ó¥É¥¦¾å¤Ë¤¢¤ë¥¦¥£¥¸¥§¥Ã¥È¤ÎÁ°·Ê¿§¤ÈÇØ·Ê¿§¤òÁªÂò¤·¤Æ²¼¤µ¤¤¡£").pack('side'=>'top')
+ 'text'=>"°Ê²¼¤Î¥Ü¥¿¥ó¤ò²¡¤·¤Æ¡¢¤³¤Î¥¦¥£¥ó¥É¥¦¾å¤Ë¤¢¤ë¥¦¥£¥¸¥§¥Ã¥È¤ÎÁ°·Ê¿§¤ÈÇØ·Ê¿§¤òÁªÂò¤·¤Æ²¼¤µ¤¤¡£").pack('side'=>'top')
# frame À¸À®
TkFrame.new($clrpick_demo) {|frame|
@@ -40,7 +40,7 @@ TkFrame.new($clrpick_demo) {|frame|
# button À¸À®
TkButton.new($clrpick_demo, 'text'=>'ÇØ·Ê¿§¤òÀßÄê ...') {|b|
command(proc{setColor $clrpick_demo, b, 'background',
- ['background', 'highlightbackground']})
+ ['background', 'highlightbackground']})
pack('side'=>'top', 'anchor'=>'c', 'pady'=>'2m')
}
@@ -53,7 +53,7 @@ def setColor(w,button,name,options)
w.grab
initialColor = button[name]
color = Tk.chooseColor('title'=>"Choose a #{name} color", 'parent'=>w,
- 'initialcolor'=>initialColor)
+ 'initialcolor'=>initialColor)
if color != ""
setColor_helper(w,options,color)
end
diff --git a/ext/tk/sample/demos-jp/cscroll.rb b/ext/tk/sample/demos-jp/cscroll.rb
index d128b63a7b..0d6db69af6 100644
--- a/ext/tk/sample/demos-jp/cscroll.rb
+++ b/ext/tk/sample/demos-jp/cscroll.rb
@@ -17,7 +17,7 @@ $cscroll_demo = TkToplevel.new {|w|
# label À¸À®
TkLabel.new($cscroll_demo, 'font'=>$font, 'wraplength'=>'4i',
- 'justify'=>'left', 'text'=>"¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤Ï¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤ä¥Þ¥¦¥¹¤Î¥Ü¥¿¥ó2 ¤Ç¥¹¥¯¥í¡¼¥ë¤Ç¤­¤ë¥­¥ã¥ó¥Ð¥¹ widget ¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£»Í³Ñ¤Î¾å¤Ç¥Ü¥¿¥ó1 ¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¤½¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤¬É¸½à½ÐÎϤ˽ÐÎϤµ¤ì¤Þ¤¹¡£"){
+ 'justify'=>'left', 'text'=>"¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤Ï¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤ä¥Þ¥¦¥¹¤Î¥Ü¥¿¥ó2 ¤Ç¥¹¥¯¥í¡¼¥ë¤Ç¤­¤ë¥­¥ã¥ó¥Ð¥¹ widget ¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£»Í³Ñ¤Î¾å¤Ç¥Ü¥¿¥ó1 ¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¤½¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤¬É¸½à½ÐÎϤ˽ÐÎϤµ¤ì¤Þ¤¹¡£"){
pack('side'=>'top')
}
@@ -51,14 +51,14 @@ end
# canvas ÀßÄê
$cscroll_canvas = TkCanvas.new($cscroll_demo,
- 'relief'=>'sunken', 'borderwidth'=>2,
- 'scrollregion'=>['-11c', '-11c', '50c', '20c']
- ) {|c|
+ 'relief'=>'sunken', 'borderwidth'=>2,
+ 'scrollregion'=>['-11c', '-11c', '50c', '20c']
+ ) {|c|
if $tk_version =~ /^4\.[01]/
pack('expand'=>'yes', 'fill'=>'both')
else
grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
end
TkScrollbar.new($cscroll_demo, 'command'=>proc{|*args| c.yview(*args)}) {|vs|
@@ -67,18 +67,18 @@ $cscroll_canvas = TkCanvas.new($cscroll_demo,
pack('side'=>'right', 'fill'=>'y')
else
grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
end
}
TkScrollbar.new($cscroll_demo, 'orient'=>'horiz',
- 'command'=>proc{|*args| c.xview(*args)}) {|hs|
+ 'command'=>proc{|*args| c.xview(*args)}) {|hs|
c.xscrollcommand(proc{|first,last| hs.set first,last})
if $tk_version =~ /^4\.[01]/
pack('side'=>'bottom', 'fill'=>'x')
else
grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
end
}
}
@@ -89,9 +89,9 @@ bg = $cscroll_canvas.configinfo('bg')[4]
y = -10
(0..9).each{|j|
TkcRectangle.new($cscroll_canvas, "#{x}c", "#{y}c", "#{x+2}c", "#{y+2}c",
- 'outline'=>'black', 'fill'=>bg, 'tags'=>'rect')
+ 'outline'=>'black', 'fill'=>bg, 'tags'=>'rect')
TkcText.new($cscroll_canvas, "#{x+1}c", "#{y+1}c",
- 'text'=>"#{i},#{j}", 'anchor'=>'center', 'tags'=>'text')
+ 'text'=>"#{i},#{j}", 'anchor'=>'center', 'tags'=>'text')
y += 3
}
}
@@ -102,7 +102,7 @@ $cscroll_canvas.itembind('all', '1', proc{scrollButton $cscroll_canvas})
$cscroll_canvas.itembind('all', 'Any-Enter', proc{scrollEnter $cscroll_canvas})
$cscroll_canvas.bind('2', proc{|x,y| $cscroll_canvas.scan_mark(x,y)}, '%x %y')
$cscroll_canvas.bind('B2-Motion',
- proc{|x,y| $cscroll_canvas.scan_dragto(x,y)}, '%x %y')
+ proc{|x,y| $cscroll_canvas.scan_dragto(x,y)}, '%x %y')
def scrollEnter(c)
id = c.find_withtag('current')[0].id
diff --git a/ext/tk/sample/demos-jp/ctext.rb b/ext/tk/sample/demos-jp/ctext.rb
index 4704b41411..a71b6f2cb0 100644
--- a/ext/tk/sample/demos-jp/ctext.rb
+++ b/ext/tk/sample/demos-jp/ctext.rb
@@ -17,7 +17,7 @@ $ctext_demo = TkToplevel.new {|w|
# label À¸À®
TkLabel.new($ctext_demo, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left',
- 'text'=>"¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤Ï¥­¥ã¥ó¥Ð¥¹widget¤Î¥Æ¥­¥¹¥Èµ¡Ç½¤ò¥Ç¥â¤¹¤ë¤¿¤á¤Î¥Æ¥­¥¹¥Èʸ»úÎó¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¥Þ¥¦¥¹¤ò»Í³Ñ¤ÎÃæ¤Ë»ý¤Ã¤Æ¤¤¤­¡¢¥¯¥ê¥Ã¥¯¤¹¤ë¤È°ÌÃÖ¤®¤áÍѤÎÅÀ¤«¤é¤ÎÁêÂаÌÃÖ¤òÊѤ¨¤¿¤ê¡¢¹Ô·¤¨¤òÊѤ¨¤¿¤ê¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤Þ¤¿°Ê²¼¤Î¤è¤¦¤ÊÊÔ½¸¤Î¤¿¤á¤Î´Êñ¤Ê¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤¹¡£
+ 'text'=>"¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤Ï¥­¥ã¥ó¥Ð¥¹widget¤Î¥Æ¥­¥¹¥Èµ¡Ç½¤ò¥Ç¥â¤¹¤ë¤¿¤á¤Î¥Æ¥­¥¹¥Èʸ»úÎó¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¥Þ¥¦¥¹¤ò»Í³Ñ¤ÎÃæ¤Ë»ý¤Ã¤Æ¤¤¤­¡¢¥¯¥ê¥Ã¥¯¤¹¤ë¤È°ÌÃÖ¤®¤áÍѤÎÅÀ¤«¤é¤ÎÁêÂаÌÃÖ¤òÊѤ¨¤¿¤ê¡¢¹Ô·¤¨¤òÊѤ¨¤¿¤ê¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤Þ¤¿°Ê²¼¤Î¤è¤¦¤ÊÊÔ½¸¤Î¤¿¤á¤Î´Êñ¤Ê¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤¹¡£
1. ¥Þ¥¦¥¹¤ò»ý¤Ã¤Æ¤¤¤­¡¢¥¯¥ê¥Ã¥¯¤·¡¢ÆþÎϤǤ­¤Þ¤¹¡£
2. ¥Ü¥¿¥ó1¤ÇÁªÂò¤Ç¤­¤Þ¤¹¡£
@@ -48,7 +48,7 @@ $ctext_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
# canvas À¸À®
$ctext_canvas = TkCanvas.new($ctext_demo, 'relief'=>'flat',
- 'borderwidth'=>0, 'width'=>500, 'height'=>350)
+ 'borderwidth'=>0, 'width'=>500, 'height'=>350)
$ctext_canvas.pack('side'=>'top', 'expand'=>'yes', 'fill'=>'both')
# font ÀßÄê
@@ -56,37 +56,37 @@ textFont = '-*-Helvetica-Medium-R-Normal--*-240-*-*-*-*-*-*'
# canvas ÀßÄê
TkcRectangle.new($ctext_canvas, 245, 195, 255, 205,
- 'outline'=>'black', 'fill'=>'red')
+ 'outline'=>'black', 'fill'=>'red')
$ctag_text = TkcTag.new($ctext_canvas)
$ctag_text.withtag(TkcText.new($ctext_canvas, 250, 200,
- 'text'=>"¤³¤ì¤Ï¥­¥ã¥ó¥Ð¥¹widget¤Î¥Æ¥­¥¹¥Èµ¡Ç½¤ò¥Ç¥â¤¹¤ë¤¿¤á¤Îʸ»úÎó¤Ç¤¹¡£¥Þ¥¦¥¹¤ò»ý¤Ã¤Æ¤¤¤­¡¢¥¯¥ê¥Ã¥¯¤·¤ÆÆþÎϤǤ­¤Þ¤¹¡£ÁªÂò¤·¤Æ¥³¥ó¥È¥í¡¼¥ë-D¤Ç¾Ãµî¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£",
- 'width'=>440, 'anchor'=>'n',
- 'font'=>'-*-Helvetica-Medium-R-Normal--*-240-*-*-*-*-*-*',
- 'kanjifont'=>'-*-r-*--24-*-jisx0208.1983-0',
- 'justify'=>'left') )
+ 'text'=>"¤³¤ì¤Ï¥­¥ã¥ó¥Ð¥¹widget¤Î¥Æ¥­¥¹¥Èµ¡Ç½¤ò¥Ç¥â¤¹¤ë¤¿¤á¤Îʸ»úÎó¤Ç¤¹¡£¥Þ¥¦¥¹¤ò»ý¤Ã¤Æ¤¤¤­¡¢¥¯¥ê¥Ã¥¯¤·¤ÆÆþÎϤǤ­¤Þ¤¹¡£ÁªÂò¤·¤Æ¥³¥ó¥È¥í¡¼¥ë-D¤Ç¾Ãµî¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£",
+ 'width'=>440, 'anchor'=>'n',
+ 'font'=>'-*-Helvetica-Medium-R-Normal--*-240-*-*-*-*-*-*',
+ 'kanjifont'=>'-*-r-*--24-*-jisx0208.1983-0',
+ 'justify'=>'left') )
$ctag_text.bind('1', proc{|x,y| textB1Press $ctext_canvas,x,y}, "%x %y")
$ctag_text.bind('B1-Motion', proc{|x,y| textB1Move $ctext_canvas,x,y}, "%x %y")
$ctag_text.bind('Shift-1',
- proc{|x,y| $ctext_canvas.seleect_adjust 'current', "@#{x},#{y}"},
- "%x %y")
+ proc{|x,y| $ctext_canvas.seleect_adjust 'current', "@#{x},#{y}"},
+ "%x %y")
$ctag_text.bind('Shift-B1-Motion',
- proc{|x,y| textB1Move $ctext_canvas,x,y}, "%x %y")
+ proc{|x,y| textB1Move $ctext_canvas,x,y}, "%x %y")
$ctag_text.bind('KeyPress', proc{|a| textInsert $ctext_canvas,a}, "%A")
$ctag_text.bind('Return', proc{textInsert $ctext_canvas,"\n"})
$ctag_text.bind('Control-h', proc{textBs $ctext_canvas})
$ctag_text.bind('BackSpace', proc{textBs $ctext_canvas})
$ctag_text.bind('Delete', proc{textDel $ctext_canvas})
$ctag_text.bind('2', proc{|x,y| textPaste $ctext_canvas, "@#{x},#{y}"},
- "%x %y")
+ "%x %y")
# Next, create some items that allow the text's anchor position
# to be edited.
def mkTextConfig(w,x,y,option,value,color)
item = TkcRectangle.new(w, x, y, x+30, y+30,
- 'outline'=>'black', 'fill'=>color, 'width'=>1)
+ 'outline'=>'black', 'fill'=>color, 'width'=>1)
item.bind('1', proc{$ctag_text.configure option, value})
w.addtag_withtag('config', item)
end
@@ -104,11 +104,11 @@ mkTextConfig $ctext_canvas, x, y+60, 'anchor', 'ne', color
mkTextConfig $ctext_canvas, x+30, y+60, 'anchor', 'n', color
mkTextConfig $ctext_canvas, x+60, y+60, 'anchor', 'nw', color
item = TkcRectangle.new($ctext_canvas, x+40, y+40, x+50, y+50,
- 'outline'=>'black', 'fill'=>'red')
+ 'outline'=>'black', 'fill'=>'red')
item.bind('1', proc{$ctag_text.configure 'anchor', 'center'})
TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Text Position', 'anchor'=>'s',
- 'font'=>'-*-times-medium-r-normal--*-240-*-*-*-*-*-*',
- 'fill'=>'brown')
+ 'font'=>'-*-times-medium-r-normal--*-240-*-*-*-*-*-*',
+ 'fill'=>'brown')
# Lastly, create some items that allow the text's justification to be
# changed.
@@ -120,14 +120,14 @@ mkTextConfig $ctext_canvas, x, y, 'justify', 'left', color
mkTextConfig $ctext_canvas, x+30, y, 'justify', 'center', color
mkTextConfig $ctext_canvas, x+60, y, 'justify', 'right', color
TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Justification', 'anchor'=>'s',
- 'font'=>'-*-times-medium-r-normal--*-240-*-*-*-*-*-*',
- 'fill'=>'brown')
+ 'font'=>'-*-times-medium-r-normal--*-240-*-*-*-*-*-*',
+ 'fill'=>'brown')
$ctext_canvas.itembind('config', 'Enter', proc{textEnter $ctext_canvas})
$ctext_canvas.itembind('config', 'Leave',
- proc{$ctext_canvas\
- .itemconfigure('current',
- 'fill'=>$textConfigFill)})
+ proc{$ctext_canvas\
+ .itemconfigure('current',
+ 'fill'=>$textConfigFill)})
$textConfigFill = ''
diff --git a/ext/tk/sample/demos-jp/dialog2.rb b/ext/tk/sample/demos-jp/dialog2.rb
index 36b2356cc1..a934378dda 100644
--- a/ext/tk/sample/demos-jp/dialog2.rb
+++ b/ext/tk/sample/demos-jp/dialog2.rb
@@ -28,9 +28,9 @@ class TkDialog_Demo2 < TkDialog
end
ret = TkDialog_Demo2.new('message_config'=>{'wraplength'=>'4i'},
- 'prev_command'=>proc{|dialog|
- Tk.after 100, proc{dialog.grab('global')}
- }).value
+ 'prev_command'=>proc{|dialog|
+ Tk.after 100, proc{dialog.grab('global')}
+ }).value
case ret
when 0
print "¤¢¤Ê¤¿¤Ï¡Öλ²ò¡×¤ò²¡¤·¤Þ¤·¤¿¤Í¡£\n"
diff --git a/ext/tk/sample/demos-jp/entry3.rb b/ext/tk/sample/demos-jp/entry3.rb
index 4dff97a93a..f57dc13553 100644
--- a/ext/tk/sample/demos-jp/entry3.rb
+++ b/ext/tk/sample/demos-jp/entry3.rb
@@ -18,8 +18,8 @@ $entry3_demo = TkToplevel.new {|w|
}
TkLabel.new($entry3_demo,
- :font=>$font, :wraplength=>'5i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
+ :font=>$font, :wraplength=>'5i', :justify=>:left,
+ :text=><<EOL).pack(:side=>:top)
°Ê²¼¤Ë¤Ï£´¼ïÎà¤Î¥¨¥ó¥È¥ê¥Ü¥Ã¥¯¥¹¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡¥³Æ¥¨¥ó¥È¥ê¥Ü¥Ã¥¯¥¹¤Ï¡¤\
¥Þ¥¦¥¹¥¯¥ê¥Ã¥¯¤ÇÁªÂò¤·Ê¸»ú¤òÂǤÁ¹þ¤à¤³¤È¤¬²Äǽ¤Ç¤¹¤¬¡¤¤½¤ì¤¾¤ì¤¬¤É¤Î¤è¤¦¤Ê\
ÆþÎϤò¼õ¤±ÉÕ¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¤«¤Ë¤ÏÀ©Ìó¤¬Àߤ±¤é¤ì¤Æ¤¤¤Þ¤¹¡¥\
@@ -42,13 +42,13 @@ TkFrame.new($entry3_demo){|f|
pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
TkButton.new(f, :text=>'ÊĤ¸¤ë', :width=>15, :command=>proc{
- $entry3_demo.destroy
- $entry3_demo = nil
- }).pack(:side=>:left, :expand=>true)
+ $entry3_demo.destroy
+ $entry3_demo = nil
+ }).pack(:side=>:left, :expand=>true)
TkButton.new(f, :text=>'¥³¡¼¥É»²¾È', :width=>15, :command=>proc{
- showCode 'entry3'
- }).pack(:side=>:left, :expand=>true)
+ showCode 'entry3'
+ }).pack(:side=>:left, :expand=>true)
}
# focusAndFlash --
@@ -58,32 +58,32 @@ TkFrame.new($entry3_demo){|f|
# 2.5Hz).
#
# Arguments:
-# widget - entry widget to flash
-# fg - Initial foreground colour
-# bg - Initial background colour
-# count - Counter to control the number of times flashed
+# widget - entry widget to flash
+# fg - Initial foreground colour
+# bg - Initial background colour
+# count - Counter to control the number of times flashed
def focusAndFlash(widget, fg, bg, count=5)
return if count <= 0
TkTimer.new(100, count,
- proc{widget.configure(:foreground=>bg, :background=>fg)},
- proc{widget.configure(:foreground=>fg, :background=>bg)}
- ).start
+ proc{widget.configure(:foreground=>bg, :background=>fg)},
+ proc{widget.configure(:foreground=>fg, :background=>bg)}
+ ).start
widget.focus(true)
end
l1 = TkLabelFrame.new($entry3_demo, :text=>"À°¿ô¥¨¥ó¥È¥ê")
TkEntry.new(l1, :validate=>:focus,
- :vcmd=>[
- proc{|s| s == '' || /^[+-]?\d+$/ =~ s }, '%P'
- ]) {|e|
+ :vcmd=>[
+ proc{|s| s == '' || /^[+-]?\d+$/ =~ s }, '%P'
+ ]) {|e|
invalidcommand [proc{|w| focusAndFlash(w, e.fg, e.bg)}, '%W']
pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m')
}
l2 = TkLabelFrame.new($entry3_demo, :text=>"ŤµÀ©ÌóÉÕ¤­¥¨¥ó¥È¥ê")
TkEntry.new(l2, :validate=>:key, :invcmd=>proc{Tk.bell},
- :vcmd=>[proc{|s| s.length < 10}, '%P']
- ).pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m')
+ :vcmd=>[proc{|s| s.length < 10}, '%P']
+ ).pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m')
### PHONE NUMBER ENTRY ###
# Note that the source to this is quite a bit longer as the behaviour
@@ -105,7 +105,7 @@ Hash[*(%w(abc 2 def 3 ghi 4 jkl 5 mno 6 pqrs 7 tuv 8 wxyz 9))].each{|chars, n|
# Skip over fixed characters in a phone-number string when moving left.
#
# Arguments:
-# widget - The entry widget containing the phone-number.
+# widget - The entry widget containing the phone-number.
def phoneSkipLeft(widget)
idx = widget.index('insert')
if idx == 8
@@ -125,7 +125,7 @@ end
# Skip over fixed characters in a phone-number string when moving right.
#
# Arguments:
-# widget - The entry widget containing the phone-number.
+# widget - The entry widget containing the phone-number.
# add - Offset to add to index before calculation (used by validation.)
def phoneSkipRight(widget, add = 0)
idx = widget.index('insert')
@@ -149,14 +149,14 @@ end
#
# widget - entry widget to validate
# vmode - The widget's validation mode
-# idx - The index where replacement is to occur
+# idx - The index where replacement is to occur
# char - The character (or string, though that will always be
-# refused) to be overwritten at that point.
+# refused) to be overwritten at that point.
def validatePhoneChange(widget, vmode, idx, char)
return true if idx == nil
Tk.after_idle(proc{widget.configure(:validate=>vmode,
- :invcmd=>proc{Tk.bell})})
+ :invcmd=>proc{Tk.bell})})
if !(idx<3 || idx==6 || idx==7 || idx==11 || idx>15) && char =~ /[0-9A-Za-z]/
widget.delete(idx)
widget.insert(idx, $phoneNumberMap[char] || char)
@@ -171,17 +171,17 @@ end
l3 = TkLabelFrame.new($entry3_demo, :text=>"ÊƹñÅÅÏÃÈֹ楨¥ó¥È¥ê")
TkEntry.new(l3, :validate=>:key, :invcmd=>proc{Tk.bell},
- :textvariable=>entry3content,
- :vcmd=>[
- proc{|w,v,i,s| validatePhoneChange(w,v,i,s)},
- "%W %v %i %S"
- ]){|e|
+ :textvariable=>entry3content,
+ :vcmd=>[
+ proc{|w,v,i,s| validatePhoneChange(w,v,i,s)},
+ "%W %v %i %S"
+ ]){|e|
# Click to focus goes to the first editable character...
bind('FocusIn', proc{|d,w|
- if d != "NotifyAncestor"
- w.cursor = 3
- Tk.after_idle(proc{w.selection_clear})
- end
+ if d != "NotifyAncestor"
+ w.cursor = 3
+ Tk.after_idle(proc{w.selection_clear})
+ end
}, '%d %W')
bind('Left', proc{|w| phoneSkipLeft(w)}, '%W')
bind('Right', proc{|w| phoneSkipRight(w)}, '%W')
@@ -190,10 +190,10 @@ TkEntry.new(l3, :validate=>:key, :invcmd=>proc{Tk.bell},
l4 = TkLabelFrame.new($entry3_demo, :text=>"¥Ñ¥¹¥ï¡¼¥É¥¨¥ó¥È¥ê")
TkEntry.new(l4, :validate=>:key, :show=>'*',
- :vcmd=>[
- proc{|s| s.length <= 8},
- '%P'
- ]).pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m')
+ :vcmd=>[
+ proc{|s| s.length <= 8},
+ '%P'
+ ]).pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m')
TkFrame.new($entry3_demo){|f|
lower
diff --git a/ext/tk/sample/demos-jp/filebox.rb b/ext/tk/sample/demos-jp/filebox.rb
index 78ae50a45b..f3608ab70f 100644
--- a/ext/tk/sample/demos-jp/filebox.rb
+++ b/ext/tk/sample/demos-jp/filebox.rb
@@ -17,7 +17,7 @@ $filebox_demo = TkToplevel.new {|w|
# label À¸À®
TkLabel.new($filebox_demo,'font'=>$font,'wraplength'=>'4i','justify'=>'left',
- 'text'=>"¥¨¥ó¥È¥ê¤Ë¥Õ¥¡¥¤¥ë̾¤òľÀÜÆþÎϤ¹¤ë¤«¡¢\"Browse\" ¥Ü¥¿¥ó¤ò²¡¤·¤Æ¥Õ¥¡¥¤¥ëÁªÂò¥À¥¤¥¢¥í¥°¤«¤é¥Õ¥¡¥¤¥ë̾¤òÁª¤ó¤Ç²¼¤µ¤¤¡£").pack('side'=>'top')
+ 'text'=>"¥¨¥ó¥È¥ê¤Ë¥Õ¥¡¥¤¥ë̾¤òľÀÜÆþÎϤ¹¤ë¤«¡¢\"Browse\" ¥Ü¥¿¥ó¤ò²¡¤·¤Æ¥Õ¥¡¥¤¥ëÁªÂò¥À¥¤¥¢¥í¥°¤«¤é¥Õ¥¡¥¤¥ë̾¤òÁª¤ó¤Ç²¼¤µ¤¤¡£").pack('side'=>'top')
# frame À¸À®
TkFrame.new($filebox_demo) {|frame|
@@ -47,7 +47,7 @@ TkFrame.new($filebox_demo) {|frame|
pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x')
TkButton.new(f, 'text'=>'Browse ...',
- 'command'=>proc{fileDialog $filebox_demo,e,type})\
+ 'command'=>proc{fileDialog $filebox_demo,e,type})\
.pack('side'=>'left')
}
@@ -58,9 +58,9 @@ TkFrame.new($filebox_demo) {|frame|
$tk_strictMotif = TkVarAccess.new('tk_strictMotif')
if ($tk_platform['platform'] == 'unix')
TkCheckButton.new($filebox_demo,
- 'text'=>'Motif¥¹¥¿¥¤¥ë¤Î¥À¥¤¥¢¥í¥°¤òÍѤ¤¤ë',
- 'variable'=>$tk_strictMotif,
- 'onvalue'=>1, 'offvalue'=>0 ).pack('anchor'=>'c')
+ 'text'=>'Motif¥¹¥¿¥¤¥ë¤Î¥À¥¤¥¢¥í¥°¤òÍѤ¤¤ë',
+ 'variable'=>$tk_strictMotif,
+ 'onvalue'=>1, 'offvalue'=>0 ).pack('anchor'=>'c')
end
def fileDialog(w,ent,operation)
@@ -84,8 +84,8 @@ def fileDialog(w,ent,operation)
file = Tk.getOpenFile('filetypes'=>types, 'parent'=>w)
else
file = Tk.getSaveFile('filetypes'=>types, 'parent'=>w,
- 'initialfile'=>'Untitled',
- 'defaultextension'=>'.txt')
+ 'initialfile'=>'Untitled',
+ 'defaultextension'=>'.txt')
end
if file != ""
ent.delete 0, 'end'
diff --git a/ext/tk/sample/demos-jp/floor.rb b/ext/tk/sample/demos-jp/floor.rb
index d9d17ee949..517600de92 100644
--- a/ext/tk/sample/demos-jp/floor.rb
+++ b/ext/tk/sample/demos-jp/floor.rb
@@ -8,8 +8,8 @@
# visible.
#
# Arguments:
-# w - Name of the canvas window.
-# active - Number of active floor (1, 2, or 3).
+# w - Name of the canvas window.
+# active - Number of active floor (1, 2, or 3).
def floorDisplay(w,active)
return if $activeFloor == active
@@ -59,7 +59,7 @@ end
# highlighted.
#
# Arguments:
-# w - The name of the canvas window.
+# w - The name of the canvas window.
def newRoom(w)
id = w.find_withtag('current')[0]
@@ -72,8 +72,8 @@ end
# It highlights the current room and unhighlights any previous room.
#
# Arguments:
-# w - The canvas window displaying the floorplan.
-# args - Not used.
+# w - The canvas window displaying the floorplan.
+# args - Not used.
def roomChanged(w,*args)
w.delete('highlight')
@@ -90,24 +90,24 @@ end
# floor.
#
# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
+# w - The canvas window.
+# fill - Fill color to use for the floor's background.
+# outline - Color to use for the floor's outline.
def floor_bg1(w,fill,outline)
TkcPolygon.new(w,347,80,349,82,351,84,353,85,363,92,375,99,386,104,
- 386,129,398,129,398,162,484,162,484,129,559,129,559,133,725,
- 133,725,129,802,129,802,389,644,389,644,391,559,391,559,327,
- 508,327,508,311,484,311,484,278,395,278,395,288,400,288,404,
- 288,409,290,413,292,418,297,421,302,422,309,421,318,417,325,
- 411,330,405,332,397,333,344,333,340,334,336,336,335,338,332,
- 342,331,347,332,351,334,354,336,357,341,359,340,360,335,363,
- 331,365,326,366,304,366,304,355,258,355,258,387,60,387,60,391,
- 0,391,0,337,3,337,3,114,8,114,8,25,30,25,30,5,93,5,98,5,104,7,
- 110,10,116,16,119,20,122,28,123,32,123,68,220,68,220,34,221,
- 22,223,17,227,13,231,8,236,4,242,2,246,0,260,0,283,1,300,5,
- 321,14,335,22,348,25,365,29,363,39,358,48,352,56,337,70,
- 344,76,347,80, 'tags'=>['floor1','bg'], 'fill'=>fill)
+ 386,129,398,129,398,162,484,162,484,129,559,129,559,133,725,
+ 133,725,129,802,129,802,389,644,389,644,391,559,391,559,327,
+ 508,327,508,311,484,311,484,278,395,278,395,288,400,288,404,
+ 288,409,290,413,292,418,297,421,302,422,309,421,318,417,325,
+ 411,330,405,332,397,333,344,333,340,334,336,336,335,338,332,
+ 342,331,347,332,351,334,354,336,357,341,359,340,360,335,363,
+ 331,365,326,366,304,366,304,355,258,355,258,387,60,387,60,391,
+ 0,391,0,337,3,337,3,114,8,114,8,25,30,25,30,5,93,5,98,5,104,7,
+ 110,10,116,16,119,20,122,28,123,32,123,68,220,68,220,34,221,
+ 22,223,17,227,13,231,8,236,4,242,2,246,0,260,0,283,1,300,5,
+ 321,14,335,22,348,25,365,29,363,39,358,48,352,56,337,70,
+ 344,76,347,80, 'tags'=>['floor1','bg'], 'fill'=>fill)
TkcLine.new(w,386,129,398,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
TkcLine.new(w,258,355,258,387, 'fill'=>outline, 'tags'=>['floor1','bg'])
TkcLine.new(w,60,387,60,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
@@ -214,17 +214,17 @@ end
# floor.
#
# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
+# w - The canvas window.
+# fill - Fill color to use for the floor's background.
+# outline - Color to use for the floor's outline.
def floor_bg2(w,fill,outline)
TkcPolygon.new(w,559,129,484,129,484,162,398,162,398,129,315,129,
- 315,133,176,133,176,129,96,129,96,133,3,133,3,339,0,339,0,391,
- 60,391,60,387,258,387,258,329,350,329,350,311,395,311,395,280,
- 484,280,484,311,508,311,508,327,558,327,558,391,644,391,644,
- 367,802,367,802,129,725,129,725,133,559,133,559,129,
- 'tags'=>['floor2','bg'], 'fill'=>fill)
+ 315,133,176,133,176,129,96,129,96,133,3,133,3,339,0,339,0,391,
+ 60,391,60,387,258,387,258,329,350,329,350,311,395,311,395,280,
+ 484,280,484,311,508,311,508,327,558,327,558,391,644,391,644,
+ 367,802,367,802,129,725,129,725,133,559,133,559,129,
+ 'tags'=>['floor2','bg'], 'fill'=>fill)
TkcLine.new(w,350,311,350,329, 'fill'=>outline, 'tags'=>['floor2','bg'])
TkcLine.new(w,398,129,398,162, 'fill'=>outline, 'tags'=>['floor2','bg'])
TkcLine.new(w,802,367,802,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
@@ -269,17 +269,17 @@ end
# floor.
#
# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
+# w - The canvas window.
+# fill - Fill color to use for the floor's background.
+# outline - Color to use for the floor's outline.
def floor_bg3(w,fill,outline)
TkcPolygon.new(w,159,300,107,300,107,248,159,248,159,129,96,129,96,
- 133,21,133,21,331,0,331,0,391,60,391,60,370,159,370,159,300,
- 'tags'=>['floor3','bg'], 'fill'=>fill)
+ 133,21,133,21,331,0,331,0,391,60,391,60,370,159,370,159,300,
+ 'tags'=>['floor3','bg'], 'fill'=>fill)
TkcPolygon.new(w,258,370,258,329,350,329,350,311,399,311,399,129,
- 315,129,315,133,176,133,176,129,159,129,159,370,258,370,
- 'tags'=>['floor3','bg'], 'fill'=>fill)
+ 315,129,315,133,176,133,176,129,159,129,159,370,258,370,
+ 'tags'=>['floor3','bg'], 'fill'=>fill)
TkcLine.new(w,96,133,96,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
TkcLine.new(w,176,129,96,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
TkcLine.new(w,176,129,176,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
@@ -299,7 +299,7 @@ def floor_bg3(w,fill,outline)
TkcLine.new(w,21,331,21,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
TkcLine.new(w,96,133,21,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
TkcLine.new(w,107,300,159,300,159,248,107,248,107,300,
- 'fill'=>outline, 'tags'=>['floor3','bg'])
+ 'fill'=>outline, 'tags'=>['floor3','bg'])
end
# floor_fg1 --
@@ -308,321 +308,321 @@ end
# floor (office outlines and numbers).
#
# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
+# w - The canvas window.
+# color - Color to use for drawing foreground information.
def floor_fg1(w,color)
i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '101'
$floorItems['101'] = i
TkcText.new(w,358,209, 'text'=>'101', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'Pub Lift1'
$floorItems['Pub Lift1'] = i
TkcText.new(w,323,223, 'text'=>'Pub Lift1', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'Priv Lift1'
$floorItems['Priv Lift1'] = i
TkcText.new(w,323,188, 'text'=>'Priv Lift1', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,42,389,42,337,1,337,1,389,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '110'
$floorItems['110'] = i
TkcText.new(w,21.5,363, 'text'=>'110', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,59,389,59,385,90,385,90,337,44,337,44,389,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '109'
$floorItems['109'] = i
TkcText.new(w,67,363, 'text'=>'109', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,51,300,51,253,6,253,6,300,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '111'
$floorItems['111'] = i
TkcText.new(w,28.5,276.5, 'text'=>'111', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,98,248,98,309,79,309,79,248,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '117B'
$floorItems['117B'] = i
TkcText.new(w,88.5,278.5, 'text'=>'117B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,51,251,51,204,6,204,6,251,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '112'
$floorItems['112'] = i
TkcText.new(w,28.5,227.5, 'text'=>'112', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,6,156,51,156,51,203,6,203,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '113'
$floorItems['113'] = i
TkcText.new(w,28.5,179.5, 'text'=>'113', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,85,169,79,169,79,192,85,192,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '117A'
$floorItems['117A'] = i
TkcText.new(w,82,180.5, 'text'=>'117A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,77,302,77,168,53,168,53,302,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '117'
$floorItems['117'] = i
TkcText.new(w,65,235, 'text'=>'117', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,51,155,51,115,6,115,6,155,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '114'
$floorItems['114'] = i
TkcText.new(w,28.5,135, 'text'=>'114', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,95,115,53,115,53,168,95,168,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '115'
$floorItems['115'] = i
TkcText.new(w,74,141.5, 'text'=>'115', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,87,113,87,27,10,27,10,113,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '116'
$floorItems['116'] = i
TkcText.new(w,48.5,70, 'text'=>'116', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,89,91,128,91,128,113,89,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '118'
$floorItems['118'] = i
TkcText.new(w,108.5,102, 'text'=>'118', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,178,128,178,132,216,132,216,91,
- 163,91,163,112,149,112,149,128,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 163,91,163,112,149,112,149,128,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '120'
$floorItems['120'] = i
TkcText.new(w,189.5,111.5, 'text'=>'120', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,79,193,87,193,87,169,136,169,136,192,
- 156,192,156,169,175,169,175,246,79,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 156,192,156,169,175,169,175,246,79,246,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '122'
$floorItems['122'] = i
TkcText.new(w,131,207.5, 'text'=>'122', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,138,169,154,169,154,191,138,191,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '121'
$floorItems['121'] = i
TkcText.new(w,146,180, 'text'=>'121', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,99,300,126,300,126,309,99,309,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '106A'
$floorItems['106A'] = i
TkcText.new(w,112.5,304.5, 'text'=>'106A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,128,299,128,309,150,309,150,248,99,248,99,299,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '105'
$floorItems['105'] = i
TkcText.new(w,124.5,278.5, 'text'=>'105', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,174,309,174,300,152,300,152,309,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '106B'
$floorItems['106B'] = i
TkcText.new(w,163,304.5, 'text'=>'106B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,176,299,176,309,216,309,216,248,152,248,152,299,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '104'
$floorItems['104'] = i
TkcText.new(w,184,278.5, 'text'=>'104', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,138,385,138,337,91,337,91,385,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '108'
$floorItems['108'] = i
TkcText.new(w,114.5,361, 'text'=>'108', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,256,337,140,337,140,385,256,385,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '107'
$floorItems['107'] = i
TkcText.new(w,198,361, 'text'=>'107', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,300,353,300,329,260,329,260,353,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'Smoking'
$floorItems['Smoking'] = i
TkcText.new(w,280,341, 'text'=>'Smoking', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,314,135,314,170,306,170,306,246,177,246,177,135,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '123'
$floorItems['123'] = i
TkcText.new(w,245.5,190.5, 'text'=>'123', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,217,248,301,248,301,326,257,326,257,310,217,310,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '103'
$floorItems['103'] = i
TkcText.new(w,259,287, 'text'=>'103', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,396,188,377,188,377,169,316,169,316,131,396,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '124'
$floorItems['124'] = i
TkcText.new(w,356,150, 'text'=>'124', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,397,226,407,226,407,189,377,189,377,246,397,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '125'
$floorItems['125'] = i
TkcText.new(w,392,217.5, 'text'=>'125', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,399,187,409,187,409,207,474,207,474,164,399,164,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '126'
$floorItems['126'] = i
TkcText.new(w,436.5,185.5, 'text'=>'126', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,409,209,409,229,399,229,399,253,
- 486,253,486,239,474,239,474,209,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 486,253,486,239,474,239,474,209,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '127'
$floorItems['127'] = i
TkcText.new(w,436.5,'231', 'text'=>'127', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,501,164,501,174,495,174,495,188,
- 490,188,490,204,476,204,476,164,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 490,188,490,204,476,204,476,164,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'MShower'
$floorItems['MShower'] = i
TkcText.new(w,488.5,'184', 'text'=>'MShower', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,497,176,513,176,513,204,492,204,492,190,497,190,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'Closet'
$floorItems['Closet'] = i
TkcText.new(w,502.5,190, 'text'=>'Closet', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,476,237,476,206,513,206,513,254,488,254,488,237,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'WShower'
$floorItems['WShower'] = i
TkcText.new(w,494.5,230, 'text'=>'WShower', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,486,131,558,131,558,135,724,135,724,166,
- 697,166,697,275,553,275,531,254,515,254,
- 515,174,503,174,503,161,486,161,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 697,166,697,275,553,275,531,254,515,254,
+ 515,174,503,174,503,161,486,161,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '130'
$floorItems['130'] = i
TkcText.new(w,638.5,205, 'text'=>'130', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,308,242,339,242,339,248,342,248,
- 342,246,397,246,397,276,393,276,
- 393,309,300,309,300,248,308,248,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 342,246,397,246,397,276,393,276,
+ 393,309,300,309,300,248,308,248,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '102'
$floorItems['102'] = i
TkcText.new(w,367.5,278.5, 'text'=>'102', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,397,255,486,255,486,276,397,276,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '128'
$floorItems['128'] = i
TkcText.new(w,441.5,265.5, 'text'=>'128', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,510,309,486,309,486,255,530,255,
- 552,277,561,277,561,325,510,325,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 552,277,561,277,561,325,510,325,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '129'
$floorItems['129'] = i
TkcText.new(w,535.5,293, 'text'=>'129', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,696,281,740,281,740,387,642,387,
- 642,389,561,389,561,277,696,277,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 642,389,561,389,561,277,696,277,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '133'
$floorItems['133'] = i
TkcText.new(w,628.5,335, 'text'=>'133', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,742,387,742,281,800,281,800,387,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '132'
$floorItems['132'] = i
TkcText.new(w,771,334, 'text'=>'132', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,800,168,800,280,699,280,699,168,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '134'
$floorItems['134'] = i
TkcText.new(w,749.5,224, 'text'=>'134', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,726,131,726,166,800,166,800,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '135'
$floorItems['135'] = i
TkcText.new(w,763,148.5, 'text'=>'135', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,340,360,335,363,331,365,326,366,304,366,
- 304,312,396,312,396,288,400,288,404,288,
- 409,290,413,292,418,297,421,302,422,309,
- 421,318,417,325,411,330,405,332,397,333,
- 344,333,340,334,336,336,335,338,332,342,
- 331,347,332,351,334,354,336,357,341,359,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 304,312,396,312,396,288,400,288,404,288,
+ 409,290,413,292,418,297,421,302,422,309,
+ 421,318,417,325,411,330,405,332,397,333,
+ 344,333,340,334,336,336,335,338,332,342,
+ 331,347,332,351,334,354,336,357,341,359,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'Ramona Stair'
$floorItems['Ramona Stair'] = i
TkcText.new(w,368,323, 'text'=>'Ramona Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,30,23,30,5,93,5,98,5,104,7,110,10,116,16,119,20,
- 122,28,123,32,123,68,220,68,220,87,90,87,90,23,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 122,28,123,32,123,68,220,68,220,87,90,87,90,23,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'University Stair'
$floorItems['University Stair'] = i
TkcText.new(w,155,77.5, 'text'=>'University Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,282,37,295,40,312,49,323,56,337,70,352,56,
- 358,48,363,39,365,29,348,25,335,22,321,14,
- 300,5,283,1,260,0,246,0,242,2,236,4,231,8,
- 227,13,223,17,221,22,220,34,260,34,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 358,48,363,39,365,29,348,25,335,22,321,14,
+ 300,5,283,1,260,0,246,0,242,2,236,4,231,8,
+ 227,13,223,17,221,22,220,34,260,34,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'Plaza Stair'
$floorItems['Plaza Stair'] = i
TkcText.new(w,317.5,28.5, 'text'=>'Plaza Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,220,34,260,34,282,37,295,40,312,49,
- 323,56,337,70,350,83,365,94,377,100,
- 386,104,386,128,220,128,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 323,56,337,70,350,83,365,94,377,100,
+ 386,104,386,128,220,128,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'Plaza Deck'
$floorItems['Plaza Deck'] = i
TkcText.new(w,303,81, 'text'=>'Plaza Deck', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,257,336,77,336,6,336,6,301,77,301,77,310,257,310,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '106'
$floorItems['106'] = i
TkcText.new(w,131.5,318.5, 'text'=>'106', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,146,110,162,110,162,91,130,91,130,115,95,115,
- 95,128,114,128,114,151,157,151,157,153,112,153,
- 112,130,97,130,97,168,175,168,175,131,146,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 95,128,114,128,114,151,157,151,157,153,112,153,
+ 112,130,97,130,97,168,175,168,175,131,146,131,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '119'
$floorItems['119'] = i
TkcText.new(w,143.5,133, 'text'=>'119', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
TkcLine.new(w,155,191,155,189, 'fill'=>color, 'tags'=>['floor1','wall'])
TkcLine.new(w,155,177,155,169, 'fill'=>color, 'tags'=>['floor1','wall'])
TkcLine.new(w,96,129,96,169, 'fill'=>color, 'tags'=>['floor1','wall'])
@@ -789,327 +789,327 @@ end
# floor (office outlines and numbers).
#
# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
+# w - The canvas window.
+# color - Color to use for drawing foreground information.
def floor_fg2(w,color)
i = TkcPolygon.new(w,748,188,755,188,755,205,758,205,758,222,
- 800,222,800,168,748,168,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 800,222,800,168,748,168,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '238'
$floorItems['238'] = i
TkcText.new(w,774,195, 'text'=>'238', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,726,188,746,188,746,166,800,166,800,131,726,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '237'
$floorItems['237'] = i
TkcText.new(w,763,148.5, 'text'=>'237', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,497,187,497,204,559,204,559,324,641,324,
- 643,324,643,291,641,291,641,205,696,205,
- 696,291,694,291,694,314,715,314,715,291,
- 715,205,755,205,755,190,724,190,724,187,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 643,324,643,291,641,291,641,205,696,205,
+ 696,291,694,291,694,314,715,314,715,291,
+ 715,205,755,205,755,190,724,190,724,187,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '246'
$floorItems['246'] = i
TkcText.new(w,600,264, 'text'=>'246', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,694,279,643,279,643,314,694,314,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '247'
$floorItems['247'] = i
TkcText.new(w,668.5,296.5, 'text'=>'247', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,232,250,308,250,308,242,339,242,339,246,
- 397,246,397,255,476,255,476,250,482,250,559,250,
- 559,274,482,274,482,278,396,278,396,274,232,274,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 397,246,397,255,476,255,476,250,482,250,559,250,
+ 559,274,482,274,482,278,396,278,396,274,232,274,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '202'
$floorItems['202'] = i
TkcText.new(w,285.5,260, 'text'=>'202', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,53,228,53,338,176,338,233,338,233,196,
- 306,196,306,180,175,180,175,169,156,169,
- 156,196,176,196,176,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 306,196,306,180,175,180,175,169,156,169,
+ 156,196,176,196,176,228,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '206'
$floorItems['206'] = i
TkcText.new(w,143,267, 'text'=>'206', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,51,277,6,277,6,338,51,338,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '212'
$floorItems['212'] = i
TkcText.new(w,28.5,307.5, 'text'=>'212', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,557,276,486,276,486,309,510,309,510,325,557,325,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '245'
$floorItems['245'] = i
TkcText.new(w,521.5,300.5, 'text'=>'245', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,560,389,599,389,599,326,560,326,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '244'
$floorItems['244'] = i
TkcText.new(w,579.5,357.5, 'text'=>'244', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,601,389,601,326,643,326,643,389,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '243'
$floorItems['243'] = i
TkcText.new(w,622,357.5, 'text'=>'243', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,688,316,645,316,645,365,688,365,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '242'
$floorItems['242'] = i
TkcText.new(w,666.5,340.5, 'text'=>'242', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,802,367,759,367,759,226,802,226,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = 'Barbecue Deck'
$floorItems['Barbecue Deck'] = i
TkcText.new(w,780.5,296.5, 'text'=>'Barbecue Deck', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,755,262,755,314,717,314,717,262,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '240'
$floorItems['240'] = i
TkcText.new(w,736,288, 'text'=>'240', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,755,316,689,316,689,365,755,365,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '241'
$floorItems['241'] = i
TkcText.new(w,722,340.5, 'text'=>'241', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,755,206,717,206,717,261,755,261,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '239'
$floorItems['239'] = i
TkcText.new(w,736,233.5, 'text'=>'239', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,695,277,643,277,643,206,695,206,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '248'
$floorItems['248'] = i
TkcText.new(w,669,241.5, 'text'=>'248', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,676,135,676,185,724,185,724,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '236'
$floorItems['236'] = i
TkcText.new(w,700,160, 'text'=>'236', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,675,135,635,135,635,145,628,145,628,185,675,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '235'
$floorItems['235'] = i
TkcText.new(w,651.5,160, 'text'=>'235', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,626,143,633,143,633,135,572,135,
- 572,143,579,143,579,185,626,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 572,143,579,143,579,185,626,185,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '234'
$floorItems['234'] = i
TkcText.new(w,606,160, 'text'=>'234', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,557,135,571,135,571,145,578,145,
- 578,185,527,185,527,131,557,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 578,185,527,185,527,131,557,131,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '233'
$floorItems['233'] = i
TkcText.new(w,552.5,158, 'text'=>'233', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,476,249,557,249,557,205,476,205,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '230'
$floorItems['230'] = i
TkcText.new(w,516.5,227, 'text'=>'230', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,476,164,486,164,486,131,525,131,525,185,476,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '232'
$floorItems['232'] = i
TkcText.new(w,500.5,158, 'text'=>'232', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,476,186,495,186,495,204,476,204,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '229'
$floorItems['229'] = i
TkcText.new(w,485.5,195, 'text'=>'229', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,474,207,409,207,409,187,399,187,399,164,474,164,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '227'
$floorItems['227'] = i
TkcText.new(w,436.5,185.5, 'text'=>'227', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,399,228,399,253,474,253,474,209,409,209,409,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '228'
$floorItems['228'] = i
TkcText.new(w,436.5,231, 'text'=>'228', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,397,246,397,226,407,226,407,189,377,189,377,246,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '226'
$floorItems['226'] = i
TkcText.new(w,392,217.5, 'text'=>'226', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,377,169,316,169,316,131,397,131,397,188,377,188,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '225'
$floorItems['225'] = i
TkcText.new(w,356.5,150, 'text'=>'225', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,234,198,306,198,306,249,234,249,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '224'
$floorItems['224'] = i
TkcText.new(w,270,223.5, 'text'=>'224', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,270,179,306,179,306,170,314,170,314,135,270,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '223'
$floorItems['223'] = i
TkcText.new(w,292,157, 'text'=>'223', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,268,179,221,179,221,135,268,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '222'
$floorItems['222'] = i
TkcText.new(w,244.5,157, 'text'=>'222', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,177,179,219,179,219,135,177,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '221'
$floorItems['221'] = i
TkcText.new(w,198,157, 'text'=>'221', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,299,327,349,327,349,284,341,284,341,276,299,276,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '204'
$floorItems['204'] = i
TkcText.new(w,324,301.5, 'text'=>'204', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,234,276,297,276,297,327,257,327,257,338,234,338,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '205'
$floorItems['205'] = i
TkcText.new(w,265.5,307, 'text'=>'205', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,256,385,256,340,212,340,212,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '207'
$floorItems['207'] = i
TkcText.new(w,234,362.5, 'text'=>'207', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,210,340,164,340,164,385,210,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '208'
$floorItems['208'] = i
TkcText.new(w,187,362.5, 'text'=>'208', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,115,340,162,340,162,385,115,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '209'
$floorItems['209'] = i
TkcText.new(w,138.5,362.5, 'text'=>'209', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,89,228,89,156,53,156,53,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '217'
$floorItems['217'] = i
TkcText.new(w,71,192, 'text'=>'217', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,89,169,97,169,97,190,89,190,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '217A'
$floorItems['217A'] = i
TkcText.new(w,93,179.5, 'text'=>'217A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,89,156,89,168,95,168,95,135,53,135,53,156,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '216'
$floorItems['216'] = i
TkcText.new(w,71,145.5, 'text'=>'216', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,51,179,51,135,6,135,6,179,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '215'
$floorItems['215'] = i
TkcText.new(w,28.5,157, 'text'=>'215', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,51,227,6,227,6,180,51,180,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '214'
$floorItems['214'] = i
TkcText.new(w,28.5,203.5, 'text'=>'214', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,51,275,6,275,6,229,51,229,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '213'
$floorItems['213'] = i
TkcText.new(w,28.5,252, 'text'=>'213', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,114,340,67,340,67,385,114,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '210'
$floorItems['210'] = i
TkcText.new(w,90.5,362.5, 'text'=>'210', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,59,389,59,385,65,385,65,340,1,340,1,389,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '211'
$floorItems['211'] = i
TkcText.new(w,33,364.5, 'text'=>'211', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,393,309,350,309,350,282,342,282,342,276,393,276,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '203'
$floorItems['203'] = i
TkcText.new(w,367.5,292.5, 'text'=>'203', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,99,191,91,191,91,226,174,226,174,198,
- 154,198,154,192,109,192,109,169,99,169,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 154,198,154,192,109,192,109,169,99,169,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '220'
$floorItems['220'] = i
TkcText.new(w,132.5,208.5, 'text'=>'220', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = 'Priv Lift2'
$floorItems['Priv Lift2'] = i
TkcText.new(w,323,188, 'text'=>'Priv Lift2', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = 'Pub Lift 2'
$floorItems['Pub Lift 2'] = i
TkcText.new(w,323,223, 'text'=>'Pub Lift 2', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '218'
$floorItems['218'] = i
TkcText.new(w,136,149.5, 'text'=>'218', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '219'
$floorItems['219'] = i
TkcText.new(w,132.5,180, 'text'=>'219', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '201'
$floorItems['201'] = i
TkcText.new(w,358,209, 'text'=>'201', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
TkcLine.new(w,641,186,678,186, 'fill'=>color, 'tags'=>['floor2','wall'])
TkcLine.new(w,757,350,757,367, 'fill'=>color, 'tags'=>['floor2','wall'])
TkcLine.new(w,634,133,634,144, 'fill'=>color, 'tags'=>['floor2','wall'])
@@ -1271,215 +1271,215 @@ end
# floor (office outlines and numbers).
#
# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
+# w - The canvas window.
+# color - Color to use for drawing foreground information.
def floor_fg3(w,color)
i = TkcPolygon.new(w,89,228,89,180,70,180,70,228,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '316'
$floorItems['316'] = i
TkcText.new(w,79.5,204, 'text'=>'316', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,115,368,162,368,162,323,115,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '309'
$floorItems['309'] = i
TkcText.new(w,138.5,345.5, 'text'=>'309', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,164,323,164,368,211,368,211,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '308'
$floorItems['308'] = i
TkcText.new(w,187.5,345.5, 'text'=>'308', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,256,368,212,368,212,323,256,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '307'
$floorItems['307'] = i
TkcText.new(w,234,345.5, 'text'=>'307', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,244,276,297,276,297,327,260,327,260,321,244,321,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '305'
$floorItems['305'] = i
TkcText.new(w,270.5,301.5, 'text'=>'305', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,251,219,251,203,244,203,244,219,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '324B'
$floorItems['324B'] = i
TkcText.new(w,247.5,211, 'text'=>'324B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,251,249,244,249,244,232,251,232,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '324A'
$floorItems['324A'] = i
TkcText.new(w,247.5,240.5, 'text'=>'324A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,223,135,223,179,177,179,177,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '320'
$floorItems['320'] = i
TkcText.new(w,200,157, 'text'=>'320', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,114,368,114,323,67,323,67,368,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '310'
$floorItems['310'] = i
TkcText.new(w,90.5,345.5, 'text'=>'310', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,23,277,23,321,68,321,68,277,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '312'
$floorItems['312'] = i
TkcText.new(w,45.5,299, 'text'=>'312', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,23,229,68,229,68,275,23,275,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '313'
$floorItems['313'] = i
TkcText.new(w,45.5,252, 'text'=>'313', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,68,227,23,227,23,180,68,180,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '314'
$floorItems['314'] = i
TkcText.new(w,40.5,203.5, 'text'=>'314', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,95,179,95,135,23,135,23,179,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '315'
$floorItems['315'] = i
TkcText.new(w,59,157, 'text'=>'315', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,99,226,99,204,91,204,91,226,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '316B'
$floorItems['316B'] = i
TkcText.new(w,95,215, 'text'=>'316B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,91,202,99,202,99,180,91,180,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '316A'
$floorItems['316A'] = i
TkcText.new(w,95,191, 'text'=>'316A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,97,169,109,169,109,192,154,192,154,198,
- 174,198,174,226,101,226,101,179,97,179,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 174,198,174,226,101,226,101,179,97,179,
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '319'
$floorItems['319'] = i
TkcText.new(w,141.5,209, 'text'=>'319', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,65,368,58,368,58,389,1,389,1,333,23,333,23,323,65,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '311'
$floorItems['311'] = i
TkcText.new(w,29.5,361, 'text'=>'311', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '318'
$floorItems['318'] = i
TkcText.new(w,132.5,180, 'text'=>'318', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '317'
$floorItems['317'] = i
TkcText.new(w,136,149.5, 'text'=>'317', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,274,194,274,221,306,221,306,194,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '323'
$floorItems['323'] = i
TkcText.new(w,290,207.5, 'text'=>'323', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,306,222,274,222,274,249,306,249,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '325'
$floorItems['325'] = i
TkcText.new(w,290,235.5, 'text'=>'325', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,263,179,224,179,224,135,263,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '321'
$floorItems['321'] = i
TkcText.new(w,243.5,157, 'text'=>'321', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,314,169,306,169,306,192,273,192,
- 264,181,264,135,314,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 264,181,264,135,314,135,
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '322'
$floorItems['322'] = i
TkcText.new(w,293.5,163.5, 'text'=>'322', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = 'Pub Lift3'
$floorItems['Pub Lift3'] = i
TkcText.new(w,323,223, 'text'=>'Pub Lift3', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = 'Priv Lift3'
$floorItems['Priv Lift3'] = i
TkcText.new(w,323,188, 'text'=>'Priv Lift3', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,350,284,376,284,376,276,397,276,397,309,350,309,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '303'
$floorItems['303'] = i
TkcText.new(w,373.5,292.5, 'text'=>'303', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,272,203,272,249,252,249,252,230,
- 244,230,244,221,252,221,252,203,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 244,230,244,221,252,221,252,203,
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '324'
$floorItems['324'] = i
TkcText.new(w,262,226, 'text'=>'324', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,299,276,299,327,349,327,349,284,341,284,341,276,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '304'
$floorItems['304'] = i
TkcText.new(w,324,301.5, 'text'=>'304', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '301'
$floorItems['301'] = i
TkcText.new(w,358,209, 'text'=>'301', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,397,246,377,246,377,185,397,185,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '327'
$floorItems['327'] = i
TkcText.new(w,387,215.5, 'text'=>'327', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,316,131,316,169,377,169,377,185,397,185,397,131,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '326'
$floorItems['326'] = i
TkcText.new(w,365.5,150, 'text'=>'326', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,308,251,242,251,242,274,342,274,342,282,375, 282,
- 375,274,397,274,397,248,339,248,339,242,308,242,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 375,274,397,274,397,248,339,248,339,242,308,242,
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '302'
$floorItems['302'] = i
TkcText.new(w,319.5,261, 'text'=>'302', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,70,321,242,321,242,200,259,200,259,203,272,203,
- 272,193,263,180,242,180,175,180,175,169,156,169,
- 156,196,177,196,177,228,107,228,70,228,70,275,107,275,
- 107,248,160,248,160,301,107,301,107,275,70,275,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 272,193,263,180,242,180,175,180,175,169,156,169,
+ 156,196,177,196,177,228,107,228,70,228,70,275,107,275,
+ 107,248,160,248,160,301,107,301,107,275,70,275,
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '306'
$floorItems['306'] = i
TkcText.new(w,200.5,284.5, 'text'=>'306', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
TkcLine.new(w,341,275,341,283, 'fill'=>color, 'tags'=>['floor3','wall'])
TkcLine.new(w,162,197,155,197, 'fill'=>color, 'tags'=>['floor3','wall'])
TkcLine.new(w,396,247,399,247, 'fill'=>color, 'tags'=>['floor3','wall'])
@@ -1588,7 +1588,7 @@ $floor_demo = TkToplevel.new {|w|
# label À¸À®
TkLabel.new($floor_demo, 'font'=>$font, 'wraplength'=>'8i', 'justify'=>'left',
- 'text'=>"¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤Ï¥Ç¥£¥¸¥¿¥ë¥¨¥¯¥¤¥Ã¥×¥á¥ó¥È¼Ò¤Î¥¦¥§¥¹¥¿¥ó¥ê¥µ¡¼¥Á¥é¥Ü¥é¥È¥ê (DECWRL) ¤Î´Ö¼è¤ê¤¬½ñ¤«¤ì¤¿¥­¥ã¥ó¥Ð¥¹ widget ¤¬Æþ¤Ã¤Æ¤¤¤Þ¤¹¡£¤³¤ì¤Ï 3³¬·ú¤Æ¤Ç¡¢¾ï¤Ë¤½¤Î¤¦¤Á¤Î1³¬Ê¬¤¬ÁªÂò¡¢¤Ä¤Þ¤ê¤½¤Î´Ö¼è¤ê¤¬É½¼¨¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£¤¢¤ë³¬¤òÁªÂò¤¹¤ë¤Ë¤Ï¡¢¤½¤Î¾å¤Ç¥Þ¥¦¥¹¤Îº¸¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£¥Þ¥¦¥¹¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤ë³¬¤Î¾å¤òÆ°¤¯¤È¡¢¤½¤Î²¼¤Ë¤¢¤ëÉô²°¤Î¿§¤¬ÊѤï¤ê¡¢Éô²°Èֹ椬¡ÖÉô²°ÈÖ¹æ:¡×¥¨¥ó¥È¥ê¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£¤Þ¤¿¡¢¥¨¥ó¥È¥ê¤ËÉô²°ÈÖ¹æ¤ò½ñ¤¯¤È¤½¤ÎÉô²°¤Î¿§¤¬ÊѤï¤ê¤Þ¤¹¡£"){
+ 'text'=>"¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤Ï¥Ç¥£¥¸¥¿¥ë¥¨¥¯¥¤¥Ã¥×¥á¥ó¥È¼Ò¤Î¥¦¥§¥¹¥¿¥ó¥ê¥µ¡¼¥Á¥é¥Ü¥é¥È¥ê (DECWRL) ¤Î´Ö¼è¤ê¤¬½ñ¤«¤ì¤¿¥­¥ã¥ó¥Ð¥¹ widget ¤¬Æþ¤Ã¤Æ¤¤¤Þ¤¹¡£¤³¤ì¤Ï 3³¬·ú¤Æ¤Ç¡¢¾ï¤Ë¤½¤Î¤¦¤Á¤Î1³¬Ê¬¤¬ÁªÂò¡¢¤Ä¤Þ¤ê¤½¤Î´Ö¼è¤ê¤¬É½¼¨¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£¤¢¤ë³¬¤òÁªÂò¤¹¤ë¤Ë¤Ï¡¢¤½¤Î¾å¤Ç¥Þ¥¦¥¹¤Îº¸¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£¥Þ¥¦¥¹¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤ë³¬¤Î¾å¤òÆ°¤¯¤È¡¢¤½¤Î²¼¤Ë¤¢¤ëÉô²°¤Î¿§¤¬ÊѤï¤ê¡¢Éô²°Èֹ椬¡ÖÉô²°ÈÖ¹æ:¡×¥¨¥ó¥È¥ê¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£¤Þ¤¿¡¢¥¨¥ó¥È¥ê¤ËÉô²°ÈÖ¹æ¤ò½ñ¤¯¤È¤½¤ÎÉô²°¤Î¿§¤¬ÊѤï¤ê¤Þ¤¹¡£"){
pack('side'=>'top')
}
@@ -1618,12 +1618,12 @@ $floorItems = {}
# canvas ÀßÄê
if $tk_version =~ /^4\.[01]/
$floor_canvas_frame = TkFrame.new($floor_demo,'bd'=>2,'relief'=>'sunken',
- 'highlightthickness'=>2)
+ 'highlightthickness'=>2)
$floor_canvas = TkCanvas.new($floor_canvas_frame,
- 'width'=>900, 'height'=>500, 'borderwidth'=>0,
- 'highlightthickness'=>0) {|c|
+ 'width'=>900, 'height'=>500, 'borderwidth'=>0,
+ 'highlightthickness'=>0) {|c|
TkScrollbar.new($floor_demo, 'orient'=>'horiz',
- 'command'=>proc{|*args| c.xview(*args)}){|hs|
+ 'command'=>proc{|*args| c.xview(*args)}){|hs|
c.xscrollcommand(proc{|first,last| hs.set first,last})
pack('side'=>'bottom', 'fill'=>'x')
}
@@ -1644,20 +1644,20 @@ else
TkFrame.new(f, 'bd'=>2, 'relief'=>'sunken') {|f1|
$floor_canvas = TkCanvas.new(f1, 'width'=>900, 'height'=>500,
- 'borderwidth'=>0,
- 'highlightthickness'=>0) {
- xscrollcommand(proc{|first,last| h.set first,last})
- yscrollcommand(proc{|first,last| v.set first,last})
- pack('expand'=>'yes', 'fill'=>'both')
+ 'borderwidth'=>0,
+ 'highlightthickness'=>0) {
+ xscrollcommand(proc{|first,last| h.set first,last})
+ yscrollcommand(proc{|first,last| v.set first,last})
+ pack('expand'=>'yes', 'fill'=>'both')
}
grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
}
v.grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
h.grid('padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
@@ -1674,7 +1674,7 @@ end
$currentRoom = TkVariable.new
$floor_entry = TkEntry.new($floor_canvas, 'width'=>10, 'relief'=>'sunken',
- 'bd'=>2, 'textvariable'=>$currentRoom)
+ 'bd'=>2, 'textvariable'=>$currentRoom)
# Choose colors, then fill in the floorplan.
@@ -1711,7 +1711,7 @@ $floor_canvas.itembind('room', 'Enter', proc{newRoom $floor_canvas})
$floor_canvas.itembind('room', 'Leave', proc{$currentRoom.value = ''})
$floor_canvas.bind('2', proc{|x,y| $floor_canvas.scan_mark x,y}, '%x %y')
$floor_canvas.bind('B2-Motion',
- proc{|x,y| $floor_canvas.scan_dragto x,y}, '%x %y')
+ proc{|x,y| $floor_canvas.scan_dragto x,y}, '%x %y')
$floor_canvas.bind('Destroy', proc{$currentRoom.unset})
$currentRoom.value = ''
$currentRoom.trace('w',proc{roomChanged $floor_canvas})
diff --git a/ext/tk/sample/demos-jp/floor2.rb b/ext/tk/sample/demos-jp/floor2.rb
index e5a8f53f2a..fcf208b61f 100644
--- a/ext/tk/sample/demos-jp/floor2.rb
+++ b/ext/tk/sample/demos-jp/floor2.rb
@@ -8,8 +8,8 @@
# visible.
#
# Arguments:
-# w - Name of the canvas window.
-# active - Number of active floor (1, 2, or 3).
+# w - Name of the canvas window.
+# active - Number of active floor (1, 2, or 3).
def floorDisplay2(w,active)
return if $activeFloor2 == active
@@ -59,7 +59,7 @@ end
# highlighted.
#
# Arguments:
-# w - The name of the canvas window.
+# w - The name of the canvas window.
def newRoom2(w)
id = w.find_withtag('current')[0]
@@ -72,8 +72,8 @@ end
# It highlights the current room and unhighlights any previous room.
#
# Arguments:
-# w - The canvas window displaying the floorplan.
-# args - Not used.
+# w - The canvas window displaying the floorplan.
+# args - Not used.
def roomChanged2(w,*args)
w.delete('highlight')
@@ -90,24 +90,24 @@ end
# floor.
#
# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
+# w - The canvas window.
+# fill - Fill color to use for the floor's background.
+# outline - Color to use for the floor's outline.
def floor2_bg1(w,fill,outline)
w.create(TkcPolygon,347,80,349,82,351,84,353,85,363,92,375,99,386,104,
- 386,129,398,129,398,162,484,162,484,129,559,129,559,133,725,
- 133,725,129,802,129,802,389,644,389,644,391,559,391,559,327,
- 508,327,508,311,484,311,484,278,395,278,395,288,400,288,404,
- 288,409,290,413,292,418,297,421,302,422,309,421,318,417,325,
- 411,330,405,332,397,333,344,333,340,334,336,336,335,338,332,
- 342,331,347,332,351,334,354,336,357,341,359,340,360,335,363,
- 331,365,326,366,304,366,304,355,258,355,258,387,60,387,60,391,
- 0,391,0,337,3,337,3,114,8,114,8,25,30,25,30,5,93,5,98,5,104,7,
- 110,10,116,16,119,20,122,28,123,32,123,68,220,68,220,34,221,
- 22,223,17,227,13,231,8,236,4,242,2,246,0,260,0,283,1,300,5,
- 321,14,335,22,348,25,365,29,363,39,358,48,352,56,337,70,
- 344,76,347,80, 'tags'=>['floor1','bg'], 'fill'=>fill)
+ 386,129,398,129,398,162,484,162,484,129,559,129,559,133,725,
+ 133,725,129,802,129,802,389,644,389,644,391,559,391,559,327,
+ 508,327,508,311,484,311,484,278,395,278,395,288,400,288,404,
+ 288,409,290,413,292,418,297,421,302,422,309,421,318,417,325,
+ 411,330,405,332,397,333,344,333,340,334,336,336,335,338,332,
+ 342,331,347,332,351,334,354,336,357,341,359,340,360,335,363,
+ 331,365,326,366,304,366,304,355,258,355,258,387,60,387,60,391,
+ 0,391,0,337,3,337,3,114,8,114,8,25,30,25,30,5,93,5,98,5,104,7,
+ 110,10,116,16,119,20,122,28,123,32,123,68,220,68,220,34,221,
+ 22,223,17,227,13,231,8,236,4,242,2,246,0,260,0,283,1,300,5,
+ 321,14,335,22,348,25,365,29,363,39,358,48,352,56,337,70,
+ 344,76,347,80, 'tags'=>['floor1','bg'], 'fill'=>fill)
w.create(TkcLine,386,129,398,129, 'fill'=>outline, 'tags'=>['floor1','bg'])
w.create(TkcLine,258,355,258,387, 'fill'=>outline, 'tags'=>['floor1','bg'])
w.create(TkcLine,60,387,60,391, 'fill'=>outline, 'tags'=>['floor1','bg'])
@@ -214,17 +214,17 @@ end
# floor.
#
# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
+# w - The canvas window.
+# fill - Fill color to use for the floor's background.
+# outline - Color to use for the floor's outline.
def floor2_bg2(w,fill,outline)
w.create(TkcPolygon,559,129,484,129,484,162,398,162,398,129,315,129,
- 315,133,176,133,176,129,96,129,96,133,3,133,3,339,0,339,0,391,
- 60,391,60,387,258,387,258,329,350,329,350,311,395,311,395,280,
- 484,280,484,311,508,311,508,327,558,327,558,391,644,391,644,
- 367,802,367,802,129,725,129,725,133,559,133,559,129,
- 'tags'=>['floor2','bg'], 'fill'=>fill)
+ 315,133,176,133,176,129,96,129,96,133,3,133,3,339,0,339,0,391,
+ 60,391,60,387,258,387,258,329,350,329,350,311,395,311,395,280,
+ 484,280,484,311,508,311,508,327,558,327,558,391,644,391,644,
+ 367,802,367,802,129,725,129,725,133,559,133,559,129,
+ 'tags'=>['floor2','bg'], 'fill'=>fill)
w.create(TkcLine,350,311,350,329, 'fill'=>outline, 'tags'=>['floor2','bg'])
w.create(TkcLine,398,129,398,162, 'fill'=>outline, 'tags'=>['floor2','bg'])
w.create(TkcLine,802,367,802,129, 'fill'=>outline, 'tags'=>['floor2','bg'])
@@ -269,17 +269,17 @@ end
# floor.
#
# Arguments:
-# w - The canvas window.
-# fill - Fill color to use for the floor's background.
-# outline - Color to use for the floor's outline.
+# w - The canvas window.
+# fill - Fill color to use for the floor's background.
+# outline - Color to use for the floor's outline.
def floor2_bg3(w,fill,outline)
w.create(TkcPolygon,159,300,107,300,107,248,159,248,159,129,96,129,96,
- 133,21,133,21,331,0,331,0,391,60,391,60,370,159,370,159,300,
- 'tags'=>['floor3','bg'], 'fill'=>fill)
+ 133,21,133,21,331,0,331,0,391,60,391,60,370,159,370,159,300,
+ 'tags'=>['floor3','bg'], 'fill'=>fill)
w.create(TkcPolygon,258,370,258,329,350,329,350,311,399,311,399,129,
- 315,129,315,133,176,133,176,129,159,129,159,370,258,370,
- 'tags'=>['floor3','bg'], 'fill'=>fill)
+ 315,129,315,133,176,133,176,129,159,129,159,370,258,370,
+ 'tags'=>['floor3','bg'], 'fill'=>fill)
w.create(TkcLine,96,133,96,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
w.create(TkcLine,176,129,96,129, 'fill'=>outline, 'tags'=>['floor3','bg'])
w.create(TkcLine,176,129,176,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
@@ -299,7 +299,7 @@ def floor2_bg3(w,fill,outline)
w.create(TkcLine,21,331,21,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
w.create(TkcLine,96,133,21,133, 'fill'=>outline, 'tags'=>['floor3','bg'])
w.create(TkcLine,107,300,159,300,159,248,107,248,107,300,
- 'fill'=>outline, 'tags'=>['floor3','bg'])
+ 'fill'=>outline, 'tags'=>['floor3','bg'])
end
# floor2_fg1 --
@@ -308,321 +308,321 @@ end
# floor (office outlines and numbers).
#
# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
+# w - The canvas window.
+# color - Color to use for drawing foreground information.
def floor2_fg1(w,color)
i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '101'
$floorItems2['101'] = i
w.create(TkcText,358,209, 'text'=>'101', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'Pub Lift1'
$floorItems2['Pub Lift1'] = i
w.create(TkcText,323,223, 'text'=>'Pub Lift1', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'Priv Lift1'
$floorItems2['Priv Lift1'] = i
w.create(TkcText,323,188, 'text'=>'Priv Lift1', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,42,389,42,337,1,337,1,389,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '110'
$floorItems2['110'] = i
w.create(TkcText,21.5,363, 'text'=>'110', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,59,389,59,385,90,385,90,337,44,337,44,389,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '109'
$floorItems2['109'] = i
w.create(TkcText,67,363, 'text'=>'109', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,51,300,51,253,6,253,6,300,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '111'
$floorItems2['111'] = i
w.create(TkcText,28.5,276.5, 'text'=>'111', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,98,248,98,309,79,309,79,248,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '117B'
$floorItems2['117B'] = i
w.create(TkcText,88.5,278.5, 'text'=>'117B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,51,251,51,204,6,204,6,251,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '112'
$floorItems2['112'] = i
w.create(TkcText,28.5,227.5, 'text'=>'112', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,6,156,51,156,51,203,6,203,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '113'
$floorItems2['113'] = i
w.create(TkcText,28.5,179.5, 'text'=>'113', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,85,169,79,169,79,192,85,192,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '117A'
$floorItems2['117A'] = i
w.create(TkcText,82,180.5, 'text'=>'117A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,77,302,77,168,53,168,53,302,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '117'
$floorItems2['117'] = i
w.create(TkcText,65,235, 'text'=>'117', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,51,155,51,115,6,115,6,155,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '114'
$floorItems2['114'] = i
w.create(TkcText,28.5,135, 'text'=>'114', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,95,115,53,115,53,168,95,168,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '115'
$floorItems2['115'] = i
w.create(TkcText,74,141.5, 'text'=>'115', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,87,113,87,27,10,27,10,113,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '116'
$floorItems2['116'] = i
w.create(TkcText,48.5,70, 'text'=>'116', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,89,91,128,91,128,113,89,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '118'
$floorItems2['118'] = i
w.create(TkcText,108.5,102, 'text'=>'118', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,178,128,178,132,216,132,216,91,
- 163,91,163,112,149,112,149,128,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 163,91,163,112,149,112,149,128,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '120'
$floorItems2['120'] = i
w.create(TkcText,189.5,111.5, 'text'=>'120', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,79,193,87,193,87,169,136,169,136,192,
- 156,192,156,169,175,169,175,246,79,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 156,192,156,169,175,169,175,246,79,246,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '122'
$floorItems2['122'] = i
w.create(TkcText,131,207.5, 'text'=>'122', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,138,169,154,169,154,191,138,191,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '121'
$floorItems2['121'] = i
w.create(TkcText,146,180, 'text'=>'121', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,99,300,126,300,126,309,99,309,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '106A'
$floorItems2['106A'] = i
w.create(TkcText,112.5,304.5, 'text'=>'106A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,128,299,128,309,150,309,150,248,99,248,99,299,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '105'
$floorItems2['105'] = i
w.create(TkcText,124.5,278.5, 'text'=>'105', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,174,309,174,300,152,300,152,309,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '106B'
$floorItems2['106B'] = i
w.create(TkcText,163,304.5, 'text'=>'106B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,176,299,176,309,216,309,216,248,152,248,152,299,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '104'
$floorItems2['104'] = i
w.create(TkcText,184,278.5, 'text'=>'104', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,138,385,138,337,91,337,91,385,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '108'
$floorItems2['108'] = i
w.create(TkcText,114.5,361, 'text'=>'108', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,256,337,140,337,140,385,256,385,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '107'
$floorItems2['107'] = i
w.create(TkcText,198,361, 'text'=>'107', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,300,353,300,329,260,329,260,353,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'Smoking'
$floorItems2['Smoking'] = i
w.create(TkcText,280,341, 'text'=>'Smoking', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,314,135,314,170,306,170,306,246,177,246,177,135,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '123'
$floorItems2['123'] = i
w.create(TkcText,245.5,190.5, 'text'=>'123', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,217,248,301,248,301,326,257,326,257,310,217,310,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '103'
$floorItems2['103'] = i
w.create(TkcText,259,287, 'text'=>'103', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,396,188,377,188,377,169,316,169,316,131,396,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '124'
$floorItems2['124'] = i
w.create(TkcText,356,150, 'text'=>'124', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,397,226,407,226,407,189,377,189,377,246,397,246,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '125'
$floorItems2['125'] = i
w.create(TkcText,392,217.5, 'text'=>'125', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,399,187,409,187,409,207,474,207,474,164,399,164,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '126'
$floorItems2['126'] = i
w.create(TkcText,436.5,185.5, 'text'=>'126', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,409,209,409,229,399,229,399,253,
- 486,253,486,239,474,239,474,209,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 486,253,486,239,474,239,474,209,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '127'
$floorItems2['127'] = i
w.create(TkcText,436.5,'231', 'text'=>'127', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,501,164,501,174,495,174,495,188,
- 490,188,490,204,476,204,476,164,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 490,188,490,204,476,204,476,164,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'MShower'
$floorItems2['MShower'] = i
w.create(TkcText,488.5,'184', 'text'=>'MShower', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,497,176,513,176,513,204,492,204,492,190,497,190,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'Closet'
$floorItems2['Closet'] = i
w.create(TkcText,502.5,190, 'text'=>'Closet', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,476,237,476,206,513,206,513,254,488,254,488,237,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'WShower'
$floorItems2['WShower'] = i
w.create(TkcText,494.5,230, 'text'=>'WShower', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,486,131,558,131,558,135,724,135,724,166,
- 697,166,697,275,553,275,531,254,515,254,
- 515,174,503,174,503,161,486,161,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 697,166,697,275,553,275,531,254,515,254,
+ 515,174,503,174,503,161,486,161,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '130'
$floorItems2['130'] = i
w.create(TkcText,638.5,205, 'text'=>'130', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,308,242,339,242,339,248,342,248,
- 342,246,397,246,397,276,393,276,
- 393,309,300,309,300,248,308,248,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 342,246,397,246,397,276,393,276,
+ 393,309,300,309,300,248,308,248,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '102'
$floorItems2['102'] = i
w.create(TkcText,367.5,278.5, 'text'=>'102', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,397,255,486,255,486,276,397,276,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '128'
$floorItems2['128'] = i
w.create(TkcText,441.5,265.5, 'text'=>'128', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,510,309,486,309,486,255,530,255,
- 552,277,561,277,561,325,510,325,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 552,277,561,277,561,325,510,325,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '129'
$floorItems2['129'] = i
w.create(TkcText,535.5,293, 'text'=>'129', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,696,281,740,281,740,387,642,387,
- 642,389,561,389,561,277,696,277,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 642,389,561,389,561,277,696,277,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '133'
$floorItems2['133'] = i
w.create(TkcText,628.5,335, 'text'=>'133', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,742,387,742,281,800,281,800,387,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '132'
$floorItems2['132'] = i
w.create(TkcText,771,334, 'text'=>'132', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,800,168,800,280,699,280,699,168,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '134'
$floorItems2['134'] = i
w.create(TkcText,749.5,224, 'text'=>'134', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,726,131,726,166,800,166,800,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '135'
$floorItems2['135'] = i
w.create(TkcText,763,148.5, 'text'=>'135', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,340,360,335,363,331,365,326,366,304,366,
- 304,312,396,312,396,288,400,288,404,288,
- 409,290,413,292,418,297,421,302,422,309,
- 421,318,417,325,411,330,405,332,397,333,
- 344,333,340,334,336,336,335,338,332,342,
- 331,347,332,351,334,354,336,357,341,359,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 304,312,396,312,396,288,400,288,404,288,
+ 409,290,413,292,418,297,421,302,422,309,
+ 421,318,417,325,411,330,405,332,397,333,
+ 344,333,340,334,336,336,335,338,332,342,
+ 331,347,332,351,334,354,336,357,341,359,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'Ramona Stair'
$floorItems2['Ramona Stair'] = i
w.create(TkcText,368,323, 'text'=>'Ramona Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,30,23,30,5,93,5,98,5,104,7,110,10,116,16,119,20,
- 122,28,123,32,123,68,220,68,220,87,90,87,90,23,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 122,28,123,32,123,68,220,68,220,87,90,87,90,23,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'University Stair'
$floorItems2['University Stair'] = i
w.create(TkcText,155,77.5, 'text'=>'University Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,282,37,295,40,312,49,323,56,337,70,352,56,
- 358,48,363,39,365,29,348,25,335,22,321,14,
- 300,5,283,1,260,0,246,0,242,2,236,4,231,8,
- 227,13,223,17,221,22,220,34,260,34,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 358,48,363,39,365,29,348,25,335,22,321,14,
+ 300,5,283,1,260,0,246,0,242,2,236,4,231,8,
+ 227,13,223,17,221,22,220,34,260,34,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'Plaza Stair'
$floorItems2['Plaza Stair'] = i
w.create(TkcText,317.5,28.5, 'text'=>'Plaza Stair', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,220,34,260,34,282,37,295,40,312,49,
- 323,56,337,70,350,83,365,94,377,100,
- 386,104,386,128,220,128,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 323,56,337,70,350,83,365,94,377,100,
+ 386,104,386,128,220,128,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'Plaza Deck'
$floorItems2['Plaza Deck'] = i
w.create(TkcText,303,81, 'text'=>'Plaza Deck', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,257,336,77,336,6,336,6,301,77,301,77,310,257,310,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '106'
$floorItems2['106'] = i
w.create(TkcText,131.5,318.5, 'text'=>'106', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
i = TkcPolygon.new(w,146,110,162,110,162,91,130,91,130,115,95,115,
- 95,128,114,128,114,151,157,151,157,153,112,153,
- 112,130,97,130,97,168,175,168,175,131,146,131,
- 'fill'=>'', 'tags'=>['floor1','room'])
+ 95,128,114,128,114,151,157,151,157,153,112,153,
+ 112,130,97,130,97,168,175,168,175,131,146,131,
+ 'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '119'
$floorItems2['119'] = i
w.create(TkcText,143.5,133, 'text'=>'119', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor1','label'])
+ 'anchor'=>'c', 'tags'=>['floor1','label'])
w.create(TkcLine,155,191,155,189, 'fill'=>color, 'tags'=>['floor1','wall'])
w.create(TkcLine,155,177,155,169, 'fill'=>color, 'tags'=>['floor1','wall'])
w.create(TkcLine,96,129,96,169, 'fill'=>color, 'tags'=>['floor1','wall'])
@@ -789,327 +789,327 @@ end
# floor (office outlines and numbers).
#
# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
+# w - The canvas window.
+# color - Color to use for drawing foreground information.
def floor2_fg2(w,color)
i = TkcPolygon.new(w,748,188,755,188,755,205,758,205,758,222,
- 800,222,800,168,748,168,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 800,222,800,168,748,168,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '238'
$floorItems2['238'] = i
w.create(TkcText,774,195, 'text'=>'238', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,726,188,746,188,746,166,800,166,800,131,726,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '237'
$floorItems2['237'] = i
w.create(TkcText,763,148.5, 'text'=>'237', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,497,187,497,204,559,204,559,324,641,324,
- 643,324,643,291,641,291,641,205,696,205,
- 696,291,694,291,694,314,715,314,715,291,
- 715,205,755,205,755,190,724,190,724,187,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 643,324,643,291,641,291,641,205,696,205,
+ 696,291,694,291,694,314,715,314,715,291,
+ 715,205,755,205,755,190,724,190,724,187,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '246'
$floorItems2['246'] = i
w.create(TkcText,600,264, 'text'=>'246', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,694,279,643,279,643,314,694,314,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '247'
$floorItems2['247'] = i
w.create(TkcText,668.5,296.5, 'text'=>'247', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,232,250,308,250,308,242,339,242,339,246,
- 397,246,397,255,476,255,476,250,482,250,559,250,
- 559,274,482,274,482,278,396,278,396,274,232,274,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 397,246,397,255,476,255,476,250,482,250,559,250,
+ 559,274,482,274,482,278,396,278,396,274,232,274,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '202'
$floorItems2['202'] = i
w.create(TkcText,285.5,260, 'text'=>'202', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,53,228,53,338,176,338,233,338,233,196,
- 306,196,306,180,175,180,175,169,156,169,
- 156,196,176,196,176,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 306,196,306,180,175,180,175,169,156,169,
+ 156,196,176,196,176,228,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '206'
$floorItems2['206'] = i
w.create(TkcText,143,267, 'text'=>'206', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,51,277,6,277,6,338,51,338,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '212'
$floorItems2['212'] = i
w.create(TkcText,28.5,307.5, 'text'=>'212', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,557,276,486,276,486,309,510,309,510,325,557,325,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '245'
$floorItems2['245'] = i
w.create(TkcText,521.5,300.5, 'text'=>'245', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,560,389,599,389,599,326,560,326,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '244'
$floorItems2['244'] = i
w.create(TkcText,579.5,357.5, 'text'=>'244', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,601,389,601,326,643,326,643,389,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '243'
$floorItems2['243'] = i
w.create(TkcText,622,357.5, 'text'=>'243', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,688,316,645,316,645,365,688,365,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '242'
$floorItems2['242'] = i
w.create(TkcText,666.5,340.5, 'text'=>'242', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,802,367,759,367,759,226,802,226,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = 'Barbecue Deck'
$floorItems2['Barbecue Deck'] = i
w.create(TkcText,780.5,296.5, 'text'=>'Barbecue Deck', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,755,262,755,314,717,314,717,262,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '240'
$floorItems2['240'] = i
w.create(TkcText,736,288, 'text'=>'240', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,755,316,689,316,689,365,755,365,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '241'
$floorItems2['241'] = i
w.create(TkcText,722,340.5, 'text'=>'241', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,755,206,717,206,717,261,755,261,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '239'
$floorItems2['239'] = i
w.create(TkcText,736,233.5, 'text'=>'239', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,695,277,643,277,643,206,695,206,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '248'
$floorItems2['248'] = i
w.create(TkcText,669,241.5, 'text'=>'248', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,676,135,676,185,724,185,724,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '236'
$floorItems2['236'] = i
w.create(TkcText,700,160, 'text'=>'236', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,675,135,635,135,635,145,628,145,628,185,675,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '235'
$floorItems2['235'] = i
w.create(TkcText,651.5,160, 'text'=>'235', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,626,143,633,143,633,135,572,135,
- 572,143,579,143,579,185,626,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 572,143,579,143,579,185,626,185,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '234'
$floorItems2['234'] = i
w.create(TkcText,606,160, 'text'=>'234', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,557,135,571,135,571,145,578,145,
- 578,185,527,185,527,131,557,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 578,185,527,185,527,131,557,131,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '233'
$floorItems2['233'] = i
w.create(TkcText,552.5,158, 'text'=>'233', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,476,249,557,249,557,205,476,205,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '230'
$floorItems2['230'] = i
w.create(TkcText,516.5,227, 'text'=>'230', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,476,164,486,164,486,131,525,131,525,185,476,185,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '232'
$floorItems2['232'] = i
w.create(TkcText,500.5,158, 'text'=>'232', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,476,186,495,186,495,204,476,204,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '229'
$floorItems2['229'] = i
w.create(TkcText,485.5,195, 'text'=>'229', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,474,207,409,207,409,187,399,187,399,164,474,164,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '227'
$floorItems2['227'] = i
w.create(TkcText,436.5,185.5, 'text'=>'227', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,399,228,399,253,474,253,474,209,409,209,409,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '228'
$floorItems2['228'] = i
w.create(TkcText,436.5,231, 'text'=>'228', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,397,246,397,226,407,226,407,189,377,189,377,246,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '226'
$floorItems2['226'] = i
w.create(TkcText,392,217.5, 'text'=>'226', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,377,169,316,169,316,131,397,131,397,188,377,188,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '225'
$floorItems2['225'] = i
w.create(TkcText,356.5,150, 'text'=>'225', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,234,198,306,198,306,249,234,249,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '224'
$floorItems2['224'] = i
w.create(TkcText,270,223.5, 'text'=>'224', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,270,179,306,179,306,170,314,170,314,135,270,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '223'
$floorItems2['223'] = i
w.create(TkcText,292,157, 'text'=>'223', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,268,179,221,179,221,135,268,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '222'
$floorItems2['222'] = i
w.create(TkcText,244.5,157, 'text'=>'222', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,177,179,219,179,219,135,177,135,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '221'
$floorItems2['221'] = i
w.create(TkcText,198,157, 'text'=>'221', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,299,327,349,327,349,284,341,284,341,276,299,276,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '204'
$floorItems2['204'] = i
w.create(TkcText,324,301.5, 'text'=>'204', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,234,276,297,276,297,327,257,327,257,338,234,338,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '205'
$floorItems2['205'] = i
w.create(TkcText,265.5,307, 'text'=>'205', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,256,385,256,340,212,340,212,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '207'
$floorItems2['207'] = i
w.create(TkcText,234,362.5, 'text'=>'207', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,210,340,164,340,164,385,210,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '208'
$floorItems2['208'] = i
w.create(TkcText,187,362.5, 'text'=>'208', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,115,340,162,340,162,385,115,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '209'
$floorItems2['209'] = i
w.create(TkcText,138.5,362.5, 'text'=>'209', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,89,228,89,156,53,156,53,228,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '217'
$floorItems2['217'] = i
w.create(TkcText,71,192, 'text'=>'217', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,89,169,97,169,97,190,89,190,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '217A'
$floorItems2['217A'] = i
w.create(TkcText,93,179.5, 'text'=>'217A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,89,156,89,168,95,168,95,135,53,135,53,156,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '216'
$floorItems2['216'] = i
w.create(TkcText,71,145.5, 'text'=>'216', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,51,179,51,135,6,135,6,179,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '215'
$floorItems2['215'] = i
w.create(TkcText,28.5,157, 'text'=>'215', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,51,227,6,227,6,180,51,180,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '214'
$floorItems2['214'] = i
w.create(TkcText,28.5,203.5, 'text'=>'214', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,51,275,6,275,6,229,51,229,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '213'
$floorItems2['213'] = i
w.create(TkcText,28.5,252, 'text'=>'213', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,114,340,67,340,67,385,114,385,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '210'
$floorItems2['210'] = i
w.create(TkcText,90.5,362.5, 'text'=>'210', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,59,389,59,385,65,385,65,340,1,340,1,389,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '211'
$floorItems2['211'] = i
w.create(TkcText,33,364.5, 'text'=>'211', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,393,309,350,309,350,282,342,282,342,276,393,276,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '203'
$floorItems2['203'] = i
w.create(TkcText,367.5,292.5, 'text'=>'203', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,99,191,91,191,91,226,174,226,174,198,
- 154,198,154,192,109,192,109,169,99,169,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 154,198,154,192,109,192,109,169,99,169,
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '220'
$floorItems2['220'] = i
w.create(TkcText,132.5,208.5, 'text'=>'220', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = 'Priv Lift2'
$floorItems2['Priv Lift2'] = i
w.create(TkcText,323,188, 'text'=>'Priv Lift2', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = 'Pub Lift 2'
$floorItems2['Pub Lift 2'] = i
w.create(TkcText,323,223, 'text'=>'Pub Lift 2', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '218'
$floorItems2['218'] = i
w.create(TkcText,136,149.5, 'text'=>'218', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '219'
$floorItems2['219'] = i
w.create(TkcText,132.5,180, 'text'=>'219', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor2','room'])
+ 'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '201'
$floorItems2['201'] = i
w.create(TkcText,358,209, 'text'=>'201', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor2','label'])
+ 'anchor'=>'c', 'tags'=>['floor2','label'])
w.create(TkcLine,641,186,678,186, 'fill'=>color, 'tags'=>['floor2','wall'])
w.create(TkcLine,757,350,757,367, 'fill'=>color, 'tags'=>['floor2','wall'])
w.create(TkcLine,634,133,634,144, 'fill'=>color, 'tags'=>['floor2','wall'])
@@ -1271,215 +1271,215 @@ end
# floor (office outlines and numbers).
#
# Arguments:
-# w - The canvas window.
-# color - Color to use for drawing foreground information.
+# w - The canvas window.
+# color - Color to use for drawing foreground information.
def floor2_fg3(w,color)
i = TkcPolygon.new(w,89,228,89,180,70,180,70,228,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '316'
$floorItems2['316'] = i
w.create(TkcText,79.5,204, 'text'=>'316', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,115,368,162,368,162,323,115,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '309'
$floorItems2['309'] = i
w.create(TkcText,138.5,345.5, 'text'=>'309', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,164,323,164,368,211,368,211,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '308'
$floorItems2['308'] = i
w.create(TkcText,187.5,345.5, 'text'=>'308', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,256,368,212,368,212,323,256,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '307'
$floorItems2['307'] = i
w.create(TkcText,234,345.5, 'text'=>'307', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,244,276,297,276,297,327,260,327,260,321,244,321,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '305'
$floorItems2['305'] = i
w.create(TkcText,270.5,301.5, 'text'=>'305', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,251,219,251,203,244,203,244,219,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '324B'
$floorItems2['324B'] = i
w.create(TkcText,247.5,211, 'text'=>'324B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,251,249,244,249,244,232,251,232,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '324A'
$floorItems2['324A'] = i
w.create(TkcText,247.5,240.5, 'text'=>'324A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,223,135,223,179,177,179,177,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '320'
$floorItems2['320'] = i
w.create(TkcText,200,157, 'text'=>'320', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,114,368,114,323,67,323,67,368,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '310'
$floorItems2['310'] = i
w.create(TkcText,90.5,345.5, 'text'=>'310', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,23,277,23,321,68,321,68,277,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '312'
$floorItems2['312'] = i
w.create(TkcText,45.5,299, 'text'=>'312', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,23,229,68,229,68,275,23,275,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '313'
$floorItems2['313'] = i
w.create(TkcText,45.5,252, 'text'=>'313', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,68,227,23,227,23,180,68,180,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '314'
$floorItems2['314'] = i
w.create(TkcText,40.5,203.5, 'text'=>'314', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,95,179,95,135,23,135,23,179,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '315'
$floorItems2['315'] = i
w.create(TkcText,59,157, 'text'=>'315', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,99,226,99,204,91,204,91,226,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '316B'
$floorItems2['316B'] = i
w.create(TkcText,95,215, 'text'=>'316B', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,91,202,99,202,99,180,91,180,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '316A'
$floorItems2['316A'] = i
w.create(TkcText,95,191, 'text'=>'316A', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,97,169,109,169,109,192,154,192,154,198,
- 174,198,174,226,101,226,101,179,97,179,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 174,198,174,226,101,226,101,179,97,179,
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '319'
$floorItems2['319'] = i
w.create(TkcText,141.5,209, 'text'=>'319', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,65,368,58,368,58,389,1,389,1,333,23,333,23,323,65,323,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '311'
$floorItems2['311'] = i
w.create(TkcText,29.5,361, 'text'=>'311', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '318'
$floorItems2['318'] = i
w.create(TkcText,132.5,180, 'text'=>'318', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '317'
$floorItems2['317'] = i
w.create(TkcText,136,149.5, 'text'=>'317', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,274,194,274,221,306,221,306,194,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '323'
$floorItems2['323'] = i
w.create(TkcText,290,207.5, 'text'=>'323', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,306,222,274,222,274,249,306,249,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '325'
$floorItems2['325'] = i
w.create(TkcText,290,235.5, 'text'=>'325', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,263,179,224,179,224,135,263,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '321'
$floorItems2['321'] = i
w.create(TkcText,243.5,157, 'text'=>'321', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,314,169,306,169,306,192,273,192,
- 264,181,264,135,314,135,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 264,181,264,135,314,135,
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '322'
$floorItems2['322'] = i
w.create(TkcText,293.5,163.5, 'text'=>'322', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = 'Pub Lift3'
$floorItems2['Pub Lift3'] = i
w.create(TkcText,323,223, 'text'=>'Pub Lift3', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = 'Priv Lift3'
$floorItems2['Priv Lift3'] = i
w.create(TkcText,323,188, 'text'=>'Priv Lift3', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,350,284,376,284,376,276,397,276,397,309,350,309,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '303'
$floorItems2['303'] = i
w.create(TkcText,373.5,292.5, 'text'=>'303', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,272,203,272,249,252,249,252,230,
- 244,230,244,221,252,221,252,203,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 244,230,244,221,252,221,252,203,
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '324'
$floorItems2['324'] = i
w.create(TkcText,262,226, 'text'=>'324', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,299,276,299,327,349,327,349,284,341,284,341,276,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '304'
$floorItems2['304'] = i
w.create(TkcText,324,301.5, 'text'=>'304', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '301'
$floorItems2['301'] = i
w.create(TkcText,358,209, 'text'=>'301', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,397,246,377,246,377,185,397,185,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '327'
$floorItems2['327'] = i
w.create(TkcText,387,215.5, 'text'=>'327', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,316,131,316,169,377,169,377,185,397,185,397,131,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '326'
$floorItems2['326'] = i
w.create(TkcText,365.5,150, 'text'=>'326', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,308,251,242,251,242,274,342,274,342,282,375, 282,
- 375,274,397,274,397,248,339,248,339,242,308,242,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 375,274,397,274,397,248,339,248,339,242,308,242,
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '302'
$floorItems2['302'] = i
w.create(TkcText,319.5,261, 'text'=>'302', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,70,321,242,321,242,200,259,200,259,203,272,203,
- 272,193,263,180,242,180,175,180,175,169,156,169,
- 156,196,177,196,177,228,107,228,70,228,70,275,107,275,
- 107,248,160,248,160,301,107,301,107,275,70,275,
- 'fill'=>'', 'tags'=>['floor3','room'])
+ 272,193,263,180,242,180,175,180,175,169,156,169,
+ 156,196,177,196,177,228,107,228,70,228,70,275,107,275,
+ 107,248,160,248,160,301,107,301,107,275,70,275,
+ 'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '306'
$floorItems2['306'] = i
w.create(TkcText,200.5,284.5, 'text'=>'306', 'fill'=>color,
- 'anchor'=>'c', 'tags'=>['floor3','label'])
+ 'anchor'=>'c', 'tags'=>['floor3','label'])
w.create(TkcLine,341,275,341,283, 'fill'=>color, 'tags'=>['floor3','wall'])
w.create(TkcLine,162,197,155,197, 'fill'=>color, 'tags'=>['floor3','wall'])
w.create(TkcLine,396,247,399,247, 'fill'=>color, 'tags'=>['floor3','wall'])
@@ -1588,7 +1588,7 @@ $floor2_demo = TkToplevel.new {|w|
# label À¸À®
TkLabel.new($floor2_demo, 'font'=>$font, 'wraplength'=>'8i', 'justify'=>'left',
- 'text'=>"¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤Ï¥Ç¥£¥¸¥¿¥ë¥¨¥¯¥¤¥Ã¥×¥á¥ó¥È¼Ò¤Î¥¦¥§¥¹¥¿¥ó¥ê¥µ¡¼¥Á¥é¥Ü¥é¥È¥ê (DECWRL) ¤Î´Ö¼è¤ê¤¬½ñ¤«¤ì¤¿¥­¥ã¥ó¥Ð¥¹ widget ¤¬Æþ¤Ã¤Æ¤¤¤Þ¤¹¡£¤³¤ì¤Ï 3³¬·ú¤Æ¤Ç¡¢¾ï¤Ë¤½¤Î¤¦¤Á¤Î1³¬Ê¬¤¬ÁªÂò¡¢¤Ä¤Þ¤ê¤½¤Î´Ö¼è¤ê¤¬É½¼¨¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£¤¢¤ë³¬¤òÁªÂò¤¹¤ë¤Ë¤Ï¡¢¤½¤Î¾å¤Ç¥Þ¥¦¥¹¤Îº¸¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£¥Þ¥¦¥¹¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤ë³¬¤Î¾å¤òÆ°¤¯¤È¡¢¤½¤Î²¼¤Ë¤¢¤ëÉô²°¤Î¿§¤¬ÊѤï¤ê¡¢Éô²°Èֹ椬¡ÖÉô²°ÈÖ¹æ:¡×¥¨¥ó¥È¥ê¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£¤Þ¤¿¡¢¥¨¥ó¥È¥ê¤ËÉô²°ÈÖ¹æ¤ò½ñ¤¯¤È¤½¤ÎÉô²°¤Î¿§¤¬ÊѤï¤ê¤Þ¤¹¡£"){
+ 'text'=>"¤³¤Î¥¦¥£¥ó¥É¥¦¤Ë¤Ï¥Ç¥£¥¸¥¿¥ë¥¨¥¯¥¤¥Ã¥×¥á¥ó¥È¼Ò¤Î¥¦¥§¥¹¥¿¥ó¥ê¥µ¡¼¥Á¥é¥Ü¥é¥È¥ê (DECWRL) ¤Î´Ö¼è¤ê¤¬½ñ¤«¤ì¤¿¥­¥ã¥ó¥Ð¥¹ widget ¤¬Æþ¤Ã¤Æ¤¤¤Þ¤¹¡£¤³¤ì¤Ï 3³¬·ú¤Æ¤Ç¡¢¾ï¤Ë¤½¤Î¤¦¤Á¤Î1³¬Ê¬¤¬ÁªÂò¡¢¤Ä¤Þ¤ê¤½¤Î´Ö¼è¤ê¤¬É½¼¨¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£¤¢¤ë³¬¤òÁªÂò¤¹¤ë¤Ë¤Ï¡¢¤½¤Î¾å¤Ç¥Þ¥¦¥¹¤Îº¸¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£¥Þ¥¦¥¹¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤ë³¬¤Î¾å¤òÆ°¤¯¤È¡¢¤½¤Î²¼¤Ë¤¢¤ëÉô²°¤Î¿§¤¬ÊѤï¤ê¡¢Éô²°Èֹ椬¡ÖÉô²°ÈÖ¹æ:¡×¥¨¥ó¥È¥ê¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£¤Þ¤¿¡¢¥¨¥ó¥È¥ê¤ËÉô²°ÈÖ¹æ¤ò½ñ¤¯¤È¤½¤ÎÉô²°¤Î¿§¤¬ÊѤï¤ê¤Þ¤¹¡£"){
pack('side'=>'top')
}
@@ -1618,12 +1618,12 @@ $floorItems2 = {}
# canvas ÀßÄê
if $tk_version =~ /^4\.[01]/
$floor2_canvas_frame = TkFrame.new($floor2_demo,'bd'=>2,'relief'=>'sunken',
- 'highlightthickness'=>2)
+ 'highlightthickness'=>2)
$floor2_canvas = TkCanvas.new($floor2_canvas_frame,
- 'width'=>900, 'height'=>500, 'borderwidth'=>0,
- 'highlightthickness'=>0) {|c|
+ 'width'=>900, 'height'=>500, 'borderwidth'=>0,
+ 'highlightthickness'=>0) {|c|
TkScrollbar.new($floor2_demo, 'orient'=>'horiz',
- 'command'=>proc{|*args| c.xview(*args)}){|hs|
+ 'command'=>proc{|*args| c.xview(*args)}){|hs|
c.xscrollcommand(proc{|first,last| hs.set first,last})
pack('side'=>'bottom', 'fill'=>'x')
}
@@ -1644,20 +1644,20 @@ else
TkFrame.new(f, 'bd'=>2, 'relief'=>'sunken') {|f1|
$floor2_canvas = TkCanvas.new(f1, 'width'=>900, 'height'=>500,
- 'borderwidth'=>0,
- 'highlightthickness'=>0) {
- xscrollcommand(proc{|first,last| h.set first,last})
- yscrollcommand(proc{|first,last| v.set first,last})
- pack('expand'=>'yes', 'fill'=>'both')
+ 'borderwidth'=>0,
+ 'highlightthickness'=>0) {
+ xscrollcommand(proc{|first,last| h.set first,last})
+ yscrollcommand(proc{|first,last| v.set first,last})
+ pack('expand'=>'yes', 'fill'=>'both')
}
grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
}
v.grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
h.grid('padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
@@ -1673,7 +1673,7 @@ end
$currentRoom2 = TkVariable.new
$floor2_entry = TkEntry.new($floor2_canvas, 'width'=>10, 'relief'=>'sunken',
- 'bd'=>2, 'textvariable'=>$currentRoom2)
+ 'bd'=>2, 'textvariable'=>$currentRoom2)
# Choose colors, then fill in the floorplan.
@@ -1710,7 +1710,7 @@ $floor2_canvas.itembind('room', 'Enter', proc{newRoom2 $floor2_canvas})
$floor2_canvas.itembind('room', 'Leave', proc{$currentRoom2.value = ''})
$floor2_canvas.bind('2', proc{|x,y| $floor2_canvas.scan_mark x,y}, '%x %y')
$floor2_canvas.bind('B2-Motion',
- proc{|x,y| $floor2_canvas.scan_dragto x,y}, '%x %y')
+ proc{|x,y| $floor2_canvas.scan_dragto x,y}, '%x %y')
$floor2_canvas.bind('Destroy', proc{$currentRoom2.unset})
$currentRoom2.value = ''
$currentRoom2.trace('w',proc{roomChanged2 $floor2_canvas})
diff --git a/ext/tk/sample/demos-jp/icon.rb b/ext/tk/sample/demos-jp/icon.rb
index 3180787dac..e4fef5cae7 100644
--- a/ext/tk/sample/demos-jp/icon.rb
+++ b/ext/tk/sample/demos-jp/icon.rb
@@ -47,14 +47,14 @@ TkFrame.new($icon_demo) {|frame|
flagup = \
TkBitmapImage.new('file'=>[$demo_dir,'..',
'images','flagup.xbm'].join(File::Separator),
- 'maskfile'=>\
- [$demo_dir,'..','images','flagup.xbm'].join(File::Separator))
+ 'maskfile'=>\
+ [$demo_dir,'..','images','flagup.xbm'].join(File::Separator))
flagdown = \
TkBitmapImage.new('file'=>[$demo_dir,'..',
'images','flagdown.xbm'].join(File::Separator),
- 'maskfile'=>\
- [$demo_dir,'..',
- 'images','flagdown.xbm'].join(File::Separator))
+ 'maskfile'=>\
+ [$demo_dir,'..',
+ 'images','flagdown.xbm'].join(File::Separator))
# ÊÑ¿ôÀ¸À®
letters = TkVariable.new
@@ -64,14 +64,14 @@ TkFrame.new($icon_demo, 'borderwidth'=>10){|w|
TkFrame.new(w) {|f|
TkRadioButton.new(f){
bitmap '@' + [$demo_dir,'..',
- 'images','letters.xbm'].join(File::Separator)
+ 'images','letters.xbm'].join(File::Separator)
variable letters
value 'full'
}.pack('side'=>'top', 'expand'=>'yes')
TkRadioButton.new(f){
bitmap '@' + [$demo_dir,'..',
- 'images','noletter.xbm'].join(File::Separator)
+ 'images','noletter.xbm'].join(File::Separator)
variable letters
value 'empty'
}.pack('side'=>'top', 'expand'=>'yes')
diff --git a/ext/tk/sample/demos-jp/image3.rb b/ext/tk/sample/demos-jp/image3.rb
index d42650f45f..549152514b 100644
--- a/ext/tk/sample/demos-jp/image3.rb
+++ b/ext/tk/sample/demos-jp/image3.rb
@@ -33,7 +33,7 @@ end
# listbox from the directory named in the demo's entry.
#
# Arguments:
-# w - Name of the toplevel window of the demo.
+# w - Name of the toplevel window of the demo.
def selectAndLoadDir3(w, lbox)
dir = Tk.chooseDirectory(:initialdir=>$dirName, :parent=>w, :mustexist=>true)
if dir.length > 0
@@ -91,11 +91,11 @@ image3_f = TkFrame.new($image3_demo).pack(:fill=>:both, :expand=>true)
image3_df = TkLabelFrame.new($image3_demo, :text=>'¥Ç¥£¥ì¥¯¥È¥ê:')
image3_ff = TkLabelFrame.new($image3_demo, :text=>'¥Õ¥¡¥¤¥ë:',
- :padx=>'2m', :pady=>'2m')
+ :padx=>'2m', :pady=>'2m')
image3_lbx = TkListbox.new(image3_ff, :width=>20, :height=>10) {
pack(:side=>:left, :fill=>:y, :expand=>true)
yscrollbar(TkScrollbar.new(image3_ff).pack(:side=>:left, :fill=>:y,
- :expand=>true))
+ :expand=>true))
insert(0, *(%w(earth.gif earthris.gif teapot.ppm)))
bind('Double-1', proc{|x,y| loadImage3(self, x, y)}, '%x %y')
}
@@ -106,7 +106,7 @@ image3_ent = TkEntry.new(image3_df, :width=>30, :textvariable=>$dirName){
}
TkButton.new(image3_df, :pady=>0, :padx=>'2m', :text=>"¥Ç¥£¥ì¥¯¥È¥êÁªÂò",
- :command=>proc{selectAndLoadDir3(image3_ent, image3_lbx)}) {
+ :command=>proc{selectAndLoadDir3(image3_ent, image3_lbx)}) {
pack(:side=>:left, :fill=>:y, :padx=>[0, '2m'], :pady=>'2m')
}
@@ -115,8 +115,8 @@ image3_if = TkLabelFrame.new($image3_demo, :text=>'¥¤¥á¡¼¥¸:') {|f|
}
Tk.grid(image3_df, '-',
- :sticky=>:ew, :padx=>'1m', :pady=>'1m', :in=>image3_f)
+ :sticky=>:ew, :padx=>'1m', :pady=>'1m', :in=>image3_f)
Tk.grid(image3_ff, image3_if,
- :sticky=>:nw, :padx=>'1m', :pady=>'1m', :in=>image3_f)
+ :sticky=>:nw, :padx=>'1m', :pady=>'1m', :in=>image3_f)
TkGrid.columnconfigure(image3_f, 1, :weight=>1)
diff --git a/ext/tk/sample/demos-jp/items.rb b/ext/tk/sample/demos-jp/items.rb
index 0dc604bb6b..38774d10d2 100644
--- a/ext/tk/sample/demos-jp/items.rb
+++ b/ext/tk/sample/demos-jp/items.rb
@@ -71,11 +71,11 @@ TkFrame.new($items_demo) {|cf|
else
c.grid('in'=>cf, 'row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
vs.grid('row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
hs.grid('row'=>1, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
TkGrid.rowconfigure(cf, 0, 'weight'=>1, 'minsize'=>0)
TkGrid.columnconfigure(cf, 0, 'weight'=>1, 'minsize'=>0)
@@ -111,126 +111,126 @@ $tag_item = TkcGroup.new(cvs)
# Set up demos within each of the areas of the grid.
TkcText.new(cvs, '5c', '.2c', 'text'=>'¥é¥¤¥ó', 'anchor'=>'n')
TkcLine.new(cvs, '1c', '1c', '3c', '1c', '1c', '4c', '3c', '4c',
- 'width'=>2, 'fill'=>blue, 'capstyle'=>'butt',
- 'join'=>'miter', 'tags'=>$tag_item )
+ 'width'=>2, 'fill'=>blue, 'capstyle'=>'butt',
+ 'join'=>'miter', 'tags'=>$tag_item )
TkcLine.new(cvs, '4.67c','1c','4.67c','4c', 'arrow'=>'last', 'tags'=>$tag_item)
TkcLine.new(cvs, '6.33c','1c','6.33c','4c', 'arrow'=>'both', 'tags'=>$tag_item)
TkcLine.new(cvs, '5c','6c','9c','6c','9c','1c','8c','1c','8c','4.8c','8.8c',
- '4.8c','8.8c','1.2c','8.2c','1.2c','8.2c','4.6c','8.6c','4.6c',
- '8.6c','1.4c','8.4c','1.4c','8.4c','4.4c',
- 'width'=>3, 'fill'=>red, 'tags'=>$tag_item )
+ '4.8c','8.8c','1.2c','8.2c','1.2c','8.2c','4.6c','8.6c','4.6c',
+ '8.6c','1.4c','8.4c','1.4c','8.4c','4.4c',
+ 'width'=>3, 'fill'=>red, 'tags'=>$tag_item )
TkcLine.new(cvs, '1c','5c','7c','5c','7c','7c','9c','7c', 'width'=>'.5c',
- 'stipple'=>'@'+[$demo_dir,'..',
- 'images','gray25.xbm'].join(File::Separator),
- 'arrow'=>'both', 'arrowshape'=>'15 15 7', 'tags'=>$tag_item )
+ 'stipple'=>'@'+[$demo_dir,'..',
+ 'images','gray25.xbm'].join(File::Separator),
+ 'arrow'=>'both', 'arrowshape'=>'15 15 7', 'tags'=>$tag_item )
TkcLine.new(cvs, '1c','7c','1.75c','5.8c','2.5c','7c','3.25c','5.8c','4c','7c',
- 'width'=>'.5c', 'capstyle'=>'round', 'join'=>'round',
- 'tags'=>$tag_item )
+ 'width'=>'.5c', 'capstyle'=>'round', 'join'=>'round',
+ 'tags'=>$tag_item )
TkcText.new(cvs, '15c', '.2c',
- 'text'=>'¶ÊÀþ (³ê¤é¤«¤Ë¤Ä¤Ê¤¤¤ÀľÀþ)', 'anchor'=>'n')
+ 'text'=>'¶ÊÀþ (³ê¤é¤«¤Ë¤Ä¤Ê¤¤¤ÀľÀþ)', 'anchor'=>'n')
TkcLine.new(cvs, '11c','4c','11.5c','1c','13.5c','1c','14c','4c',
- 'smooth'=>'on', 'fill'=>blue, 'tags'=>$tag_item )
+ 'smooth'=>'on', 'fill'=>blue, 'tags'=>$tag_item )
TkcLine.new(cvs, '15.5c','1c','19.5c','1.5c','15.5c','4.5c','19.5c','4c',
- 'smooth'=>'on', 'arrow'=>'both', 'width'=>3, 'tags'=>$tag_item )
+ 'smooth'=>'on', 'arrow'=>'both', 'width'=>3, 'tags'=>$tag_item )
TkcLine.new(cvs, '12c','6c','13.5c','4.5c','16.5c','7.5c','18c','6c',
- '16.5c','4.5c','13.5c','7.5c','12c','6c',
- 'smooth'=>'on', 'width'=>'3m', 'capstyle'=>'round',
- 'stipple'=>'@'+[$demo_dir, '..',
- 'images', 'gray25.xbm'].join(File::Separator),
- 'fill'=>red, 'tags'=>$tag_item )
+ '16.5c','4.5c','13.5c','7.5c','12c','6c',
+ 'smooth'=>'on', 'width'=>'3m', 'capstyle'=>'round',
+ 'stipple'=>'@'+[$demo_dir, '..',
+ 'images', 'gray25.xbm'].join(File::Separator),
+ 'fill'=>red, 'tags'=>$tag_item )
TkcText.new(cvs, '25c', '.2c', 'text'=>'¿³Ñ·Á', 'anchor'=>'n')
TkcPolygon.new(cvs, '21c','1.0c','22.5c','1.75c','24c','1.0c','23.25c','2.5c',
- '24c','4.0c','22.5c','3.25c','21c','4.0c','21.75c','2.5c',
- 'fill'=>'green', 'outline'=>'black', 'width'=>4,
- 'tags'=>$tag_item )
+ '24c','4.0c','22.5c','3.25c','21c','4.0c','21.75c','2.5c',
+ 'fill'=>'green', 'outline'=>'black', 'width'=>4,
+ 'tags'=>$tag_item )
TkcPolygon.new(cvs, '25c','4c','25c','4c','25c','1c','26c','1c','27c','4c',
- '28c','1c','29c','1c','29c','4c','29c','4c',
- 'fill'=>red, 'smooth'=>'on', 'tags'=> $tag_item)
+ '28c','1c','29c','1c','29c','4c','29c','4c',
+ 'fill'=>red, 'smooth'=>'on', 'tags'=> $tag_item)
TkcPolygon.new(cvs, '22c','4.5c','25c','4.5c','25c','6.75c','28c','6.75c',
- '28c','5.25c','24c','5.25c','24c','6.0c','26c','6c','26c',
- '7.5c','22c','7.5c',
- 'stipple'=>'@' + [$demo_dir, '..',
+ '28c','5.25c','24c','5.25c','24c','6.0c','26c','6c','26c',
+ '7.5c','22c','7.5c',
+ 'stipple'=>'@' + [$demo_dir, '..',
'images', 'gray25.xbm'].join(File::Separator),
- 'outline'=>'black', 'tags'=>$tag_item )
+ 'outline'=>'black', 'tags'=>$tag_item )
TkcText.new(cvs, '5c', '8.2c', 'text'=>'¶ë·Á', 'anchor'=>'n')
TkcRectangle.new(cvs, '1c','9.5c','4c','12.5c',
- 'outline'=>red, 'width'=>'3m', 'tags'=>$tag_item)
+ 'outline'=>red, 'width'=>'3m', 'tags'=>$tag_item)
TkcRectangle.new(cvs, '0.5c','13.5c','4.5c','15.5c',
- 'fill'=>green, 'tags'=>$tag_item )
+ 'fill'=>green, 'tags'=>$tag_item )
TkcRectangle.new(cvs, '6c','10c','9c','15c', 'outline'=>'',
- 'stipple'=>'@'+[$demo_dir,'..',
- 'images','gray25.xbm'].join(File::Separator),
- 'fill'=>blue, 'tags'=>$tag_item )
+ 'stipple'=>'@'+[$demo_dir,'..',
+ 'images','gray25.xbm'].join(File::Separator),
+ 'fill'=>blue, 'tags'=>$tag_item )
TkcText.new(cvs, '15c', '8.2c', 'text'=>'Âʱß', 'anchor'=>'n')
TkcOval.new(cvs, '11c','9.5c','14c','12.5c',
- 'outline'=>red, 'width'=>'3m', 'tags'=>$tag_item)
+ 'outline'=>red, 'width'=>'3m', 'tags'=>$tag_item)
TkcOval.new(cvs, '10.5c','13.5c','14.5c','15.5c',
- 'fill'=>green, 'tags'=>$tag_item )
+ 'fill'=>green, 'tags'=>$tag_item )
TkcOval.new(cvs, '16c','10c','19c','15c', 'outline'=>'',
- 'stipple'=>'@'+[$demo_dir,'..',
- 'images','gray25.xbm'].join(File::Separator),
- 'fill'=>blue, 'tags'=>$tag_item )
+ 'stipple'=>'@'+[$demo_dir,'..',
+ 'images','gray25.xbm'].join(File::Separator),
+ 'fill'=>blue, 'tags'=>$tag_item )
TkcText.new(cvs, '25c', '8.2c', 'text'=>'¥Æ¥­¥¹¥È', 'anchor'=>'n')
TkcRectangle.new(cvs, '22.4c','8.9c','22.6c','9.1c')
TkcText.new(cvs, '22.5c', '9c', 'anchor'=>'n', 'font'=>font1, 'width'=>'4c',
- 'text'=>'û¤¤¥Æ¥­¥¹¥È¡£¥ï¡¼¥É¥é¥Ã¥×¡¢º¸Â·¤¨¡¢¥¢¥ó¥«¡¼¤ÏËÌ(¾å)¡£¢¢¤Ï³Æ¥Æ¥­¥¹¥È¤Î¥¢¥ó¥«¡¼¥Ý¥¤¥ó¥È¤ò¼¨¤¹¡£', 'tags'=>$tag_item )
+ 'text'=>'û¤¤¥Æ¥­¥¹¥È¡£¥ï¡¼¥É¥é¥Ã¥×¡¢º¸Â·¤¨¡¢¥¢¥ó¥«¡¼¤ÏËÌ(¾å)¡£¢¢¤Ï³Æ¥Æ¥­¥¹¥È¤Î¥¢¥ó¥«¡¼¥Ý¥¤¥ó¥È¤ò¼¨¤¹¡£', 'tags'=>$tag_item )
TkcRectangle.new(cvs, '25.4c','10.9c','25.6c','11.1c')
TkcText.new(cvs, '25.5c', '11c', 'anchor'=>'w', 'font'=>font1, 'fill'=>blue,
- 'text'=>"¤¤¤¯¤Ä¤«¤Î¹Ô¡£\n¤½¤ì¤¾¤ìÆÈΩ¤Ë\n¹Ô·¤¨¡£\nÁ´¤Æº¸Ã¼¤¬¥¢¥ó¥«¡¼¤µ¤ì¤Æ¤¤¤ë¡£", 'justify'=>'center', 'tags'=>$tag_item )
+ 'text'=>"¤¤¤¯¤Ä¤«¤Î¹Ô¡£\n¤½¤ì¤¾¤ìÆÈΩ¤Ë\n¹Ô·¤¨¡£\nÁ´¤Æº¸Ã¼¤¬¥¢¥ó¥«¡¼¤µ¤ì¤Æ¤¤¤ë¡£", 'justify'=>'center', 'tags'=>$tag_item )
TkcRectangle.new(cvs, '24.9c','13.9c','25.1c','14.1c')
if $tk_version =~ /^4\.[01]/
TkcText.new(cvs, '25c', '14c', 'anchor'=>'c', 'font'=>font2, 'fill'=>red,
- 'stipple'=>'@' + [$demo_dir, '..',
+ 'stipple'=>'@' + [$demo_dir, '..',
'images', 'grey.5'].join(File::Separator),
- 'text'=>'Stippled characters', 'tags'=>$tag_item )
+ 'text'=>'Stippled characters', 'tags'=>$tag_item )
else
TkcText.new(cvs, '25c', '14c', 'anchor'=>'c', 'font'=>font2, 'fill'=>red,
- 'stipple'=>'gray50', 'text'=>'Stippled characters',
- 'tags'=>$tag_item )
+ 'stipple'=>'gray50', 'text'=>'Stippled characters',
+ 'tags'=>$tag_item )
end
TkcText.new(cvs, '5c', '16.2c', 'text'=>'¸Ì', 'anchor'=>'n')
TkcArc.new(cvs, '0.5c','17c','7c','20c', 'fill'=>green, 'outline'=>'black',
- 'start'=>45, 'extent'=>270, 'style'=>'pieslice', 'tags'=>$tag_item)
+ 'start'=>45, 'extent'=>270, 'style'=>'pieslice', 'tags'=>$tag_item)
#TkcArc.new(cvs, '6.5c','17c','9.5c','20c', 'width'=>'4m', 'style'=>'arc',
-# 'outline'=>blue, 'start'=>135, 'extent'=>270,
-# 'outlinestipple'=>'@' + ['images', 'grey.25'].join(File::Separator),
-# 'tags'=>$tag_item)
+# 'outline'=>blue, 'start'=>135, 'extent'=>270,
+# 'outlinestipple'=>'@' + ['images', 'grey.25'].join(File::Separator),
+# 'tags'=>$tag_item)
TkcArc.new(cvs, '6.5c','17c','9.5c','20c', 'width'=>'4m', 'style'=>'arc',
- 'outline'=>blue, 'start'=>135, 'extent'=>270,
- 'outlinestipple'=>'@'+[$demo_dir, '..',
+ 'outline'=>blue, 'start'=>135, 'extent'=>270,
+ 'outlinestipple'=>'@'+[$demo_dir, '..',
'images','gray25.xbm'].join(File::Separator),
- 'tags'=>$tag_item)
+ 'tags'=>$tag_item)
TkcArc.new(cvs, '0.5c','20c','9.5c','24c', 'width'=>'4m', 'style'=>'pieslice',
- 'fill'=>'', 'outline'=>red, 'start'=>225, 'extent'=>90,
- 'tags'=>$tag_item)
+ 'fill'=>'', 'outline'=>red, 'start'=>225, 'extent'=>90,
+ 'tags'=>$tag_item)
TkcArc.new(cvs, '5.5c','20.5c','9.5c','23.5c', 'width'=>'4m', 'style'=>'chord',
- 'fill'=>blue, 'outline'=>'', 'start'=>45, 'extent'=>270,
- 'tags'=>$tag_item)
+ 'fill'=>blue, 'outline'=>'', 'start'=>45, 'extent'=>270,
+ 'tags'=>$tag_item)
TkcText.new(cvs, '15c', '16.2c', 'text'=>'¥Ó¥Ã¥È¥Þ¥Ã¥×', 'anchor'=>'n')
#TkcBitmap.new(cvs, '13c','20c',
-# 'bitmap'=>'@' + ['images', 'face'].join(File::Separator),
-# 'tags'=>$tag_item)
+# 'bitmap'=>'@' + ['images', 'face'].join(File::Separator),
+# 'tags'=>$tag_item)
TkcBitmap.new(cvs, '13c','20c',
- 'bitmap'=>'@' + [$demo_dir, '..',
+ 'bitmap'=>'@' + [$demo_dir, '..',
'images', 'face.xbm'].join(File::Separator),
- 'tags'=>$tag_item)
+ 'tags'=>$tag_item)
#TkcBitmap.new(cvs, '17c','18.5c',
-# 'bitmap'=>'@' + ['images', 'noletters'].join(File::Separator),
-# 'tags'=>$tag_item)
+# 'bitmap'=>'@' + ['images', 'noletters'].join(File::Separator),
+# 'tags'=>$tag_item)
TkcBitmap.new(cvs, '17c','18.5c',
- 'bitmap'=>'@' + [$demo_dir, '..',
- 'images', 'noletter.xbm'].join(File::Separator),
- 'tags'=>$tag_item)
+ 'bitmap'=>'@' + [$demo_dir, '..',
+ 'images', 'noletter.xbm'].join(File::Separator),
+ 'tags'=>$tag_item)
#TkcBitmap.new(cvs, '17c','21.5c',
-# 'bitmap'=>'@' + ['images', 'letters'].join(File::Separator),
-# 'tags'=>$tag_item)
+# 'bitmap'=>'@' + ['images', 'letters'].join(File::Separator),
+# 'tags'=>$tag_item)
# ¢­¤Î·Á¼°¤Ç¤â²Äǽ
TkcBitmap.new(cvs, '17c','21.5c') {
bitmap '@' + [$demo_dir, '..', 'images', 'letters.xbm'].join(File::Separator)
@@ -246,17 +246,17 @@ TkButton.new(cvs) {|b|
text '²¡¤·¤Æ¤Í'
command proc{butPress cvs, red}
TkcWindow.new(cvs, '21c','18c',
- 'window'=>b, 'anchor'=>'nw', 'tags'=>$tag_item)
+ 'window'=>b, 'anchor'=>'nw', 'tags'=>$tag_item)
}
TkEntry.new(cvs, 'width'=>20, 'relief'=>'sunken') {|e|
insert 'end', 'ÊÔ½¸¤·¤Æ¤Í'
TkcWindow.new(cvs, '21c','21c',
- 'window'=>e, 'anchor'=>'nw', 'tags'=>$tag_item)
+ 'window'=>e, 'anchor'=>'nw', 'tags'=>$tag_item)
}
TkScale.new(cvs, 'from'=>0, 'to'=>100, 'length'=>'6c', 'sliderlength'=>'.4c',
- 'width'=>'.5c', 'tickinterval'=>0 ) {|scl|
+ 'width'=>'.5c', 'tickinterval'=>0 ) {|scl|
TkcWindow.new(cvs, '28.5c','17.5c',
- 'window'=>scl, 'anchor'=>'n', 'tags'=>$tag_item)
+ 'window'=>scl, 'anchor'=>'n', 'tags'=>$tag_item)
}
TkcText.new(cvs, '21c', '17.9c', 'text'=>'¥Ü¥¿¥ó:', 'anchor'=>'sw')
TkcText.new(cvs, '21c', '20.9c', 'text'=>'¥¨¥ó¥È¥ê:', 'anchor'=>'sw')
@@ -321,7 +321,7 @@ def itemStroke(c,x,y)
if $areaX1 != x && $areaY1 != y
c.delete 'area'
c.addtag_withtag 'area', TkcRectangle.new(c, $areaX1, $areaY1, x, y,
- '-outline', 'black')
+ '-outline', 'black')
$areaX2 = x
$areaY2 = y
end
@@ -366,6 +366,6 @@ end
def butPress(w,color)
i = TkcText.new(w, '25c', '18.1c',
- 'text'=>'¤¤¤Æ¤Æ!!', 'fill'=>color, 'anchor'=>'n')
+ 'text'=>'¤¤¤Æ¤Æ!!', 'fill'=>color, 'anchor'=>'n')
Tk.after(500, proc{w.delete i})
end
diff --git a/ext/tk/sample/demos-jp/label.rb b/ext/tk/sample/demos-jp/label.rb
index 425654216c..59626289fc 100644
--- a/ext/tk/sample/demos-jp/label.rb
+++ b/ext/tk/sample/demos-jp/label.rb
@@ -47,12 +47,12 @@ TkFrame.new($label_demo) {|frame|
f_left = TkFrame.new($label_demo)
f_right = TkFrame.new($label_demo)
[f_left, f_right].each{|w| w.pack('side'=>'left', 'expand'=>'yes',
- 'padx'=>10, 'pady'=>10, 'fill'=>'both')}
+ 'padx'=>10, 'pady'=>10, 'fill'=>'both')}
# label À¸À®
[ TkLabel.new(f_left, 'text'=>'ºÇ½é¤Î¥é¥Ù¥ë'),
TkLabel.new(f_left, 'text'=>'2 ÈÖÌÜ¡£¤Á¤ç¤Ã¤ÈÉ⤭¾å¤¬¤é¤»¤Æ¤ß¤Þ¤·¤¿',
- 'relief'=>'raised'),
+ 'relief'=>'raised'),
TkLabel.new(f_left, 'text'=>'3 ÈÖÌÜ¡£ÄÀ¤ó¤Ç¤¤¤Þ¤¹ ', 'relief'=>'sunken')
].each{|w| w.pack('side'=>'top', 'expand'=>'yes', 'pady'=>2, 'anchor'=>'w')}
diff --git a/ext/tk/sample/demos-jp/labelframe.rb b/ext/tk/sample/demos-jp/labelframe.rb
index 8f76ffacfb..23c974dcc2 100644
--- a/ext/tk/sample/demos-jp/labelframe.rb
+++ b/ext/tk/sample/demos-jp/labelframe.rb
@@ -19,8 +19,8 @@ $labelframe_demo = TkToplevel.new {|w|
# Some information
TkLabel.new($labelframe_demo,
- :font=>$font, :wraplength=>'4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
+ :font=>$font, :wraplength=>'4i', :justify=>:left,
+ :text=><<EOL).pack(:side=>:top)
TkLabelFrame ¥¦¥£¥¸¥§¥Ã¥È¤Ï´ØÏ¢¤¹¤ë widget
·²¤ò¤Þ¤È¤á¤Æ¼è¤ê°·¤¦¤¿¤á¤ËÍѤ¤¤é¤ì¤Þ¤¹¡£¥é
¥Ù¥ë¤ÏÄ̾ï¤Îʸ»úÎó¤Ç¤â²¿¤é¤«¤Î¥¦¥£¥¸¥§¥Ã¥È
@@ -38,28 +38,28 @@ TkFrame.new($labelframe_demo){|f|
pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
TkButton.new(f, :text=>'ÊĤ¸¤ë', :width=>15, :command=>proc{
- $labelframe_demo.destroy
- $labelframe_demo = nil
- }).pack(:side=>:left, :expand=>true)
+ $labelframe_demo.destroy
+ $labelframe_demo = nil
+ }).pack(:side=>:left, :expand=>true)
TkButton.new(f, :text=>'¥³¡¼¥É»²¾È', :width=>15, :command=>proc{
- showCode 'labelframe'
- }).pack(:side=>:left, :expand=>true)
+ showCode 'labelframe'
+ }).pack(:side=>:left, :expand=>true)
}
# Demo area
w = TkFrame.new($labelframe_demo).pack(:side=>:bottom, :fill=>:both,
- :expand=>true)
+ :expand=>true)
# A group of radiobuttons in a labelframe
TkLabelFrame.new(w, :text=>'ÁªÂòÃÍ',
- :padx=>2, :pady=>2) {|f|
+ :padx=>2, :pady=>2) {|f|
grid(:row=>0, :column=>0, :pady=>'2m', :padx=>'2m')
v = TkVariable.new
(1..4).each{|i|
TkRadiobutton.new(f, :text=>"This is value #{i}",
- :variable=>v, :value=>i) {
+ :variable=>v, :value=>i) {
pack(:side=>:top, :fill=>:x, :pady=>2)
}
}
@@ -82,7 +82,7 @@ end
TkLabelFrame.new(w, :pady=>2, :padx=>2){|f|
TkCheckButton.new(f, :widgetname=>'cb', :variable=>$lfdummy,
- :text=>"¥ª¥×¥·¥ç¥ó¤ò»ÈÍÑ", :padx=>0) {|cb|
+ :text=>"¥ª¥×¥·¥ç¥ó¤ò»ÈÍÑ", :padx=>0) {|cb|
command proc{lfEnableButtons(f)}
f.labelwidget(cb)
}
diff --git a/ext/tk/sample/demos-jp/menu.rb b/ext/tk/sample/demos-jp/menu.rb
index 79d5b3d4ca..50152cead3 100644
--- a/ext/tk/sample/demos-jp/menu.rb
+++ b/ext/tk/sample/demos-jp/menu.rb
@@ -79,8 +79,8 @@ TkMenubutton.new($menu_frame, 'text'=>'Basic', 'underline'=>0) {|m|
['A','B','C','D','E','F','G'].each{|c|
# add('command', 'label'=>"ʸ»ú \"#{c}\" ¤ò°õ»ú", 'underline'=>4,
add('command', 'label'=>"Print letter \"#{c}\" (ʸ»ú \"#{c}\" ¤ò°õ»ú)",
- 'underline'=>14, 'accelerator'=>"Meta+#{c}",
- 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
+ 'underline'=>14, 'accelerator'=>"Meta+#{c}",
+ 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
$menu_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"})
}
}
@@ -91,17 +91,17 @@ TkMenubutton.new($menu_frame, 'text'=>'Cascades', 'underline'=>0) {|m|
TkMenu.new(m, 'tearoff'=>false) {|cascade_menu|
m.configure('menu'=>cascade_menu)
add('command', 'label'=>'Print hello(¤³¤ó¤Ë¤Á¤Ï)',
- 'command'=>proc{print "Hello(¤³¤ó¤Ë¤Á¤Ï)\n"},
- 'accelerator'=>"#{modifier}+H", 'underline'=>6)
+ 'command'=>proc{print "Hello(¤³¤ó¤Ë¤Á¤Ï)\n"},
+ 'accelerator'=>"#{modifier}+H", 'underline'=>6)
$menu_demo.bind("#{modifier}-h", proc{print "Hello(¤³¤ó¤Ë¤Á¤Ï)\n"})
add('command', 'label'=>'Print goodbye(¤µ¤è¤¦¤Ê¤é)',
- 'command'=>proc{print "Goodbye(¤µ¤è¤¦¤Ê¤é)\n"},
- 'accelerator'=>"#{modifier}+G", 'underline'=>6)
+ 'command'=>proc{print "Goodbye(¤µ¤è¤¦¤Ê¤é)\n"},
+ 'accelerator'=>"#{modifier}+G", 'underline'=>6)
$menu_demo.bind("#{modifier}-g", proc{print "Goodbye(¤µ¤è¤¦¤Ê¤é)\n"})
TkMenu.new(m, 'tearoff'=>false) {|cascade_check|
cascade_menu.add('cascade', 'label'=>'Check buttons(¥Á¥§¥Ã¥¯¥Ü¥¿¥ó)',
- 'menu'=>cascade_check, 'underline'=>0)
+ 'menu'=>cascade_check, 'underline'=>0)
oil = TkVariable.new(0)
add('check', 'label'=>'¥ª¥¤¥ëÅÀ¸¡', 'variable'=>oil)
trans = TkVariable.new(0)
@@ -112,18 +112,18 @@ TkMenubutton.new($menu_frame, 'text'=>'Cascades', 'underline'=>0) {|m|
add('check', 'label'=>'¥é¥¤¥ÈÅÀ¸¡', 'variable'=>lights)
add('separator')
add('command', 'label'=>'¸½ºß¤ÎÃͤòɽ¼¨',
- 'command'=>proc{showVars($menu_demo,
- ['¥ª¥¤¥ëÅÀ¸¡', oil],
- ['¥È¥é¥ó¥¹¥ß¥Ã¥·¥ç¥óÅÀ¸¡', trans],
- ['¥Ö¥ì¡¼¥­ÅÀ¸¡', brakes],
- ['¥é¥¤¥ÈÅÀ¸¡', lights])} )
+ 'command'=>proc{showVars($menu_demo,
+ ['¥ª¥¤¥ëÅÀ¸¡', oil],
+ ['¥È¥é¥ó¥¹¥ß¥Ã¥·¥ç¥óÅÀ¸¡', trans],
+ ['¥Ö¥ì¡¼¥­ÅÀ¸¡', brakes],
+ ['¥é¥¤¥ÈÅÀ¸¡', lights])} )
invoke 1
invoke 3
}
TkMenu.new(m, 'tearoff'=>false) {|cascade_radio|
cascade_menu.add('cascade', 'label'=>'Radio buttons(¥é¥¸¥ª¥Ü¥¿¥ó)',
- 'menu'=>cascade_radio, 'underline'=>0)
+ 'menu'=>cascade_radio, 'underline'=>0)
pointSize = TkVariable.new
add('radio', 'label'=>'10 ¥Ý¥¤¥ó¥È', 'variable'=>pointSize, 'value'=>10)
add('radio', 'label'=>'14 ¥Ý¥¤¥ó¥È', 'variable'=>pointSize, 'value'=>14)
@@ -137,9 +137,9 @@ TkMenubutton.new($menu_frame, 'text'=>'Cascades', 'underline'=>0) {|m|
add('radio', 'label'=>'¥¤¥¿¥ê¥Ã¥¯', 'variable'=>style, 'value'=>'italic')
add('separator')
add('command', 'label'=>'¸½ºß¤ÎÃͤòɽ¼¨',
- 'command'=>proc{showVars($menu_demo,
- ['¥Ý¥¤¥ó¥È¥µ¥¤¥º', pointSize],
- ['¥¹¥¿¥¤¥ë', style])} )
+ 'command'=>proc{showVars($menu_demo,
+ ['¥Ý¥¤¥ó¥È¥µ¥¤¥º', pointSize],
+ ['¥¹¥¿¥¤¥ë', style])} )
invoke 1
invoke 7
}
@@ -151,15 +151,15 @@ TkMenubutton.new($menu_frame, 'text'=>'Icons', 'underline'=>0) {|m|
TkMenu.new(m, 'tearoff'=>false) {|icon_menu|
m.configure('menu'=>icon_menu)
add('command',
- 'bitmap'=>'@'+[$demo_dir,'..',
- 'images','pattern.xbm'].join(File::Separator),
- 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry',
- 'text'=>'º£¤¢¤Ê¤¿¤¬ÁªÂò¤·¤¿¥á¥Ë¥å¡¼¤Î¹àÌܤϥƥ­¥¹¥È¤Ç¤Ï¤Ê¤¯¥Ó¥Ã¥È¥Þ¥Ã¥×¤òɽ¼¨¤·¤Æ¤¤¤Þ¤·¤¿¡£¤½¤ì°Ê³°¤ÎÅÀ¤Ç¤Ï¾¤Î¥á¥Ë¥å¡¼¹àÌܤÈÊѤï¤ê¤Þ¤»¤ó¡£',
- 'bitmap'=>'', 'default'=>0,
- 'buttons'=>'λ²ò')} )
+ 'bitmap'=>'@'+[$demo_dir,'..',
+ 'images','pattern.xbm'].join(File::Separator),
+ 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry',
+ 'text'=>'º£¤¢¤Ê¤¿¤¬ÁªÂò¤·¤¿¥á¥Ë¥å¡¼¤Î¹àÌܤϥƥ­¥¹¥È¤Ç¤Ï¤Ê¤¯¥Ó¥Ã¥È¥Þ¥Ã¥×¤òɽ¼¨¤·¤Æ¤¤¤Þ¤·¤¿¡£¤½¤ì°Ê³°¤ÎÅÀ¤Ç¤Ï¾¤Î¥á¥Ë¥å¡¼¹àÌܤÈÊѤï¤ê¤Þ¤»¤ó¡£',
+ 'bitmap'=>'', 'default'=>0,
+ 'buttons'=>'λ²ò')} )
['info', 'questhead', 'error'].each{|icon|
add('command', 'bitmap'=>icon,
- 'command'=>proc{print "You invoked the #{icon} bitmap\n"})
+ 'command'=>proc{print "You invoked the #{icon} bitmap\n"})
}
}
}
@@ -171,7 +171,7 @@ TkMenubutton.new($menu_frame, 'text'=>'More', 'underline'=>0) {|m|
[ '¥¨¥ó¥È¥ê','Ê̤Υ¨¥ó¥È¥ê','²¿¤â¤·¤Ê¤¤','¤Û¤È¤ó¤É²¿¤â¤·¤Ê¤¤',
'¿ÍÀ¸¤ò°ÕµÁ¤¢¤ë¤â¤Î¤Ë' ].each{|i|
add('command', 'label'=>i,
- 'command'=>proc{print "You invoked \"#{i}\"\n"})
+ 'command'=>proc{print "You invoked \"#{i}\"\n"})
}
}
}
@@ -182,7 +182,7 @@ TkMenubutton.new($menu_frame, 'text'=>'Colors', 'underline'=>0) {|m|
m.configure('menu'=>colors_menu)
['red', 'orange', 'yellow', 'green', 'blue'].each{|c|
add('command', 'label'=>c, 'background'=>c,
- 'command'=>proc{print "You invoked \"#{c}\"\n"})
+ 'command'=>proc{print "You invoked \"#{c}\"\n"})
}
}
}
diff --git a/ext/tk/sample/demos-jp/menu84.rb b/ext/tk/sample/demos-jp/menu84.rb
index 78d4e68872..8c2a815d78 100644
--- a/ext/tk/sample/demos-jp/menu84.rb
+++ b/ext/tk/sample/demos-jp/menu84.rb
@@ -35,9 +35,9 @@ TkLabel.new($menu84_demo,'font'=>$font,'wraplength'=>'4i','justify'=>'left') {
menustatus = TkVariable.new(" ")
TkFrame.new($menu84_demo) {|frame|
TkLabel.new(frame, 'textvariable'=>menustatus, 'relief'=>'sunken',
- 'bd'=>1, 'font'=>['Helvetica', '10'],
- 'anchor'=>'w').pack('side'=>'left', 'padx'=>2,
- 'expand'=>true, 'fill'=>'both')
+ 'bd'=>1, 'font'=>['Helvetica', '10'],
+ 'anchor'=>'w').pack('side'=>'left', 'padx'=>2,
+ 'expand'=>true, 'fill'=>'both')
pack('side'=>'bottom', 'fill'=>'x', 'pady'=>2)
}
@@ -92,8 +92,8 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
add('command', 'label'=>'Long entry that does nothing')
['A','B','C','D','E','F','G'].each{|c|
add('command', 'label'=>"Print letter \"#{c}\"",
- 'underline'=>14, 'accelerator'=>"Meta+#{c}",
- 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
+ 'underline'=>14, 'accelerator'=>"Meta+#{c}",
+ 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
$menu84_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"})
}
}
@@ -111,7 +111,7 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
TkMenu.new(m, 'tearoff'=>false) {|cascade_check|
m.add('cascade', 'label'=>'Check button',
- 'menu'=>cascade_check, 'underline'=>0)
+ 'menu'=>cascade_check, 'underline'=>0)
oil = TkVariable.new(0)
add('check', 'label'=>'¥ª¥¤¥ë¸¡ºº', 'variable'=>oil)
trans = TkVariable.new(0)
@@ -122,18 +122,18 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
add('check', 'label'=>'¥é¥¤¥È¸¡ºº', 'variable'=>lights)
add('separator')
add('command', 'label'=>'Show current values',
- 'command'=>proc{showVars($menu84_demo,
- ['¥ª¥¤¥ë', oil],
- ['¥È¥é¥ó¥¹¥ß¥Ã¥·¥ç¥ó', trans],
- ['¥Ö¥ì¡¼¥­', brakes],
- ['¥é¥¤¥È', lights])} )
+ 'command'=>proc{showVars($menu84_demo,
+ ['¥ª¥¤¥ë', oil],
+ ['¥È¥é¥ó¥¹¥ß¥Ã¥·¥ç¥ó', trans],
+ ['¥Ö¥ì¡¼¥­', brakes],
+ ['¥é¥¤¥È', lights])} )
invoke 1
invoke 3
}
TkMenu.new(m, 'tearoff'=>false) {|cascade_radio|
m.add('cascade', 'label'=>'Radio buttons',
- 'menu'=>cascade_radio, 'underline'=>0)
+ 'menu'=>cascade_radio, 'underline'=>0)
pointSize = TkVariable.new
add('radio', 'label'=>'10 point', 'variable'=>pointSize, 'value'=>10)
add('radio', 'label'=>'14 point', 'variable'=>pointSize, 'value'=>14)
@@ -147,9 +147,9 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
add('radio', 'label'=>'Italic', 'variable'=>style, 'value'=>'italic')
add('separator')
add('command', 'label'=>'¸½ºßÃͤÎɽ¼¨',
- 'command'=>proc{showVars($menu84_demo,
- ['pointSize', pointSize],
- ['style', style])} )
+ 'command'=>proc{showVars($menu84_demo,
+ ['pointSize', pointSize],
+ ['style', style])} )
invoke 1
invoke 7
}
@@ -159,14 +159,14 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
$menu84_frame.add('cascade', 'label'=>'Icons', 'menu'=>m, 'underline'=>0)
add('command', 'hidemargin'=>1,
'bitmap'=>'@'+[$demo_dir,'..',
- 'images','pattern.xbm'].join(File::Separator),
+ 'images','pattern.xbm'].join(File::Separator),
'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry',
- 'text'=>'¤¢¤Ê¤¿¤¬ÁªÂò¤·¤¿¥á¥Ë¥å¡¼¹àÌܤϡ¢Ê¸»úÎó¤ÎÂå¤ï¤ê¤Ë¥Ó¥Ã¥È¥Þ¥Ã¥×¥¤¥á¡¼¥¸¤Ç¹àÌܤòɽ¼¨¤·¤¿¤â¤Î¤Ç¤¹¡£¤½¤ì°Ê³°¤ÎÅÀ¤Ç¤Ï¡¢¤Û¤«¤Î¥á¥Ë¥å¡¼¹àÌܤȤδ֤ÇÆä˰㤤¤¬¤¢¤ë¤ï¤±¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£',
- 'bitmap'=>'', 'default'=>0,
- 'buttons'=>'ÊĤ¸¤ë')} )
+ 'text'=>'¤¢¤Ê¤¿¤¬ÁªÂò¤·¤¿¥á¥Ë¥å¡¼¹àÌܤϡ¢Ê¸»úÎó¤ÎÂå¤ï¤ê¤Ë¥Ó¥Ã¥È¥Þ¥Ã¥×¥¤¥á¡¼¥¸¤Ç¹àÌܤòɽ¼¨¤·¤¿¤â¤Î¤Ç¤¹¡£¤½¤ì°Ê³°¤ÎÅÀ¤Ç¤Ï¡¢¤Û¤«¤Î¥á¥Ë¥å¡¼¹àÌܤȤδ֤ÇÆä˰㤤¤¬¤¢¤ë¤ï¤±¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£',
+ 'bitmap'=>'', 'default'=>0,
+ 'buttons'=>'ÊĤ¸¤ë')} )
['info', 'questhead', 'error'].each{|icon|
add('command', 'bitmap'=>icon, 'hidemargin'=>1,
- 'command'=>proc{print "You invoked the #{icon} bitmap\n"})
+ 'command'=>proc{print "You invoked the #{icon} bitmap\n"})
}
entryconfigure(2, :columnbreak=>true)
@@ -177,34 +177,34 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
[ 'An entry','Another entry','Does nothing','Does almost nothing',
'Make life meaningful' ].each{|i|
add('command', 'label'=>i,
- 'command'=>proc{print "You invoked \"#{i}\"\n"})
+ 'command'=>proc{print "You invoked \"#{i}\"\n"})
}
m.entryconfigure('Does almost nothing',
- 'bitmap'=>'questhead', 'compound'=>'left',
- 'command'=>proc{
- TkDialog.new('title'=>'Compound Menu Entry',
- 'message'=>'¤¢¤Ê¤¿¤¬ÁªÂò¤·¤¿¥á¥Ë¥å¡¼¹àÌܤϡ¢¥Ó¥Ã¥È¥Þ¥Ã¥×¥¤¥á¡¼¥¸¤Èʸ»úÎó¤È¤òƱ»þ¤Ë°ì¤Ä¤Î¹àÌܤËɽ¼¨¤¹¤ë¤è¤¦¤Ë¤·¤¿¤â¤Î¤Ç¤¹¡£¤½¤ì°Ê³°¤ÎÅÀ¤Ç¤Ï¡¢¤Û¤«¤Î¥á¥Ë¥å¡¼¹àÌܤȤδ֤ÇÆä˰㤤¤¬¤¢¤ë¤ï¤±¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£',
- 'buttons'=>['λ²ò'], 'bitmap'=>'')
- })
+ 'bitmap'=>'questhead', 'compound'=>'left',
+ 'command'=>proc{
+ TkDialog.new('title'=>'Compound Menu Entry',
+ 'message'=>'¤¢¤Ê¤¿¤¬ÁªÂò¤·¤¿¥á¥Ë¥å¡¼¹àÌܤϡ¢¥Ó¥Ã¥È¥Þ¥Ã¥×¥¤¥á¡¼¥¸¤Èʸ»úÎó¤È¤òƱ»þ¤Ë°ì¤Ä¤Î¹àÌܤËɽ¼¨¤¹¤ë¤è¤¦¤Ë¤·¤¿¤â¤Î¤Ç¤¹¡£¤½¤ì°Ê³°¤ÎÅÀ¤Ç¤Ï¡¢¤Û¤«¤Î¥á¥Ë¥å¡¼¹àÌܤȤδ֤ÇÆä˰㤤¤¬¤¢¤ë¤ï¤±¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£',
+ 'buttons'=>['λ²ò'], 'bitmap'=>'')
+ })
}
TkMenu.new($menu84_frame) {|m|
$menu84_frame.add('cascade', 'label'=>'Colors', 'menu'=>m, 'underline'=>0)
['red', 'orange', 'yellow', 'green', 'blue'].each{|c|
add('command', 'label'=>c, 'background'=>c,
- 'command'=>proc{print "You invoked \"#{c}\"\n"})
+ 'command'=>proc{print "You invoked \"#{c}\"\n"})
}
}
$menu84_demo.menu($menu84_frame)
TkMenu.bind('<MenuSelect>', proc{|w|
- begin
- label = w.entrycget('active', 'label')
- rescue
- label = " "
- end
- menustatus.value = label
- Tk.update(true)
- }, '%W')
+ begin
+ label = w.entrycget('active', 'label')
+ rescue
+ label = " "
+ end
+ menustatus.value = label
+ Tk.update(true)
+ }, '%W')
diff --git a/ext/tk/sample/demos-jp/menu8x.rb b/ext/tk/sample/demos-jp/menu8x.rb
index e2f477da8b..ab691a42b5 100644
--- a/ext/tk/sample/demos-jp/menu8x.rb
+++ b/ext/tk/sample/demos-jp/menu8x.rb
@@ -56,7 +56,7 @@ TkLabel.new($menu8x_demo,'font'=>$font,'wraplength'=>'4i','justify'=>'left') {
$menu8xstatus = TkVariable.new(" ")
TkFrame.new($menu8x_demo) {|frame|
TkLabel.new(frame, 'textvariable'=>$menu8xstatus, 'relief'=>'sunken',
- 'bd'=>1, 'font'=>['Helvetica', '10'], 'anchor'=>'w')\
+ 'bd'=>1, 'font'=>['Helvetica', '10'], 'anchor'=>'w')\
.pack('side'=>'left', 'padx'=>2, 'expand'=>'yes', 'fill'=>'both')
}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>2)
@@ -107,8 +107,8 @@ TkMenu.new($menu8x_demo, 'tearoff'=>false) {|m|
['A','B','C','D','E','F','G'].each{|c|
# add('command', 'label'=>"ʸ»ú \"#{c}\" ¤ò°õ»ú", 'underline'=>4,
add('command', 'label'=>"Print letter \"#{c}\" (ʸ»ú \"#{c}\" ¤ò°õ»ú)",
- 'underline'=>14, 'accelerator'=>"Meta+#{c}",
- 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
+ 'underline'=>14, 'accelerator'=>"Meta+#{c}",
+ 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
$menu8x_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"})
}
}
@@ -116,17 +116,17 @@ TkMenu.new($menu8x_demo, 'tearoff'=>false) {|m|
TkMenu.new(m, 'tearoff'=>false) {|cascade_menu|
m.add('cascade', 'label'=>'Cascades', 'menu'=>cascade_menu, 'underline'=>0)
add('command', 'label'=>'Print hello(¤³¤ó¤Ë¤Á¤Ï)',
- 'command'=>proc{print "Hello(¤³¤ó¤Ë¤Á¤Ï)\n"},
- 'accelerator'=>"#{modifier}+H", 'underline'=>6)
+ 'command'=>proc{print "Hello(¤³¤ó¤Ë¤Á¤Ï)\n"},
+ 'accelerator'=>"#{modifier}+H", 'underline'=>6)
$menu8x_demo.bind("#{modifier}-h", proc{print "Hello(¤³¤ó¤Ë¤Á¤Ï)\n"})
add('command', 'label'=>'Print goodbye(¤µ¤è¤¦¤Ê¤é)',
- 'command'=>proc{print "Goodbye(¤µ¤è¤¦¤Ê¤é)\n"},
- 'accelerator'=>"#{modifier}+G", 'underline'=>6)
+ 'command'=>proc{print "Goodbye(¤µ¤è¤¦¤Ê¤é)\n"},
+ 'accelerator'=>"#{modifier}+G", 'underline'=>6)
$menu8x_demo.bind("#{modifier}-g", proc{print "Goodbye(¤µ¤è¤¦¤Ê¤é)\n"})
TkMenu.new(m, 'tearoff'=>false) {|cascade_check|
cascade_menu.add('cascade', 'label'=>'Check buttons(¥Á¥§¥Ã¥¯¥Ü¥¿¥ó)',
- 'menu'=>cascade_check, 'underline'=>0)
+ 'menu'=>cascade_check, 'underline'=>0)
oil = TkVariable.new(0)
add('check', 'label'=>'¥ª¥¤¥ëÅÀ¸¡', 'variable'=>oil)
trans = TkVariable.new(0)
@@ -137,18 +137,18 @@ TkMenu.new($menu8x_demo, 'tearoff'=>false) {|m|
add('check', 'label'=>'¥é¥¤¥ÈÅÀ¸¡', 'variable'=>lights)
add('separator')
add('command', 'label'=>'¸½ºß¤ÎÃͤòɽ¼¨',
- 'command'=>proc{showVars($menu8x_demo,
- ['¥ª¥¤¥ëÅÀ¸¡', oil],
- ['¥È¥é¥ó¥¹¥ß¥Ã¥·¥ç¥óÅÀ¸¡', trans],
- ['¥Ö¥ì¡¼¥­ÅÀ¸¡', brakes],
- ['¥é¥¤¥ÈÅÀ¸¡', lights])} )
+ 'command'=>proc{showVars($menu8x_demo,
+ ['¥ª¥¤¥ëÅÀ¸¡', oil],
+ ['¥È¥é¥ó¥¹¥ß¥Ã¥·¥ç¥óÅÀ¸¡', trans],
+ ['¥Ö¥ì¡¼¥­ÅÀ¸¡', brakes],
+ ['¥é¥¤¥ÈÅÀ¸¡', lights])} )
invoke 1
invoke 3
}
TkMenu.new(m, 'tearoff'=>false) {|cascade_radio|
cascade_menu.add('cascade', 'label'=>'Radio buttons(¥é¥¸¥ª¥Ü¥¿¥ó)',
- 'menu'=>cascade_radio, 'underline'=>0)
+ 'menu'=>cascade_radio, 'underline'=>0)
pointSize = TkVariable.new
add('radio', 'label'=>'10 ¥Ý¥¤¥ó¥È', 'variable'=>pointSize, 'value'=>10)
add('radio', 'label'=>'14 ¥Ý¥¤¥ó¥È', 'variable'=>pointSize, 'value'=>14)
@@ -162,9 +162,9 @@ TkMenu.new($menu8x_demo, 'tearoff'=>false) {|m|
add('radio', 'label'=>'¥¤¥¿¥ê¥Ã¥¯', 'variable'=>style, 'value'=>'italic')
add('separator')
add('command', 'label'=>'¸½ºß¤ÎÃͤòɽ¼¨',
- 'command'=>proc{showVars($menu8x_demo,
- ['¥Ý¥¤¥ó¥È¥µ¥¤¥º', pointSize],
- ['¥¹¥¿¥¤¥ë', style])} )
+ 'command'=>proc{showVars($menu8x_demo,
+ ['¥Ý¥¤¥ó¥È¥µ¥¤¥º', pointSize],
+ ['¥¹¥¿¥¤¥ë', style])} )
invoke 1
invoke 7
}
@@ -173,16 +173,16 @@ TkMenu.new($menu8x_demo, 'tearoff'=>false) {|m|
TkMenu.new(m, 'tearoff'=>false) {|icon_menu|
m.add('cascade', 'label'=>'Icons', 'menu'=>icon_menu, 'underline'=>0)
add('command',
- 'bitmap'=>'@'+[$demo_dir,'..',
- 'images','pattern.xbm'].join(File::Separator),
- 'hidemargin'=>1,
- 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry',
- 'text'=>'º£¤¢¤Ê¤¿¤¬ÁªÂò¤·¤¿¥á¥Ë¥å¡¼¤Î¹àÌܤϥƥ­¥¹¥È¤Ç¤Ï¤Ê¤¯¥Ó¥Ã¥È¥Þ¥Ã¥×¤òɽ¼¨¤·¤Æ¤¤¤Þ¤·¤¿¡£¤½¤ì°Ê³°¤ÎÅÀ¤Ç¤Ï¾¤Î¥á¥Ë¥å¡¼¹àÌܤÈÊѤï¤ê¤Þ¤»¤ó¡£',
- 'bitmap'=>'', 'default'=>0,
- 'buttons'=>'λ²ò')} )
+ 'bitmap'=>'@'+[$demo_dir,'..',
+ 'images','pattern.xbm'].join(File::Separator),
+ 'hidemargin'=>1,
+ 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry',
+ 'text'=>'º£¤¢¤Ê¤¿¤¬ÁªÂò¤·¤¿¥á¥Ë¥å¡¼¤Î¹àÌܤϥƥ­¥¹¥È¤Ç¤Ï¤Ê¤¯¥Ó¥Ã¥È¥Þ¥Ã¥×¤òɽ¼¨¤·¤Æ¤¤¤Þ¤·¤¿¡£¤½¤ì°Ê³°¤ÎÅÀ¤Ç¤Ï¾¤Î¥á¥Ë¥å¡¼¹àÌܤÈÊѤï¤ê¤Þ¤»¤ó¡£',
+ 'bitmap'=>'', 'default'=>0,
+ 'buttons'=>'λ²ò')} )
['info', 'questhead', 'error'].each{|icon|
add('command', 'bitmap'=>icon, 'hidemargin'=>1,
- 'command'=>proc{print "You invoked the #{icon} bitmap\n"})
+ 'command'=>proc{print "You invoked the #{icon} bitmap\n"})
}
entryconfigure(2, 'columnbreak'=>1)
@@ -193,7 +193,7 @@ TkMenu.new($menu8x_demo, 'tearoff'=>false) {|m|
[ '¥¨¥ó¥È¥ê','Ê̤Υ¨¥ó¥È¥ê','²¿¤â¤·¤Ê¤¤','¤Û¤È¤ó¤É²¿¤â¤·¤Ê¤¤',
'¿ÍÀ¸¤ò°ÕµÁ¤¢¤ë¤â¤Î¤Ë' ].each{|i|
add('command', 'label'=>i,
- 'command'=>proc{print "You invoked \"#{i}\"\n"})
+ 'command'=>proc{print "You invoked \"#{i}\"\n"})
}
}
@@ -201,7 +201,7 @@ TkMenu.new($menu8x_demo, 'tearoff'=>false) {|m|
m.add('cascade', 'label'=>'Colors', 'menu'=>colors_menu, 'underline'=>1)
['red', 'orange', 'yellow', 'green', 'blue'].each{|c|
add('command', 'label'=>c, 'background'=>c,
- 'command'=>proc{print "You invoked \"#{c}\"\n"})
+ 'command'=>proc{print "You invoked \"#{c}\"\n"})
}
}
@@ -209,14 +209,14 @@ TkMenu.new($menu8x_demo, 'tearoff'=>false) {|m|
}
TkMenu.bind('<MenuSelect>',
- proc{|w|
- begin
- label = w.entrycget('active', 'label')
- rescue
- label = ' '
- end
- $menu8xstatus.value = label
- Tk.update('idletasks')
- }, '%W')
+ proc{|w|
+ begin
+ label = w.entrycget('active', 'label')
+ rescue
+ label = ' '
+ end
+ $menu8xstatus.value = label
+ Tk.update('idletasks')
+ }, '%W')
end ; # Tk 8.x
diff --git a/ext/tk/sample/demos-jp/menubu.rb b/ext/tk/sample/demos-jp/menubu.rb
index 1308014183..aa90a3087f 100644
--- a/ext/tk/sample/demos-jp/menubu.rb
+++ b/ext/tk/sample/demos-jp/menubu.rb
@@ -187,7 +187,7 @@ TkFrame.new(center) {|f|
menubuttonoptions = TkVariable.new
mbutton = TkMenubutton.new(f)
options = optionMenu(mbutton, menubuttonoptions,
- 'one', 'two', 'three')
+ 'one', 'two', 'three')
mbutton.pack('side'=>'left', 'padx'=>25, 'pady'=>25)
paletteColor = TkVariable.new
colors = ['Black','red4','DarkGreen','NavyBlue', 'gray75',
diff --git a/ext/tk/sample/demos-jp/msgbox.rb b/ext/tk/sample/demos-jp/msgbox.rb
index 03ab1f7dbe..983e6b6589 100644
--- a/ext/tk/sample/demos-jp/msgbox.rb
+++ b/ext/tk/sample/demos-jp/msgbox.rb
@@ -17,7 +17,7 @@ $msgbox_demo = TkToplevel.new {|w|
# label À¸À®
TkLabel.new($msgbox_demo, 'font'=>$font, 'wraplength'=>'4i', 'justify'=>'left',
- 'text'=>"ɽ¼¨¤¹¤ë¥¢¥¤¥³¥ó¤È¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹¤Î¼ïÎà¤òÁª¤ó¤Ç²¼¤µ¤¤¡£¤½¤·¤Æ \"¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹\" ¥Ü¥¿¥ó¤ò²¡¤¹¤È¡¢»ØÄꤷ¤¿¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£").pack('side'=>'top')
+ 'text'=>"ɽ¼¨¤¹¤ë¥¢¥¤¥³¥ó¤È¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹¤Î¼ïÎà¤òÁª¤ó¤Ç²¼¤µ¤¤¡£¤½¤·¤Æ \"¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹\" ¥Ü¥¿¥ó¤ò²¡¤¹¤È¡¢»ØÄꤷ¤¿¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£").pack('side'=>'top')
# frame À¸À®
TkFrame.new($msgbox_demo) {|frame|
@@ -46,9 +46,9 @@ TkFrame.new($msgbox_demo) {|frame|
$msgbox_leftframe = TkFrame.new($msgbox_demo)
$msgbox_rightframe = TkFrame.new($msgbox_demo)
$msgbox_leftframe .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
- 'pady'=>'.5c', 'padx'=>'.5c')
+ 'pady'=>'.5c', 'padx'=>'.5c')
$msgbox_rightframe.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
- 'pady'=>'.5c', 'padx'=>'.5c')
+ 'pady'=>'.5c', 'padx'=>'.5c')
TkLabel.new($msgbox_leftframe, 'text'=>'¥¢¥¤¥³¥ó').pack('side'=>'top')
TkFrame.new($msgbox_leftframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\
@@ -57,9 +57,9 @@ TkFrame.new($msgbox_leftframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\
$msgboxIcon = TkVariable.new('info')
['error', 'info', 'question', 'warning'].each {|icon|
TkRadioButton.new($msgbox_leftframe, 'text'=>icon, 'variable'=>$msgboxIcon,
- 'relief'=>'flat', 'value'=>icon, 'width'=>16,
- 'anchor'=>'w').pack('side'=>'top', 'pady'=>2,
- 'anchor'=>'w', 'fill'=>'x')
+ 'relief'=>'flat', 'value'=>icon, 'width'=>16,
+ 'anchor'=>'w').pack('side'=>'top', 'pady'=>2,
+ 'anchor'=>'w', 'fill'=>'x')
}
TkLabel.new($msgbox_rightframe, 'text'=>'¼ïÎà').pack('side'=>'top')
@@ -70,17 +70,17 @@ $msgboxType = TkVariable.new('ok')
['abortretryignore', 'ok', 'okcancel',
'retrycancel', 'yesno', 'yesnocancel'].each {|type|
TkRadioButton.new($msgbox_rightframe, 'text'=>type, 'variable'=>$msgboxType,
- 'relief'=>'flat', 'value'=>type, 'width'=>16,
- 'anchor'=>'w').pack('side'=>'top', 'pady'=>2,
- 'anchor'=>'w', 'fill'=>'x')
+ 'relief'=>'flat', 'value'=>type, 'width'=>16,
+ 'anchor'=>'w').pack('side'=>'top', 'pady'=>2,
+ 'anchor'=>'w', 'fill'=>'x')
}
def showMessageBox(w)
button = Tk.messageBox('icon'=>$msgboxIcon.value, 'type'=>$msgboxType.value,
- 'title'=>'Message', 'parent'=>w,
- 'message'=>"¤³¤ì¤Ï \"#{$msgboxType.value}\" ¤È¤¤¤¦¼ïÎà¤Î¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹¤Ç¡¢\"#{$msgboxIcon.value}\" ¤Î¥¢¥¤¥³¥ó¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£")
+ 'title'=>'Message', 'parent'=>w,
+ 'message'=>"¤³¤ì¤Ï \"#{$msgboxType.value}\" ¤È¤¤¤¦¼ïÎà¤Î¥á¥Ã¥»¡¼¥¸¥Ü¥Ã¥¯¥¹¤Ç¡¢\"#{$msgboxIcon.value}\" ¤Î¥¢¥¤¥³¥ó¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£")
Tk.messageBox('icon'=>'info', 'type'=>'ok', 'parent'=>w,
- 'message'=>"¤¢¤Ê¤¿¤Ï \"#{button}\" ¤ò²¡¤·¤Þ¤·¤¿¤Í¡£")
+ 'message'=>"¤¢¤Ê¤¿¤Ï \"#{button}\" ¤ò²¡¤·¤Þ¤·¤¿¤Í¡£")
end
diff --git a/ext/tk/sample/demos-jp/paned1.rb b/ext/tk/sample/demos-jp/paned1.rb
index cd51e34aa0..8d16d03c08 100644
--- a/ext/tk/sample/demos-jp/paned1.rb
+++ b/ext/tk/sample/demos-jp/paned1.rb
@@ -17,8 +17,8 @@ $paned1_demo = TkToplevel.new {|w|
}
TkLabel.new($paned1_demo,
- :font=>$font, :wraplength=>'4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
+ :font=>$font, :wraplength=>'4i', :justify=>:left,
+ :text=><<EOL).pack(:side=>:top)
²¼¤Î¿§ÉÕ¤±¤µ¤ì¤¿Æó¤Ä¤Î¥¦¥£¥ó¥É¥¦¤Î´Ö¤Î»ÅÀÚ¤êÏȤϡ¢°ì¤Ä¤ÎÎΰè¤ò¤½¤ì¤¾¤ì¤Î¥¦¥£¥ó¥É¥¦¤Î¤¿¤á¤Ëʬ³ä¤¹¤ë¤¿¤á¤Î¤â¤Î¤Ç¤¹¡£º¸¥Ü¥¿¥ó¤Ç»ÅÀÚ¤ê¤òÁàºî¤¹¤ë¤È¡¢Ê¬³ä¥µ¥¤¥ºÊѹ¹¤ÎÁàºîÅÓÃæ¤Ç¤ÏºÆɽ¼¨¤Ï¤Ê¤µ¤ì¤º¡¢³ÎÄꤵ¤»¤¿¤È¤­¤Ëɽ¼¨¤¬¹¹¿·¤µ¤ì¤Þ¤¹¡£¥Þ¥¦¥¹¤Ë¤è¤ë»ÅÀÚ¤ê¤ÎÁàºî¤ËÄɿ路¤Æ¥µ¥¤¥º¤òÊѹ¹¤·¤¿É½¼¨¤¬¤Ê¤ï¤ì¤ë¤è¤¦¤Ë¤·¤¿¤¤¾ì¹ç¤Ï¡¢¥Þ¥¦¥¹¤ÎÃæ±û¥Ü¥¿¥ó¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£
¤â¤·¤¢¤Ê¤¿¤¬»È¤Ã¤Æ¤¤¤ë Ruby ¤Ë¥ê¥ó¥¯¤µ¤ì¤Æ¤¤¤ë Tk ¥é¥¤¥Ö¥é¥ê¤¬ panedwindow ¤ò¼ÂÁõ¤·¤Æ¤¤¤Ê¤¤
¾ì¹ç¡¢¤³¤Î¥Ç¥â¤Ï¤¦¤Þ¤¯Æ°¤«¤Ê¤¤¤Ï¤º¤Ç¤¹¡£¤½¤Î¾ì¹ç¤Ë¤Ï panedwindow ¤¬¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¤è¤¦¤Ê
@@ -31,13 +31,13 @@ TkFrame.new($paned1_demo){|f|
pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
TkButton.new(f, :text=>'ÊĤ¸¤ë', :width=>15, :command=>proc{
- $paned1_demo.destroy
- $paned1_demo = nil
- }).pack(:side=>:left, :expand=>true)
+ $paned1_demo.destroy
+ $paned1_demo = nil
+ }).pack(:side=>:left, :expand=>true)
TkButton.new(f, :text=>'¥³¡¼¥É»²¾È', :width=>15, :command=>proc{
- showCode 'paned1'
- }).pack(:side=>:left, :expand=>true)
+ showCode 'paned1'
+ }).pack(:side=>:left, :expand=>true)
}
TkPanedwindow.new($paned1_demo){|f|
diff --git a/ext/tk/sample/demos-jp/paned2.rb b/ext/tk/sample/demos-jp/paned2.rb
index c6b0f06914..1e82eddda4 100644
--- a/ext/tk/sample/demos-jp/paned2.rb
+++ b/ext/tk/sample/demos-jp/paned2.rb
@@ -17,8 +17,8 @@ $paned2_demo = TkToplevel.new {|w|
}
TkLabel.new($paned2_demo,
- :font=>$font, :wraplength=>'4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
+ :font=>$font, :wraplength=>'4i', :justify=>:left,
+ :text=><<EOL).pack(:side=>:top)
²¼¤Î¥¹¥¯¥í¡¼¥ë¥Ð¡¼ÉÕ¤­¤Î¥¦¥£¥¸¥§¥Ã¥È¤¬ÃÖ¤«¤ì¤¿Æó¤Ä¤Î¥¦¥£¥ó¥É¥¦¤Î´Ö¤Î»ÅÀÚ¤êÏȤϡ¢°ì¤Ä¤ÎÎΰè¤ò¤½¤ì¤¾¤ì¤Î¥¦¥£¥ó¥É¥¦¤Î¤¿¤á¤Ëʬ³ä¤¹¤ë¤¿¤á¤Î¤â¤Î¤Ç¤¹¡£º¸¥Ü¥¿¥ó¤Ç»ÅÀÚ¤ê¤òÁàºî¤¹¤ë¤È¡¢Ê¬³ä¥µ¥¤¥ºÊѹ¹¤ÎÁàºîÅÓÃæ¤Ç¤ÏºÆɽ¼¨¤Ï¤Ê¤µ¤ì¤º¡¢³ÎÄꤵ¤»¤¿¤È¤­¤Ëɽ¼¨¤¬¹¹¿·¤µ¤ì¤Þ¤¹¡£¥Þ¥¦¥¹¤Ë¤è¤ë»ÅÀÚ¤ê¤ÎÁàºî¤ËÄɿ路¤Æ¥µ¥¤¥º¤òÊѹ¹¤·¤¿É½¼¨¤¬¤Ê¤ï¤ì¤ë¤è¤¦¤Ë¤·¤¿¤¤¾ì¹ç¤Ï¡¢¥Þ¥¦¥¹¤ÎÃæ±û¥Ü¥¿¥ó¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£
¤â¤·¤¢¤Ê¤¿¤¬»È¤Ã¤Æ¤¤¤ë Ruby ¤Ë¥ê¥ó¥¯¤µ¤ì¤Æ¤¤¤ë Tk ¥é¥¤¥Ö¥é¥ê¤¬ panedwindow ¤ò¼ÂÁõ¤·¤Æ¤¤¤Ê¤¤
¾ì¹ç¡¢¤³¤Î¥Ç¥â¤Ï¤¦¤Þ¤¯Æ°¤«¤Ê¤¤¤Ï¤º¤Ç¤¹¡£¤½¤Î¾ì¹ç¤Ë¤Ï panedwindow ¤¬¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¤è¤¦¤Ê
@@ -31,13 +31,13 @@ TkFrame.new($paned2_demo){|f|
pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
TkButton.new(f, :text=>'ÊĤ¸¤ë', :width=>15, :command=>proc{
- $paned2_demo.destroy
- $paned2_demo = nil
- }).pack(:side=>:left, :expand=>true)
+ $paned2_demo.destroy
+ $paned2_demo = nil
+ }).pack(:side=>:left, :expand=>true)
TkButton.new(f, :text=>'¥³¡¼¥É»²¾È', :width=>15, :command=>proc{
- showCode 'paned2'
- }).pack(:side=>:left, :expand=>true)
+ showCode 'paned2'
+ }).pack(:side=>:left, :expand=>true)
}
paneList = TkVariable.new # define as normal variable (not array)
@@ -68,29 +68,29 @@ TkPanedwindow.new($paned2_demo, :orient=>:vertical){|f|
pack(:side=>:top, :expand=>true, :fill=>:both, :pady=>2, :padx=>'2m')
add(TkFrame.new(f){|paned2_top|
- TkListbox.new(paned2_top, :listvariable=>paneList) {
- # Invert the first item to highlight it
- itemconfigure(0, :background=>self.cget(:foreground),
- :foreground=>self.cget(:background) )
- yscrollbar(TkScrollbar.new(paned2_top).pack(:side=>:right,
- :fill=>:y))
- pack(:fill=>:both, :expand=>true)
- }
+ TkListbox.new(paned2_top, :listvariable=>paneList) {
+ # Invert the first item to highlight it
+ itemconfigure(0, :background=>self.cget(:foreground),
+ :foreground=>self.cget(:background) )
+ yscrollbar(TkScrollbar.new(paned2_top).pack(:side=>:right,
+ :fill=>:y))
+ pack(:fill=>:both, :expand=>true)
+ }
},
TkFrame.new(f, :height=>120) {|paned2_bottom|
- # The bottom window is a text widget with scrollbar
- paned2_xscr = TkScrollbar.new(paned2_bottom)
- paned2_yscr = TkScrollbar.new(paned2_bottom)
- paned2_text = TkText.new(paned2_bottom, :width=>30, :wrap=>:non) {
- insert('1.0', '¤³¤³¤ËÇÛÃÖ¤µ¤ì¤Æ¤¤¤ë¤Î¤Ï¡¢' +
- '¤´¤¯ÉáÄ̤Υƥ­¥¹¥È¥¦¥£¥¸¥§¥Ã¥È¤Ç¤¹¡£')
- xscrollbar(paned2_xscr)
- yscrollbar(paned2_yscr)
- }
- Tk.grid(paned2_text, paned2_yscr, :sticky=>'nsew')
- Tk.grid(paned2_xscr, :sticky=>'nsew')
- TkGrid.columnconfigure(paned2_bottom, 0, :weight=>1)
- TkGrid.rowconfigure(paned2_bottom, 0, :weight=>1)
+ # The bottom window is a text widget with scrollbar
+ paned2_xscr = TkScrollbar.new(paned2_bottom)
+ paned2_yscr = TkScrollbar.new(paned2_bottom)
+ paned2_text = TkText.new(paned2_bottom, :width=>30, :wrap=>:non) {
+ insert('1.0', '¤³¤³¤ËÇÛÃÖ¤µ¤ì¤Æ¤¤¤ë¤Î¤Ï¡¢' +
+ '¤´¤¯ÉáÄ̤Υƥ­¥¹¥È¥¦¥£¥¸¥§¥Ã¥È¤Ç¤¹¡£')
+ xscrollbar(paned2_xscr)
+ yscrollbar(paned2_yscr)
+ }
+ Tk.grid(paned2_text, paned2_yscr, :sticky=>'nsew')
+ Tk.grid(paned2_xscr, :sticky=>'nsew')
+ TkGrid.columnconfigure(paned2_bottom, 0, :weight=>1)
+ TkGrid.rowconfigure(paned2_bottom, 0, :weight=>1)
} )
}
diff --git a/ext/tk/sample/demos-jp/plot.rb b/ext/tk/sample/demos-jp/plot.rb
index c8025d8bf9..902b144f72 100644
--- a/ext/tk/sample/demos-jp/plot.rb
+++ b/ext/tk/sample/demos-jp/plot.rb
@@ -17,7 +17,7 @@ $plot_demo = TkToplevel.new {|w|
# label À¸À®
TkLabel.new($plot_demo, 'font'=>$font, 'wraplength'=>'4i', 'justify'=>'left',
- 'text'=>"¤³¤Î¥¦¥£¥ó¥É¥¦¤Ï´Êñ¤Ê2¼¡¸µ¤Î¥×¥í¥Ã¥È¤ò´Þ¤ó¤À¥­¥ã¥ó¥Ð¥¹ widget¤Ç¤¹¡£É½¼¨¤µ¤ì¤¿ÅÀ¤ò¥Þ¥¦¥¹¥Ü¥¿¥ó1¤Ç¥É¥é¥Ã¥°¤·¤Æ¥Ç¡¼¥¿¤ò¤¤¤¸¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£"){
+ 'text'=>"¤³¤Î¥¦¥£¥ó¥É¥¦¤Ï´Êñ¤Ê2¼¡¸µ¤Î¥×¥í¥Ã¥È¤ò´Þ¤ó¤À¥­¥ã¥ó¥Ð¥¹ widget¤Ç¤¹¡£É½¼¨¤µ¤ì¤¿ÅÀ¤ò¥Þ¥¦¥¹¥Ü¥¿¥ó1¤Ç¥É¥é¥Ã¥°¤·¤Æ¥Ç¡¼¥¿¤ò¤¤¤¸¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£"){
pack('side'=>'top')
}
@@ -51,39 +51,39 @@ $plot_canvas.pack('side'=>'top', 'fill'=>'x')
TkcLine.new($plot_canvas, 100, 250, 400, 250, 'width'=>2)
TkcLine.new($plot_canvas, 100, 250, 100, 50, 'width'=>2)
TkcText.new($plot_canvas, 225, 20,
- 'text'=>"´Êñ¤Ê¥×¥í¥Ã¥È", 'font'=>plotFont, 'fill'=>'brown')
+ 'text'=>"´Êñ¤Ê¥×¥í¥Ã¥È", 'font'=>plotFont, 'fill'=>'brown')
(0..10).each {|i|
x = 100 + (i * 30)
TkcLine.new($plot_canvas, x, 250, x, 245, 'width'=>2)
TkcText.new($plot_canvas, x, 254,
- 'text'=>10*i, 'font'=>plotFont, 'anchor'=>'n')
+ 'text'=>10*i, 'font'=>plotFont, 'anchor'=>'n')
}
(0..5).each {|i|
y = 250 - (i * 40)
TkcLine.new($plot_canvas, 100, y, 105, y, 'width'=>2)
TkcText.new($plot_canvas, 96, y,
- 'text'=>"#{i*50}.0", 'font'=>plotFont, 'anchor'=>'e')
+ 'text'=>"#{i*50}.0", 'font'=>plotFont, 'anchor'=>'e')
}
for xx, yy in [[12,56],[20,94],[33,98],[32,120],[61,180],[75,160],[98,223]]
x = 100 + (3*xx)
y = 250 - (4*yy)/5
item = TkcOval.new($plot_canvas, x-6, y-6, x+6, y+6,
- 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
+ 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
item.addtag 'point'
end
$plot_canvas.itembind('point', 'Any-Enter',
- proc{$plot_canvas.itemconfigure 'current','fill','red'})
+ proc{$plot_canvas.itemconfigure 'current','fill','red'})
$plot_canvas.itembind('point', 'Any-Leave',
- proc{$plot_canvas.itemconfigure 'current','fill','SkyBlue2'})
+ proc{$plot_canvas.itemconfigure 'current','fill','SkyBlue2'})
$plot_canvas.itembind('point', '1',
- proc{|x,y| plotDown $plot_canvas,x,y}, "%x %y")
+ proc{|x,y| plotDown $plot_canvas,x,y}, "%x %y")
$plot_canvas.itembind('point', 'ButtonRelease-1',
- proc{$plot_canvas.dtag 'selected'})
+ proc{$plot_canvas.dtag 'selected'})
$plot_canvas.bind('B1-Motion',
- proc{|x,y| plotMove $plot_canvas,x,y}, "%x %y")
+ proc{|x,y| plotMove $plot_canvas,x,y}, "%x %y")
$plot = {'lastX'=>0, 'lastY'=>0}
@@ -92,8 +92,8 @@ $plot = {'lastX'=>0, 'lastY'=>0}
# data points. It sets up state to allow the point to be dragged.
#
# Arguments:
-# w - The canvas window.
-# x, y - The coordinates of the mouse press.
+# w - The canvas window.
+# x, y - The coordinates of the mouse press.
def plotDown (w, x, y)
w.dtag 'selected'
@@ -108,8 +108,8 @@ end
# current item.
#
# Arguments:
-# w - The canvas window.
-# x, y - The coordinates of the mouse.
+# w - The canvas window.
+# x, y - The coordinates of the mouse.
def plotMove (w, x, y)
w.move 'selected', x - $plot['lastX'], y - $plot['lastY']
diff --git a/ext/tk/sample/demos-jp/puzzle.rb b/ext/tk/sample/demos-jp/puzzle.rb
index afef8fcb09..ad69775aab 100644
--- a/ext/tk/sample/demos-jp/puzzle.rb
+++ b/ext/tk/sample/demos-jp/puzzle.rb
@@ -89,7 +89,7 @@ order = [3,1,6,2,5,7,15,13,4,11,8,9,14,10,12]
highlightthickness 0
command def_puzzleswitch_proc(w, num)
}.place('relx'=>$xpos[num], 'rely'=>$ypos[num],
- 'relwidth'=>0.25, 'relheight'=>0.25)
+ 'relwidth'=>0.25, 'relheight'=>0.25)
}
$xpos['space'] = 0.75
$ypos['space'] = 0.75
@@ -101,9 +101,9 @@ def puzzleSwitch(w, num)
&& ($xpos[num] >= ($xpos['space'] - 0.26)) \
&& ($xpos[num] <= ($xpos['space'] + 0.26))) \
|| (($xpos[num] >= ($xpos['space'] - 0.01)) \
- && ($xpos[num] <= ($xpos['space'] + 0.01)) \
- && ($ypos[num] >= ($ypos['space'] - 0.26)) \
- && ($ypos[num] <= ($ypos['space'] + 0.26)))
+ && ($xpos[num] <= ($xpos['space'] + 0.01)) \
+ && ($ypos[num] >= ($ypos['space'] - 0.26)) \
+ && ($ypos[num] <= ($ypos['space'] + 0.26)))
tmp = $xpos['space']
$xpos['space'] = $xpos[num]
$xpos[num] = tmp
diff --git a/ext/tk/sample/demos-jp/radio2.rb b/ext/tk/sample/demos-jp/radio2.rb
index c7b98e6312..5ac877d99a 100644
--- a/ext/tk/sample/demos-jp/radio2.rb
+++ b/ext/tk/sample/demos-jp/radio2.rb
@@ -55,18 +55,18 @@ TkFrame.new($radio2_demo) {|frame|
text 'ÊÑ¿ô»²¾È'
command proc{
showVars($radio2_demo,
- ['size', size], ['color', color], ['compound', align])
+ ['size', size], ['color', color], ['compound', align])
}
}.pack('side'=>'left', 'expand'=>'yes')
}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
# frame
f_left = TkLabelFrame.new($radio2_demo, 'text'=>'ʸ»ú¥µ¥¤¥º',
- 'pady'=>2, 'padx'=>2)
+ 'pady'=>2, 'padx'=>2)
f_mid = TkLabelFrame.new($radio2_demo, 'text'=>'¿§',
- 'pady'=>2, 'padx'=>2)
+ 'pady'=>2, 'padx'=>2)
f_right = TkLabelFrame.new($radio2_demo, 'text'=>'¥Ó¥Ã¥È¥Þ¥Ã¥×ÇÛÃÖ',
- 'pady'=>2, 'padx'=>2)
+ 'pady'=>2, 'padx'=>2)
f_left.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
f_mid.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
f_right.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
@@ -92,14 +92,14 @@ f_right.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
}
label = TkLabel.new(f_right, 'text'=>'¥é¥Ù¥ë', 'bitmap'=>'questhead',
- 'compound'=>'left')
+ 'compound'=>'left')
label.configure('width'=>TkWinfo.reqwidth(label), 'compound'=>'top')
label.height(TkWinfo.reqheight(label))
abtn = ['Top', 'Left', 'Right', 'Bottom'].collect{|a|
lower = a.downcase
TkRadioButton.new(f_right, 'text'=>a, 'variable'=>align, 'relief'=>'flat',
- 'value'=>lower, 'indicatoron'=>0, 'width'=>7,
- 'command'=>proc{label.compound(align.value)})
+ 'value'=>lower, 'indicatoron'=>0, 'width'=>7,
+ 'command'=>proc{label.compound(align.value)})
}
Tk.grid('x', abtn[0])
diff --git a/ext/tk/sample/demos-jp/radio3.rb b/ext/tk/sample/demos-jp/radio3.rb
index bdc3ee0bf5..6e9a0f750b 100644
--- a/ext/tk/sample/demos-jp/radio3.rb
+++ b/ext/tk/sample/demos-jp/radio3.rb
@@ -36,43 +36,43 @@ align = TkVariable.new
# frame
TkFrame.new($radio3_demo) {|frame|
TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2),
- :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
+ :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
TkGrid('x',
- TkButton.new(frame, :text=>'ÊÑ¿ô»²¾È',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{
- showVars($radio3_demo, ['size', size],
- ['color', color], ['compound', align])
- }),
- TkButton.new(frame, :text=>'¥³¡¼¥É»²¾È',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'radio3'}),
- TkButton.new(frame, :text=>'ÊĤ¸¤ë',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- tmppath = $radio3_demo
- $radio3_demo = nil
- $showVarsWin[tmppath.path] = nil
- tmppath.destroy
- }),
- :padx=>4, :pady=>4)
+ TkButton.new(frame, :text=>'ÊÑ¿ô»²¾È',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{
+ showVars($radio3_demo, ['size', size],
+ ['color', color], ['compound', align])
+ }),
+ TkButton.new(frame, :text=>'¥³¡¼¥É»²¾È',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{showCode 'radio3'}),
+ TkButton.new(frame, :text=>'ÊĤ¸¤ë',
+ :image=>$image['delete'], :compound=>:left,
+ :command=>proc{
+ tmppath = $radio3_demo
+ $radio3_demo = nil
+ $showVarsWin[tmppath.path] = nil
+ tmppath.destroy
+ }),
+ :padx=>4, :pady=>4)
frame.grid_columnconfigure(0, :weight=>1)
TkGrid(frame, :row=>3, :column=>0, :columnspan=>3, :sticky=>'nsew')
}
# frame
f_left = TkLabelFrame.new($radio3_demo, 'text'=>'ʸ»ú¥µ¥¤¥º',
- 'pady'=>2, 'padx'=>2)
+ 'pady'=>2, 'padx'=>2)
f_mid = TkLabelFrame.new($radio3_demo, 'text'=>'¿§',
- 'pady'=>2, 'padx'=>2)
+ 'pady'=>2, 'padx'=>2)
f_right = TkLabelFrame.new($radio3_demo, 'text'=>'¥Ó¥Ã¥È¥Þ¥Ã¥×ÇÛÃÖ',
- 'pady'=>2, 'padx'=>2)
+ 'pady'=>2, 'padx'=>2)
f_left .grid('column'=>0, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c', 'rowspan'=>2)
f_mid .grid('column'=>1, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c', 'rowspan'=>2)
f_right.grid('column'=>2, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c')
TkButton.new($radio3_demo, 'text'=>'¥È¥é¥¤¥¹¥Æ¡¼¥È',
- 'command'=>proc{size.value = 'multi'; color.value = 'multi'}){
+ 'command'=>proc{size.value = 'multi'; color.value = 'multi'}){
grid('column'=>2, 'row'=>2, 'pady'=>'.5c', 'padx'=>'.5c')
}
@@ -100,13 +100,13 @@ TkButton.new($radio3_demo, 'text'=>'¥È¥é¥¤¥¹¥Æ¡¼¥È',
}
label = TkLabel.new(f_right, 'text'=>'¥é¥Ù¥ë', 'bitmap'=>'questhead',
- 'compound'=>'left')
+ 'compound'=>'left')
label.configure('width'=>TkWinfo.reqwidth(label), 'compound'=>'top')
label.height(TkWinfo.reqheight(label))
a_btn = ['Top', 'Left', 'Right', 'Bottom'].collect{|a|
TkRadioButton.new(f_right, 'text'=>a, 'variable'=>align, 'relief'=>'flat',
- 'value'=>a.downcase, 'indicatoron'=>0, 'width'=>7,
- 'command'=>proc{label.compound(align.value)})
+ 'value'=>a.downcase, 'indicatoron'=>0, 'width'=>7,
+ 'command'=>proc{label.compound(align.value)})
}
Tk.grid('x', a_btn[0])
diff --git a/ext/tk/sample/demos-jp/ruler.rb b/ext/tk/sample/demos-jp/ruler.rb
index 5d8c0443c1..94b4c921d3 100644
--- a/ext/tk/sample/demos-jp/ruler.rb
+++ b/ext/tk/sample/demos-jp/ruler.rb
@@ -7,8 +7,8 @@
# represent a tab stop.
#
# Arguments:
-# c - The canvas window.
-# x, y - Coordinates at which to create the tab stop.
+# c - The canvas window.
+# x, y - Coordinates at which to create the tab stop.
def rulerMkTab(c,x,y)
v = $demo_rulerInfo
@@ -30,7 +30,7 @@ $ruler_demo = TkToplevel.new {|w|
# label À¸À®
TkLabel.new($ruler_demo, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left',
- 'text'=>"¤³¤Î¥­¥ã¥ó¥Ð¥¹widget¤Ï¥ë¡¼¥é¡¼¤ÎÌÏ·¿¤Ç¤¹¡£¥ë¡¼¥é¡¼¤Î±¦¤Ë¤¢¤ë¤Î¤Ï¥¿¥Ö¥¹¥È¥Ã¥×¤Î°æ¸Í¤Ç¡¢¤³¤³¤«¤é°ú¤ÃÄ¥¤Ã¤Æ¤¯¤ë¤³¤È¤Ë¤è¤Ã¤Æ¥¿¥Ö¥¹¥È¥Ã¥×¤òºî¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤Þ¤¿¡¢¤¹¤Ç¤Ë¤¢¤ë¥¿¥Ö¥¹¥È¥Ã¥×¤òÆ°¤«¤¹¤³¤È¤â¤Ç¤­¤Þ¤¹¡£¥¿¥Ö¥¹¥È¥Ã¥×¤ò¾åÊý¤Þ¤¿¤Ï²¼Êý¤Ë¤«¤¹¤ì¤Æɽ¼¨¤µ¤ì¤ë¤Þ¤Ç¥É¥é¥Ã¥°¤¹¤ë¤È¡¢¥Þ¥¦¥¹¥Ü¥¿¥ó¤òÎ¥¤·¤¿»þ¤Ë¤½¤Î¥¿¥Ö¥¹¥È¥Ã¥×¤Ï¾Ã¤¨¤Þ¤¹¡£"){
+ 'text'=>"¤³¤Î¥­¥ã¥ó¥Ð¥¹widget¤Ï¥ë¡¼¥é¡¼¤ÎÌÏ·¿¤Ç¤¹¡£¥ë¡¼¥é¡¼¤Î±¦¤Ë¤¢¤ë¤Î¤Ï¥¿¥Ö¥¹¥È¥Ã¥×¤Î°æ¸Í¤Ç¡¢¤³¤³¤«¤é°ú¤ÃÄ¥¤Ã¤Æ¤¯¤ë¤³¤È¤Ë¤è¤Ã¤Æ¥¿¥Ö¥¹¥È¥Ã¥×¤òºî¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤Þ¤¿¡¢¤¹¤Ç¤Ë¤¢¤ë¥¿¥Ö¥¹¥È¥Ã¥×¤òÆ°¤«¤¹¤³¤È¤â¤Ç¤­¤Þ¤¹¡£¥¿¥Ö¥¹¥È¥Ã¥×¤ò¾åÊý¤Þ¤¿¤Ï²¼Êý¤Ë¤«¤¹¤ì¤Æɽ¼¨¤µ¤ì¤ë¤Þ¤Ç¥É¥é¥Ã¥°¤¹¤ë¤È¡¢¥Þ¥¦¥¹¥Ü¥¿¥ó¤òÎ¥¤·¤¿»þ¤Ë¤½¤Î¥¿¥Ö¥¹¥È¥Ã¥×¤Ï¾Ã¤¨¤Þ¤¹¡£"){
pack('side'=>'top')
}
@@ -60,8 +60,8 @@ $ruler_canvas.pack('side'=>'top', 'fill'=>'x')
# ÃÍÀßÄê
unless Struct.const_defined?("RulerInfo")
$demo_rulerInfo = Struct.new("RulerInfo", :grid, :left, :right, :x, :y,
- :top, :bottom, :size, :normalStyle,
- :activeStyle, :deleteStyle).new
+ :top, :bottom, :size, :normalStyle,
+ :activeStyle, :deleteStyle).new
end
$demo_rulerInfo.grid = '.25c'
$demo_rulerInfo.left = TkWinfo.fpixels($ruler_canvas, '1c')
@@ -83,7 +83,7 @@ else
end
TkcLine.new($ruler_canvas,
- '1c', '0.5c', '1c', '1c', '13c', '1c', '13c', '0.5c', 'width'=>1)
+ '1c', '0.5c', '1c', '1c', '13c', '1c', '13c', '0.5c', 'width'=>1)
(0..11).each{|i|
x = i+1
TkcLine.new($ruler_canvas, "#{x}c", '1c', "#{x}c", '0.6c', 'width'=>1)
@@ -96,22 +96,22 @@ TkcLine.new($ruler_canvas,
$rulerTag_well = TkcTag.new($ruler_canvas)
$ruler_canvas\
.addtag_withtag($rulerTag_well,
- TkcRectangle.new($ruler_canvas,
- '13.2c', '1c', '13.8c', '0.5c',
- 'outline'=>'black',
- 'fill'=>($ruler_canvas\
- .configinfo('background'))[4]) )
+ TkcRectangle.new($ruler_canvas,
+ '13.2c', '1c', '13.8c', '0.5c',
+ 'outline'=>'black',
+ 'fill'=>($ruler_canvas\
+ .configinfo('background'))[4]) )
$ruler_canvas\
.addtag_withtag($rulerTag_well,
- rulerMkTab($ruler_canvas,
- TkWinfo.pixels($ruler_canvas, '13.5c'),
- TkWinfo.pixels($ruler_canvas, '.65c') ) )
+ rulerMkTab($ruler_canvas,
+ TkWinfo.pixels($ruler_canvas, '13.5c'),
+ TkWinfo.pixels($ruler_canvas, '.65c') ) )
$rulerTag_well.bind('1', proc{|x,y| rulerNewTab($ruler_canvas,x,y)}, '%x %y')
$ruler_canvas.itembind('tab', '1',
- proc{|x,y| rulerSelectTab($ruler_canvas,x,y)}, '%x %y')
+ proc{|x,y| rulerSelectTab($ruler_canvas,x,y)}, '%x %y')
$ruler_canvas.bind('B1-Motion',
- proc{|x,y| rulerMoveTab($ruler_canvas,x,y)}, '%x %y')
+ proc{|x,y| rulerMoveTab($ruler_canvas,x,y)}, '%x %y')
$ruler_canvas.bind('Any-ButtonRelease-1', proc{rulerReleaseTab($ruler_canvas)})
# rulerNewTab --
@@ -119,8 +119,8 @@ $ruler_canvas.bind('Any-ButtonRelease-1', proc{rulerReleaseTab($ruler_canvas)})
# triangle object and adding tags to it to give it tab behavior.
#
# Arguments:
-# c - The canvas window.
-# x, y - The coordinates of the tab stop.
+# c - The canvas window.
+# x, y - The coordinates of the tab stop.
def rulerNewTab(c,x,y)
v = $demo_rulerInfo
@@ -137,9 +137,9 @@ end
# be dragged interactively.
#
# Arguments:
-# c - The canvas widget.
-# x, y - The coordinates of the mouse (identifies the point by
-# which the tab was picked up for dragging).
+# c - The canvas widget.
+# x, y - The coordinates of the mouse (identifies the point by
+# which the tab was picked up for dragging).
def rulerSelectTab(c,x,y)
v = $demo_rulerInfo
@@ -156,8 +156,8 @@ end
# it is about to be dragged out of the ruler.
#
# Arguments:
-# c - The canvas widget.
-# x, y - The coordinates of the mouse.
+# c - The canvas widget.
+# x, y - The coordinates of the mouse.
def rulerMoveTab(c,x,y)
v = $demo_rulerInfo
@@ -184,8 +184,8 @@ end
# it was dragged out of the ruler.
#
# Arguments:
-# c - The canvas widget.
-# x, y - The coordinates of the mouse.
+# c - The canvas widget.
+# x, y - The coordinates of the mouse.
def rulerReleaseTab(c)
v = $demo_rulerInfo
diff --git a/ext/tk/sample/demos-jp/sayings.rb b/ext/tk/sample/demos-jp/sayings.rb
index bcbdd7a5e7..ce195a0e53 100644
--- a/ext/tk/sample/demos-jp/sayings.rb
+++ b/ext/tk/sample/demos-jp/sayings.rb
@@ -65,11 +65,11 @@ TkFrame.new($sayings_demo, 'borderwidth'=>10) {|w|
else
sayings_lbox.grid('row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
sv.grid('row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
sh.grid('row'=>1, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
TkGrid.rowconfigure(w, 0, 'weight'=>1, 'minsize'=>0)
TkGrid.columnconfigure(w, 0, 'weight'=>1, 'minsize'=>0)
end
diff --git a/ext/tk/sample/demos-jp/search.rb b/ext/tk/sample/demos-jp/search.rb
index 3ae7de769d..f5268f987f 100644
--- a/ext/tk/sample/demos-jp/search.rb
+++ b/ext/tk/sample/demos-jp/search.rb
@@ -8,9 +8,9 @@
# not affected, however.
#
# Arguments:
-# w - The window into which to load the file. Must be a
-# text widget.
-# file - The name of the file to load. Must be readable.
+# w - The window into which to load the file. Must be a
+# text widget.
+# file - The name of the file to load. Must be readable.
def textLoadFile(w,file)
w.delete('1.0', 'end')
@@ -26,10 +26,10 @@ end
# apply a given tag to each instance found.
#
# Arguments:
-# w - The window in which to search. Must be a text widget.
-# string - The string to search for. The search is done using
-# exact matching only; no special characters.
-# tag - Tag to apply to each instance of a matching string.
+# w - The window in which to search. Must be a text widget.
+# string - The string to search for. The search is done using
+# exact matching only; no special characters.
+# tag - Tag to apply to each instance of a matching string.
def textSearch(w, string, tag)
tag.remove('0.0', 'end')
@@ -50,15 +50,15 @@ end
# deleted) then it doesn't reschedule itself.
#
# Arguments:
-# cmd1 - Command to execute when method is called.
-# sleep1 - Ms to sleep after executing cmd1 before executing cmd2.
-# cmd2 - Command to execute in the *next* invocation of this method.
-# sleep2 - Ms to sleep after executing cmd2 before executing cmd1 again.
+# cmd1 - Command to execute when method is called.
+# sleep1 - Ms to sleep after executing cmd1 before executing cmd2.
+# cmd2 - Command to execute in the *next* invocation of this method.
+# sleep2 - Ms to sleep after executing cmd2 before executing cmd1 again.
def textToggle(cmd1,sleep1,cmd2,sleep2)
sleep_list = [sleep2, sleep1]
TkAfter.new(proc{sleep = sleep_list.shift; sleep_list.push(sleep); sleep},
- -1, cmd1, cmd2).start(sleep1)
+ -1, cmd1, cmd2).start(sleep1)
end
# toplevel widget ¤¬Â¸ºß¤¹¤ì¤Ðºï½ü¤¹¤ë
@@ -96,35 +96,35 @@ $search_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
# frame À¸À®
TkFrame.new($search_demo) {|f|
TkLabel.new(f, 'text'=>'¥Õ¥¡¥¤¥ë̾:',
- 'width'=>13, 'anchor'=>'w').pack('side'=>'left')
+ 'width'=>13, 'anchor'=>'w').pack('side'=>'left')
$search_fileName = TkVariable.new
TkEntry.new(f, 'width'=>40,
- 'textvariable'=>$search_fileName) {
+ 'textvariable'=>$search_fileName) {
pack('side'=>'left')
bind('Return', proc{textLoadFile($search_text, $search_fileName.value)
- $search_string_entry.focus})
+ $search_string_entry.focus})
focus
}
TkButton.new(f, 'text'=>'Æɤ߹þ¤ß',
- 'command'=>proc{textLoadFile($search_text,
- $search_fileName.value)})\
+ 'command'=>proc{textLoadFile($search_text,
+ $search_fileName.value)})\
.pack('side'=>'left', 'pady'=>5, 'padx'=>10)
}.pack('side'=>'top', 'fill'=>'x')
TkFrame.new($search_demo) {|f|
TkLabel.new(f, 'text'=>'¸¡º÷ʸ»úÎó:',
- 'width'=>13, 'anchor'=>'w').pack('side'=>'left')
+ 'width'=>13, 'anchor'=>'w').pack('side'=>'left')
$search_searchString = TkVariable.new
$search_string_entry = TkEntry.new(f, 'width'=>40,
- 'textvariable'=>$search_searchString) {
+ 'textvariable'=>$search_searchString) {
pack('side'=>'left')
bind('Return', proc{textSearch($search_text, $search_searchString.value,
- $search_Tag)})
+ $search_Tag)})
}
TkButton.new(f, 'text'=>'ȿž',
- 'command'=>proc{textSearch($search_text,
- $search_searchString.value,
- $search_Tag)}) {
+ 'command'=>proc{textSearch($search_text,
+ $search_searchString.value,
+ $search_Tag)}) {
pack('side'=>'left', 'pady'=>5, 'padx'=>10)
}
}.pack('side'=>'top', 'fill'=>'x')
@@ -142,24 +142,24 @@ $search_text = TkText.new($search_demo, 'setgrid'=>true) {|t|
if TkWinfo.depth($search_demo) > 1
textToggle(proc{
- $search_Tag.configure('background'=>'#ce5555',
- 'foreground'=>'white')
- },
- 800,
- proc{
- $search_Tag.configure('background'=>'', 'foreground'=>'')
- },
- 200 )
+ $search_Tag.configure('background'=>'#ce5555',
+ 'foreground'=>'white')
+ },
+ 800,
+ proc{
+ $search_Tag.configure('background'=>'', 'foreground'=>'')
+ },
+ 200 )
else
textToggle(proc{
- $search_Tag.configure('background'=>'black',
- 'foreground'=>'white')
- },
- 800,
- proc{
- $search_Tag.configure('background'=>'', 'foreground'=>'')
- },
- 200 )
+ $search_Tag.configure('background'=>'black',
+ 'foreground'=>'white')
+ },
+ 800,
+ proc{
+ $search_Tag.configure('background'=>'', 'foreground'=>'')
+ },
+ 200 )
end
$search_text.insert('1.0', "\
¤³¤Î¥¦¥£¥ó¥É¥¦¤Ï¸¡º÷µ¡¹½¤ò¼Â¸½¤¹¤ë¤Î¤Ë¥Æ¥­¥¹¥È widget ¤Î¥¿¥°µ¡Ç½¤¬¤É¤Î \
diff --git a/ext/tk/sample/demos-jp/spin.rb b/ext/tk/sample/demos-jp/spin.rb
index 69d6d71d8d..c7b8096723 100644
--- a/ext/tk/sample/demos-jp/spin.rb
+++ b/ext/tk/sample/demos-jp/spin.rb
@@ -16,8 +16,8 @@ $spin_demo = TkToplevel.new {|w|
}
TkLabel.new($spin_demo,
- :font=>$font, :wraplength=>'5i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
+ :font=>$font, :wraplength=>'5i', :justify=>:left,
+ :text=><<EOL).pack(:side=>:top)
²¼¤Ë¤Ï£³¼ïÎà¤Î¥¹¥Ô¥ó¥Ü¥Ã¥¯¥¹¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£\
¤½¤ì¤¾¤ì¡¢¥Þ¥¦¥¹¤ÇÁªÂò¤·¤Æʸ»ú¤òÆþÎϤ¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
ÊÔ½¸Áàºî¤È¤·¤Æ¤Ï¡¢Emacs ·Á¼°¤Î¿¤¯¤Ë²Ã¤¨¤Æ¡¢°ìÈÌŪ¤Ê
@@ -42,13 +42,13 @@ TkFrame.new($spin_demo){|f|
pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
TkButton.new(f, :text=>'ÊĤ¸¤ë', :width=>15, :command=>proc{
- $spin_demo.destroy
- $spin_demo = nil
- }).pack(:side=>:left, :expand=>true)
+ $spin_demo.destroy
+ $spin_demo = nil
+ }).pack(:side=>:left, :expand=>true)
TkButton.new(f, :text=>'¥³¡¼¥É»²¾È', :width=>15, :command=>proc{
- showCode 'spin'
- }).pack(:side=>:left, :expand=>true)
+ showCode 'spin'
+ }).pack(:side=>:left, :expand=>true)
}
australianCities = [
@@ -58,10 +58,10 @@ australianCities = [
[
TkSpinbox.new($spin_demo, :from=>1, :to=>10, :width=>10, :validate=>:key,
- :validatecommand=>[
- proc{|s| s == '' || /^[+-]?\d+$/ =~ s }, '%P'
- ]),
+ :validatecommand=>[
+ proc{|s| s == '' || /^[+-]?\d+$/ =~ s }, '%P'
+ ]),
TkSpinbox.new($spin_demo, :from=>0, :to=>3, :increment=>0.5,
- :format=>'%05.2f', :width=>10),
+ :format=>'%05.2f', :width=>10),
TkSpinbox.new($spin_demo, :values=>australianCities, :width=>10)
].each{|sbox| sbox.pack(:side=>:top, :pady=>5, :padx=>10)}
diff --git a/ext/tk/sample/demos-jp/style.rb b/ext/tk/sample/demos-jp/style.rb
index 458479611b..59e406bc80 100644
--- a/ext/tk/sample/demos-jp/style.rb
+++ b/ext/tk/sample/demos-jp/style.rb
@@ -62,13 +62,13 @@ TkText.new($style_demo){|t|
# unless $style_demo_do_first
# $style_demo_do_first = true
# Tk.tk_call('font', 'create', '@bigascii',
-# '-copy', '-*-Courier-Bold-R-Normal--*-140-*-*-*-*-*-*')
+# '-copy', '-*-Courier-Bold-R-Normal--*-140-*-*-*-*-*-*')
# Tk.tk_call('font', 'create', '@smallascii',
-# '-copy', '-Adobe-Helvetica-Bold-R-Normal-*-100-*')
+# '-copy', '-Adobe-Helvetica-Bold-R-Normal-*-100-*')
# Tk.tk_call('font', 'create', '@cBigFont',
-# '-compound', '@bigascii @msg_knj')
+# '-compound', '@bigascii @msg_knj')
# Tk.tk_call('font', 'create', '@cSmallFont',
-# '-compound', '@smallascii @kanji')
+# '-compound', '@smallascii @kanji')
# end
# style_tag_big = TkTextTag.new(t, 'font'=>'@cBigFont')
# style_tag_small = TkTextTag.new(t, 'font'=>'@cSmallFont')
@@ -82,24 +82,24 @@ TkText.new($style_demo){|t|
style_tag_sunken = TkTextTag.new(t, 'relief'=>'sunken', 'borderwidth'=>1)
else
style_tag_color1 = TkTextTag.new(t, 'background'=>'black',
- 'foreground'=>'white')
+ 'foreground'=>'white')
style_tag_color2 = TkTextTag.new(t, 'background'=>'black',
- 'foreground'=>'white')
+ 'foreground'=>'white')
style_tag_raised = TkTextTag.new(t, 'background'=>'white',
- 'relief'=>'raised', 'borderwidth'=>1)
+ 'relief'=>'raised', 'borderwidth'=>1)
style_tag_sunken = TkTextTag.new(t, 'background'=>'white',
- 'relief'=>'sunken', 'borderwidth'=>1)
+ 'relief'=>'sunken', 'borderwidth'=>1)
end
# ¥Æ¥­¥¹¥È¥¿¥°ÀßÄê (¤½¤Î¾)
if $tk_version =~ /^4\.[01]/
style_tag_bgstipple = TkTextTag.new(t, 'background'=>'black',
- 'borderwidth'=>0,
- 'bgstipple'=>'gray25')
+ 'borderwidth'=>0,
+ 'bgstipple'=>'gray25')
else
style_tag_bgstipple = TkTextTag.new(t, 'background'=>'black',
- 'borderwidth'=>0,
- 'bgstipple'=>'gray12')
+ 'borderwidth'=>0,
+ 'bgstipple'=>'gray12')
end
style_tag_fgstipple = TkTextTag.new(t, 'fgstipple'=>'gray50')
style_tag_underline = TkTextTag.new(t, 'underline'=>'on')
@@ -109,10 +109,10 @@ TkText.new($style_demo){|t|
style_tag_super = TkTextTag.new(t, 'offset'=>'4p', 'font'=>'-Adobe-Courier-Medium-R-Normal--*-100-*-*-*-*-*-*')
style_tag_sub = TkTextTag.new(t, 'offset'=>'-2p', 'font'=>'-Adobe-Courier-Medium-R-Normal--*-100-*-*-*-*-*-*')
style_tag_margins = TkTextTag.new(t, 'lmargin1'=>'12m', 'lmargin2'=>'6m',
- 'rmargin'=>'10m')
+ 'rmargin'=>'10m')
style_tag_spacing = TkTextTag.new(t, 'spacing1'=>'10p', 'spacing2'=>'2p',
- 'lmargin1'=>'12m', 'lmargin2'=>'6m',
- 'rmargin'=>'10m')
+ 'lmargin1'=>'12m', 'lmargin2'=>'6m',
+ 'rmargin'=>'10m')
# ¥Æ¥­¥¹¥ÈÁÞÆþ
insert('end', '¤³¤Î¤è¤¦¤Ë¥Æ¥­¥¹¥È widget ¤Ï¾ðÊó¤òÍÍ¡¹¤Ê¥¹¥¿¥¤¥ë¤Çɽ¼¨¤¹¤ë¤³¤È
@@ -198,9 +198,9 @@ X')
insert('end', '¥Æ¥­¥¹¥È¤Îº¸Â¦¤Ë;ʬ¤Ê¶õÇò¤òÃÖ¤¯¤³¤È¤¬¤Ç¤­¤Þ¤¹:
')
insert('end', '¤³¤ÎÃÊÍî¤Ï¥Þ¡¼¥¸¥ó¤Î»ÈÍÑÎã¤Ç¤¹¡£¥¹¥¯¥ê¡¼¥ó',
- style_tag_margins)
+ style_tag_margins)
insert('end', '¾å¤ÇÀÞ¤êÊÖ¤µ¤ì¤Æɽ¼¨¤µ¤ì¤Æ¤¤¤ë1¹Ô¤Î¥Æ¥­¥¹¥È¤Ç¤¹¡£',
- style_tag_margins)
+ style_tag_margins)
insert('end', 'º¸Â¦¤Ë¤Ï2¼ïÎà¤Î¥Þ¡¼¥¸¥ó¤ò»ý¤Á¤Þ¤¹¡£', style_tag_margins)
insert('end', '1¹ÔÌܤËÂФ¹¤ë¤â¤Î¤È¡¢', style_tag_margins)
insert('end', '2¹ÔÌܰʹߤÎϢ³¤·¤¿¥Þ¡¼¥¸¥ó', style_tag_margins)
@@ -222,9 +222,9 @@ spacing3')
¤¯¤«¤ò¼¨¤·¤Þ¤¹¡£
')
insert('end', '¤³¤ì¤é¤Î¥¤¥ó¥Ç¥ó¥È¤µ¤ì¤¿ÃÊÍî¤Ï¤É¤Î¤è¤¦¤Ë',
- style_tag_spacing)
+ style_tag_spacing)
insert('end', '¥¹¥Ú¡¼¥·¥ó¥°¤¬¤¬¹Ô¤ï¤ì¤ë¤Î¤«¤ò¼¨¤·¤Þ¤¹¡£',
- style_tag_spacing)
+ style_tag_spacing)
insert('end', '³ÆÃÊÍî¤Ï¼ÂºÝ¤Ï¥Æ¥­¥¹¥Èwidget', style_tag_spacing)
insert('end', '¤Î1¹Ô¤Ç¡¢widget¤Ë¤è¤Ã¤ÆÀÞ¤ê¾ö¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£
', style_tag_spacing)
@@ -234,11 +234,11 @@ spacing3')
insert('end', '¸ºß¤·¤Æ¤¤¤Þ¤¹¡£', style_tag_spacing)
insert('end', 'Spacing2¤Ï2point¤ËÀßÄꤵ¤ì¤Æ¤¤¤Þ¤¹¡£', style_tag_spacing)
insert('end', '¤³¤ì¤ÇÃÊÍî¤ÎÃæ¤Ë¤Û¤ó¤Î¾¯¤·´Ö³Ö¤¬Â¸ºß¤·¤Æ¤¤¤Þ¤¹¡£',
- style_tag_spacing)
+ style_tag_spacing)
insert('end', 'Spacing3¤Ï¤³¤ÎÎã¤Ç¤Ï»ÈÍѤµ¤ì¤Æ¤¤¤Þ¤»¤ó¡£
', style_tag_spacing)
insert('end', '´Ö³Ö¤¬¤É¤³¤Ë¤¢¤ë¤«¤ò¸«¤¿¤±¤ì¤Ð¡¢¤³¤ì¤é¤ÎÃÊÍî¤Î',
- style_tag_spacing)
+ style_tag_spacing)
insert('end', '¤Ê¤«¤Ç¥Æ¥­¥¹¥È¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£ÁªÂò¤Î', style_tag_spacing)
insert('end', 'ȿž¤·¤¿Éôʬ¤Ë¤Ï;ʬ¤Ë¤È¤é¤ì¤¿´Ö³Ö¤¬', style_tag_spacing)
insert('end', '´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£
diff --git a/ext/tk/sample/demos-jp/text.rb b/ext/tk/sample/demos-jp/text.rb
index bec95ee525..0057d5dbdc 100644
--- a/ext/tk/sample/demos-jp/text.rb
+++ b/ext/tk/sample/demos-jp/text.rb
@@ -92,16 +92,16 @@ TkText.new($text_demo){|t|
¥³¥ó¥È¥í¡¼¥ë-K ¤ÏÁÞÆþ¥«¡¼¥½¥ë¤«¤é¹ÔËö¤Þ¤Ç¤òºï½ü¤·¡¢¤½¤Î°ÌÃ֤˲þ¹Ô
¤·¤«¤Ê¤«¤Ã¤¿¾ì¹ç¤Ï¡¢²þ¹Ô¤òºï½ü¤·¤Þ¤¹¡£#{
if undo_support
- undo_text = "Control-z ¤ÏºÇ¸å¤Ë¹Ô¤Ã¤¿Êѹ¹¤Î¼è¤ê¾Ã¤·(undo)¤ò¹Ô¤¤¡¢"
- case $tk_platform['platform']
- when "unix", "macintosh"
- undo_text << "Control-Shift-z"
- else # 'windows'
- undo_text << "Control-y"
- end
- undo_text << "¤Ïundo¤·¤¿Êѹ¹¤ÎºÆŬÍÑ(redo)¤ò¹Ô¤¤¤Þ¤¹¡£"
+ undo_text = "Control-z ¤ÏºÇ¸å¤Ë¹Ô¤Ã¤¿Êѹ¹¤Î¼è¤ê¾Ã¤·(undo)¤ò¹Ô¤¤¡¢"
+ case $tk_platform['platform']
+ when "unix", "macintosh"
+ undo_text << "Control-Shift-z"
+ else # 'windows'
+ undo_text << "Control-y"
+ end
+ undo_text << "¤Ïundo¤·¤¿Êѹ¹¤ÎºÆŬÍÑ(redo)¤ò¹Ô¤¤¤Þ¤¹¡£"
else
- ""
+ ""
end
}
diff --git a/ext/tk/sample/demos-jp/twind.rb b/ext/tk/sample/demos-jp/twind.rb
index 8716ad7278..2b228e4acd 100644
--- a/ext/tk/sample/demos-jp/twind.rb
+++ b/ext/tk/sample/demos-jp/twind.rb
@@ -37,10 +37,10 @@ $twind_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
# frame À¸À®
$twind_text = nil
TkFrame.new($twind_demo, 'highlightthickness'=>2, 'borderwidth'=>2,
- 'relief'=>'sunken') {|f|
+ 'relief'=>'sunken') {|f|
$twind_text = TkText.new(f, 'setgrid'=>'true', 'font'=>$font,
- 'width'=>'70', 'height'=>35, 'wrap'=>'word',
- 'highlightthickness'=>0, 'borderwidth'=>0 ){|t|
+ 'width'=>'70', 'height'=>35, 'wrap'=>'word',
+ 'highlightthickness'=>0, 'borderwidth'=>0 ){|t|
TkScrollbar.new(f) {|s|
command proc{|*args| t.yview(*args)}
t.yscrollcommand proc{|first,last| s.set first,last}
@@ -50,60 +50,60 @@ TkFrame.new($twind_demo, 'highlightthickness'=>2, 'borderwidth'=>2,
# ¥¿¥°À¸À®
$tag_center = TkTextTag.new($twind_text,
- 'justify' =>'center',
- 'spacing1'=>'5m',
- 'spacing3'=>'5m' )
+ 'justify' =>'center',
+ 'spacing1'=>'5m',
+ 'spacing3'=>'5m' )
$tag_buttons = TkTextTag.new($twind_text,
- 'lmargin1'=>'1c',
- 'lmargin2'=>'1c',
- 'rmargin' =>'1c',
- 'spacing1'=>'3m',
- 'spacing2'=>0,
- 'spacing3'=>0 )
+ 'lmargin1'=>'1c',
+ 'lmargin2'=>'1c',
+ 'rmargin' =>'1c',
+ 'spacing1'=>'3m',
+ 'spacing2'=>0,
+ 'spacing3'=>0 )
# ¥Æ¥­¥¹¥È¤ÎÀ¸À®
$twind_text.insert('end',
- '¥Æ¥­¥¹¥Èwidget¾å¤Ë¾¤Îwidget¤òÁȤ߹þ¤à¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£')
+ '¥Æ¥­¥¹¥Èwidget¾å¤Ë¾¤Îwidget¤òÁȤ߹þ¤à¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£')
$twind_text.insert('end',
- 'ÁȤ߹þ¤ß¥¦¥£¥ó¥É¥¦¤È¸Æ¤Ð¤ì¡¢Ç¤°Õ¤Îwidget¤¬²Äǽ¤Ç¤¹¡£')
+ 'ÁȤ߹þ¤ß¥¦¥£¥ó¥É¥¦¤È¸Æ¤Ð¤ì¡¢Ç¤°Õ¤Îwidget¤¬²Äǽ¤Ç¤¹¡£')
$twind_text.insert('end',
- 'Î㤨¤Ð¡¢¤³¤³¤Ë2¤Ä¤Î¥Ü¥¿¥ówidget¤¬ÁȤ߹þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£')
+ 'Î㤨¤Ð¡¢¤³¤³¤Ë2¤Ä¤Î¥Ü¥¿¥ówidget¤¬ÁȤ߹þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£')
$twind_text.insert('end', 'ºÇ½é¤Î¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤È¿åÊ¿Êý¸þ¤Î¥¹¥¯¥í¡¼¥ë¤ò')
TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {
- #text 'ON'
- text '¥ª¥ó'
- command proc{textWindOn $twind_text,$twind_buttons}
- cursor 'top_left_arrow'
- })
+ 'window'=>TkButton.new($twind_text) {
+ #text 'ON'
+ text '¥ª¥ó'
+ command proc{textWindOn $twind_text,$twind_buttons}
+ cursor 'top_left_arrow'
+ })
$twind_text.insert('end', "¤Ë¤·¤Þ¤¹¡£¤Þ¤¿2¤Ä¤á¤Î¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È\n")
$twind_text.insert('end', '¿åÊ¿Êý¸þ¤Î¥¹¥¯¥í¡¼¥ë¤ò')
TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {
- #text 'OFF'
- text '¥ª¥Õ'
- command proc{textWindOff $twind_text}
- cursor 'top_left_arrow'
- })
+ 'window'=>TkButton.new($twind_text) {
+ #text 'OFF'
+ text '¥ª¥Õ'
+ command proc{textWindOff $twind_text}
+ cursor 'top_left_arrow'
+ })
$twind_text.insert('end', '¤Ë¤·¤Þ¤¹¡£')
$twind_text.insert('end', '¤â¤¦¤Ò¤È¤Ä¤ÎÎã¤Ç¤¹¡£')
TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {
- text '¤³¤³¤ò¥¯¥ê¥Ã¥¯'
- command proc{textWindPlot $twind_text}
- cursor 'top_left_arrow'
- })
+ 'window'=>TkButton.new($twind_text) {
+ text '¤³¤³¤ò¥¯¥ê¥Ã¥¯'
+ command proc{textWindPlot $twind_text}
+ cursor 'top_left_arrow'
+ })
$twind_text.insert('end', '¤¹¤ë¤È¡¢x-y¥×¥í¥Ã¥È¤¬¤³¤³¤Ë¸½¤ì¤Þ¤¹¡£')
$mark_plot = TkTextMark.new($twind_text, 'insert')
$mark_plot.gravity='left'
$twind_text.insert('end', '¥Þ¥¦¥¹¤Ç¥Ç¡¼¥¿¤òÉÁ²è¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£')
TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {
- text '¾Ãµî'
- command proc{textWindDel $twind_text}
- cursor 'top_left_arrow'
- })
+ 'window'=>TkButton.new($twind_text) {
+ text '¾Ãµî'
+ command proc{textWindDel $twind_text}
+ cursor 'top_left_arrow'
+ })
$twind_text.insert('end', '¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¸µ¤ËÌá¤ê¤Þ¤¹¡£
')
@@ -123,27 +123,27 @@ $twind_text.insert('end', '¤â¤¦°ìÅÙƱ¤¸¥Ü¥¿¥ó¤ò²¡¤¹¤È¸µ¤ËÌá¤ê¤Þ¤¹¡£
')
TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {|b|
- text '¥Ç¥Õ¥©¥ë¥È'
- command proc{embDefBg $twind_text}
- cursor 'top_left_arrow'
- $tag_buttons.add('end')
- },
- 'padx'=>3 )
+ 'window'=>TkButton.new($twind_text) {|b|
+ text '¥Ç¥Õ¥©¥ë¥È'
+ command proc{embDefBg $twind_text}
+ cursor 'top_left_arrow'
+ $tag_buttons.add('end')
+ },
+ 'padx'=>3 )
embToggle = TkVariable.new('Short')
TkTextWindow.new($twind_text, 'end',
- 'window'=>TkCheckButton.new($twind_text) {
- textvariable embToggle
- indicatoron 0
- variable embToggle
- onvalue 'A much longer string'
- offvalue 'Short'
- cursor 'top_left_arrow'
- pady 5
- padx 2
- },
- 'padx'=>3,
- 'pady'=>2 )
+ 'window'=>TkCheckButton.new($twind_text) {
+ textvariable embToggle
+ indicatoron 0
+ variable embToggle
+ onvalue 'A much longer string'
+ offvalue 'Short'
+ cursor 'top_left_arrow'
+ pady 5
+ padx 2
+ },
+ 'padx'=>3,
+ 'pady'=>2 )
[ 'AntiqueWhite3', 'Bisque1', 'Bisque2', 'Bisque3', 'Bisque4',
'SlateBlue3', 'RoyalBlue1', 'SteelBlue2', 'DeepSkyBlue3', 'LightBlue1',
@@ -151,13 +151,13 @@ TkTextWindow.new($twind_text, 'end',
'Yellow1', 'IndianRed1', 'IndianRed2', 'Tan1', 'Tan4'
].each{|twind_color|
TkTextWindow.new($twind_text, 'end',
- 'window'=>TkButton.new($twind_text) {
- text twind_color
- cursor 'top_left_arrow'
- command proc{$twind_text.bg twind_color}
- },
- 'padx'=>3,
- 'pady'=>2 )
+ 'window'=>TkButton.new($twind_text) {
+ text twind_color
+ cursor 'top_left_arrow'
+ command proc{$twind_text.bg twind_color}
+ },
+ 'padx'=>3,
+ 'pady'=>2 )
}
# ¥á¥½¥Ã¥ÉÄêµÁ
@@ -211,39 +211,39 @@ def textWindPlot (t)
TkcLine.new($twind_plot, 100, 250, 400, 250, 'width'=>2)
TkcLine.new($twind_plot, 100, 250, 100, 50, 'width'=>2)
TkcText.new($twind_plot, 225, 20,
- 'text'=>"A Simple Plot", 'font'=>font, 'fill'=>'brown')
+ 'text'=>"A Simple Plot", 'font'=>font, 'fill'=>'brown')
(0..10).each {|i|
x = 100 + (i * 30)
TkcLine.new($twind_plot, x, 250, x, 245, 'width'=>2)
TkcText.new($twind_plot, x, 254,
- 'text'=>10*i, 'font'=>font, 'anchor'=>'n')
+ 'text'=>10*i, 'font'=>font, 'anchor'=>'n')
}
(0..5).each {|i|
y = 250 - (i * 40)
TkcLine.new($twind_plot, 100, y, 105, y, 'width'=>2)
TkcText.new($twind_plot, 96, y,
- 'text'=>"#{i*50}.0", 'font'=>font, 'anchor'=>'e')
+ 'text'=>"#{i*50}.0", 'font'=>font, 'anchor'=>'e')
}
for xx, yy in [[12,56],[20,94],[33,98],[32,120],[61,180],[75,160],[98,223]]
x = 100 + (3*xx)
y = 250 - (4*yy)/5
item = TkcOval.new($twind_plot, x-6, y-6, x+6, y+6,
- 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
+ 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
item.addtag 'point'
end
$twind_plot.itembind('point', 'Any-Enter',
- proc{$twind_plot.itemconfigure 'current', 'fill', 'red'})
+ proc{$twind_plot.itemconfigure 'current', 'fill', 'red'})
$twind_plot.itembind('point', 'Any-Leave',
- proc{$twind_plot.itemconfigure 'current', 'fill', 'SkyBlue2'})
+ proc{$twind_plot.itemconfigure 'current', 'fill', 'SkyBlue2'})
$twind_plot.itembind('point', '1',
- proc{|x,y| embPlotDown $twind_plot,x,y}, "%x %y")
+ proc{|x,y| embPlotDown $twind_plot,x,y}, "%x %y")
$twind_plot.itembind('point', 'ButtonRelease-1',
- proc{$twind_plot.dtag 'selected'})
+ proc{$twind_plot.dtag 'selected'})
$twind_plot.bind('B1-Motion',
- proc{|x,y| embPlotMove $twind_plot,x,y}, "%x %y")
+ proc{|x,y| embPlotMove $twind_plot,x,y}, "%x %y")
while ($twind_text.get($mark_plot) =~ /[ \t\n]/)
$twind_text.delete $mark_plot
end
diff --git a/ext/tk/sample/demos-jp/twind2.rb b/ext/tk/sample/demos-jp/twind2.rb
index 8c871688b3..b634f07b4b 100644
--- a/ext/tk/sample/demos-jp/twind2.rb
+++ b/ext/tk/sample/demos-jp/twind2.rb
@@ -18,20 +18,20 @@ $twind2_demo = TkToplevel.new {|w|
# frame À¸À®
$twind2_buttons = TkFrame.new($twind2_demo) {|frame|
TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2),
- :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
+ :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
TkGrid('x',
- TkButton.new(frame, :text=>'¥³¡¼¥É»²¾È',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'twind2'}),
- TkButton.new(frame, :text=>'ÊĤ¸¤ë',
- :image=>$image['delete'], :compound=>:left,
- :command=>proc{
- tmppath = $twind2_demo
- $twind2_demo = nil
- $showVarsWin[tmppath.path] = nil
- tmppath.destroy
- }),
- :padx=>4, :pady=>4)
+ TkButton.new(frame, :text=>'¥³¡¼¥É»²¾È',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{showCode 'twind2'}),
+ TkButton.new(frame, :text=>'ÊĤ¸¤ë',
+ :image=>$image['delete'], :compound=>:left,
+ :command=>proc{
+ tmppath = $twind2_demo
+ $twind2_demo = nil
+ $showVarsWin[tmppath.path] = nil
+ tmppath.destroy
+ }),
+ :padx=>4, :pady=>4)
frame.grid_columnconfigure(0, :weight=>1)
}
$twind2_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
@@ -39,11 +39,11 @@ $twind2_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
# frame À¸À®
$twind2_text = nil
TkFrame.new($twind2_demo, 'highlightthickness'=>2, 'borderwidth'=>2,
- 'relief'=>'sunken') {|f|
+ 'relief'=>'sunken') {|f|
$twind2_text = TkText.new(f, 'setgrid'=>true, 'font'=>$font,
- # 'width'=>'70', 'height'=>35, 'wrap'=>'word',
- 'width'=>'70', 'height'=>35, 'wrap'=>'char',
- 'highlightthickness'=>0, 'borderwidth'=>0 ){|t|
+ # 'width'=>'70', 'height'=>35, 'wrap'=>'word',
+ 'width'=>'70', 'height'=>35, 'wrap'=>'char',
+ 'highlightthickness'=>0, 'borderwidth'=>0 ){|t|
TkScrollbar.new(f) {|s|
command proc{|*args| t.yview(*args)}
t.yscrollcommand proc{|first,last| s.set first,last}
@@ -53,16 +53,16 @@ TkFrame.new($twind2_demo, 'highlightthickness'=>2, 'borderwidth'=>2,
# ¥¿¥°À¸À®
$tag2_center = TkTextTag.new($twind2_text,
- 'justify' =>'center',
- 'spacing1'=>'5m',
- 'spacing3'=>'5m' )
+ 'justify' =>'center',
+ 'spacing1'=>'5m',
+ 'spacing3'=>'5m' )
$tag2_buttons = TkTextTag.new($twind2_text,
- 'lmargin1'=>'1c',
- 'lmargin2'=>'1c',
- 'rmargin' =>'1c',
- 'spacing1'=>'3m',
- 'spacing2'=>0,
- 'spacing3'=>0 )
+ 'lmargin1'=>'1c',
+ 'lmargin2'=>'1c',
+ 'rmargin' =>'1c',
+ 'spacing1'=>'3m',
+ 'spacing2'=>0,
+ 'spacing3'=>0 )
# ¥Æ¥­¥¹¥È¤ÎÀ¸À®
$twind2_text.insert('end', '¥Æ¥­¥¹¥È¥¦¥£¥¸¥§¥Ã¥È¤Ë¤Ï¿§¡¹¤Ê¼ïÎà¤Î¥¢¥¤¥Æ¥à')
@@ -84,41 +84,41 @@ $twind2_text.insert('end', '¥Ü¥¿¥ó¥¦¥£¥¸¥§¥Ã¥È¤¬Ëä¤á¹þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£')
$twind2_text.insert('end', 'ºÇ½é¤Î¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢')
$twind2_text.insert('end', '¿åÊ¿Êý¸þ¤Î¥¹¥¯¥í¡¼¥ë¤ò ')
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text) {
- #text 'ON'
- text '¥ª¥ó'
- command proc{textWindOn2 $twind2_text,$twind2_buttons}
- cursor 'top_left_arrow'
- })
+ 'window'=>TkButton.new($twind2_text) {
+ #text 'ON'
+ text '¥ª¥ó'
+ command proc{textWindOn2 $twind2_text,$twind2_buttons}
+ cursor 'top_left_arrow'
+ })
$twind2_text.insert('end', "¤Ë¤·¤Þ¤¹¡£¤Þ¤¿¡¢£²¤Ä¤á¤Î¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È\n")
$twind2_text.insert('end', '¿åÊ¿Êý¸þ¤Î¥¹¥¯¥í¡¼¥ë¤ò')
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text) {
- #text 'OFF'
- text '¥ª¥Õ'
- command proc{textWindOff2 $twind2_text}
- cursor 'top_left_arrow'
- })
+ 'window'=>TkButton.new($twind2_text) {
+ #text 'OFF'
+ text '¥ª¥Õ'
+ command proc{textWindOff2 $twind2_text}
+ cursor 'top_left_arrow'
+ })
$twind2_text.insert('end', "¤Ë¤·¤Þ¤¹¡£\n\n")
$twind2_text.insert('end', '¼¡¤Ï¤â¤¦¤Ò¤È¤Ä¤ÎÎã¤Ç¤¹¡£')
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text) {
- text '¤³¤³¤ò¥¯¥ê¥Ã¥¯'
- command proc{textWindPlot2 $twind2_text}
- cursor 'top_left_arrow'
- })
+ 'window'=>TkButton.new($twind2_text) {
+ text '¤³¤³¤ò¥¯¥ê¥Ã¥¯'
+ command proc{textWindPlot2 $twind2_text}
+ cursor 'top_left_arrow'
+ })
$twind2_text.insert('end', '¤¹¤ë¤È¡¢x-y¥×¥í¥Ã¥È¤¬¤³¤³¤Ë¸½¤ì¤Þ¤¹¡£')
$mark2_plot = TkTextMark.new($twind2_text, 'insert')
$mark2_plot.gravity='left'
$twind2_text.insert('end', '¥Þ¥¦¥¹¤Ç¥É¥é¥Ã¥°¤¹¤ë¤³¤È¤Ç¡¢')
$twind2_text.insert('end', '¥×¥í¥Ã¥È¾å¤Î¥Ç¡¼¥¿ÅÀ¤ò°ÜÆ°¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£')
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text) {
- text '¾Ãµî'
- command proc{textWindDel2 $twind2_text}
- cursor 'top_left_arrow'
- })
+ 'window'=>TkButton.new($twind2_text) {
+ text '¾Ãµî'
+ command proc{textWindDel2 $twind2_text}
+ cursor 'top_left_arrow'
+ })
$twind2_text.insert('end', '¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¸µ¤ËÌá¤ê¤Þ¤¹¡£')
$twind2_text.insert('end', "\n\n")
@@ -146,18 +146,18 @@ btn_default = TkButton.new($twind2_text) {|b|
TkTextWindow.new($twind2_text, 'end', 'window'=>btn_default, 'padx'=>3)
embToggle = TkVariable.new('Short')
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkCheckButton.new($twind2_text) {
- textvariable embToggle
- indicatoron 0
- variable embToggle
- onvalue 'A much longer string'
- offvalue 'Short'
- cursor 'top_left_arrow'
- pady 5
- padx 2
- },
- 'padx'=>3,
- 'pady'=>2 )
+ 'window'=>TkCheckButton.new($twind2_text) {
+ textvariable embToggle
+ indicatoron 0
+ variable embToggle
+ onvalue 'A much longer string'
+ offvalue 'Short'
+ cursor 'top_left_arrow'
+ pady 5
+ padx 2
+ },
+ 'padx'=>3,
+ 'pady'=>2 )
[ 'AntiqueWhite3', 'Bisque1', 'Bisque2', 'Bisque3', 'Bisque4',
'SlateBlue3', 'RoyalBlue1', 'SteelBlue2', 'DeepSkyBlue3', 'LightBlue1',
@@ -165,13 +165,13 @@ TkTextWindow.new($twind2_text, 'end',
'Yellow1', 'IndianRed1', 'IndianRed2', 'Tan1', 'Tan4'
].each{|twind_color|
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text) {
- text twind_color
- cursor 'top_left_arrow'
- command proc{$twind2_text.bg twind_color}
- },
- 'padx'=>3,
- 'pady'=>2 )
+ 'window'=>TkButton.new($twind2_text) {
+ text twind_color
+ cursor 'top_left_arrow'
+ command proc{$twind2_text.bg twind_color}
+ },
+ 'padx'=>3,
+ 'pady'=>2 )
}
$tag2_buttons.add(btn_default, 'end')
@@ -185,55 +185,55 @@ $twind2_text.insert('end', "\nborder width ¤ä highlightthickness, ")
$twind2_text.insert('end', "padding ¤òÄ̾ï¤ÎÃͤ«¤éÊѹ¹¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£\n")
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Big borders",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinBigB2 $twind2_text
- }))
+ 'window'=>TkButton.new($twind2_text, :text=>"Big borders",
+ :cursor=>'top_left_arrow',
+ 'command'=>proc{
+ textWinBigB2 $twind2_text
+ }))
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Small borders",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinSmallB2 $twind2_text
- }))
+ 'window'=>TkButton.new($twind2_text, :text=>"Small borders",
+ :cursor=>'top_left_arrow',
+ 'command'=>proc{
+ textWinSmallB2 $twind2_text
+ }))
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Big highlight",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinBigH2 $twind2_text
- }))
+ 'window'=>TkButton.new($twind2_text, :text=>"Big highlight",
+ :cursor=>'top_left_arrow',
+ 'command'=>proc{
+ textWinBigH2 $twind2_text
+ }))
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Small highlight",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinSmallH2 $twind2_text
- }))
+ 'window'=>TkButton.new($twind2_text, :text=>"Small highlight",
+ :cursor=>'top_left_arrow',
+ 'command'=>proc{
+ textWinSmallH2 $twind2_text
+ }))
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Big pad",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinBigP2 $twind2_text
- }))
+ 'window'=>TkButton.new($twind2_text, :text=>"Big pad",
+ :cursor=>'top_left_arrow',
+ 'command'=>proc{
+ textWinBigP2 $twind2_text
+ }))
TkTextWindow.new($twind2_text, 'end',
- 'window'=>TkButton.new($twind2_text, :text=>"Small pad",
- :cursor=>'top_left_arrow',
- 'command'=>proc{
- textWinSmallP2 $twind2_text
- }))
+ 'window'=>TkButton.new($twind2_text, :text=>"Small pad",
+ :cursor=>'top_left_arrow',
+ 'command'=>proc{
+ textWinSmallP2 $twind2_text
+ }))
$twind2_text.insert('end', "\n\n¹¹¤Ë¥¤¥á¡¼¥¸¤â¥Æ¥­¥¹¥È¥¦¥£¥¸¥§¥Ã¥È¤Ë")
$twind2_text.insert('end', "¤¦¤Þ¤¯ÇÛÃ֤Ǥ­¤Þ¤¹¡§")
TkTextImage.new($twind2_text, 'end',
- 'image'=>TkBitmapImage.new(:file=>[
- $demo_dir, '..',
- 'images', 'face.xbm'
- ].join(File::Separator)))
+ 'image'=>TkBitmapImage.new(:file=>[
+ $demo_dir, '..',
+ 'images', 'face.xbm'
+ ].join(File::Separator)))
# ¥á¥½¥Ã¥ÉÄêµÁ
def textWinBigB2(w)
@@ -307,39 +307,39 @@ def textWindPlot2 (t)
TkcLine.new($twind2_plot, 100, 250, 400, 250, 'width'=>2)
TkcLine.new($twind2_plot, 100, 250, 100, 50, 'width'=>2)
TkcText.new($twind2_plot, 225, 20,
- 'text'=>"A Simple Plot", 'font'=>font, 'fill'=>'brown')
+ 'text'=>"A Simple Plot", 'font'=>font, 'fill'=>'brown')
(0..10).each {|i|
x = 100 + (i * 30)
TkcLine.new($twind2_plot, x, 250, x, 245, 'width'=>2)
TkcText.new($twind2_plot, x, 254,
- 'text'=>10*i, 'font'=>font, 'anchor'=>'n')
+ 'text'=>10*i, 'font'=>font, 'anchor'=>'n')
}
(0..5).each {|i|
y = 250 - (i * 40)
TkcLine.new($twind2_plot, 100, y, 105, y, 'width'=>2)
TkcText.new($twind2_plot, 96, y,
- 'text'=>"#{i*50}.0", 'font'=>font, 'anchor'=>'e')
+ 'text'=>"#{i*50}.0", 'font'=>font, 'anchor'=>'e')
}
for xx, yy in [[12,56],[20,94],[33,98],[32,120],[61,180],[75,160],[98,223]]
x = 100 + (3*xx)
y = 250 - (4*yy)/5
item = TkcOval.new($twind2_plot, x-6, y-6, x+6, y+6,
- 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
+ 'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
item.addtag 'point'
end
$twind2_plot.itembind('point', 'Any-Enter',
- proc{$twind2_plot.itemconfigure 'current', 'fill', 'red'})
+ proc{$twind2_plot.itemconfigure 'current', 'fill', 'red'})
$twind2_plot.itembind('point', 'Any-Leave',
- proc{$twind2_plot.itemconfigure 'current', 'fill', 'SkyBlue2'})
+ proc{$twind2_plot.itemconfigure 'current', 'fill', 'SkyBlue2'})
$twind2_plot.itembind('point', '1',
- proc{|x,y| embPlotDown2 $twind2_plot,x,y}, "%x %y")
+ proc{|x,y| embPlotDown2 $twind2_plot,x,y}, "%x %y")
$twind2_plot.itembind('point', 'ButtonRelease-1',
- proc{$twind2_plot.dtag 'selected'})
+ proc{$twind2_plot.dtag 'selected'})
$twind2_plot.bind('B1-Motion',
- proc{|x,y| embPlotMove2 $twind2_plot,x,y}, "%x %y")
+ proc{|x,y| embPlotMove2 $twind2_plot,x,y}, "%x %y")
while ($twind2_text.get($mark2_plot) =~ /[ \t\n]/)
$twind2_text.delete $mark2_plot
end
diff --git a/ext/tk/sample/demos-jp/unicodeout.rb b/ext/tk/sample/demos-jp/unicodeout.rb
index 37cc1699bb..090cdf3059 100644
--- a/ext/tk/sample/demos-jp/unicodeout.rb
+++ b/ext/tk/sample/demos-jp/unicodeout.rb
@@ -17,8 +17,8 @@ $unicodeout_demo = TkToplevel.new {|w|
}
TkLabel.new($unicodeout_demo,
- :font=>$font, :wraplength=>'5.4i', :justify=>:left,
- :text=><<EOL).pack(:side=>:top)
+ :font=>$font, :wraplength=>'5.4i', :justify=>:left,
+ :text=><<EOL).pack(:side=>:top)
¤³¤ì¤Ï¡¤Tk¤Ë¤ª¤±¤ëÈó²¤ÊÆʸ»ú½¸¹ç¤òÍѤ¤¤ë¸À¸ì¤ËÂФ¹¤ë¥µ¥Ý¡¼¥È¤Ë¤Ä¤¤¤Æ¤Î\
¥µ¥ó¥×¥ë¤Ç¤¹¡¥¤¿¤À¤·¡¤²¼¤Îɽ¼¨¤Ë¤ª¤¤¤Æ¤¢¤Ê¤¿¤¬¼ÂºÝ¤Ë¤É¤Î¤è¤¦¤Êɽ¼¨¤ò\
Ìܤˤ¹¤ë¤«¤Ï¡¤¤¢¤Ê¤¿¤Î´Ä¶­¤Ë¤É¤Î¤è¤¦¤Êʸ»ú½¸¹ç¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤«¤Ë\
@@ -42,19 +42,19 @@ TkFrame.new($unicodeout_demo){|f|
pack(:side=>:bottom, :fill=>:x, :pady=>'2m')
TkButton.new(f, :text=>'ÊĤ¸¤ë', :width=>15, :command=>proc{
- $unicodeout_demo.destroy
- $unicodeout_demo = nil
- }).pack(:side=>:left, :expand=>true)
+ $unicodeout_demo.destroy
+ $unicodeout_demo = nil
+ }).pack(:side=>:left, :expand=>true)
TkButton.new(f, :text=>'¥³¡¼¥É»²¾È', :width=>15, :command=>proc{
- showCode 'unicodeout'
- }).pack(:side=>:left, :expand=>true)
+ showCode 'unicodeout'
+ }).pack(:side=>:left, :expand=>true)
}
wait_msg = TkLabel.new($unicodeout_demo,
- :text=>"¥Õ¥©¥ó¥ÈÆɤ߹þ¤ß¤Î´°Î»¤Þ¤Ç" +
- "¤·¤Ð¤é¤¯¤ªÂÔ¤Á²¼¤µ¤¤¡¥¡¥¡¥",
- :font=>"Helvetica 12 italic").pack
+ :text=>"¥Õ¥©¥ó¥ÈÆɤ߹þ¤ß¤Î´°Î»¤Þ¤Ç" +
+ "¤·¤Ð¤é¤¯¤ªÂÔ¤Á²¼¤µ¤¤¡¥¡¥¡¥",
+ :font=>"Helvetica 12 italic").pack
class Unicodeout_SampleFrame < TkFrame
@@font = $font
@@ -74,10 +74,10 @@ class Unicodeout_SampleFrame < TkFrame
def add_sample(lang, *args)
sample_txt = Tk::UTF8_String(args.join(''))
l = TkLabel.new(self, :font=>@@font, :text=>lang+':',
- :anchor=>:nw, :pady=>0)
+ :anchor=>:nw, :pady=>0)
#s = TkLabel.new(self, :font=>@@font, :text=>sample_txt,
s = TkLabel.new(self, :font=>TkFont.new(@@font), :text=>sample_txt,
- :anchor=>:nw, :width=>30, :pady=>0)
+ :anchor=>:nw, :width=>30, :pady=>0)
Tk.grid(l, s, :sticky=>:ew, :pady=>0)
l.grid_config(:padx, '1m')
end
@@ -93,23 +93,23 @@ $unicodeout_demo.cursor('watch')
Tk.update
f.add_sample('Arabic',
- '\uFE94\uFEF4\uFE91\uFEAE\uFECC\uFEDF\uFE8D\uFE94',
- '\uFEE4\uFEE0\uFEDC\uFEDF\uFE8D')
+ '\uFE94\uFEF4\uFE91\uFEAE\uFECC\uFEDF\uFE8D\uFE94',
+ '\uFEE4\uFEE0\uFEDC\uFEDF\uFE8D')
f.add_sample('Trad. Chinese', '\u4E2D\u570B\u7684\u6F22\u5B57')
f.add_sample('Simpl. Chinese', '\u6C49\u8BED')
f.add_sample('Greek',
- '\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AE ',
- '\u03B3\u03BB\u03CE\u03C3\u03C3\u03B1')
+ '\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AE ',
+ '\u03B3\u03BB\u03CE\u03C3\u03C3\u03B1')
f.add_sample('Hebrew',
- '\u05DD\u05D9\u05DC\u05E9\u05D5\u05E8\u05D9 ',
- '\u05DC\u05D9\u05D0\u05E8\u05E9\u05D9')
+ '\u05DD\u05D9\u05DC\u05E9\u05D5\u05E8\u05D9 ',
+ '\u05DC\u05D9\u05D0\u05E8\u05E9\u05D9')
f.add_sample('Japanese',
- '\u65E5\u672C\u8A9E\u306E\u3072\u3089\u304C\u306A, ',
- '\u6F22\u5B57\u3068\u30AB\u30BF\u30AB\u30CA')
+ '\u65E5\u672C\u8A9E\u306E\u3072\u3089\u304C\u306A, ',
+ '\u6F22\u5B57\u3068\u30AB\u30BF\u30AB\u30CA')
f.add_sample('Korean', '\uB300\uD55C\uBBFC\uAD6D\uC758 \uD55C\uAE00')
f.add_sample('Russian',
- '\u0420\u0443\u0441\u0441\u043A\u0438\u0439 ',
- '\u044F\u0437\u044B\u043A')
+ '\u0420\u0443\u0441\u0441\u043A\u0438\u0439 ',
+ '\u044F\u0437\u044B\u043A')
wait_msg.destroy
$unicodeout_demo.cursor(oldCursor)
diff --git a/ext/tk/sample/demos-jp/widget b/ext/tk/sample/demos-jp/widget
index 0544127cbb..e8196aec8f 100644
--- a/ext/tk/sample/demos-jp/widget
+++ b/ext/tk/sample/demos-jp/widget
@@ -28,10 +28,10 @@ when /^4.*/
$font = TkFont.new('-*-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*', nil)
knjfont = '-*--16-*-jisx0208.1983-0'
$kanji_font = TkFont.new('-*-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*',
- knjfont)
+ knjfont)
TkOption.add('*kanjiFont', knjfont, 'startupFile')
$msg_kanji_font=TkFont.new('-*-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*',
- '-*--24-*-jisx0208.1983-0')
+ '-*--24-*-jisx0208.1983-0')
#when '8.0'
# $font = TkFont.new('Helvetica -12')
@@ -49,10 +49,10 @@ else
$font = TkFont.new('-*-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*', nil)
knjfont = '-*--16-*-jisx0208.1983-0'
$kanji_font = TkFont.new('-*-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*',
- knjfont)
+ knjfont)
TkOption.add('*kanjiFont', knjfont, 'startupFile')
$msg_kanji_font=TkFont.new('-*-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*',
- '-*--24-*-jisx0208.1983-0')
+ '-*--24-*-jisx0208.1983-0')
end
#######
@@ -117,11 +117,11 @@ end
# ¥á¥Ë¥å¡¼ÀßÄê
TkMenubar.new($root,
- [[['File', 0],
- ['About ... ', proc{aboutBox}, 0, '<F1>'],
- '---',
- ['Quit', proc{exit}, 0, 'Meta-Q']
- ]]).pack('side'=>'top', 'fill'=>'x')
+ [[['File', 0],
+ ['About ... ', proc{aboutBox}, 0, '<F1>'],
+ '---',
+ ['Quit', proc{exit}, 0, 'Meta-Q']
+ ]]).pack('side'=>'top', 'fill'=>'x')
$root.bind('F1', proc{aboutBox})
$root.bind('Meta-q', proc{exit})
@@ -156,7 +156,7 @@ if $tk_version =~ /^4\.[01]/
else
textFrame = TkFrame.new($root)
scr = TkScrollbar.new($root, 'orient'=>'vertical',
- 'highlightthickness'=>0, 'takefocus'=>1) {
+ 'highlightthickness'=>0, 'takefocus'=>1) {
pack('in'=>textFrame, 'side'=>'right', 'fill'=>'y', 'padx'=>1)
}
txt = TkText.new($root) {
@@ -182,10 +182,10 @@ else
statusBar = TkFrame.new($root) {|f|
$statusBarLabel = \
TkLabel.new(f, 'text'=>" ", 'relief'=>'sunken', 'bd'=>1, 'anchor'=>'w',
- 'font'=>'-*-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*') \
+ 'font'=>'-*-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*') \
.pack('side'=>'left', 'padx'=>2, 'expand'=>'yes', 'fill'=>'both')
TkLabel.new(f, 'width'=>8, 'relief'=>'sunken', 'bd'=>1, 'anchor'=>'w',
- 'font'=>'-*-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*') \
+ 'font'=>'-*-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*') \
.pack('side'=>'left', 'padx'=>2)
}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>2)
end
@@ -200,53 +200,53 @@ tag_demospace = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c')
if TkWinfo.depth($root) == 1
tag_demo = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c',
- 'underline'=>1)
+ 'underline'=>1)
$tag_visited = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c',
- 'underline'=>1)
+ 'underline'=>1)
tag_hot = TkTextTag.new(txt, 'background'=>'black', 'foreground'=>'white')
else
tag_demo = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c',
- 'foreground'=>'blue', 'underline'=>1)
+ 'foreground'=>'blue', 'underline'=>1)
$tag_visited = TkTextTag.new(txt, 'lmargin1'=>'1c', 'lmargin2'=>'1c',
- 'foreground'=>'#303080', 'underline'=>1)
+ 'foreground'=>'#303080', 'underline'=>1)
# tag_hot = TkTextTag.new(txt, 'relief'=>'raised', 'borderwidth'=>1,
-# 'background'=>'SeaGreen3')
+# 'background'=>'SeaGreen3')
tag_hot = TkTextTag.new(txt, 'borderwidth'=>1, 'foreground'=>'red')
end
#tag_demo.bind('Button-1', proc{invoke txt, txt.index('current')})
tag_demo.bind('ButtonRelease-1',
- proc{|x,y|invoke txt, txt.index("@#{x},#{y}")}, '%x %y')
+ proc{|x,y|invoke txt, txt.index("@#{x},#{y}")}, '%x %y')
lastLine = TkVariable.new("")
newLine = TkVariable.new("")
tag_demo.bind('Enter', proc{|x,y|
- lastLine.value = txt.index("@#{x},#{y} linestart")
- tag_hot.add(lastLine.value, "#{lastLine.value} lineend")
- showStatus txt, txt.index("@#{x},#{y}")
- },
- '%x %y')
+ lastLine.value = txt.index("@#{x},#{y} linestart")
+ tag_hot.add(lastLine.value, "#{lastLine.value} lineend")
+ showStatus txt, txt.index("@#{x},#{y}")
+ },
+ '%x %y')
tag_demo.bind('Leave',
- proc{
- tag_hot.remove('1.0','end')
- txt.configure('cursor','xterm')
- $statusBarLabel.configure('text'=>"")
- })
+ proc{
+ tag_hot.remove('1.0','end')
+ txt.configure('cursor','xterm')
+ $statusBarLabel.configure('text'=>"")
+ })
tag_demo.bind('Motion', proc{|x, y|
- newLine.value = txt.index("@#{x},#{y} linestart")
- if newLine.value != lastLine.value
- tag_hot.remove('1.0','end')
- lastLine.value = newLine.value
- if ( txt.tag_names("@#{x},#{y}").find{|t|
- t.kind_of?(String) && t =~ /^demo-/
- } )
- tag_hot.add(lastLine.value,
- "#{lastLine.value} lineend -1 chars")
- end
- end
- showStatus txt, txt.index("@#{x},#{y}")
- },
- '%x %y')
+ newLine.value = txt.index("@#{x},#{y} linestart")
+ if newLine.value != lastLine.value
+ tag_hot.remove('1.0','end')
+ lastLine.value = newLine.value
+ if ( txt.tag_names("@#{x},#{y}").find{|t|
+ t.kind_of?(String) && t =~ /^demo-/
+ } )
+ tag_hot.add(lastLine.value,
+ "#{lastLine.value} lineend -1 chars")
+ end
+ end
+ showStatus txt, txt.index("@#{x},#{y}")
+ },
+ '%x %y')
# ¥Æ¥­¥¹¥ÈÀ¸À®
txt.insert('end', 'Ruby/Tk : Widget', tag_title)
@@ -276,47 +276,47 @@ EOT
#txt.insert('end',"¥é¥Ù¥ë, ¥Ü¥¿¥ó, ¥Á¥§¥Ã¥¯¥Ü¥¿¥ó, ¥é¥¸¥ª¥Ü¥¿¥ó\n",tag_middle)
txt.insert('end', "¥é¥Ù¥ë, ¥Ü¥¿¥ó, ¥Á¥§¥Ã¥¯¥Ü¥¿¥ó, ¥é¥¸¥ª¥Ü¥¿¥ó\n",
- tag_kanji_title)
+ tag_kanji_title)
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "1. ¥é¥Ù¥ë (¥Æ¥­¥¹¥È, ¥Ó¥Ã¥È¥Þ¥Ã¥×)\n",
- tag_demo, "demo-label")
+ tag_demo, "demo-label")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "2. ¥é¥Ù¥ë¤ÈUNICODE¥Æ¥­¥¹¥È (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n", tag_demo, "demo-unicodeout")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "3. ¥Ü¥¿¥ó \n", tag_demo, "demo-button")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "4. ¥Á¥§¥Ã¥¯¥Ü¥¿¥ó (Ê£¿ô¤òÁªÂò²Äǽ)\n",
- tag_demo, "demo-check")
+ tag_demo, "demo-check")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "5. £³¾õÂÖ¥Á¥§¥Ã¥¯¥Ü¥¿¥ó (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n",
- tag_demo, "demo-check2")
+ tag_demo, "demo-check2")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "6. ¥é¥¸¥ª¥Ü¥¿¥ó (Ǥ°Õ¤Î°ì¤Ä¤òÁªÂò²Äǽ)\n",
- tag_demo, "demo-radio")
+ tag_demo, "demo-radio")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "7. ¥é¥¸¥ª¥Ü¥¿¥ó (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n",
- tag_demo, "demo-radio2")
+ tag_demo, "demo-radio2")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "8. £³¾õÂ֥饸¥ª¥Ü¥¿¥ó (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n",
- tag_demo, "demo-radio3")
+ tag_demo, "demo-radio3")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "9. ¥Ü¥¿¥ó¤Çºî¤é¤ì¤¿15-¥Ñ¥º¥ë¥²¡¼¥à\n",
- tag_demo, "demo-puzzle")
+ tag_demo, "demo-puzzle")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "10. ¥Ó¥Ã¥È¥Þ¥Ã¥×¤ò»ÈÍѤ·¤¿¥¢¥¤¥³¥ó¥Ü¥¿¥ó\n",
- tag_demo, "demo-icon")
+ tag_demo, "demo-icon")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "11. ²èÁü¤òɽ¼¨¤¹¤ëÆó¤Ä¤Î¥é¥Ù¥ë\n",
- tag_demo, "demo-image1")
+ tag_demo, "demo-image1")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "12. ²èÁü¤ò¸«¤ë¤¿¤á¤Î´Êñ¤Ê¥æ¡¼¥¶¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹\n",
- tag_demo, "demo-image2")
+ tag_demo, "demo-image2")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "13. ²èÁü¤ò¸«¤ë¤¿¤á¤Î´Êñ¤Ê¥æ¡¼¥¶¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹ (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n",
- tag_demo, "demo-image3")
+ tag_demo, "demo-image3")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "14. ¥é¥Ù¥ëÉÕ¤­¥Õ¥ì¡¼¥à (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n",
- tag_demo, "demo-labelframe")
+ tag_demo, "demo-labelframe")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "\n")
@@ -326,7 +326,7 @@ txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "1. ÅÔÆ»Éܸ©.\n", tag_demo, "demo-states")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "2. ¿§: ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¤¿¤á¤ÎÇÛ¿§¤òÊѤ¨¤ë\n",
- "#{tag_demo.id} demo-colors")
+ "#{tag_demo.id} demo-colors")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "3. ³Ê¸À½¸\n", tag_demo, "demo-sayings")
txt.insert('end', " \n ", tag_demospace)
@@ -340,10 +340,10 @@ txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "2. ¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤¢¤ê\n", tag_demo, "demo-entry2")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "3. ǧ¾Ú½èÍýÉÕ¤­¤Î¥¨¥ó¥È¥ê¥Ü¥Ã¥¯¥¹¤È¥Ñ¥¹¥ï¡¼¥É¥Õ¥£¡¼¥ë¥É (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n",
- tag_demo, "demo-entry3")
+ tag_demo, "demo-entry3")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "4. ¥¹¥Ô¥ó¥Ü¥Ã¥¯¥¹ (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n",
- tag_demo, "demo-spin")
+ tag_demo, "demo-spin")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "5. ´Êñ¤Ê¥Õ¥©¡¼¥à\n", tag_demo, "demo-form")
txt.insert('end', " \n ", tag_demospace)
@@ -357,13 +357,13 @@ txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "2. ɽ¼¨¥¹¥¿¥¤¥ë.\n", tag_demo, "demo-style")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "3. ¥Ï¥¤¥Ñ¡¼¥Æ¥­¥¹¥È(¥¿¥°¥Ð¥¤¥ó¥É).\n",
- tag_demo, "demo-bind")
+ tag_demo, "demo-bind")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "4. ¥¦¥£¥ó¥É¥¦¤òËä¤á¹þ¤ó¤À¥Æ¥­¥¹¥È\n",
- tag_demo, "demo-twind")
+ tag_demo, "demo-twind")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "5. ¥¦¥£¥ó¥É¥¦¤òËä¤á¹þ¤ó¤À¥Æ¥­¥¹¥È (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n",
- tag_demo, "demo-twind2")
+ tag_demo, "demo-twind2")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "6. ¸¡º÷\n", tag_demo, "demo-search")
txt.insert('end', " \n ", tag_demospace)
@@ -387,7 +387,7 @@ txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "7. ¥Õ¥í¥¢¥×¥é¥ó (°Û¤Ê¤ë¥­¥ã¥ó¥Ð¥¹¥¢¥¤¥Æ¥àºîÀ®ÊýË¡¤ò»ÈÍÑ)\n", tag_demo, "demo-floor2")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "8. ¥¹¥¯¥í¡¼¥ë²Äǽ¤Ê¥­¥ã¥ó¥Ð¥¹\n",
- tag_demo, "demo-cscroll")
+ tag_demo, "demo-cscroll")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "\n")
@@ -403,10 +403,10 @@ txt.insert('end', "\n")
txt.insert('end', "¥Ú¥¤¥ó¥É¥¦¥£¥ó¥É¥¦\n", tag_kanji_title)
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "1. ¿åÊ¿Êý¸þ (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n",
- tag_demo.id, "demo-paned1")
+ tag_demo.id, "demo-paned1")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "2. ¿âľÊý¸þ (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n",
- tag_demo.id, "demo-paned2")
+ tag_demo.id, "demo-paned2")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "\n")
@@ -414,16 +414,16 @@ txt.insert('end', "\n")
txt.insert('end', "¥á¥Ë¥å¡¼\n", tag_kanji_title)
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "1. ¥á¥Ë¥å¡¼¤È¥«¥¹¥±¡¼¥É¤ò´Þ¤ó¤À¥¦¥£¥ó¥É¥¦\n",
- tag_demo, "demo-menu")
+ tag_demo, "demo-menu")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "2. ¥á¥Ë¥å¡¼¤È¥«¥¹¥±¡¼¥É¤ò´Þ¤ó¤À¥¦¥£¥ó¥É¥¦ (Tk8.x ÀìÍÑ)\n",
- tag_demo, "demo-menu8x")
+ tag_demo, "demo-menu8x")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "3. ¡· (µ¡Ç½¤ËÂбþ¤·¤¿¥Ð¡¼¥¸¥ç¥ó¤ÎTk¤¬É¬Í×)\n",
- tag_demo, "demo-menu84")
+ tag_demo, "demo-menu84")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "4. ¥á¥Ë¥å¡¼¥Ü¥¿¥ó (Tk8.x ÀìÍÑ)\n",
- tag_demo, "demo-menubu")
+ tag_demo, "demo-menubu")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "\n")
@@ -444,10 +444,10 @@ txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "1. ÁȤ߹þ¤ß¤Î¥Ó¥Ã¥È¥Þ¥Ã¥×\n", tag_demo, "demo-bitmap")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "2. ¥â¡¼¥À¥ë¥À¥¤¥¢¥í¥°(¥í¡¼¥«¥ë¥°¥é¥Ö)\n",
- tag_demo, "demo-dialog1")
+ tag_demo, "demo-dialog1")
txt.insert('end', " \n ", tag_demospace)
txt.insert('end', "3. ¥â¡¼¥À¥ë¥À¥¤¥¢¥í¥°(¥°¥í¡¼¥Ð¥ë¥°¥é¥Ö)\n",
- tag_demo, "demo-dialog2")
+ tag_demo, "demo-dialog2")
txt.insert('end', " \n ", tag_demospace)
txt.state('disabled')
@@ -483,10 +483,10 @@ def showVars1(parent, *args)
}
args.each{|vnam,vbody|
TkFrame.new(w){|f|
- #TkLabel.new(f, 'text'=>"#{vnam}: ").pack('side'=>'left')
- TkLabel.new(f, 'text'=>"#{vnam}: ",'width'=>len+2).pack('side'=>'left')
- TkLabel.new(f, 'textvariable'=>vbody, 'anchor'=>'w')\
- .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x')
+ #TkLabel.new(f, 'text'=>"#{vnam}: ").pack('side'=>'left')
+ TkLabel.new(f, 'text'=>"#{vnam}: ",'width'=>len+2).pack('side'=>'left')
+ TkLabel.new(f, 'textvariable'=>vbody, 'anchor'=>'w')\
+ .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x')
}.pack('side'=>'top', 'anchor'=>'w', 'fill'=>'x')
}
TkButton.new(w) {
@@ -508,11 +508,11 @@ def showVars2(parent, *args)
title "Variable values"
TkLabelFrame.new(w, :text=>"ÊÑ¿ôÃÍ:",
- :font=>{:family=>'Helvetica', :size=>14}){|f|
+ :font=>{:family=>'Helvetica', :size=>14}){|f|
args.each{|vnam,vbody|
- TkGrid(TkLabel.new(f, :text=>"#{vnam}: ", :anchor=>'w'),
- TkLabel.new(f, :textvariable=>vbody, :anchor=>'w'),
- :padx=>2, :pady=>2, :sticky=>'w')
+ TkGrid(TkLabel.new(f, :text=>"#{vnam}: ", :anchor=>'w'),
+ TkLabel.new(f, :textvariable=>vbody, :anchor=>'w'),
+ :padx=>2, :pady=>2, :sticky=>'w')
}
f.grid(:sticky=>'news', :padx=>4)
@@ -520,7 +520,7 @@ def showVars2(parent, *args)
f.grid_rowconfig(100, :weight=>1)
}
TkButton.new(w, :text=>"λ²ò", :width=>8, :default=>:active,
- :command=>proc{w.destroy}){|b|
+ :command=>proc{w.destroy}){|b|
w.bind('Return', proc{b.invoke})
w.bind('Escape', proc{b.invoke})
@@ -566,7 +566,7 @@ def showStatus (txt, index)
else
demoname = tag[5..-1]
$statusBarLabel.configure('text',
- "¥µ¥ó¥×¥ë¥×¥í¥°¥é¥à \"#{demoname}\" ¤Î¼Â¹Ô ")
+ "¥µ¥ó¥×¥ë¥×¥í¥°¥é¥à \"#{demoname}\" ¤Î¼Â¹Ô ")
newcursor = 'hand2'
end
txt.configure('cursor'=>newcursor) if cursor != newcursor
@@ -583,8 +583,8 @@ def showCode1(demo)
#text "λ²ò"
text "ÊĤ¸¤ë"
command proc{
- $code_window.destroy
- $code_window = nil
+ $code_window.destroy
+ $code_window = nil
}
}.pack('side'=>'left', 'expand'=>'yes', 'pady'=>2)
TkButton.new(f) {
@@ -597,43 +597,43 @@ def showCode1(demo)
if $tk_version =~ /^4\.[01]/
s = TkScrollbar.new($code_window, 'orient'=>'vertical')
$code_text = TkText.new($code_window) {
- height 40
- setgrid 'yes'
- yscrollcommand proc{|first,last| s.set first,last}
+ height 40
+ setgrid 'yes'
+ yscrollcommand proc{|first,last| s.set first,last}
}
s.command(proc{|*args| $code_text.yview(*args)})
s.pack('side'=>'right', 'fill'=>'y')
$code_text.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'both')
else
TkFrame.new($code_window) {|f|
- pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1)
-
- hs = TkScrollbar.new($code_window, 'highlightthickness'=>0,
- 'orient'=>'horizontal')
- vs = TkScrollbar.new($code_window, 'highlightthickness'=>0,
- 'orient'=>'vertical')
- $code_text = TkText.new($code_window) {|t|
- height 40
- #wrap 'word'
- wrap 'char'
- xscrollcommand proc{|first,last| hs.set first,last}
- yscrollcommand proc{|first,last| vs.set first,last}
- setgrid 'yes'
- highlightthickness 0
- pady 2
- padx 3
- hs.command(proc{|*args| $code_text.xview(*args)})
- vs.command(proc{|*args| $code_text.yview(*args)})
- }
-
- $code_text.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- vs.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
- 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
-# xs.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
-# 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
- TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
+ pack('expand'=>'yes', 'fill'=>'both', 'padx'=>1, 'pady'=>1)
+
+ hs = TkScrollbar.new($code_window, 'highlightthickness'=>0,
+ 'orient'=>'horizontal')
+ vs = TkScrollbar.new($code_window, 'highlightthickness'=>0,
+ 'orient'=>'vertical')
+ $code_text = TkText.new($code_window) {|t|
+ height 40
+ #wrap 'word'
+ wrap 'char'
+ xscrollcommand proc{|first,last| hs.set first,last}
+ yscrollcommand proc{|first,last| vs.set first,last}
+ setgrid 'yes'
+ highlightthickness 0
+ pady 2
+ padx 3
+ hs.command(proc{|*args| $code_text.xview(*args)})
+ vs.command(proc{|*args| $code_text.yview(*args)})
+ }
+
+ $code_text.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ vs.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
+ 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+# xs.grid('in'=>f, 'padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
+# 'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
+ TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
+ TkGrid.columnconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
}
end
else
@@ -660,8 +660,8 @@ def showCode2(demo)
$code_window = TkToplevel.new(nil)
tf = TkFrame.new($code_window)
$code_text = TkText.new(tf, :font=>'Courier 10', :height=>30,
- :wrap=>'word', :bd=>1, :setgrid=>true,
- :highlightthickness=>0, :pady=>2, :padx=>3)
+ :wrap=>'word', :bd=>1, :setgrid=>true,
+ :highlightthickness=>0, :pady=>2, :padx=>3)
xscr = TkScrollbar.new(tf, :bd=>1){assign($code_text)}
yscr = TkScrollbar.new(tf, :bd=>1){assign($code_text)}
TkGrid($code_text, yscr, :sticky=>'news')
@@ -673,17 +673,17 @@ def showCode2(demo)
#b_dis = TkButton.new(bf, :text=>'λ²ò', :default=>:active,
b_dis = TkButton.new(bf, :text=>'ÊĤ¸¤ë', :default=>:active,
- :command=>proc{
- $code_window.destroy
- $code_window = nil
- },
- :image=>$image['delete'], :compound=>:left)
+ :command=>proc{
+ $code_window.destroy
+ $code_window = nil
+ },
+ :image=>$image['delete'], :compound=>:left)
b_prn = TkButton.new(bf, :text=>'°õºþ',
- :command=>proc{printCode($code_text, file)},
- :image=>$image['print'], :compound=>:left)
+ :command=>proc{printCode($code_text, file)},
+ :image=>$image['print'], :compound=>:left)
b_run = TkButton.new(bf, :text=>'ºÆ¼Â¹Ô',
- :command=>proc{eval($code_text.get('1.0','end'))},
- :image=>$image['refresh'], :compound=>:left)
+ :command=>proc{eval($code_text.get('1.0','end'))},
+ :image=>$image['refresh'], :compound=>:left)
TkGrid('x', b_run, b_prn, b_dis, :padx=>4, :pady=>[6,4])
bf.grid_columnconfigure(0, :weight=>1)
@@ -694,8 +694,8 @@ def showCode2(demo)
$code_window.grid_rowconfigure(0, :weight=>1)
$code_window.bind('Return', proc{|win|
- b_dis.invoke unless win.kind_of?(TkText)
- }, '%W')
+ b_dis.invoke unless win.kind_of?(TkText)
+ }, '%W')
$code_window.bindinfo('Return').each{|cmd, arg|
$code_window.bind_append('Escape', cmd, arg)
}
@@ -727,8 +727,8 @@ end
# Much thanks to Arjen Markus for this.
#
# Arguments:
-# txt - Name of text widget containing code to print
-# file - Name of the original file (implicitly for title)
+# txt - Name of text widget containing code to print
+# file - Name of the original file (implicitly for title)
def printCode(txt, file)
code = txt.get('1.0', 'end - 1c')
@@ -744,27 +744,27 @@ def printCode(txt, file)
when 'unix'
msg = `lp -c #{fname}`
unless $?.exitstatus == 0
- Tk.messageBox(:title=>'Print spooling failure',
- :message=>'¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡¥' +
- '°õºþ¤Ë¼ºÇÔ¤·¤¿¤â¤Î¤È»×¤ï¤ì¤Þ¤¹ : ' + msg)
+ Tk.messageBox(:title=>'Print spooling failure',
+ :message=>'¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡¥' +
+ '°õºþ¤Ë¼ºÇÔ¤·¤¿¤â¤Î¤È»×¤ï¤ì¤Þ¤¹ : ' + msg)
end
when 'windows'
begin
- printTextWin32(fname)
+ printTextWin32(fname)
rescue => e
- Tk.messageBox(:title=>'Print spooling failure',
- :message=>'¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡¥' +
- '°õºþ¤Ë¼ºÇÔ¤·¤¿¤â¤Î¤È»×¤ï¤ì¤Þ¤¹ : ' +
- e.message)
+ Tk.messageBox(:title=>'Print spooling failure',
+ :message=>'¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡¥' +
+ '°õºþ¤Ë¼ºÇÔ¤·¤¿¤â¤Î¤È»×¤ï¤ì¤Þ¤¹ : ' +
+ e.message)
end
when 'macintosh'
Tk.messageBox(:title=>'Operation not Implemented',
- :message=>'°õºþµ¡Ç½¤Ï¤Þ¤À¼ÂÁõ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó')
+ :message=>'°õºþµ¡Ç½¤Ï¤Þ¤À¼ÂÁõ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó')
else
Tk.messageBox(:title=>'Operation not Implemented',
- :message=>'¸¡½Ð¤µ¤ì¤¿´Ä¶­ ' +
- Tk::TCL_PLATFORM('platform') +
- ' ¤Ï̤ÃΤδĶ­¤Ç¤¢¤ë¤¿¤á¡¤' +
+ :message=>'¸¡½Ð¤µ¤ì¤¿´Ä¶­ ' +
+ Tk::TCL_PLATFORM('platform') +
+ ' ¤Ï̤ÃΤδĶ­¤Ç¤¢¤ë¤¿¤á¡¤' +
'°õºþµ¡Ç½¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó: ')
end
ensure
@@ -776,7 +776,7 @@ end
# Print a file under Windows
#
# Arguments:
-# filename - Name of the file
+# filename - Name of the file
#
def printTextWin32(fname)
require 'win32/registry'
@@ -807,12 +807,12 @@ end
#
def aboutBox
Tk.messageBox('icon'=>'info', 'type'=>'ok', 'title'=>'About Widget Demo',
- 'message'=>"Ruby/Tk ¥¦¥£¥¸¥§¥Ã¥È¥Ç¥â Ver.1.4.3-jp\n\n" +
+ 'message'=>"Ruby/Tk ¥¦¥£¥¸¥§¥Ã¥È¥Ç¥â Ver.1.4.3-jp\n\n" +
"based on demos of Tk8.1 -- 8.5 " +
- "( Copyright:: " +
- "(c) 1996-1997 Sun Microsystems, Inc. / " +
+ "( Copyright:: " +
+ "(c) 1996-1997 Sun Microsystems, Inc. / " +
"(c) 1997-2000 Ajuba Solutions, Inc. / " +
- "(c) 2001-2003 Donal K. Fellows )\n\n" +
+ "(c) 2001-2003 Donal K. Fellows )\n\n" +
"Your Ruby & Tk Version ::\n" +
"Ruby#{RUBY_VERSION}(#{RUBY_RELEASE_DATE})[#{RUBY_PLATFORM}] / Tk#{$tk_patchlevel}#{(Tk::JAPANIZED_TK)? '-jp': ''}")
end
@@ -836,7 +836,7 @@ if no_launcher
loop do
count = 0
$root.winfo_children.each{|w|
- count += 1 if w.kind_of?(TkToplevel)
+ count += 1 if w.kind_of?(TkToplevel)
}
$root.destroy if count == 0
end
diff --git a/ext/tk/sample/encstr_usage.rb b/ext/tk/sample/encstr_usage.rb
index 2155544c64..4285ec861c 100644
--- a/ext/tk/sample/encstr_usage.rb
+++ b/ext/tk/sample/encstr_usage.rb
@@ -14,12 +14,12 @@ t3 = TkText.new(:height=>5).pack
src_str = IO.readlines('iso2022-kr.txt').join
t1.insert('end',
- "use neither Tk::EncodedString class nor Tk.encoding= method\n\n")
+ "use neither Tk::EncodedString class nor Tk.encoding= method\n\n")
t1.insert('end', src_str)
enc_str = Tk::EncodedString(src_str, 'iso2022-kr')
t2.insert('end',
- "use Tk::EncodedString class (Tk.encoding => '#{Tk.encoding}')\n\n")
+ "use Tk::EncodedString class (Tk.encoding => '#{Tk.encoding}')\n\n")
t2.insert('end', enc_str)
Tk.encoding = 'iso2022-kr'
diff --git a/ext/tk/sample/menubar2.rb b/ext/tk/sample/menubar2.rb
index 6ca58e45a4..4507d8b2fe 100644
--- a/ext/tk/sample/menubar2.rb
+++ b/ext/tk/sample/menubar2.rb
@@ -40,11 +40,11 @@ menu_spec = [
]
mbar = Tk.root.add_menubar(menu_spec,
- # followings are default configure options
- 'tearoff'=>'false',
- 'foreground'=>'grey40',
- 'activeforeground'=>'red',
- 'font'=>'Helvetia 12 bold')
+ # followings are default configure options
+ 'tearoff'=>'false',
+ 'foreground'=>'grey40',
+ 'activeforeground'=>'red',
+ 'font'=>'Helvetia 12 bold')
# This (default configure options) is NOT same the following.
#
# mbar = Tk.root.add_menubar(menu_spec)
diff --git a/ext/tk/sample/msgs_rb/ru.msg b/ext/tk/sample/msgs_rb/ru.msg
index d6739ceb56..f389dff0b6 100644
--- a/ext/tk/sample/msgs_rb/ru.msg
+++ b/ext/tk/sample/msgs_rb/ru.msg
@@ -20,7 +20,7 @@ TkMsgCatalog.new('::tk') {
ru '&Blue', ' &\u0413\u043e\u043b\u0443\u0431\u043e\u0439'
ru '&Cancel', '\u041e\u0442&\u043c\u0435\u043d\u0430'
ru 'Cannot change to the directory "%1\$s".' "\n" 'Permission denied.' \
- '\u041d\u0435 \u043c\u043e\u0433\u0443 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 "%1\$s".' "\n" '\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430'
+ '\u041d\u0435 \u043c\u043e\u0433\u0443 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 "%1\$s".' "\n" '\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430'
ru 'Choose Directory', '\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433'
ru 'Clear', '\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c'
ru 'Color', '\u0426\u0432\u0435\u0442'
@@ -34,7 +34,7 @@ TkMsgCatalog.new('::tk') {
ru 'Error: %1\$s', '\u041e\u0448\u0438\u0431\u043a\u0430: %1\$s'
ru 'Exit', '\u0412\u044b\u0445\u043e\u0434'
ru 'File "%1\$s" already exists.' "\n" 'Do you want to overwrite it?' \
- '\u0424\u0430\u0439\u043b "%1\$s" \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.' "\n" '\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e?'
+ '\u0424\u0430\u0439\u043b "%1\$s" \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.' "\n" '\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e?'
ru 'File "%1\$s" already exists.' "\n\n", '\u0424\u0430\u0439\u043b "%1\$s" \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.' "\n\n"
ru 'File "%1\$s" does not exist.', '\u0424\u0430\u0439\u043b "%1\$s" \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d.'
ru 'File &name:', '&\u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430:'
diff --git a/ext/tk/sample/multi-ip_sample.rb b/ext/tk/sample/multi-ip_sample.rb
index 2bb20db4c7..8d6e1bc626 100644
--- a/ext/tk/sample/multi-ip_sample.rb
+++ b/ext/tk/sample/multi-ip_sample.rb
@@ -86,17 +86,17 @@ TkTimer.new(2000, -1, proc{p ['safe2', safe_slave2.deleted?]}).start
TkTimer.new(2000, -1, proc{p ['trusted', trusted_slave.deleted?]}).start
TkTimer.new(5000, 1,
- proc{
- safe_slave1.eval_proc{Tk.root.destroy}
- safe_slave1.delete
- print "*** The safe_slave1 is deleted by the timer.\n"
- }).start
+ proc{
+ safe_slave1.eval_proc{Tk.root.destroy}
+ safe_slave1.delete
+ print "*** The safe_slave1 is deleted by the timer.\n"
+ }).start
TkTimer.new(10000, 1,
- proc{
- trusted_slave.eval_proc{Tk.root.destroy}
- trusted_slave.delete
- print "*** The trusted_slave is deleted by the timer.\n"
- }).start
+ proc{
+ trusted_slave.eval_proc{Tk.root.destroy}
+ trusted_slave.delete
+ print "*** The trusted_slave is deleted by the timer.\n"
+ }).start
Tk.mainloop
diff --git a/ext/tk/sample/multi-ip_sample2.rb b/ext/tk/sample/multi-ip_sample2.rb
index e5e3c2920c..f4a45d8d9a 100644
--- a/ext/tk/sample/multi-ip_sample2.rb
+++ b/ext/tk/sample/multi-ip_sample2.rb
@@ -15,7 +15,7 @@ cmd = proc{|s|
TkButton.new(:text=>'b2: p $SAFE', :command=>proc{p $SAFE}).pack(:fill=>:x)
sleep s
TkButton.new(:text=>'b3: p MultiTkIp.ip_name',
- :command=>proc{p MultiTkIp.ip_name}).pack(:fill=>:x)
+ :command=>proc{p MultiTkIp.ip_name}).pack(:fill=>:x)
sleep s
TkButton.new(:text=>'EXIT', :command=>proc{exit}).pack(:fill=>:x)
diff --git a/ext/tk/sample/optobj_sample.rb b/ext/tk/sample/optobj_sample.rb
index b7bab06324..cafacbdd17 100644
--- a/ext/tk/sample/optobj_sample.rb
+++ b/ext/tk/sample/optobj_sample.rb
@@ -13,13 +13,13 @@ b2 = TkButton.new(f, :text=>'BBB').pack(:fill=>:x)
b3 = TkButton.new(f, :text=>'CCC').pack(:fill=>:x)
optobj.assign( b1,
- [ b2, 'configure',
- { 'foreground'=>'background',
- 'background'=>'foreground' } ],
- [ b3, nil,
- { 'foreground'=>'background',
- 'activeforeground'=>nil,
- 'background'=>['foreground', 'activeforeground'] } ] )
+ [ b2, 'configure',
+ { 'foreground'=>'background',
+ 'background'=>'foreground' } ],
+ [ b3, nil,
+ { 'foreground'=>'background',
+ 'activeforeground'=>nil,
+ 'background'=>['foreground', 'activeforeground'] } ] )
optobj.update('activeforeground'=>'yellow')
@@ -30,9 +30,9 @@ TkButton.new(f){
TkButton.new(f){
configure( optobj.assign([self, nil,
- {'foreground'=>'activeforeground',
- 'background'=>'foreground',
- 'activeforeground'=>'background'}]) \
+ {'foreground'=>'activeforeground',
+ 'background'=>'foreground',
+ 'activeforeground'=>'background'}]) \
+ {:text=>'EEE', :relief=>:groove, :borderwidth=>5} )
pack(:fill=>:x)
}
diff --git a/ext/tk/sample/propagate.rb b/ext/tk/sample/propagate.rb
index a6fbc9725a..800cef553d 100644
--- a/ext/tk/sample/propagate.rb
+++ b/ext/tk/sample/propagate.rb
@@ -4,7 +4,7 @@ require 'tk'
TkLabel.new(:text=>"Please click the bottom frame").pack
f = TkFrame.new(:width=>400, :height=>100, :background=>'yellow',
- :relief=>'ridge', :borderwidth=>5).pack
+ :relief=>'ridge', :borderwidth=>5).pack
# TkPack.propagate(f, false) # <== important!!
f.pack_propagate(false) # <== important!!
@@ -21,10 +21,10 @@ list = (1..3).collect{|n|
list.unshift(nil)
f.bind('1', proc{
- w = list.shift
- w.unpack if w
- list.push(w)
- list[0].pack(:expand=>true, :anchor=>:center) if list[0]
+ w = list.shift
+ w.unpack if w
+ list.push(w)
+ list[0].pack(:expand=>true, :anchor=>:center) if list[0]
})
Tk.mainloop
diff --git a/ext/tk/sample/remote-ip_sample.rb b/ext/tk/sample/remote-ip_sample.rb
index 3c153e94fa..3696a20852 100644
--- a/ext/tk/sample/remote-ip_sample.rb
+++ b/ext/tk/sample/remote-ip_sample.rb
@@ -28,6 +28,6 @@ end
ip.eval_proc{TkButton.new(:command=>'exit', :text=>'QUIT').pack(:fill=>:x)}
TkButton.new(:command=>proc{exit}, :text=>'QUIT',
- :padx=>10, :pady=>7).pack(:padx=>10, :pady=>7)
+ :padx=>10, :pady=>7).pack(:padx=>10, :pady=>7)
Tk.mainloop
diff --git a/ext/tk/sample/remote-ip_sample2.rb b/ext/tk/sample/remote-ip_sample2.rb
index cc7f424489..e12b2a96c9 100644
--- a/ext/tk/sample/remote-ip_sample2.rb
+++ b/ext/tk/sample/remote-ip_sample2.rb
@@ -19,14 +19,14 @@ btns = []
ip.eval_proc{
btns <<
TkButton.new(:command=>proc{
- puts 'This procesure is on the controller-ip (Ruby-side)'
- },
- :text=>'print on controller-ip (Ruby-side)').pack(:fill=>:x)
+ puts 'This procesure is on the controller-ip (Ruby-side)'
+ },
+ :text=>'print on controller-ip (Ruby-side)').pack(:fill=>:x)
btns <<
TkButton.new(:command=>
- 'puts {This procesure is on the remote-ip (Tk-side)}',
- :text=>'print on remote-ip (Tk-side)').pack(:fill=>:x)
+ 'puts {This procesure is on the remote-ip (Tk-side)}',
+ :text=>'print on remote-ip (Tk-side)').pack(:fill=>:x)
btns <<
TkButton.new(:command=>
@@ -34,7 +34,7 @@ ip.eval_proc{
puts "This procedure is on the remote-ip (Ruby-side)"
p Array.new(3,"ruby")
}',
- :text=>'ruby cmd on the remote-ip').pack(:fill=>:x)
+ :text=>'ruby cmd on the remote-ip').pack(:fill=>:x)
TkButton.new(:command=>'exit', :text=>'QUIT').pack(:fill=>:x)
}
@@ -45,12 +45,12 @@ btns.each_with_index{|btn, idx|
# the enternal. If you want to pass local values to the eval-block,
# use arguments of eval_proc method. They are passed to block-arguments.
TkButton.new(:command=>proc{ip.eval_proc(btn){|b| b.flash}},
- :text=>"flash button-#{idx}",
- :padx=>10).pack(:padx=>10, :pady=>2)
+ :text=>"flash button-#{idx}",
+ :padx=>10).pack(:padx=>10, :pady=>2)
}
TkButton.new(:command=>proc{exit}, :text=>'QUIT',
- :padx=>10, :pady=>7).pack(:padx=>10, :pady=>7)
+ :padx=>10, :pady=>7).pack(:padx=>10, :pady=>7)
# start eventloop
Tk.mainloop
diff --git a/ext/tk/sample/safe-tk.rb b/ext/tk/sample/safe-tk.rb
index 48d9a6bfcb..e2289697e0 100644
--- a/ext/tk/sample/safe-tk.rb
+++ b/ext/tk/sample/safe-tk.rb
@@ -8,8 +8,8 @@ require "multi-tk"
TkLabel.new(:text=>'This is the Default Master Ipnterpreter').pack(:padx=>5, :pady=>3)
TkButton.new(:text=>'QUIT', :command=>proc{exit}).pack(:pady=>3)
TkFrame.new(:borderwidth=>2, :height=>3,
- :relief=>:sunken).pack(:fill=>:x, :expand=>true,
- :padx=>10, :pady=>7)
+ :relief=>:sunken).pack(:fill=>:x, :expand=>true,
+ :padx=>10, :pady=>7)
###############################
@@ -20,17 +20,17 @@ puts "\n---- create procs ----------"
puts 'x = proc{p [\'proc x\', "$SAFE==#{$SAFE}"]; exit}'
x = proc{p ['proc x', "$SAFE==#{$SAFE}"]; exit}
TkLabel.new(:text=>'x = proc{p [\'proc x\', "$SAFE==#{$SAFE}"]; exit}',
- :anchor=>:w).pack(:fill=>:x)
+ :anchor=>:w).pack(:fill=>:x)
puts 'y = proc{|label| p [\'proc y\', "$SAFE==#{$SAFE}", label]; label.text($SAFE)}'
y = proc{|label| p ['proc y', "$SAFE==#{$SAFE}", label]; label.text($SAFE)}
TkLabel.new(:text=>'y = proc{|label| p [\'proc y\', "$SAFE==#{$SAFE}", label]; label.text($SAFE)}',
- :anchor=>:w).pack(:fill=>:x)
+ :anchor=>:w).pack(:fill=>:x)
puts 'z = proc{p [\'proc z\', "$SAFE==#{$SAFE}"]; exit}'
z = proc{p ['proc z', "$SAFE==#{$SAFE}"]; exit}
TkLabel.new(:text=>'z = proc{p [\'proc z\', "$SAFE==#{$SAFE}"]; exit}',
- :anchor=>:w).pack(:fill=>:x)
+ :anchor=>:w).pack(:fill=>:x)
puts "\n---- call 1st eval_proc ----------"
print 'lbl = '
@@ -43,13 +43,13 @@ p lbl = ip.eval_proc{
l = TkLabel.new(f).pack(:side=>:right)
TkButton.new(:text=>':command=>proc{l.text($SAFE)}',
- :command=>proc{l.text($SAFE)}).pack(:fill=>:x, :padx=>5)
+ :command=>proc{l.text($SAFE)}).pack(:fill=>:x, :padx=>5)
TkButton.new(:text=>':command=>x', :command=>x).pack(:fill=>:x, :padx=>5)
TkButton.new(:text=>':command=>proc{exit}',
- :command=>proc{exit}).pack(:fill=>:x, :padx=>5)
+ :command=>proc{exit}).pack(:fill=>:x, :padx=>5)
TkFrame.new(:borderwidth=>2, :height=>3,
- :relief=>:sunken).pack(:fill=>:x, :expand=>true,
- :padx=>10, :pady=>7)
+ :relief=>:sunken).pack(:fill=>:x, :expand=>true,
+ :padx=>10, :pady=>7)
l # return the label widget
}
@@ -58,26 +58,26 @@ ip.safe_level = 3
puts "\n---- call 2nd eval_proc ----------"
p ip.eval_proc(proc{
- TkLabel.new(:text=>"2nd eval_proc : $SAFE == #{$SAFE}").pack
- f = TkFrame.new.pack
- TkLabel.new(f, :text=>"$SAFE == ").pack(:side=>:left)
- l = TkLabel.new(f, :text=>$SAFE).pack(:side=>:right)
- TkButton.new(:text=>':command=>proc{l.text($SAFE)}',
- :command=>proc{l.text($SAFE)}).pack(:fill=>:x,
- :padx=>5)
- TkButton.new(:text=>':command=>proc{y.call(l)}',
- :command=>proc{y.call(l)}).pack(:fill=>:x,
- :padx=>5)
- TkButton.new(:text=>':command=>proc{Thread.new(l, &y).value}',
- :command=>proc{
- Thread.new(l, &y).value
- }).pack(:fill=>:x, :padx=>5)
- TkButton.new(:text=>':command=>proc{z.call}',
- :command=>proc{z.call}).pack(:fill=>:x, :padx=>5)
- TkFrame.new(:borderwidth=>2, :height=>3,
- :relief=>:sunken).pack(:fill=>:x, :expand=>true,
- :padx=>10, :pady=>7)
- })
+ TkLabel.new(:text=>"2nd eval_proc : $SAFE == #{$SAFE}").pack
+ f = TkFrame.new.pack
+ TkLabel.new(f, :text=>"$SAFE == ").pack(:side=>:left)
+ l = TkLabel.new(f, :text=>$SAFE).pack(:side=>:right)
+ TkButton.new(:text=>':command=>proc{l.text($SAFE)}',
+ :command=>proc{l.text($SAFE)}).pack(:fill=>:x,
+ :padx=>5)
+ TkButton.new(:text=>':command=>proc{y.call(l)}',
+ :command=>proc{y.call(l)}).pack(:fill=>:x,
+ :padx=>5)
+ TkButton.new(:text=>':command=>proc{Thread.new(l, &y).value}',
+ :command=>proc{
+ Thread.new(l, &y).value
+ }).pack(:fill=>:x, :padx=>5)
+ TkButton.new(:text=>':command=>proc{z.call}',
+ :command=>proc{z.call}).pack(:fill=>:x, :padx=>5)
+ TkFrame.new(:borderwidth=>2, :height=>3,
+ :relief=>:sunken).pack(:fill=>:x, :expand=>true,
+ :padx=>10, :pady=>7)
+ })
puts "\n---- call 1st and 2nd eval_str ----------"
p bind = ip.eval_str('
@@ -92,10 +92,10 @@ p bind = ip.eval_str('
p ip.eval_str("
TkButton.new(:text=>':command=>proc{ l.text = $SAFE }',
- :command=>proc{ l.text = $SAFE }).pack(:fill=>:x, :padx=>5)
+ :command=>proc{ l.text = $SAFE }).pack(:fill=>:x, :padx=>5)
TkFrame.new(:borderwidth=>2, :height=>3,
- :relief=>:sunken).pack(:fill=>:x, :expand=>true,
- :padx=>10, :pady=>7)
+ :relief=>:sunken).pack(:fill=>:x, :expand=>true,
+ :padx=>10, :pady=>7)
", bind)
puts "\n---- change the safe slave IP's safe-level ==> 4 ----------"
@@ -107,7 +107,7 @@ p ip.eval_proc{
}
p ip.eval_proc{
TkButton.new(:text=>':command=>proc{ lbl.text = $SAFE }',
- :command=>proc{ lbl.text = $SAFE }).pack(:fill=>:x, :padx=>5)
+ :command=>proc{ lbl.text = $SAFE }).pack(:fill=>:x, :padx=>5)
}
puts "\n---- start event-loop ( current $SAFE == #{$SAFE} ) ----------"
diff --git a/ext/tk/sample/tkalignbox.rb b/ext/tk/sample/tkalignbox.rb
index b56c9cc11e..32915a5e69 100644
--- a/ext/tk/sample/tkalignbox.rb
+++ b/ext/tk/sample/tkalignbox.rb
@@ -54,7 +54,7 @@ class TkAlignBox < TkFrame
def add(*widgets)
widgets.each{|w|
unless w.kind_of? TkWindow
- fail RuntimeError, "#{w.inspect} is not a widget instance."
+ fail RuntimeError, "#{w.inspect} is not a widget instance."
end
@widgets.delete(w)
@widgets << w
@@ -127,10 +127,10 @@ class TkHBox < TkAlignBox
def _place_config(widget, idx, cnt)
widget.place_in(self,
- 'relx'=>idx/cnt, 'x'=>@padx,
- 'rely'=>0, 'y'=>@pady,
- 'relwidth'=>1.0/cnt, 'width'=>-2*@padx,
- 'relheight'=>1.0, 'height'=>-2*@pady)
+ 'relx'=>idx/cnt, 'x'=>@padx,
+ 'rely'=>0, 'y'=>@pady,
+ 'relwidth'=>1.0/cnt, 'width'=>-2*@padx,
+ 'relheight'=>1.0, 'height'=>-2*@pady)
end
private :_place_config
end
@@ -139,10 +139,10 @@ TkHLBox = TkHBox
class TkHRBox < TkHBox
def _place_config(widget, idx, cnt)
widget.place_in(self,
- 'relx'=>(cnt - idx - 1)/cnt, 'x'=>@padx,
- 'rely'=>0, 'y'=>@pady,
- 'relwidth'=>1.0/cnt, 'width'=>-2*@padx,
- 'relheight'=>1.0, 'height'=>-2*@pady)
+ 'relx'=>(cnt - idx - 1)/cnt, 'x'=>@padx,
+ 'rely'=>0, 'y'=>@pady,
+ 'relwidth'=>1.0/cnt, 'width'=>-2*@padx,
+ 'relheight'=>1.0, 'height'=>-2*@pady)
end
private :_place_config
end
@@ -157,10 +157,10 @@ class TkVBox < TkAlignBox
def _place_config(widget, idx, cnt)
widget.place_in(self,
- 'relx'=>0, 'x'=>@padx,
- 'rely'=>idx/cnt, 'y'=>@pady,
- 'relwidth'=>1.0, 'width'=>-2*@padx,
- 'relheight'=>1.0/cnt, 'height'=>-2*@pady)
+ 'relx'=>0, 'x'=>@padx,
+ 'rely'=>idx/cnt, 'y'=>@pady,
+ 'relwidth'=>1.0, 'width'=>-2*@padx,
+ 'relheight'=>1.0/cnt, 'height'=>-2*@pady)
end
private :_place_config
end
@@ -169,10 +169,10 @@ TkVTBox = TkVBox
class TkVBBox < TkVBox
def _place_config(widget, idx, cnt)
widget.place_in(self,
- 'relx'=>0, 'x'=>@padx,
- 'rely'=>(cnt - idx - 1)/cnt, 'y'=>@pady,
- 'relwidth'=>1.0, 'width'=>-2*@padx,
- 'relheight'=>1.0/cnt, 'height'=>-2*@pady)
+ 'relx'=>0, 'x'=>@padx,
+ 'rely'=>(cnt - idx - 1)/cnt, 'y'=>@pady,
+ 'relwidth'=>1.0, 'width'=>-2*@padx,
+ 'relheight'=>1.0/cnt, 'height'=>-2*@pady)
end
private :_place_config
end
@@ -183,43 +183,43 @@ end
if __FILE__ == $0
f = TkHBox.new(:borderwidth=>3, :relief=>'ridge').pack
f.add(TkButton.new(f, :text=>'a'),
- TkButton.new(f, :text=>'aa', :font=>'Helvetica 16'),
- TkButton.new(f, :text=>'aaa'),
- TkButton.new(f, :text=>'aaaa'))
+ TkButton.new(f, :text=>'aa', :font=>'Helvetica 16'),
+ TkButton.new(f, :text=>'aaa'),
+ TkButton.new(f, :text=>'aaaa'))
f = TkHBox.new(:borderwidth=>3, :relief=>'ridge',
- :padx=>7, :pady=>3, :background=>'yellow').pack
+ :padx=>7, :pady=>3, :background=>'yellow').pack
f.add(TkButton.new(f, :text=>'a'),
- TkButton.new(f, :text=>'aa', :font=>'Helvetica 16'),
- TkButton.new(f, :text=>'aaa'),
- TkButton.new(f, :text=>'aaaa'))
+ TkButton.new(f, :text=>'aa', :font=>'Helvetica 16'),
+ TkButton.new(f, :text=>'aaa'),
+ TkButton.new(f, :text=>'aaaa'))
f = TkVBox.new(:borderwidth=>5, :relief=>'groove').pack
f.add(TkButton.new(f, :text=>'a'),
- TkButton.new(f, :text=>'aa', :font=>'Helvetica 30'),
- TkButton.new(f, :text=>'aaa'),
- TkButton.new(f, :text=>'aaaa'))
+ TkButton.new(f, :text=>'aa', :font=>'Helvetica 30'),
+ TkButton.new(f, :text=>'aaa'),
+ TkButton.new(f, :text=>'aaaa'))
f = TkHRBox.new(:borderwidth=>3, :relief=>'raised').pack(:fill=>:x)
f.add(TkButton.new(f, :text=>'a'),
- TkButton.new(f, :text=>'aa'),
- TkButton.new(f, :text=>'aaa'))
+ TkButton.new(f, :text=>'aa'),
+ TkButton.new(f, :text=>'aaa'))
f = TkVBBox.new(:borderwidth=>3, :relief=>'ridge').pack(:fill=>:x)
f.propagate = false
f.height 100
f.add(TkFrame.new(f){|ff|
- TkButton.new(ff, :text=>'a').pack(:pady=>4, :padx=>6,
- :fill=>:both, :expand=>true)
- },
- TkFrame.new(f){|ff|
- TkButton.new(ff, :text=>'aa').pack(:pady=>4, :padx=>6,
- :fill=>:both, :expand=>true)
- },
- TkFrame.new(f){|ff|
- TkButton.new(ff, :text=>'aaaa').pack(:pady=>4, :padx=>6,
- :fill=>:both, :expand=>true)
- })
+ TkButton.new(ff, :text=>'a').pack(:pady=>4, :padx=>6,
+ :fill=>:both, :expand=>true)
+ },
+ TkFrame.new(f){|ff|
+ TkButton.new(ff, :text=>'aa').pack(:pady=>4, :padx=>6,
+ :fill=>:both, :expand=>true)
+ },
+ TkFrame.new(f){|ff|
+ TkButton.new(ff, :text=>'aaaa').pack(:pady=>4, :padx=>6,
+ :fill=>:both, :expand=>true)
+ })
Tk.mainloop
end
diff --git a/ext/tk/sample/tkballoonhelp.rb b/ext/tk/sample/tkballoonhelp.rb
index b71c5746db..d66bc35a88 100644
--- a/ext/tk/sample/tkballoonhelp.rb
+++ b/ext/tk/sample/tkballoonhelp.rb
@@ -92,8 +92,8 @@ if __FILE__ == $0
TkButton.new('text'=>'This button has another balloon help') {|b|
pack('fill'=>'x')
TkBalloonHelp.new(b, 'text'=>'configured message',
- 'interval'=>200, 'font'=>'courier',
- 'background'=>'gray', 'foreground'=>'red')
+ 'interval'=>200, 'font'=>'courier',
+ 'background'=>'gray', 'foreground'=>'red')
}
Tk.mainloop
end
diff --git a/ext/tk/sample/tkbiff.rb b/ext/tk/sample/tkbiff.rb
index e89644bd9d..c6699629cc 100644
--- a/ext/tk/sample/tkbiff.rb
+++ b/ext/tk/sample/tkbiff.rb
@@ -40,13 +40,13 @@ class Mail
@body = []
while line = f.gets()
line.chop!
- next if /^From / =~ line # skip From-line
- break if /^$/ =~ line # end of header
+ next if /^From / =~ line # skip From-line
+ break if /^$/ =~ line # end of header
if /^(\S+):\s*(.*)/ =~ line
- @header[attr = $1.capitalize] = $2
+ @header[attr = $1.capitalize] = $2
elsif attr
- sub(/^\s*/, '')
- @header[attr] += "\n" + $_
+ sub(/^\s*/, '')
+ @header[attr] += "\n" + $_
end
end
@@ -112,7 +112,7 @@ if defined? Thread
loop do
sleep 600
if Time.now - $check_time > 200
- Tk.after 5000, proc{check}
+ Tk.after 5000, proc{check}
end
end
end
diff --git a/ext/tk/sample/tkbrowse.rb b/ext/tk/sample/tkbrowse.rb
index 7395688e97..4893f57f95 100644
--- a/ext/tk/sample/tkbrowse.rb
+++ b/ext/tk/sample/tkbrowse.rb
@@ -41,8 +41,8 @@ def browsedir (dir)
list.bind "Double-Button-1", proc{
for i in TkSelection.get.split
- print "clicked ", i, "\n"
- browse dir, i
+ print "clicked ", i, "\n"
+ browse dir, i
end
}
$dirlist[dir] = list
@@ -56,9 +56,9 @@ def browse (dir, file)
else
if File.file? file
if ENV['EDITOR']
- system format("%s %s&", ENV['EDITOR'], file)
+ system format("%s %s&", ENV['EDITOR'], file)
else
- system "xedit #{file}&"
+ system "xedit #{file}&"
end
else
STDERR.print "\"#{file}\" isn't a directory or regular file"
diff --git a/ext/tk/sample/tkcombobox.rb b/ext/tk/sample/tkcombobox.rb
index 61ab254691..1840270951 100644
--- a/ext/tk/sample/tkcombobox.rb
+++ b/ext/tk/sample/tkcombobox.rb
@@ -45,9 +45,9 @@ EOD
@scr.command(proc{|*args| @lbox.yview(*args); _config_proc})
@up_arrow = TkLabel.new(@lbox, :image=>@@up_bmp,
- :relief=>:raised, :borderwidth=>1)
+ :relief=>:raised, :borderwidth=>1)
@down_arrow = TkLabel.new(@lbox, :image=>@@down_bmp,
- :relief=>:raised, :borderwidth=>1)
+ :relief=>:raised, :borderwidth=>1)
_init_binding
@@ -198,10 +198,10 @@ EOD
@lbox.bind('Configure', proc{_config_proc})
@lbox.bind('Enter', proc{|y| _set_sel(@lbox.nearest(y))}, '%y')
@lbox.bind('Motion', proc{|y|
- @up_timer.stop if @up_timer.running?
- @down_timer.stop if @down_timer.running?
- _check_sel(@lbox.nearest(y))
- }, '%y')
+ @up_timer.stop if @up_timer.running?
+ @down_timer.stop if @down_timer.running?
+ _check_sel(@lbox.nearest(y))
+ }, '%y')
@lbox.bind('Up', proc{_key_UP_proc})
@lbox.bind('Down', proc{_key_DOWN_proc})
@@ -267,7 +267,7 @@ EOD
begin
@var.tkwait
if (idx = @var.to_i) >= 0
- @ent.value = @lst.get(idx)
+ @ent.value = @lst.get(idx)
end
@top.withdraw
@btn.relief(:raised)
@@ -275,8 +275,8 @@ EOD
rescue
ensure
begin
- @top.grab(:release)
- @ent.focus
+ @top.grab(:release)
+ @ent.focus
rescue
end
end
@@ -299,8 +299,8 @@ EOD
keys = _symbolkey2str(keys)
@btn = TkLabel.new(@frame, :relief=>:raised, :borderwidth=>3,
- :image=>@@down_btn_bmp).pack(:side=>:right,
- :ipadx=>2, :fill=>:y)
+ :image=>@@down_btn_bmp).pack(:side=>:right,
+ :ipadx=>2, :fill=>:y)
@ent = TkEntry.new(@frame).pack(:side=>:left)
@path = @ent.path
@@ -313,9 +313,9 @@ EOD
startwait = keys.delete('startwait'){300}
interval = keys.delete('interval'){150}
@lst = TkAutoScrollbox.new(@top,
- :startwait=>startwait,
- :interval=>interval).pack(:fill=>:both,
- :expand=>true)
+ :startwait=>startwait,
+ :interval=>interval).pack(:fill=>:both,
+ :expand=>true)
@ent_list = []
@var = TkVariable.new
@@ -397,8 +397,8 @@ end
if __FILE__ == $0
v = TkVariable.new
e = TkCombobox.new(:height=>7, :scrollbar=>true, :textvariable=>v,
- :arrowrelief=>:flat, :arrowborderwidth=>0,
- :startwait=>400, :interval=>200).pack
+ :arrowrelief=>:flat, :arrowborderwidth=>0,
+ :startwait=>400, :interval=>200).pack
e.values(%w(aa bb cc dd ee ff gg hh ii jj kk ll mm nn oo pp qq rr ss tt uu))
#e.see(e.list_index('end') - 2)
e.value = 'cc'
@@ -409,17 +409,17 @@ if __FILE__ == $0
}.pack
TkFrame.new(:relief=>:raised, :borderwidth=>2,
- :height=>3).pack(:fill=>:x, :expand=>true, :padx=>5, :pady=>3)
+ :height=>3).pack(:fill=>:x, :expand=>true, :padx=>5, :pady=>3)
l = TkAutoScrollbox.new(nil, :relief=>:groove, :borderwidth=>4,
- :width=>20).pack(:fill=>:both, :expand=>true)
+ :width=>20).pack(:fill=>:both, :expand=>true)
(0..20).each{|i| l.insert('end', "line #{i}")}
TkFrame.new(:relief=>:ridge, :borderwidth=>3){
TkButton.new(self, :text=>'ON',
- :command=>proc{l.scrollbar(true)}).pack(:side=>:left)
+ :command=>proc{l.scrollbar(true)}).pack(:side=>:left)
TkButton.new(self, :text=>'OFF',
- :command=>proc{l.scrollbar(false)}).pack(:side=>:right)
+ :command=>proc{l.scrollbar(false)}).pack(:side=>:right)
pack(:fill=>:x)
}
Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/ICONS/viewIcons.rb b/ext/tk/sample/tkextlib/ICONS/viewIcons.rb
index fa8741f415..fc88eb5c85 100644
--- a/ext/tk/sample/tkextlib/ICONS/viewIcons.rb
+++ b/ext/tk/sample/tkextlib/ICONS/viewIcons.rb
@@ -28,17 +28,17 @@ class ViewIcons
ent_groups = TkEntry.new(base, :width=>50, :textvariable=>@groups)
btn_browse = TkButton.new(base, :text=>'Browse',
- :command=>method(:select_icons))
+ :command=>method(:select_icons))
btn_view = TkButton.new(base, :text=>'View',
- :command=>method(:display_icons))
+ :command=>method(:display_icons))
btn_exit = TkButton.new(base, :text=>'Exit', :command=>proc{exit})
@column_btns = {}
6.step(20, 2){|i|
@column_btns[i] = TkButton.new(columns,
- :text=>i.to_s, :width=>2,
- :command=>proc{set_columns(i)}
- ).pack(:side=>:left)
+ :text=>i.to_s, :width=>2,
+ :command=>proc{set_columns(i)}
+ ).pack(:side=>:left)
}
@column_btns[@columns][:relief] = :sunken
@@ -91,15 +91,15 @@ class ViewIcons
def _create_info_window
@info_window = TkToplevel.new(:background=>'lightyellow', :borderwidth=>1,
- :relief=>:solid){|w|
+ :relief=>:solid){|w|
lbl_name = TkLabel.new(w, :text=>'Name', :background=>'lightyellow',
- :font=>@boldfont, :justify=>:left)
+ :font=>@boldfont, :justify=>:left)
lbl_grps = TkLabel.new(w, :text=>'Groups', :background=>'lightyellow',
- :font=>@boldfont, :justify=>:left)
+ :font=>@boldfont, :justify=>:left)
lbl_type = TkLabel.new(w, :text=>'Type', :background=>'lightyellow',
- :font=>@boldfont, :justify=>:left)
+ :font=>@boldfont, :justify=>:left)
lbl_size = TkLabel.new(w, :text=>'Size', :background=>'lightyellow',
- :font=>@boldfont, :justify=>:left)
+ :font=>@boldfont, :justify=>:left)
lbl_name.grid(:row=>0, :column=>0, :sticky=>:w)
lbl_grps.grid(:row=>1, :column=>0, :sticky=>:w)
@@ -117,16 +117,16 @@ class ViewIcons
@size.grid(:row=>3, :column=>1, :sticky=>:w)
def name(txt)
- @name['text'] = txt
+ @name['text'] = txt
end
def groups(txt)
- @grps['text'] = txt
+ @grps['text'] = txt
end
def type(txt)
- @type['text'] = txt
+ @type['text'] = txt
end
def size(txt)
- @size['text'] = txt
+ @size['text'] = txt
end
overrideredirect(true)
@@ -243,9 +243,9 @@ class ViewIcons
if Tk::PLATFORM['platform'] == 'unix'
TkSelection.handle(Tk.root, method(:primary_transfer),
- :selection=>'PRIMARY')
+ :selection=>'PRIMARY')
TkSelection.set_owner(Tk.root, :selection=>'PRIMARY',
- :command=>method(:lost_selection))
+ :command=>method(:lost_selection))
end
Tk.bell
@@ -257,18 +257,18 @@ class ViewIcons
width = @controls.winfo_width - @icons_window.yscrollbar.winfo_width - 8
@icons_window.configure(:width=>width, :scrollregion=>bbox,
- :xscrollincrement=>'0.1i',
- :yscrollincrement=>'0.1i')
+ :xscrollincrement=>'0.1i',
+ :yscrollincrement=>'0.1i')
end
def select_icons
new_lib = Tk.getOpenFile(:initialdir=>@initial_dir,
- :initialfile=>'tkIcons',
- :title=>'Select Icon Library',
- :filetypes=>[
- ['Icon Libraries', ['tkIcons*']],
- ['All Files', ['*']]
- ])
+ :initialfile=>'tkIcons',
+ :title=>'Select Icon Library',
+ :filetypes=>[
+ ['Icon Libraries', ['tkIcons*']],
+ ['All Files', ['*']]
+ ])
@library.value = new_lib if new_lib.length != 0
display_icons
@@ -281,7 +281,7 @@ class ViewIcons
unless File.exist?(@library.value)
Tk.messageBox(:icon=>'warning', :message=>'File does not exist',
- :title=>'viewIcons')
+ :title=>'viewIcons')
return
end
@@ -306,10 +306,10 @@ class ViewIcons
init_info(lbl, name)
if column == limit
- column = 0
- row += 1
+ column = 0
+ row += 1
else
- column += 1
+ column += 1
end
}
diff --git a/ext/tk/sample/tkextlib/bwidget/basic.rb b/ext/tk/sample/tkextlib/bwidget/basic.rb
index f622c142e4..c1521651fd 100644
--- a/ext/tk/sample/tkextlib/bwidget/basic.rb
+++ b/ext/tk/sample/tkextlib/bwidget/basic.rb
@@ -30,37 +30,37 @@ module DemoBasic
def self._label(parent)
lab = Tk::BWidget::Label.new(parent, :text=>'This is a Label widget',
- :helptext=>'Label widget')
+ :helptext=>'Label widget')
chk = TkCheckbutton.new(parent, :text=>'Disabled',
- :variable=>@@var.ref(lab, 'state'),
- :onvalue=>'disabled', :offvalue=>'normal',
- :command=>proc{lab[:state] = @@var[lab, 'state']})
+ :variable=>@@var.ref(lab, 'state'),
+ :onvalue=>'disabled', :offvalue=>'normal',
+ :command=>proc{lab[:state] = @@var[lab, 'state']})
lab.pack(:anchor=>:w, :pady=>4)
chk.pack(:anchor=>:w)
end
def self._entry(parent)
ent = Tk::BWidget::Entry.new(parent, :text=>'Press enter',
- :helptext=>'Entry widtet',
- :command=>proc{
- @@var['entcmd'] = 'command called'
- Tk.after(500, proc{@@var['entcmd'] = ''})
- })
+ :helptext=>'Entry widtet',
+ :command=>proc{
+ @@var['entcmd'] = 'command called'
+ Tk.after(500, proc{@@var['entcmd'] = ''})
+ })
chk1 = TkCheckbutton.new(parent, :text=>'Disabled',
- :variable=>@@var.ref(ent, 'state'),
- :onvalue=>'disabled', :offvalue=>'normal',
- :command=>proc{ent.state = @@var[ent, 'state']})
+ :variable=>@@var.ref(ent, 'state'),
+ :onvalue=>'disabled', :offvalue=>'normal',
+ :command=>proc{ent.state = @@var[ent, 'state']})
chk2 = TkCheckbutton.new(parent, :text=>'Non editable',
- :variable=>@@var.ref(ent, 'editable'),
- :onvalue=>false, :offvalue=>true,
- :command=>proc{
- ent.editable = @@var[ent, 'editable']
- })
+ :variable=>@@var.ref(ent, 'editable'),
+ :onvalue=>false, :offvalue=>true,
+ :command=>proc{
+ ent.editable = @@var[ent, 'editable']
+ })
lab = TkLabel.new(parent, :textvariable=>@@var.ref('entcmd'),
- :foreground=>'red')
+ :foreground=>'red')
ent.pack(:pady=>4, :anchor=>:w)
Tk.pack(chk1, chk2, :anchor=>:w)
@@ -70,22 +70,22 @@ module DemoBasic
def self._button(parent)
frame = TkFrame.new(parent)
but = Tk::BWidget::Button.new(frame, :text=>'Press me!',
- :repeatdelay=>300,
- :command=>proc{_butcmd('command')},
- :helptext=>'This is a Button widget')
+ :repeatdelay=>300,
+ :command=>proc{_butcmd('command')},
+ :helptext=>'This is a Button widget')
sep1 = Tk::BWidget::Separator.new(frame, :orient=>:vertical)
arr1 = Tk::BWidget::ArrowButton.new(frame, :type=>:button,
- :width=>25, :height=>25, :repeatdelay=>300,
- :command=>proc{_butcmd('command')},
- :helptext=>"This is an ArrowButton widget\nof type button")
+ :width=>25, :height=>25, :repeatdelay=>300,
+ :command=>proc{_butcmd('command')},
+ :helptext=>"This is an ArrowButton widget\nof type button")
sep2 = Tk::BWidget::Separator.new(frame, :orient=>:vertical)
arr2 = Tk::BWidget::ArrowButton.new(frame, :type=>:arrow,
- :width=>25, :height=>25, :relief=>:sunken,
- :ipadx=>0, :ipady=>0, :repeatdelay=>300,
- :command=>proc{_butcmd('command')},
- :helptext=>"This is an ArrowButton widget\nof type arrow")
+ :width=>25, :height=>25, :relief=>:sunken,
+ :ipadx=>0, :ipady=>0, :repeatdelay=>300,
+ :command=>proc{_butcmd('command')},
+ :helptext=>"This is an ArrowButton widget\nof type arrow")
but.pack(:side=>:left, :padx=>4)
sep1.pack(:side=>:left, :padx=>4, :fill=>:y)
@@ -95,51 +95,51 @@ module DemoBasic
frame.pack
Tk::BWidget::Separator.new(parent,
- :orient=>:horizontal).pack(:fill=>:x, :pady=>10)
+ :orient=>:horizontal).pack(:fill=>:x, :pady=>10)
labf1 = Tk::BWidget::LabelFrame.new(parent, :text=>'Command',
- :side=>:top, :anchor=>:w,
- :relief=>:sunken, :borderwidth=>1)
+ :side=>:top, :anchor=>:w,
+ :relief=>:sunken, :borderwidth=>1)
subf = labf1.get_frame
chk1 = TkCheckbutton.new(subf, :text=>'Disabled',
- :variable=>@@var.ref('bstate'),
- :onvalue=>'disabled', :offvalue=>'normal',
- :command=>proc{_bstate(@@var['bstate'],
- but, arr1, arr2)})
+ :variable=>@@var.ref('bstate'),
+ :onvalue=>'disabled', :offvalue=>'normal',
+ :command=>proc{_bstate(@@var['bstate'],
+ but, arr1, arr2)})
chk2 = TkCheckbutton.new(subf, :text=>"Use armcommand/\ndisarmcommand",
- :variable=>@@var.ref('barmcmd'),
- :command=>proc{_barmcmd(@@var['barmcmd'],
- but, arr1, arr2)})
+ :variable=>@@var.ref('barmcmd'),
+ :command=>proc{_barmcmd(@@var['barmcmd'],
+ but, arr1, arr2)})
Tk.pack(chk1, chk2, :anchor=>:w)
label = TkLabel.new(parent, :textvariable=>@@var.ref('butcmd'),
- :foreground=>'red').pack(:side=>:bottom, :pady=>4)
+ :foreground=>'red').pack(:side=>:bottom, :pady=>4)
labf2 = Tk::BWidget::LabelFrame.new(parent, :text=>'Direction',
- :side=>:top, :anchor=>:w,
- :relief=>:sunken, :borderwidth=>1)
+ :side=>:top, :anchor=>:w,
+ :relief=>:sunken, :borderwidth=>1)
subf = labf2.get_frame
@@var['bside'] = :top
[:top, :left, :bottom, :right].each{|dir|
TkRadiobutton.new(subf, :text=>"#{dir} arrow",
- :variable=>@@var.ref('bside'), :value=>dir,
- :command=>proc{_bside(@@var['bside'], arr1, arr2)}
- ).pack(:anchor=>:w)
+ :variable=>@@var.ref('bside'), :value=>dir,
+ :command=>proc{_bside(@@var['bside'], arr1, arr2)}
+ ).pack(:anchor=>:w)
}
labf3 = Tk::BWidget::LabelFrame.new(parent, :text=>'Relief',
- :side=>:top, :anchor=>:w,
- :relief=>:sunken, :borderwidth=>1)
+ :side=>:top, :anchor=>:w,
+ :relief=>:sunken, :borderwidth=>1)
subf = labf3.get_frame
@@var['brelief'] = :raised
[ %w(raised sunken ridge groove), %w(flat solid link)].each{|lrelief|
f = TkFrame.new(subf)
lrelief.each{|relief|
- TkRadiobutton.new(f, :text=>relief,
- :variable=>@@var.ref('brelief'), :value=>relief,
- :command=>proc{
- _brelief(@@var['brelief'], but, arr1, arr2)
- }).pack(:anchor=>:w)
+ TkRadiobutton.new(f, :text=>relief,
+ :variable=>@@var.ref('brelief'), :value=>relief,
+ :command=>proc{
+ _brelief(@@var['brelief'], but, arr1, arr2)
+ }).pack(:anchor=>:w)
}
f.pack(:side=>:left, :padx=>2, :anchor=>:n)
}
@@ -164,19 +164,19 @@ module DemoBasic
def self._barmcmd(value, but, arr1, arr2)
if TkComm.bool(value)
but.configure(:armcommand=>proc{_butcmd('arm')},
- :disarmcommand=>proc{_butcmd('disarm')},
- :command=>'')
+ :disarmcommand=>proc{_butcmd('disarm')},
+ :command=>'')
[arr1, arr2].each{|arr|
- arr.configure(:armcommand=>proc{_butcmd('arm')},
- :disarmcommand=>proc{_butcmd('disarm')},
- :command=>'')
+ arr.configure(:armcommand=>proc{_butcmd('arm')},
+ :disarmcommand=>proc{_butcmd('disarm')},
+ :command=>'')
}
else
but.configure(:armcommand=>'', :disarmcommand=>'',
- :command=>proc{_butcmd('command')})
+ :command=>proc{_butcmd('command')})
[arr1, arr2].each{|arr|
- arr.configure(:armcommand=>'', :disarmcommand=>'',
- :command=>proc{_butcmd('command')})
+ arr.configure(:armcommand=>'', :disarmcommand=>'',
+ :command=>proc{_butcmd('command')})
}
end
end
diff --git a/ext/tk/sample/tkextlib/bwidget/demo.rb b/ext/tk/sample/tkextlib/bwidget/demo.rb
index e192cd6364..785d2681a8 100644
--- a/ext/tk/sample/tkextlib/bwidget/demo.rb
+++ b/ext/tk/sample/tkextlib/bwidget/demo.rb
@@ -54,26 +54,26 @@ class BWidget_Demo
descmenu = [
'&File', 'all', 'file', 0, [
- ['command', 'E&xit', [], 'Exit BWidget demo', [],
- {:command=>proc{exit}}]
+ ['command', 'E&xit', [], 'Exit BWidget demo', [],
+ {:command=>proc{exit}}]
],
'&Options', 'all', 'options', 0, [
- ['checkbutton', 'Toolbar &1', ['all', 'option'],
- 'Show/hide toolbar 1', [],
- { :variable=>DemoVar.toolbar1,
- :command=>proc{
- DemoVar.mainframe.show_toolbar(0, DemoVar.toolbar1.value)
- }
- }
- ],
- ['checkbutton', 'Toolbar &2', ['all', 'option'],
- 'Show/hide toolbar 2', [],
- { :variable=>DemoVar.toolbar2,
- :command=>proc{
- DemoVar.mainframe.show_toolbar(1, DemoVar.toolbar2.value)
- }
- }
- ]
+ ['checkbutton', 'Toolbar &1', ['all', 'option'],
+ 'Show/hide toolbar 1', [],
+ { :variable=>DemoVar.toolbar1,
+ :command=>proc{
+ DemoVar.mainframe.show_toolbar(0, DemoVar.toolbar1.value)
+ }
+ }
+ ],
+ ['checkbutton', 'Toolbar &2', ['all', 'option'],
+ 'Show/hide toolbar 2', [],
+ { :variable=>DemoVar.toolbar2,
+ :command=>proc{
+ DemoVar.mainframe.show_toolbar(1, DemoVar.toolbar2.value)
+ }
+ }
+ ]
]
]
@@ -81,63 +81,63 @@ class BWidget_Demo
DemoVar.prgindic.value = 0
DemoVar.mainframe = Tk::BWidget::MainFrame.new(
- :menu=>descmenu,
- :textvariable=>DemoVar.status,
- :progressvar=>DemoVar.prgindic
- )
+ :menu=>descmenu,
+ :textvariable=>DemoVar.status,
+ :progressvar=>DemoVar.prgindic
+ )
# toobar 1 creation
DemoVar.prgindic.numeric += 1
DemoVar.mainframe.add_toolbar{|tb1|
Tk::BWidget::ButtonBox.new(tb1, :spacing=>0, :padx=>1, :pady=>1){|bbox|
- add(:image=>Tk::BWidget::Bitmap.new('new'),
- :highlightthickness=>0, :takefocus=>0, :relief=>:link,
- :borderwidth=>1, :padx=>1, :pady=>1,
- :command=>proc{puts 'select "Create a new file" icon'},
- :helptext=>"Create a new file")
-
- add(:image=>Tk::BWidget::Bitmap.new('open'),
- :highlightthickness=>0, :takefocus=>0, :relief=>:link,
- :borderwidth=>1, :padx=>1, :pady=>1,
- :command=>proc{puts 'select "Open an existing file" icon'},
- :helptext=>"Open an existing file")
-
- add(:image=>Tk::BWidget::Bitmap.new('save'),
- :highlightthickness=>0, :takefocus=>0, :relief=>:link,
- :borderwidth=>1, :padx=>1, :pady=>1,
- :command=>proc{puts 'select "Save file" icon'},
- :helptext=>"Save file")
-
- pack(:side=>:left, :anchor=>:w)
+ add(:image=>Tk::BWidget::Bitmap.new('new'),
+ :highlightthickness=>0, :takefocus=>0, :relief=>:link,
+ :borderwidth=>1, :padx=>1, :pady=>1,
+ :command=>proc{puts 'select "Create a new file" icon'},
+ :helptext=>"Create a new file")
+
+ add(:image=>Tk::BWidget::Bitmap.new('open'),
+ :highlightthickness=>0, :takefocus=>0, :relief=>:link,
+ :borderwidth=>1, :padx=>1, :pady=>1,
+ :command=>proc{puts 'select "Open an existing file" icon'},
+ :helptext=>"Open an existing file")
+
+ add(:image=>Tk::BWidget::Bitmap.new('save'),
+ :highlightthickness=>0, :takefocus=>0, :relief=>:link,
+ :borderwidth=>1, :padx=>1, :pady=>1,
+ :command=>proc{puts 'select "Save file" icon'},
+ :helptext=>"Save file")
+
+ pack(:side=>:left, :anchor=>:w)
}
Tk::BWidget::Separator.new(tb1, :orient=>:vertical){
- pack(:side=>:left, :fill=>:y, :padx=>4, :anchor=>:w)
+ pack(:side=>:left, :fill=>:y, :padx=>4, :anchor=>:w)
}
DemoVar.prgindic.numeric += 1
Tk::BWidget::ButtonBox.new(tb1, :spacing=>0, :padx=>1, :pady=>1){|bbox|
- add(:image=>Tk::BWidget::Bitmap.new('cut'),
- :highlightthickness=>0, :takefocus=>0, :relief=>:link,
- :borderwidth=>1, :padx=>1, :pady=>1,
- :command=>proc{puts 'select "Cut selection" icon'},
- :helptext=>"Cut selection")
-
- add(:image=>Tk::BWidget::Bitmap.new('copy'),
- :highlightthickness=>0, :takefocus=>0, :relief=>:link,
- :borderwidth=>1, :padx=>1, :pady=>1,
- :command=>proc{puts 'select "Copy selection" icon'},
- :helptext=>"Copy selection")
-
- add(:image=>Tk::BWidget::Bitmap.new('paste'),
- :highlightthickness=>0, :takefocus=>0, :relief=>:link,
- :borderwidth=>1, :padx=>1, :pady=>1,
- :command=>proc{puts 'select "Paste selection" icon'},
- :helptext=>"Paste selection")
-
- pack(:side=>:left, :anchor=>:w)
+ add(:image=>Tk::BWidget::Bitmap.new('cut'),
+ :highlightthickness=>0, :takefocus=>0, :relief=>:link,
+ :borderwidth=>1, :padx=>1, :pady=>1,
+ :command=>proc{puts 'select "Cut selection" icon'},
+ :helptext=>"Cut selection")
+
+ add(:image=>Tk::BWidget::Bitmap.new('copy'),
+ :highlightthickness=>0, :takefocus=>0, :relief=>:link,
+ :borderwidth=>1, :padx=>1, :pady=>1,
+ :command=>proc{puts 'select "Copy selection" icon'},
+ :helptext=>"Copy selection")
+
+ add(:image=>Tk::BWidget::Bitmap.new('paste'),
+ :highlightthickness=>0, :takefocus=>0, :relief=>:link,
+ :borderwidth=>1, :padx=>1, :pady=>1,
+ :command=>proc{puts 'select "Paste selection" icon'},
+ :helptext=>"Paste selection")
+
+ pack(:side=>:left, :anchor=>:w)
}
}
@@ -147,7 +147,7 @@ class BWidget_Demo
tb2 = DemoVar.mainframe.add_toolbar
DemoVar._wfont = Tk::BWidget::SelectFont::Toolbar.new(tb2,
:command=>proc{update_font(DemoVar._wfont[:font])}
- )
+ )
DemoVar.font = DemoVar._wfont[:font]
DemoVar._wfont.pack(:side=>:left, :anchor=>:w)
@@ -214,18 +214,18 @@ class BWidget_Demo
top.overrideredirect(true)
ximg = TkLabel.new(top, :bitmap=>"@#{File.join(DEMODIR,'x1.xbm')}",
- :foreground=>'grey90', :background=>'white')
+ :foreground=>'grey90', :background=>'white')
bwimg = TkLabel.new(ximg, :bitmap=>"@#{File.join(DEMODIR,'bwidget.xbm')}",
- :foreground=>'grey90', :background=>'white')
+ :foreground=>'grey90', :background=>'white')
frame = TkFrame.new(ximg, :background=>'white')
TkLabel.new(frame, :text=>'Loading demo',
- :background=>'white', :font=>'times 8').pack
+ :background=>'white', :font=>'times 8').pack
TkLabel.new(frame, :textvariable=>DemoVar.prgtext,
- :background=>'white', :font=>'times 8', :width=>35).pack
+ :background=>'white', :font=>'times 8', :width=>35).pack
Tk::BWidget::ProgressBar.new(frame, :width=>50, :height=>10,
- :background=>'white',
- :variable=>DemoVar.prgindic,
- :maximum=>10).pack
+ :background=>'white',
+ :variable=>DemoVar.prgindic,
+ :maximum=>10).pack
frame.place(:x=>0, :y=>0, :anchor=>:nw)
bwimg.place(:relx=>1, :rely=>1, :anchor=>:se)
ximg.pack
diff --git a/ext/tk/sample/tkextlib/bwidget/dnd.rb b/ext/tk/sample/tkextlib/bwidget/dnd.rb
index fd6cc40dda..1c8b036530 100644
--- a/ext/tk/sample/tkextlib/bwidget/dnd.rb
+++ b/ext/tk/sample/tkextlib/bwidget/dnd.rb
@@ -13,19 +13,19 @@ module DemoDnD
subf = titf1.get_frame
ent1 = Tk::BWidget::LabelEntry.new(subf, :label=>'Entry',
- :labelwidth=>14, :dragenabled=>true,
- :dragevent=>3)
+ :labelwidth=>14, :dragenabled=>true,
+ :dragevent=>3)
labf1 = Tk::BWidget::LabelFrame.new(subf, :text=>'Label (text)',
- :width=>14)
+ :width=>14)
f = labf1.get_frame
lab = Tk::BWidget::Label.new(f, :text=>'Drag this text',
- :dragenabled=>true, :dragevent=>3).pack
+ :dragenabled=>true, :dragevent=>3).pack
labf2 = Tk::BWidget::LabelFrame.new(subf, :text=>'Label (bitmap)',
- :width=>14)
+ :width=>14)
f = labf2.get_frame
lab = Tk::BWidget::Label.new(f, :bitmap=>'info',
- :dragenabled=>true, :dragevent=>3).pack
+ :dragenabled=>true, :dragevent=>3).pack
Tk.pack(ent1, labf1, labf2, :side=>:top, :fill=>:x, :pady=>4)
@@ -33,11 +33,11 @@ module DemoDnD
subf = titf2.get_frame
ent1 = Tk::BWidget::LabelEntry.new(subf, :label=>'Entry',
- :labelwidth=>14, :dropenabled=>true)
+ :labelwidth=>14, :dropenabled=>true)
labf1 = Tk::BWidget::LabelFrame.new(subf, :text=>'Label', :width=>14)
f = labf1.get_frame
lab = Tk::BWidget::Label.new(f, :dropenabled=>true,
- :highlightthickness=>1).pack(:fill=>:x)
+ :highlightthickness=>1).pack(:fill=>:x)
Tk.pack(ent1, labf1, :side=>:top, :fill=>:x, :pady=>4)
Tk.pack(titf1, titf2, :pady=>4)
diff --git a/ext/tk/sample/tkextlib/bwidget/manager.rb b/ext/tk/sample/tkextlib/bwidget/manager.rb
index 65bbe0f9e6..776cb3065b 100644
--- a/ext/tk/sample/tkextlib/bwidget/manager.rb
+++ b/ext/tk/sample/tkextlib/bwidget/manager.rb
@@ -33,34 +33,34 @@ module DemoManager
def self._mainframe(parent)
labf1 = Tk::BWidget::LabelFrame.new(parent, :text=>'Toolbar',
- :side=>:top, :anchor=>:w,
- :relief=>:sunken, :borderwidth=>2)
+ :side=>:top, :anchor=>:w,
+ :relief=>:sunken, :borderwidth=>2)
subf = labf1.get_frame
chk1 = TkCheckbutton.new(subf, :text=>'View toolbar 1',
- :variable=>DemoVar.toolbar1,
- :command=>proc{
- DemoVar.mainframe.show_toolbar(
- 0, DemoVar.toolbar1.value
- )
- })
+ :variable=>DemoVar.toolbar1,
+ :command=>proc{
+ DemoVar.mainframe.show_toolbar(
+ 0, DemoVar.toolbar1.value
+ )
+ })
chk2 = TkCheckbutton.new(subf, :text=>'View toolbar 2',
- :variable=>DemoVar.toolbar2,
- :command=>proc{
- DemoVar.mainframe.show_toolbar(
- 1, DemoVar.toolbar2.value
- )
- })
+ :variable=>DemoVar.toolbar2,
+ :command=>proc{
+ DemoVar.mainframe.show_toolbar(
+ 1, DemoVar.toolbar2.value
+ )
+ })
Tk.pack(chk1, chk2, :anchor=>:w, :fill=>:x)
labf1.pack(:fill=>:both)
labf2 = Tk::BWidget::LabelFrame.new(parent, :text=>'Status bar',
- :side=>:top, :anchor=>:w,
- :relief=>:sunken, :borderwidth=>2)
+ :side=>:top, :anchor=>:w,
+ :relief=>:sunken, :borderwidth=>2)
subf = labf2.get_frame
chk1 = TkCheckbutton.new(subf, :text=>"Show Progress\nindicator",
- :justify=>:left, :variable=>@@progress,
- :command=>proc{ _show_progress })
+ :justify=>:left, :variable=>@@progress,
+ :command=>proc{ _show_progress })
chk1.pack(:anchor=>:w, :fill=>:x)
Tk.pack(labf1, labf2, :side=>:left, :padx=>4, :fill=>:both)
@@ -68,10 +68,10 @@ module DemoManager
def self._notebook(parent)
TkCheckbutton.new(parent, :text=>'Homogeneous label',
- :variable=>@@homogeneous,
- :command=>proc{
- DemoVar.notebook[:homogeneous] = @@homogeneous.value
- }).pack(:side=>:left, :anchor=>:n, :fill=>:x)
+ :variable=>@@homogeneous,
+ :command=>proc{
+ DemoVar.notebook[:homogeneous] = @@homogeneous.value
+ }).pack(:side=>:left, :anchor=>:n, :fill=>:x)
end
def self._paned(parent)
@@ -93,15 +93,15 @@ module DemoManager
}
sw = Tk::BWidget::ScrolledWindow.new(pane3, :relief=>:sunken,
- :borderwidth=>2)
+ :borderwidth=>2)
sf = Tk::BWidget::ScrollableFrame.new(sw)
sw.set_widget(sf)
subf = sf.get_frame
lab = TkLabel.new(subf, :text=>'This is a ScrollableFrame')
chk = TkCheckbutton.new(subf, :text=>'Constrained with',
- :variable=>@@constw, :command=>proc{
- sf['constrainedwidth'] = @@constw.value
- })
+ :variable=>@@constw, :command=>proc{
+ sf['constrainedwidth'] = @@constw.value
+ })
lab.pack
chk.pack(:anchor=>:w)
chk.bind('FocusIn', proc{sf.see(chk)})
@@ -133,13 +133,13 @@ module DemoManager
def self._update_progress
if @@progress.bool
if DemoVar.prgindic.numeric < 100
- DemoVar.prgindic.numeric += 5
+ DemoVar.prgindic.numeric += 5
else
- @@progress.value = false
- DemoVar.mainframe.show_statusbar(:status)
- DemoVar.status.value = 'Done'
- @@afterobj.stop
- Tk.after(500, proc{ DemoVar.status.value = '' })
+ @@progress.value = false
+ DemoVar.mainframe.show_statusbar(:status)
+ DemoVar.status.value = 'Done'
+ @@afterobj.stop
+ Tk.after(500, proc{ DemoVar.status.value = '' })
end
else
@@afterobj.stop
diff --git a/ext/tk/sample/tkextlib/bwidget/select.rb b/ext/tk/sample/tkextlib/bwidget/select.rb
index a04d8da482..ea24b47e2e 100644
--- a/ext/tk/sample/tkextlib/bwidget/select.rb
+++ b/ext/tk/sample/tkextlib/bwidget/select.rb
@@ -14,30 +14,30 @@ module DemoSelect
titf1 = Tk::BWidget::TitleFrame.new(frame, :text=>'SpinBox')
subf = titf1.get_frame
spin = Tk::BWidget::SpinBox.new(subf, :range=>[1, 100, 1],
- :textvariable=>@@var.ref('spin', 'var'),
- :helptext=>'This is the SpinBox')
+ :textvariable=>@@var.ref('spin', 'var'),
+ :helptext=>'This is the SpinBox')
ent = Tk::BWidget::LabelEntry.new(subf, :label=>'Linked var',
- :labelwidth=>10, :labelanchor=>:w,
- :textvariable=>@@var.ref('spin', 'var'),
- :editable=>0,
- :helptext=>"This is an Entry reflecting\nthe linked var of SpinBox")
+ :labelwidth=>10, :labelanchor=>:w,
+ :textvariable=>@@var.ref('spin', 'var'),
+ :editable=>0,
+ :helptext=>"This is an Entry reflecting\nthe linked var of SpinBox")
labf = Tk::BWidget::LabelFrame.new(subf, :text=>'Options',
- :side=>:top, :anchor=>:w,
- :relief=>:sunken, :borderwidth=>1,
- :helptext=>'Modify some options of SpinBox')
+ :side=>:top, :anchor=>:w,
+ :relief=>:sunken, :borderwidth=>1,
+ :helptext=>'Modify some options of SpinBox')
subf = labf.get_frame
chk1 = TkCheckbutton.new(subf, :text=>'Non editable',
- :variable=>@@var.ref('spin', 'editable'),
- :onvalue=>false, :offvalue=>true,
- :command=>proc{
- spin.editable(@@var['spin', 'editable'])
- })
+ :variable=>@@var.ref('spin', 'editable'),
+ :onvalue=>false, :offvalue=>true,
+ :command=>proc{
+ spin.editable(@@var['spin', 'editable'])
+ })
chk2 = TkCheckbutton.new(subf, :text=>'Disabled',
- :variable=>@@var.ref('spin', 'state'),
- :onvalue=>'disabled', :offvalue=>'normal',
- :command=>proc{
- spin.state(@@var['spin', 'state'])
- })
+ :variable=>@@var.ref('spin', 'state'),
+ :onvalue=>'disabled', :offvalue=>'normal',
+ :command=>proc{
+ spin.state(@@var['spin', 'state'])
+ })
Tk.pack(chk1, chk2, :side=>:left, :anchor=>:w)
Tk.pack(spin, ent, labf, :pady=>4, :fill=>:x)
titf1.pack
@@ -45,33 +45,33 @@ module DemoSelect
titf2 = Tk::BWidget::TitleFrame.new(frame, :text=>'ComboBox')
subf = titf2.get_frame
combo = Tk::BWidget::ComboBox.new(subf,
- :textvariable=>@@var.ref('combo', 'var'),
- :values=>[
- 'first value', 'second value',
- 'third value', 'fourth value',
- 'fifth value'
- ],
- :helptext=>'This is the ComboBox')
+ :textvariable=>@@var.ref('combo', 'var'),
+ :values=>[
+ 'first value', 'second value',
+ 'third value', 'fourth value',
+ 'fifth value'
+ ],
+ :helptext=>'This is the ComboBox')
ent = Tk::BWidget::LabelEntry.new(subf, :label=>'Linked var',
- :labelwidth=>10, :labelanchor=>:w,
- :textvariable=>@@var.ref('combo', 'var'),
- :editable=>0, :helptext=>"This is an Entry reflecting\nthe linked var of ComboBox")
+ :labelwidth=>10, :labelanchor=>:w,
+ :textvariable=>@@var.ref('combo', 'var'),
+ :editable=>0, :helptext=>"This is an Entry reflecting\nthe linked var of ComboBox")
labf = Tk::BWidget::LabelFrame.new(subf, :text=>'Options', :side=>:top,
- :anchor=>:w, :relief=>:sunken,
- :borderwidth=>1, :helptext=>'Modify some options of ComboBox')
+ :anchor=>:w, :relief=>:sunken,
+ :borderwidth=>1, :helptext=>'Modify some options of ComboBox')
subf = labf.get_frame
chk1 = TkCheckbutton.new(subf, :text=>'Non editable',
- :variable=>@@var.ref('combo', 'editable'),
- :onvalue=>false, :offvalue=>true,
- :command=>proc{
- combo.editable(@@var['combo', 'editable'])
- })
+ :variable=>@@var.ref('combo', 'editable'),
+ :onvalue=>false, :offvalue=>true,
+ :command=>proc{
+ combo.editable(@@var['combo', 'editable'])
+ })
chk2 = TkCheckbutton.new(subf, :text=>'Disabled',
- :variable=>@@var.ref('combo', 'state'),
- :onvalue=>'disabled', :offvalue=>'normal',
- :command=>proc{
- combo.state(@@var['combo', 'state'])
- })
+ :variable=>@@var.ref('combo', 'state'),
+ :onvalue=>'disabled', :offvalue=>'normal',
+ :command=>proc{
+ combo.state(@@var['combo', 'state'])
+ })
Tk.pack(chk1, chk2, :side=>:left, :anchor=>:w)
Tk.pack(combo, ent, labf, :pady=>4, :fill=>:x)
diff --git a/ext/tk/sample/tkextlib/bwidget/tmpldlg.rb b/ext/tk/sample/tkextlib/bwidget/tmpldlg.rb
index 1ed84e21aa..3d19c8d092 100644
--- a/ext/tk/sample/tkextlib/bwidget/tmpldlg.rb
+++ b/ext/tk/sample/tkextlib/bwidget/tmpldlg.rb
@@ -24,14 +24,14 @@ module DemoDialog
subf = titf1.get_frame
cmd = proc{ TkOption.read_file(File.join(Tk::BWidget::LIBRARY, 'lang',
- @@resources.value + '.rc')) }
+ @@resources.value + '.rc')) }
Tk.pack(TkRadiobutton.new(subf, :text=>'English', :value=>'en',
- :variable=>@@resources, :command=>cmd),
- TkRadiobutton.new(subf, :text=>'French', :value=>'fr',
- :variable=>@@resources, :command=>cmd),
- TkRadiobutton.new(subf, :text=>'German', :value=>'de',
- :variable=>@@resources, :command=>cmd),
- :side=>:left)
+ :variable=>@@resources, :command=>cmd),
+ TkRadiobutton.new(subf, :text=>'French', :value=>'fr',
+ :variable=>@@resources, :command=>cmd),
+ TkRadiobutton.new(subf, :text=>'German', :value=>'de',
+ :variable=>@@resources, :command=>cmd),
+ :side=>:left)
_tmpldlg(titf2.get_frame)
_msgdlg(titf3.get_frame)
@@ -47,34 +47,34 @@ module DemoDialog
@@tmpl['anchor'] = :c
labf1 = Tk::BWidget::LabelFrame.new(parent, :text=>'Button side',
- :side=>:top, :anchor=>:w,
- :relief=>:sunken, :borderwidth=>1)
+ :side=>:top, :anchor=>:w,
+ :relief=>:sunken, :borderwidth=>1)
subf = labf1.get_frame
Tk.pack(TkRadiobutton.new(subf, :text=>'Bottom', :value=>:bottom,
- :variable=>@@tmpl.ref('side'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Left', :value=>:left,
- :variable=>@@tmpl.ref('side'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Right', :value=>:right,
- :variable=>@@tmpl.ref('side'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Top', :value=>:top,
- :variable=>@@tmpl.ref('side'), :anchor=>:w),
- :fill=>:x, :anchor=>:w)
+ :variable=>@@tmpl.ref('side'), :anchor=>:w),
+ TkRadiobutton.new(subf, :text=>'Left', :value=>:left,
+ :variable=>@@tmpl.ref('side'), :anchor=>:w),
+ TkRadiobutton.new(subf, :text=>'Right', :value=>:right,
+ :variable=>@@tmpl.ref('side'), :anchor=>:w),
+ TkRadiobutton.new(subf, :text=>'Top', :value=>:top,
+ :variable=>@@tmpl.ref('side'), :anchor=>:w),
+ :fill=>:x, :anchor=>:w)
labf2 = Tk::BWidget::LabelFrame.new(parent, :text=>'Button anchor',
- :side=>:top, :anchor=>:w,
- :relief=>:sunken, :borderwidth=>1)
+ :side=>:top, :anchor=>:w,
+ :relief=>:sunken, :borderwidth=>1)
subf = labf2.get_frame
Tk.pack(TkRadiobutton.new(subf, :text=>'North', :value=>:n,
- :variable=>@@tmpl.ref('anchor'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'West', :value=>:w,
- :variable=>@@tmpl.ref('anchor'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'East', :value=>:e,
- :variable=>@@tmpl.ref('anchor'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'South', :value=>:s,
- :variable=>@@tmpl.ref('anchor'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Center', :value=>:c,
- :variable=>@@tmpl.ref('anchor'), :anchor=>:w),
- :fill=>:x, :anchor=>:w)
+ :variable=>@@tmpl.ref('anchor'), :anchor=>:w),
+ TkRadiobutton.new(subf, :text=>'West', :value=>:w,
+ :variable=>@@tmpl.ref('anchor'), :anchor=>:w),
+ TkRadiobutton.new(subf, :text=>'East', :value=>:e,
+ :variable=>@@tmpl.ref('anchor'), :anchor=>:w),
+ TkRadiobutton.new(subf, :text=>'South', :value=>:s,
+ :variable=>@@tmpl.ref('anchor'), :anchor=>:w),
+ TkRadiobutton.new(subf, :text=>'Center', :value=>:c,
+ :variable=>@@tmpl.ref('anchor'), :anchor=>:w),
+ :fill=>:x, :anchor=>:w)
sep = Tk::BWidget::Separator.new(parent, :orient=>:horizontal)
button = TkButton.new(parent, :text=>'Show', :command=>proc{_show_tmpldlg})
@@ -89,44 +89,44 @@ module DemoDialog
@@msg['icon'] = 'info'
labf1 = Tk::BWidget::LabelFrame.new(parent, :text=>'Type', :side=>:top,
- :anchor=>:w, :relief=>:sunken,
- :borderwidth=>1)
+ :anchor=>:w, :relief=>:sunken,
+ :borderwidth=>1)
subf = labf1.get_frame
Tk.pack(TkRadiobutton.new(subf, :text=>'Ok', :value=>'ok',
- :variable=>@@msg.ref('type'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Ok, Cancel', :value=>'okcancel',
- :variable=>@@msg.ref('type'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Retry, Cancel',
- :value=>'retrycancel',
- :variable=>@@msg.ref('type'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Yes, No', :value=>'yesno',
- :variable=>@@msg.ref('type'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Yes, No, Cancel',
- :value=>'yesnocancel',
- :variable=>@@msg.ref('type'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Abort, Retry, Ignore',
- :value=>'abortretryignore',
- :variable=>@@msg.ref('type'), :anchor=>:w),
- :fill=>:x, :anchor=>:w)
+ :variable=>@@msg.ref('type'), :anchor=>:w),
+ TkRadiobutton.new(subf, :text=>'Ok, Cancel', :value=>'okcancel',
+ :variable=>@@msg.ref('type'), :anchor=>:w),
+ TkRadiobutton.new(subf, :text=>'Retry, Cancel',
+ :value=>'retrycancel',
+ :variable=>@@msg.ref('type'), :anchor=>:w),
+ TkRadiobutton.new(subf, :text=>'Yes, No', :value=>'yesno',
+ :variable=>@@msg.ref('type'), :anchor=>:w),
+ TkRadiobutton.new(subf, :text=>'Yes, No, Cancel',
+ :value=>'yesnocancel',
+ :variable=>@@msg.ref('type'), :anchor=>:w),
+ TkRadiobutton.new(subf, :text=>'Abort, Retry, Ignore',
+ :value=>'abortretryignore',
+ :variable=>@@msg.ref('type'), :anchor=>:w),
+ :fill=>:x, :anchor=>:w)
Tk.pack(TkRadiobutton.new(subf, :text=>'User', :value=>'user',
- :variable=>@@msg.ref('type'), :anchor=>:w),
- Tk::BWidget::Entry.new(subf, :textvariable=>@@msg.ref('buttons')),
- :side=>:left)
+ :variable=>@@msg.ref('type'), :anchor=>:w),
+ Tk::BWidget::Entry.new(subf, :textvariable=>@@msg.ref('buttons')),
+ :side=>:left)
labf2 = Tk::BWidget::LabelFrame.new(parent, :text=>'Icon', :side=>:top,
- :anchor=>:w, :relief=>:sunken,
- :borderwidth=>1)
+ :anchor=>:w, :relief=>:sunken,
+ :borderwidth=>1)
subf = labf2.get_frame
Tk.pack(TkRadiobutton.new(subf, :text=>'Information', :value=>'info',
- :variable=>@@msg.ref('icon'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Question', :value=>'question',
- :variable=>@@msg.ref('icon'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Warning', :value=>'warning',
- :variable=>@@msg.ref('icon'), :anchor=>:w),
- TkRadiobutton.new(subf, :text=>'Error', :value=>'error',
- :variable=>@@msg.ref('icon'), :anchor=>:w),
- :fill=>:x, :anchor=>:w)
+ :variable=>@@msg.ref('icon'), :anchor=>:w),
+ TkRadiobutton.new(subf, :text=>'Question', :value=>'question',
+ :variable=>@@msg.ref('icon'), :anchor=>:w),
+ TkRadiobutton.new(subf, :text=>'Warning', :value=>'warning',
+ :variable=>@@msg.ref('icon'), :anchor=>:w),
+ TkRadiobutton.new(subf, :text=>'Error', :value=>'error',
+ :variable=>@@msg.ref('icon'), :anchor=>:w),
+ :fill=>:x, :anchor=>:w)
sep = Tk::BWidget::Separator.new(parent, :orient=>:horizontal)
button = TkButton.new(parent, :text=>'Show', :command=>proc{_show_msgdlg})
@@ -138,15 +138,15 @@ module DemoDialog
def self._stddlg(parent)
Tk.pack(TkButton.new(parent, :text=>'Select a color '){|w|
- command(proc{DemoDialog._show_color(w)})
- },
- TkButton.new(parent, :text=>'Font selector dialog',
- :command=>proc{_show_fontdlg}),
- TkButton.new(parent, :text=>'Progression dialog',
- :command=>proc{_show_progdlg}),
- TkButton.new(parent, :text=>'Password dialog',
- :command=>proc{_show_passdlg}),
- :side=>:left, :padx=>5, :anchor=>:w)
+ command(proc{DemoDialog._show_color(w)})
+ },
+ TkButton.new(parent, :text=>'Font selector dialog',
+ :command=>proc{_show_fontdlg}),
+ TkButton.new(parent, :text=>'Progression dialog',
+ :command=>proc{_show_progdlg}),
+ TkButton.new(parent, :text=>'Password dialog',
+ :command=>proc{_show_passdlg}),
+ :side=>:left, :padx=>5, :anchor=>:w)
end
def self._show_color(w)
@@ -159,15 +159,15 @@ module DemoDialog
def self._show_tmpldlg
dlg = Tk::BWidget::Dialog.new(:relative=>Tk.root, :modal=>:local,
- :separator=>true, :title=>'Template dialog',
- :side=>@@tmpl['side'],
- :anchor=>@@tmpl['anchor'],
- :default=>0, :cancel=>1)
+ :separator=>true, :title=>'Template dialog',
+ :side=>@@tmpl['side'],
+ :anchor=>@@tmpl['anchor'],
+ :default=>0, :cancel=>1)
dlg.add('name'=>'ok')
dlg.add('name'=>'cancel')
TkMessage.new(dlg.get_frame, :text=>"Template\nDialog", :justify=>:center,
- :anchor=>:c, :width=>80).pack(:fill=>:both, :expand=>true,
- :padx=>100, :pady=>100)
+ :anchor=>:c, :width=>80).pack(:fill=>:both, :expand=>true,
+ :padx=>100, :pady=>100)
dlg.draw
dlg.destroy
end
@@ -175,16 +175,16 @@ module DemoDialog
def self._show_msgdlg
@@msgdlg.destroy if @@msgdlg
@@msgdlg = Tk::BWidget::MessageDlg.new(:relative=>Tk.root,
- :message=>'Message for MessageBox',
- :type=>@@msg['type'],
- :icon=>@@msg['icon'],
- :buttons=>@@msg['buttons'])
+ :message=>'Message for MessageBox',
+ :type=>@@msg['type'],
+ :icon=>@@msg['icon'],
+ :buttons=>@@msg['buttons'])
@@msgdlg.create
end
def self._show_fontdlg
font = Tk::BWidget::SelectFont.new(:relative=>Tk.root,
- :font=>DemoVar.font).create
+ :font=>DemoVar.font).create
DemoVar::Demo.update_font(font)
end
@@ -193,11 +193,11 @@ module DemoDialog
@@progval.value = 0
@@progdlg = Tk::BWidget::ProgressDlg.new(:relative=>Tk.root,
- :title=>'Wait...',
- :type=>'infinite', :width=>20,
- :textvariable=>@@progmsg,
- :variable=>@@progval,
- :stop=>'Stop') {
+ :title=>'Wait...',
+ :type=>'infinite', :width=>20,
+ :textvariable=>@@progmsg,
+ :variable=>@@progval,
+ :stop=>'Stop') {
command(proc{self.destroy})
create
}
@@ -206,12 +206,12 @@ module DemoDialog
def self._update_progdlg
TkTimer.new(20, -1, proc{
- if @@progdlg && @@progdlg.winfo_exist?
- @@progval.value = 2
- else
- stop
- end
- }).start
+ if @@progdlg && @@progdlg.winfo_exist?
+ @@progval.value = 2
+ else
+ stop
+ end
+ }).start
end
def self._show_passdlg
diff --git a/ext/tk/sample/tkextlib/bwidget/tree.rb b/ext/tk/sample/tkextlib/bwidget/tree.rb
index 9bfa4f3ccf..a355b6759c 100644
--- a/ext/tk/sample/tkextlib/bwidget/tree.rb
+++ b/ext/tk/sample/tkextlib/bwidget/tree.rb
@@ -17,29 +17,29 @@ module DemoTree
pane = pw.add(:weight=>1)
title = Tk::BWidget::TitleFrame.new(pane, :text=>'Directory tree')
sw = Tk::BWidget::ScrolledWindow.new(title.get_frame,
- :relief=>:sunken, :borderwidth=>2)
+ :relief=>:sunken, :borderwidth=>2)
tree = Tk::BWidget::Tree.new(sw, :relief=>:flat, :borderwidth=>0,
- :width=>15, :highlightthickness=>0,
- :redraw=>false, :dropenabled=>true,
- :dragenabled=>true, :dragevent=>3,
- :droptypes=>[
- 'TREE_NODE', [
- :copy, [],
- :move, [],
- :link, []
- ],
- 'LISTBOX_ITEM', [
- :copy, [],
- :move, [],
- :link, []
- ]
- ],
- :opencmd=>proc{|node|
- moddir(1, tree, node)
- },
- :closecmd=>proc{|node|
- moddir(0, tree, node)
- })
+ :width=>15, :highlightthickness=>0,
+ :redraw=>false, :dropenabled=>true,
+ :dragenabled=>true, :dragevent=>3,
+ :droptypes=>[
+ 'TREE_NODE', [
+ :copy, [],
+ :move, [],
+ :link, []
+ ],
+ 'LISTBOX_ITEM', [
+ :copy, [],
+ :move, [],
+ :link, []
+ ]
+ ],
+ :opencmd=>proc{|node|
+ moddir(1, tree, node)
+ },
+ :closecmd=>proc{|node|
+ moddir(0, tree, node)
+ })
sw.set_widget(tree)
sw.pack(:side=>:top, :expand=>true, :fill=>:both)
@@ -48,27 +48,27 @@ module DemoTree
pane = pw.add(:weight=>2)
lf = Tk::BWidget::TitleFrame.new(pane, :text=>'Content')
sw = Tk::BWidget::ScrolledWindow.new(lf.get_frame,
- :scrollbar=>:horizontal,
- :auto=>:none, :relief=>:sunken,
- :borderwidth=>2)
+ :scrollbar=>:horizontal,
+ :auto=>:none, :relief=>:sunken,
+ :borderwidth=>2)
list = Tk::BWidget::ListBox.new(sw, :relief=>:flat, :borderwidth=>0,
- :highlightthickness=>0, :width=>20,
- :multicolumn=>true, :redraw=>false,
- :dragevent=>3, :dropenabled=>true,
- :dragenabled=>true,
- :droptypes=>[
- 'TREE_NODE', [
- :copy, [],
- :move, [],
- :link, []
- ],
- 'LISTBOX_ITEM', [
- :copy, [],
- :move, [],
- :link, []
- ]
- ])
+ :highlightthickness=>0, :width=>20,
+ :multicolumn=>true, :redraw=>false,
+ :dragevent=>3, :dropenabled=>true,
+ :dragenabled=>true,
+ :droptypes=>[
+ 'TREE_NODE', [
+ :copy, [],
+ :move, [],
+ :link, []
+ ],
+ 'LISTBOX_ITEM', [
+ :copy, [],
+ :move, [],
+ :link, []
+ ]
+ ])
sw.set_widget(list)
Tk.pack(sw, lf, :fill=>:both, :expand=>true)
@@ -76,51 +76,51 @@ module DemoTree
pw.pack(:fill=>:both, :expand=>true)
tree.textbind('ButtonPress-1',
- proc{|node, ev| select('tree', 1, tree, list, node)})
+ proc{|node, ev| select('tree', 1, tree, list, node)})
tree.textbind('Double-ButtonPress-1',
- proc{|node, ev| select('tree', 2, tree, list, node)})
+ proc{|node, ev| select('tree', 2, tree, list, node)})
list.textbind('ButtonPress-1',
- proc{|node, ev| select('list', 1, tree, list, node)})
+ proc{|node, ev| select('list', 1, tree, list, node)})
list.textbind('Double-ButtonPress-1',
- proc{|node, ev| select('list', 2, tree, list, node)})
+ proc{|node, ev| select('list', 2, tree, list, node)})
list.imagebind('Double-ButtonPress-1',
- proc{|node, ev| select('list', 2, tree, list, node)})
+ proc{|node, ev| select('list', 2, tree, list, node)})
nb.itemconfigure('demoTree',
- :createcmd=>proc{|*args| init(tree, list, *args)},
- :raisecmd=>proc{
- Tk.root.geometry =~
- /\d+x\d+([+-]{1,2}\d+)([+-]{1,2}\d+)/
- global_w = ($1 || 0).to_i
- global_h = ($2 || 0).to_i
- if @@top
- Tk::BWidget.place(@@top, 0, 0, :at,
- global_w - Tk.root.winfo_screenwidth, global_h)
- @@top.deiconify
- Tk.root.bind('Unmap', proc{@@top.withdraw})
- Tk.root.bind('Map', proc{@@top.deiconify})
- Tk.root.bind('Configure', proc{|w|
- if w == Tk.root
- Tk.root.geometry =~
- /\d+x\d+([+-]{1,2}\d+)([+-]{1,2}\d+)/
- global_w = ($1 || 0).to_i
- global_h = ($2 || 0).to_i
- BWidget.place(@@top, 0, 0, :at,
- global_w - Tk.root.winfo_screenwidth,
- global_h)
- end
- }, '%W')
- end
- },
- :leavecmd=>proc{
- @@top.withdraw if @@top
- Tk.root.bind_remove('Unmap')
- Tk.root.bind_remove('Map')
- Tk.root.bind_remove('Configure')
- return true
- })
+ :createcmd=>proc{|*args| init(tree, list, *args)},
+ :raisecmd=>proc{
+ Tk.root.geometry =~
+ /\d+x\d+([+-]{1,2}\d+)([+-]{1,2}\d+)/
+ global_w = ($1 || 0).to_i
+ global_h = ($2 || 0).to_i
+ if @@top
+ Tk::BWidget.place(@@top, 0, 0, :at,
+ global_w - Tk.root.winfo_screenwidth, global_h)
+ @@top.deiconify
+ Tk.root.bind('Unmap', proc{@@top.withdraw})
+ Tk.root.bind('Map', proc{@@top.deiconify})
+ Tk.root.bind('Configure', proc{|w|
+ if w == Tk.root
+ Tk.root.geometry =~
+ /\d+x\d+([+-]{1,2}\d+)([+-]{1,2}\d+)/
+ global_w = ($1 || 0).to_i
+ global_h = ($2 || 0).to_i
+ BWidget.place(@@top, 0, 0, :at,
+ global_w - Tk.root.winfo_screenwidth,
+ global_h)
+ end
+ }, '%W')
+ end
+ },
+ :leavecmd=>proc{
+ @@top.withdraw if @@top
+ Tk.root.bind_remove('Unmap')
+ Tk.root.bind_remove('Map')
+ Tk.root.bind_remove('Configure')
+ return true
+ })
end
def self.init(tree, list, *args)
@@ -132,8 +132,8 @@ module DemoTree
end
tree.insert('end', 'root', 'home',
- :text=>rootdir, :data=>rootdir, :open=>true,
- :image=>Tk::BWidget::Bitmap.new('openfold'))
+ :text=>rootdir, :data=>rootdir, :open=>true,
+ :image=>Tk::BWidget::Bitmap.new('openfold'))
getdir(tree, 'home', rootdir)
select('tree', 1, tree, list, 'home')
tree.redraw(true)
@@ -148,8 +148,8 @@ module DemoTree
@@top.title('Drag rectangle to scroll directory tree')
@@top.transient(Tk.root)
Tk::BWidget::ScrollView.new(@@top, :window=>tree, :fill=>'white',
- :width=>300, :height=>300, :relief=>:sunken,
- :bd=>1).pack(:fill=>:both, :expand=>true)
+ :width=>300, :height=>300, :relief=>:sunken,
+ :bd=>1).pack(:fill=>:both, :expand=>true)
end
def self.getdir(tree, node, path)
@@ -158,13 +158,13 @@ module DemoTree
lentries.each{|f|
basename = File.basename(f)
if File.directory?(f)
- Tk::BWidget::Tree::Node.new(tree, node,
- :index=>'end', :text=>basename,
- :image=>Tk::BWidget::Bitmap.new('folder'),
- :drawcross=>:allways, :data=>f)
- @@count += 1
+ Tk::BWidget::Tree::Node.new(tree, node,
+ :index=>'end', :text=>basename,
+ :image=>Tk::BWidget::Bitmap.new('folder'),
+ :drawcross=>:allways, :data=>f)
+ @@count += 1
else
- lfiles << basename
+ lfiles << basename
end
}
tree.itemconfigure(node, :drawcross=>:auto, :data=>lfiles)
@@ -174,9 +174,9 @@ module DemoTree
if (idx != 0 && tree.itemcget(node, :drawcross).to_s == 'allways')
getdir(tree, node, tree.itemcget(node, :data))
if tree.nodes(node).empty?
- tree.itemconfigure(node, :image=>Tk::BWidget::Bitmap.new('folder'))
+ tree.itemconfigure(node, :image=>Tk::BWidget::Bitmap.new('folder'))
else
- tree.itemconfigure(node, :image=>Tk::BWidget::Bitmap.new('openfold'))
+ tree.itemconfigure(node, :image=>Tk::BWidget::Bitmap.new('openfold'))
end
else
img = %w(folder openfold)[idx] || 'openfold'
@@ -188,31 +188,31 @@ module DemoTree
@@dblclick = true
if num == 1
if (where == 'tree' &&
- tree.selection_get.find{|x|
- TkUtil._get_eval_string(x) == TkUtil._get_eval_string(node)
- })
- @@dblclick = false
- Tk.after(500, proc{edit('tree', tree, list, node)})
- return
+ tree.selection_get.find{|x|
+ TkUtil._get_eval_string(x) == TkUtil._get_eval_string(node)
+ })
+ @@dblclick = false
+ Tk.after(500, proc{edit('tree', tree, list, node)})
+ return
end
if (where == 'list' &&
- list.selection_get.find{|x|
- TkUtil._get_eval_string(x) == TkUtil._get_eval_string(node)
- })
- @@dblclick = false
- Tk.after(500, proc{edit('list', tree, list, node)})
- return
+ list.selection_get.find{|x|
+ TkUtil._get_eval_string(x) == TkUtil._get_eval_string(node)
+ })
+ @@dblclick = false
+ Tk.after(500, proc{edit('list', tree, list, node)})
+ return
end
if where == 'tree'
- select_node(tree, list, node)
+ select_node(tree, list, node)
else
- list.selection_set(node)
+ list.selection_set(node)
end
elsif (where == 'list' && tree.exist?(node))
parent = tree.parent(node)
while TkUtil._get_eval_string(parent) != 'root'
- tree.itemconfigure(parent, :open=>true)
- parent = tree.parent(parent)
+ tree.itemconfigure(parent, :open=>true)
+ parent = tree.parent(parent)
end
select_node(tree, list, node)
end
@@ -231,13 +231,13 @@ module DemoTree
tree.nodes(node).each{|subnode|
list.insert('end', subnode,
- :text=>tree.itemcget(subnode, :text),
- :image=>Tk::BWidget::Bitmap.new('folder'))
+ :text=>tree.itemcget(subnode, :text),
+ :image=>Tk::BWidget::Bitmap.new('folder'))
}
TkComm.simplelist(dir).each{|f|
Tk::BWidget::ListBox::Item.new(list, 'end', :text=>f,
- :image=>Tk::BWidget::Bitmap.new('file'))
+ :image=>Tk::BWidget::Bitmap.new('file'))
}
end
@@ -245,16 +245,16 @@ module DemoTree
return if @@dblclick
if (where == 'tree' &&
- tree.selection_get.find{|x|
- TkUtil._get_eval_string(x) == TkUtil._get_eval_string(node)
- })
+ tree.selection_get.find{|x|
+ TkUtil._get_eval_string(x) == TkUtil._get_eval_string(node)
+ })
res = tree.edit(node, tree.itemcget(node, :text))
if res != ''
- tree.itemconfigure(node, :text=>res)
- if list.exist?(node)
- list.itemconfigure(node, :text=>res)
- end
- tree.selection_set(node)
+ tree.itemconfigure(node, :text=>res)
+ if list.exist?(node)
+ list.itemconfigure(node, :text=>res)
+ end
+ tree.selection_set(node)
end
return
end
@@ -262,17 +262,17 @@ module DemoTree
if (where == 'list')
res = list.edit(node, list.igemcget(node, :text))
if res != ''
- list.itemconfigure(node, :text=>res)
- if tree.exist?(node)
- tree.itemconfigure(node, :text=>res)
- else
- cursel = tree.selection_get[0]
- index = list.index(node) - tree.nodes(cursel).size
- data = TkComm.simplelist(tree.itemcget(cursel, :data))
- data[index] = res
- tree.itemconfigure(cursel, :date=>data)
- end
- list.selection_set(node)
+ list.itemconfigure(node, :text=>res)
+ if tree.exist?(node)
+ tree.itemconfigure(node, :text=>res)
+ else
+ cursel = tree.selection_get[0]
+ index = list.index(node) - tree.nodes(cursel).size
+ data = TkComm.simplelist(tree.itemcget(cursel, :data))
+ data[index] = res
+ tree.itemconfigure(cursel, :date=>data)
+ end
+ list.selection_set(node)
end
end
end
@@ -280,9 +280,9 @@ module DemoTree
def self.expand(tree, but)
unless (cur = tree.selection_get).empty?
if TkComm.bool(but)
- tree.opentree(cur)
+ tree.opentree(cur)
else
- tree.closetree(cur)
+ tree.closetree(cur)
end
end
end
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/calendar.rb b/ext/tk/sample/tkextlib/iwidgets/sample/calendar.rb
index 7a7c65ae82..4dd929c035 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/calendar.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/calendar.rb
@@ -3,8 +3,8 @@ require 'tk'
require 'tkextlib/iwidgets'
Tk::Iwidgets::Calendar.new(:command=>proc{|arg| puts(arg.date)},
- :weekendbackground=>'mistyrose',
- :weekdaybackground=>'ghostwhite',
- :outline=>'black', :startday=>'wednesday',
- :days=>%w(We Th Fr Sa Su Mo Tu)).pack
+ :weekendbackground=>'mistyrose',
+ :weekdaybackground=>'ghostwhite',
+ :outline=>'black', :startday=>'wednesday',
+ :days=>%w(We Th Fr Sa Su Mo Tu)).pack
Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/combobox.rb b/ext/tk/sample/tkextlib/iwidgets/sample/combobox.rb
index 5c2e6cbbd7..ec9c7a1df3 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/combobox.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/combobox.rb
@@ -6,11 +6,11 @@ require 'tkextlib/iwidgets'
# Non-editable Dropdown Combobox
#
cb1 = Tk::Iwidgets::Combobox.new(:labeltext=>'Month:',
- :selectioncommand=>proc{
- puts(cb1.get_curselection)
- },
- :editable=>false, :listheight=>185,
- :popupcursor=>'hand1')
+ :selectioncommand=>proc{
+ puts(cb1.get_curselection)
+ },
+ :editable=>false, :listheight=>185,
+ :popupcursor=>'hand1')
cb1.insert_list('end', *%w(Jan Feb Mar Apr May June Jul Aug Sept Oct Nov Dec))
@@ -19,9 +19,9 @@ cb1.insert_list('end', *%w(Jan Feb Mar Apr May June Jul Aug Sept Oct Nov Dec))
# Editable Dropdown Combobox
#
cb2 = Tk::Iwidgets::Combobox.new(:labeltext=>'Operating System:',
- :selectioncommand=>proc{
- puts(cb2.get_curselection)
- })
+ :selectioncommand=>proc{
+ puts(cb2.get_curselection)
+ })
cb2.insert_list('end', *%w(Linux HP-UX SunOS Solaris Irix))
cb2.insert_entry('end', 'L')
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/dialogshell.rb b/ext/tk/sample/tkextlib/iwidgets/sample/dialogshell.rb
index d4578297ec..197521e0a4 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/dialogshell.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/dialogshell.rb
@@ -9,6 +9,6 @@ ds.add('Cancel', :text=>'Cancel', :command=>proc{puts 'Cancel'; ds.deactivate})
ds.default('OK')
TkButton.new(:text=>'ACTIVATE', :padx=>7, :pady=>7,
- :command=>proc{puts ds.activate}).pack(:padx=>10, :pady=>10)
+ :command=>proc{puts ds.activate}).pack(:padx=>10, :pady=>10)
Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/disjointlistbox.rb b/ext/tk/sample/tkextlib/iwidgets/sample/disjointlistbox.rb
index f7a0e5c48e..85c5d03d17 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/disjointlistbox.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/disjointlistbox.rb
@@ -3,7 +3,7 @@ require 'tk'
require 'tkextlib/iwidgets'
djl = Tk::Iwidgets::Disjointlistbox.new.pack(:fill=>:both, :expand=>true,
- :padx=>10, :pady=>10)
+ :padx=>10, :pady=>10)
djl.set_lhs(*[0,2,4,5])
djl.set_rhs(3,6)
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-1.rb b/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-1.rb
index 24253fcb98..856d883a92 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-1.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-1.rb
@@ -12,21 +12,21 @@ TkOption.add('*textBackground', 'white')
ef = Tk::Iwidgets::Entryfield.new(:command=>proc{puts "Return Pressed"})
fef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Fixed:',
- :fixed=>10, :width=>12)
+ :fixed=>10, :width=>12)
nef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Numeric:',
- :validate=>:numeric, :width=>12)
+ :validate=>:numeric, :width=>12)
aef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Alphabetic:',
- :validate=>:alphabetic, :width=>12,
- :invalid=>proc{
- puts "Alphabetic contents invalid"
- })
+ :validate=>:alphabetic, :width=>12,
+ :invalid=>proc{
+ puts "Alphabetic contents invalid"
+ })
pef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Password:', :width=>12,
- :show=>Tk::UTF8_String("\267"),
- ## <=== utf8 character
- :command=>proc{puts "Return Pressed"})
+ :show=>Tk::UTF8_String("\267"),
+ ## <=== utf8 character
+ :command=>proc{puts "Return Pressed"})
Tk::Iwidgets::Labeledwidget.alignlabels(ef, fef, nef, aef, pef)
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-2.rb b/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-2.rb
index 9a80e4aaf2..4a4c2e7eb7 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-2.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-2.rb
@@ -14,20 +14,20 @@ TkOption.add('*textBackground', 'white')
ef = Tk::Iwidgets::Entryfield.new(:command=>proc{puts "Return Pressed"})
fef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Fixed:',
- :fixed=>10, :width=>12)
+ :fixed=>10, :width=>12)
nef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Numeric:',
- :validate=>:numeric, :width=>12)
+ :validate=>:numeric, :width=>12)
aef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Alphabetic:',
- :validate=>:alphabetic, :width=>12,
- :invalid=>proc{
- puts "Alphabetic contents invalid"
- })
+ :validate=>:alphabetic, :width=>12,
+ :invalid=>proc{
+ puts "Alphabetic contents invalid"
+ })
pef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Password:', :width=>12,
- :show=>"\267", ## <=== utf8 character
- :command=>proc{puts "Return Pressed"})
+ :show=>"\267", ## <=== utf8 character
+ :command=>proc{puts "Return Pressed"})
Tk::Iwidgets::Labeledwidget.alignlabels(ef, fef, nef, aef, pef)
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-3.rb b/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-3.rb
index e830308396..bddd542f64 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-3.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/entryfield-3.rb
@@ -14,20 +14,20 @@ TkOption.add('*textBackground', 'white')
ef = Tk::Iwidgets::Entryfield.new(:command=>proc{puts "Return Pressed"})
fef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Fixed:',
- :fixed=>10, :width=>12)
+ :fixed=>10, :width=>12)
nef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Numeric:',
- :validate=>:numeric, :width=>12)
+ :validate=>:numeric, :width=>12)
aef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Alphabetic:',
- :validate=>:alphabetic, :width=>12,
- :invalid=>proc{
- puts "Alphabetic contents invalid"
- })
+ :validate=>:alphabetic, :width=>12,
+ :invalid=>proc{
+ puts "Alphabetic contents invalid"
+ })
pef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Password:', :width=>12,
- :show=>"\267", ## <=== utf8 character
- :command=>proc{puts "Return Pressed"})
+ :show=>"\267", ## <=== utf8 character
+ :command=>proc{puts "Return Pressed"})
Tk::Iwidgets::Labeledwidget.alignlabels(ef, fef, nef, aef, pef)
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/extbutton.rb b/ext/tk/sample/tkextlib/iwidgets/sample/extbutton.rb
index 83a6a07b64..6971052b60 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/extbutton.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/extbutton.rb
@@ -3,18 +3,18 @@ require 'tk'
require 'tkextlib/iwidgets'
Tk::Iwidgets::Extbutton.new(:text=>'Bitmap example', :bitmap=>'info',
- :background=>'bisque', :activeforeground=>'red',
- :bitmapforeground=>'blue', :defaultring=>true,
- :command=>proc{
- puts "Bisque is beautiful"
- }).pack(:expand=>true)
+ :background=>'bisque', :activeforeground=>'red',
+ :bitmapforeground=>'blue', :defaultring=>true,
+ :command=>proc{
+ puts "Bisque is beautiful"
+ }).pack(:expand=>true)
#img = TkPhotoImage.new(:file=>File.join(File.dirname(File.expand_path(__FILE__)), '../../../images/earthris.gif'))
img = TkPhotoImage.new(:file=>File.join(File.dirname(File.expand_path(__FILE__)), '../catalog_demo/images/clear.gif'))
Tk::Iwidgets::Extbutton.new(:text=>'Image example', :relief=>:ridge,
- :image=>img, :imagepos=>:e, :font=>'9x15bold',
- :activebackground=>'lightyellow',
- :background=>'lightgreen').pack(:expand=>true)
+ :image=>img, :imagepos=>:e, :font=>'9x15bold',
+ :activebackground=>'lightyellow',
+ :background=>'lightgreen').pack(:expand=>true)
Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectionbox.rb b/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectionbox.rb
index ef3b14ff4b..4738084d9d 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectionbox.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectionbox.rb
@@ -3,6 +3,6 @@ require 'tk'
require 'tkextlib/iwidgets'
Tk::Iwidgets::Extfileselectionbox.new.pack(:padx=>10, :pady=>10,
- :fill=>:both, :expand=>true)
+ :fill=>:both, :expand=>true)
Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectiondialog.rb b/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectiondialog.rb
index 80a31d06e7..c1a9b3defd 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectiondialog.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/extfileselectiondialog.rb
@@ -9,9 +9,9 @@ mainloop = Thread.new{Tk.mainloop}
#
nmfsd = Tk::Iwidgets::Extfileselectiondialog.new(:title=>'Non-Modal')
nmfsd.buttonconfigure('OK', :command=>proc{
- puts "You selected #{nmfsd.get}"
- nmfsd.deactivate
- })
+ puts "You selected #{nmfsd.get}"
+ nmfsd.deactivate
+ })
nmfsd.activate
#
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/fileselectionbox.rb b/ext/tk/sample/tkextlib/iwidgets/sample/fileselectionbox.rb
index f0313d9481..2ad3adb974 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/fileselectionbox.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/fileselectionbox.rb
@@ -3,6 +3,6 @@ require 'tk'
require 'tkextlib/iwidgets'
Tk::Iwidgets::Fileselectionbox.new.pack(:padx=>10, :pady=>10,
- :fill=>:both, :expand=>true)
+ :fill=>:both, :expand=>true)
Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/fileselectiondialog.rb b/ext/tk/sample/tkextlib/iwidgets/sample/fileselectiondialog.rb
index 955e5cbd20..ff22b2f643 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/fileselectiondialog.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/fileselectiondialog.rb
@@ -9,9 +9,9 @@ mainloop = Thread.new{Tk.mainloop}
#
nmfsd = Tk::Iwidgets::Fileselectiondialog.new(:title=>'Non-Modal')
nmfsd.buttonconfigure('OK', :command=>proc{
- puts "You selected #{nmfsd.get}"
- nmfsd.deactivate
- })
+ puts "You selected #{nmfsd.get}"
+ nmfsd.deactivate
+ })
nmfsd.activate
#
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb b/ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb
index 594158294e..c83ae37248 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb
@@ -11,15 +11,15 @@ def get_files(file)
end
Tk::Iwidgets::Hierarchy.new(:querycommand=>proc{|arg| get_files(arg.node)},
- :visibleitems=>'30x15',
- :labeltext=>ENV['HOME']).pack(:side=>:left,
- :expand=>true,
- :fill=>:both)
+ :visibleitems=>'30x15',
+ :labeltext=>ENV['HOME']).pack(:side=>:left,
+ :expand=>true,
+ :fill=>:both)
# Tk::Iwidgets::Hierarchy.new(:querycommand=>[proc{|n| get_files(n)}, '%n'],
-# :visibleitems=>'30x15',
-# :labeltext=>ENV['HOME']).pack(:side=>:left,
-# :expand=>true,
-# :fill=>:both)
+# :visibleitems=>'30x15',
+# :labeltext=>ENV['HOME']).pack(:side=>:left,
+# :expand=>true,
+# :fill=>:both)
Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/labeledwidget.rb b/ext/tk/sample/tkextlib/iwidgets/sample/labeledwidget.rb
index 1fed7d55e7..1d2e0a98a3 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/labeledwidget.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/labeledwidget.rb
@@ -3,11 +3,11 @@ require 'tk'
require 'tkextlib/iwidgets'
lw = Tk::Iwidgets::Labeledwidget.new(:labeltext=>'Canvas Widget',
- :labelpos=>:s)
+ :labelpos=>:s)
lw.pack(:fill=>:both, :expand=>true, :padx=>10, :pady=>10)
cw = TkCanvas.new(lw.child_site, :relief=>:raised, :width=>200, :height=>200,
- :borderwidth=>3, :background=>:white)
+ :borderwidth=>3, :background=>:white)
cw.pack(:padx=>10, :pady=>10)
Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/mainwindow.rb b/ext/tk/sample/tkextlib/iwidgets/sample/mainwindow.rb
index 85b28b45e7..b87a6d27f9 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/mainwindow.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/mainwindow.rb
@@ -5,57 +5,57 @@ require 'tkextlib/iwidgets'
mw = Tk::Iwidgets::Mainwindow.new
mw.menubar.add(:menubutton, 'file', :text=>'File', :underline=>0,
- :padx=>8, :pady=>2, :menu=>[
- [:options, {:tearoff=>false}],
+ :padx=>8, :pady=>2, :menu=>[
+ [:options, {:tearoff=>false}],
- [:command, 'new', {
- :label=>'New', :underline=>0,
- :helpstr=>'Create a new file'
- }
- ],
+ [:command, 'new', {
+ :label=>'New', :underline=>0,
+ :helpstr=>'Create a new file'
+ }
+ ],
- [:command, 'open', {
- :label=>'Open ...', :underline=>0,
- :helpstr=>'Open an existing file'
- }
- ],
+ [:command, 'open', {
+ :label=>'Open ...', :underline=>0,
+ :helpstr=>'Open an existing file'
+ }
+ ],
- [:command, 'save', {
- :label=>'Save', :underline=>0,
- :helpstr=>'Save the current file'
- }
- ],
+ [:command, 'save', {
+ :label=>'Save', :underline=>0,
+ :helpstr=>'Save the current file'
+ }
+ ],
- [:command, 'saveas', {
- :label=>'Save As', :underline=>5,
- :helpstr=>'Save the file as a different name'
- }
- ],
+ [:command, 'saveas', {
+ :label=>'Save As', :underline=>5,
+ :helpstr=>'Save the file as a different name'
+ }
+ ],
- [:command, 'print', {
- :label=>'Print', :underline=>0,
- :helpstr=>'Print the file'
- }
- ],
+ [:command, 'print', {
+ :label=>'Print', :underline=>0,
+ :helpstr=>'Print the file'
+ }
+ ],
- [:separator, 'sep1'],
+ [:separator, 'sep1'],
- [:command, 'close', {
- :label=>'Close', :underline=>0,
- :helpstr=>'Close the file'
- }
- ],
+ [:command, 'close', {
+ :label=>'Close', :underline=>0,
+ :helpstr=>'Close the file'
+ }
+ ],
- [:separator, 'sep2'],
+ [:separator, 'sep2'],
- [:command, 'exit', {
- :label=>'Exit', :underline=>1,
- :helpstr=>'Exit this application'
- }
- ],
+ [:command, 'exit', {
+ :label=>'Exit', :underline=>1,
+ :helpstr=>'Exit this application'
+ }
+ ],
- nil
- ])
+ nil
+ ])
Tk::Iwidgets::Scrolledtext.new(mw.child_site).pack(:fill=>:both, :expand=>true)
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/menubar.rb b/ext/tk/sample/tkextlib/iwidgets/sample/menubar.rb
index c61071470f..891761adc1 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/menubar.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/menubar.rb
@@ -8,109 +8,109 @@ viewmode = TkVariable.new
menu_spec = [
[:menubutton, 'file', {
:text=>'File', :menu=>[
- [:options, {:tearoff=>false}],
-
- [:command, 'new', {
- :label=>'New', :helpstr=>'Open new document',
- :command=>proc{puts 'NEW'}
- }
- ],
-
- [:command, 'close', {
- :label=>'Close', :helpstr=>'Close current document',
- :command=>proc{puts 'CLOSE'}
- }
- ],
-
- [:separator, 'sep1'],
-
- [:command, 'exit', {
- :label=>'Exit', :helpstr=>'Exit application',
- :command=>proc{exit}
- }
- ]
+ [:options, {:tearoff=>false}],
+
+ [:command, 'new', {
+ :label=>'New', :helpstr=>'Open new document',
+ :command=>proc{puts 'NEW'}
+ }
+ ],
+
+ [:command, 'close', {
+ :label=>'Close', :helpstr=>'Close current document',
+ :command=>proc{puts 'CLOSE'}
+ }
+ ],
+
+ [:separator, 'sep1'],
+
+ [:command, 'exit', {
+ :label=>'Exit', :helpstr=>'Exit application',
+ :command=>proc{exit}
+ }
+ ]
]
}
],
[:menubutton, 'edit', {
:text=>'Edit', :menu=>[
- [:options, {:tearoff=>false}],
-
- [:command, 'undo', {
- :label=>'Undo', :underline=>0,
- :helpstr=>'Undo last command',
- :command=>proc{puts 'UNDO'}
- }
- ],
-
- [:separator, 'sep2'],
-
- [:command, 'cut', {
- :label=>'Cut', :underline=>1,
- :helpstr=>'Cut selection to clipboard',
- :command=>proc{puts 'CUT'}
- }
- ],
-
- [:command, 'copy', {
- :label=>'Copy', :underline=>1,
- :helpstr=>'Copy selection to clipboard',
- :command=>proc{puts 'COPY'}
- }
- ],
-
- [:command, 'paste', {
- :label=>'Paste', :underline=>0,
- :helpstr=>'Paste clipboard contents',
- :command=>proc{puts 'PASTE'}
- }
- ]
+ [:options, {:tearoff=>false}],
+
+ [:command, 'undo', {
+ :label=>'Undo', :underline=>0,
+ :helpstr=>'Undo last command',
+ :command=>proc{puts 'UNDO'}
+ }
+ ],
+
+ [:separator, 'sep2'],
+
+ [:command, 'cut', {
+ :label=>'Cut', :underline=>1,
+ :helpstr=>'Cut selection to clipboard',
+ :command=>proc{puts 'CUT'}
+ }
+ ],
+
+ [:command, 'copy', {
+ :label=>'Copy', :underline=>1,
+ :helpstr=>'Copy selection to clipboard',
+ :command=>proc{puts 'COPY'}
+ }
+ ],
+
+ [:command, 'paste', {
+ :label=>'Paste', :underline=>0,
+ :helpstr=>'Paste clipboard contents',
+ :command=>proc{puts 'PASTE'}
+ }
+ ]
]
}
],
[:menubutton, 'options', {
:text=>'Options', :menu=>[
- [:options, {:tearoff=>false, :selectcolor=>'blue'}],
-
- [:radiobutton, 'byName', {
- :variable=>viewmode, :value=>'NAME',
- :label=>'by Name', :helpstr=>'View files by name order',
- :command=>proc{puts 'NAME'}
- }
- ],
-
- [:radiobutton, 'byDate', {
- :variable=>viewmode, :value=>'DATE',
- :label=>'by Date', :helpstr=>'View files by date order',
- :command=>proc{puts 'DATE'}
- }
- ],
-
- [:cascade, 'prefs', {
- :label=>'Preferences', :menu=>[
- [:command, 'colors', {
- :label=>'Colors...', :helpstr=>'Change text colors',
- :command=>proc{puts 'COLORS'}
- }
- ],
-
- [:command, 'fonts', {
- :label=>'Fonts...', :helpstr=>'Change text font',
- :command=>proc{puts 'COLORS'}
- }
- ]
- ]
- }
- ]
+ [:options, {:tearoff=>false, :selectcolor=>'blue'}],
+
+ [:radiobutton, 'byName', {
+ :variable=>viewmode, :value=>'NAME',
+ :label=>'by Name', :helpstr=>'View files by name order',
+ :command=>proc{puts 'NAME'}
+ }
+ ],
+
+ [:radiobutton, 'byDate', {
+ :variable=>viewmode, :value=>'DATE',
+ :label=>'by Date', :helpstr=>'View files by date order',
+ :command=>proc{puts 'DATE'}
+ }
+ ],
+
+ [:cascade, 'prefs', {
+ :label=>'Preferences', :menu=>[
+ [:command, 'colors', {
+ :label=>'Colors...', :helpstr=>'Change text colors',
+ :command=>proc{puts 'COLORS'}
+ }
+ ],
+
+ [:command, 'fonts', {
+ :label=>'Fonts...', :helpstr=>'Change text font',
+ :command=>proc{puts 'COLORS'}
+ }
+ ]
+ ]
+ }
+ ]
]
}
]
]
#mb = Tk::Iwidgets::Menubar.new(:helpvariable=>helpvar,
-# :menubuttons=>menu_spec)
+# :menubuttons=>menu_spec)
mb = Tk::Iwidgets::Menubar.new(:helpvariable=>helpvar)
mb.configure(:menubuttons=>menu_spec)
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/menubar2.rb b/ext/tk/sample/tkextlib/iwidgets/sample/menubar2.rb
index eec4928afb..d6f2292650 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/menubar2.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/menubar2.rb
@@ -9,10 +9,10 @@ mb = Tk::Iwidgets::Menubar.new
mb.menubuttons = [
[:menubutton, 'file', {
:text=>'File', :menu=>[
- [:command, 'new', {:label=>'New'}],
- [:command, 'close', {:label=>'Close'}],
- [:separator, 'sep1'],
- [:command, 'quit', {:label=>'Quit'}]
+ [:command, 'new', {:label=>'New'}],
+ [:command, 'close', {:label=>'Close'}],
+ [:separator, 'sep1'],
+ [:command, 'quit', {:label=>'Quit'}]
]
}
],
@@ -26,17 +26,17 @@ mb.add(:command, '.edit.copy', :label=>'Copy', :underline=>1)
mb.add(:command, '.edit.paste', :label=>'Paste', :underline=>0)
mb.add(:menubutton, '.options', :text=>'Options', :menu=>[
- [:radiobutton, 'byName', {
- :variable=>viewmode, :value=>'NAME', :label=>'by Name'}
- ],
- [:radiobutton, 'byDate', {
- :variable=>viewmode, :value=>'DATE', :label=>'by Date'}
- ]
+ [:radiobutton, 'byName', {
+ :variable=>viewmode, :value=>'NAME', :label=>'by Name'}
+ ],
+ [:radiobutton, 'byDate', {
+ :variable=>viewmode, :value=>'DATE', :label=>'by Date'}
+ ]
])
mb.add(:cascade, '.options.prefs', :label=>'Preferences', :menu=>[
- [:command, 'colors', {:label=>'Colors...'}],
- [:command, 'fonts', {:label=>'Fonts...'}]
+ [:command, 'colors', {:label=>'Colors...'}],
+ [:command, 'fonts', {:label=>'Fonts...'}]
])
mb.pack(:side=>:left, :anchor=>:nw, :fill=>:x, :expand=>true)
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/messagebox1.rb b/ext/tk/sample/tkextlib/iwidgets/sample/messagebox1.rb
index 3f7b137b19..3221dbc30c 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/messagebox1.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/messagebox1.rb
@@ -3,9 +3,9 @@ require 'tk'
require 'tkextlib/iwidgets'
mb = Tk::Iwidgets::Messagebox.new(:hscrollmode=>:dynamic,
- :labeltext=>'Messages', :labelpos=>:n,
- :height=>120, :width=>550,
- :savedir=>'/tmp', :textbackground=>'#d9d9d9')
+ :labeltext=>'Messages', :labelpos=>:n,
+ :height=>120, :width=>550,
+ :savedir=>'/tmp', :textbackground=>'#d9d9d9')
mb.pack(:padx=>5, :pady=>5, :fill=>:both, :expand=>true)
mb.type_add('ERROR', :background=>'red', :foreground=>'white', :bell=>true)
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/messagebox2.rb b/ext/tk/sample/tkextlib/iwidgets/sample/messagebox2.rb
index 1aae7587e4..2f0e3648a6 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/messagebox2.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/messagebox2.rb
@@ -3,9 +3,9 @@ require 'tk'
require 'tkextlib/iwidgets'
mb = Tk::Iwidgets::Messagebox.new(:hscrollmode=>:dynamic,
- :labeltext=>'Messages', :labelpos=>:n,
- :height=>120, :width=>550,
- :savedir=>'/tmp', :textbackground=>'#d9d9d9')
+ :labeltext=>'Messages', :labelpos=>:n,
+ :height=>120, :width=>550,
+ :savedir=>'/tmp', :textbackground=>'#d9d9d9')
mb.pack(:padx=>5, :pady=>5, :fill=>:both, :expand=>true)
error = mb.type_add(:background=>'red', :foreground=>'white', :bell=>true)
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/messagedialog.rb b/ext/tk/sample/tkextlib/iwidgets/sample/messagedialog.rb
index 8cf373f964..6c6bfbca3f 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/messagedialog.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/messagedialog.rb
@@ -8,8 +8,8 @@ mainloop = Thread.new{Tk.mainloop}
# Standard question message dialog used for confirmation.
#
md = Tk::Iwidgets::Messagedialog.new(:title=>'Message Dialog',
- :text=>'Are you sure ? ',
- :bitmap=>'questhead', :modality=>:global)
+ :text=>'Are you sure ? ',
+ :bitmap=>'questhead', :modality=>:global)
md.buttonconfigure('OK', :text=>'Yes')
md.buttonconfigure('Cancel', :text=>'No')
@@ -33,8 +33,8 @@ md.destroy
bmp = '@' + File.join(File.dirname(File.expand_path(__FILE__)), '../catalog_demo/images/text.xbm')
cr = Tk::Iwidgets::Messagedialog.new(:title=>'Copyright',
- :bitmap=>bmp, :imagepos=>:n,
- :text=>"Copyright 200x XXX Corporation\nAll rights reserved")
+ :bitmap=>bmp, :imagepos=>:n,
+ :text=>"Copyright 200x XXX Corporation\nAll rights reserved")
cr.hide('Cancel')
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/notebook.rb b/ext/tk/sample/tkextlib/iwidgets/sample/notebook.rb
index 77f1c1dc63..e33b81eb6f 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/notebook.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/notebook.rb
@@ -5,7 +5,7 @@ require 'tkextlib/iwidgets'
# Create the tabnotebook widget and pack it.
nb = Tk::Iwidgets::Notebook.new(:width=>100, :height=>100)
nb.pack(:anchor=>:nw, :fill=>:both, :expand=>true,
- :side=>:left, :padx=>10, :pady=>10)
+ :side=>:left, :padx=>10, :pady=>10)
# Add two pages to the tabnotebook,
# labelled "Page One" and "Page Two"
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/notebook2.rb b/ext/tk/sample/tkextlib/iwidgets/sample/notebook2.rb
index e14e1207a5..649de4f024 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/notebook2.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/notebook2.rb
@@ -5,7 +5,7 @@ require 'tkextlib/iwidgets'
# Create the tabnotebook widget and pack it.
nb = Tk::Iwidgets::Notebook.new(:width=>100, :height=>100)
nb.pack(:anchor=>:nw, :fill=>:both, :expand=>true,
- :side=>:top, :padx=>10, :pady=>0)
+ :side=>:top, :padx=>10, :pady=>0)
# Add two pages to the tabnotebook,
# labelled "Page One" and "Page Two"
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/optionmenu.rb b/ext/tk/sample/tkextlib/iwidgets/sample/optionmenu.rb
index bdeafb691e..1fd7a5bc05 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/optionmenu.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/optionmenu.rb
@@ -3,7 +3,7 @@ require 'tk'
require 'tkextlib/iwidgets'
om = Tk::Iwidgets::Optionmenu.new(:labelmargin=>5, :labelpos=>:w,
- :labeltext=>"Operating System :")
+ :labeltext=>"Operating System :")
om.insert('end', 'Unix', 'VMS', 'Linux', 'OS/2', 'Windows NT', 'DOS')
om.sort_ascending
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow.rb b/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow.rb
index 902b2c4bcb..6e4458e508 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow.rb
@@ -12,7 +12,7 @@ pw.pack(:fill=>:both, :expand=>true)
pw.child_site_list.each{|pane|
TkButton.new(pane, :text=>pane.path, :relief=>:raised,
- :borderwidth=>2).pack(:fill=>:both, :expand=>true)
+ :borderwidth=>2).pack(:fill=>:both, :expand=>true)
}
pw.fraction(50,30,20)
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow2.rb b/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow2.rb
index 8928393a8b..6779cb57db 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow2.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/panedwindow2.rb
@@ -12,7 +12,7 @@ pw.pack(:fill=>:both, :expand=>true)
pw.child_site_list.each{|pane|
TkButton.new(pane, :text=>pane.path, :relief=>:raised,
- :borderwidth=>2).pack(:fill=>:both, :expand=>true)
+ :borderwidth=>2).pack(:fill=>:both, :expand=>true)
}
pw.fraction(50,30,20)
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/promptdialog.rb b/ext/tk/sample/tkextlib/iwidgets/sample/promptdialog.rb
index 7dbecc6dc0..2c643e56f7 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/promptdialog.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/promptdialog.rb
@@ -7,7 +7,7 @@ mainloop = Thread.new{Tk.mainloop}
TkOption.add('*textBackground', 'white')
pd = Tk::Iwidgets::Promptdialog.new(:modality=>:global, :title=>'Password',
- :labeltext=>'Password:', :show=>'*')
+ :labeltext=>'Password:', :show=>'*')
pd.hide('Apply')
if TkComm.bool(pd.activate)
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/pushbutton.rb b/ext/tk/sample/tkextlib/iwidgets/sample/pushbutton.rb
index b1f4d7d118..6e1c3fffe3 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/pushbutton.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/pushbutton.rb
@@ -3,7 +3,7 @@ require 'tk'
require 'tkextlib/iwidgets'
Tk::Iwidgets::Pushbutton.new(:text=>'Hello',
- :command=>proc{puts 'Hello World'},
- :defaultring=>true).pack(:padx=>10, :pady=>10)
+ :command=>proc{puts 'Hello World'},
+ :defaultring=>true).pack(:padx=>10, :pady=>10)
Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/scrolledframe.rb b/ext/tk/sample/tkextlib/iwidgets/sample/scrolledframe.rb
index c12b664482..5219847c9c 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/scrolledframe.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/scrolledframe.rb
@@ -3,7 +3,7 @@ require 'tk'
require 'tkextlib/iwidgets'
sf = Tk::Iwidgets::Scrolledframe.new(:width=>150, :height=>180,
- :labeltext=>'scrolledframe')
+ :labeltext=>'scrolledframe')
cs = sf.child_site
TkButton.new(cs, :text=>'Hello').pack(:pady=>10)
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/scrolledhtml.rb b/ext/tk/sample/tkextlib/iwidgets/sample/scrolledhtml.rb
index 6b0827ec89..04334b8da8 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/scrolledhtml.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/scrolledhtml.rb
@@ -5,9 +5,9 @@ require 'tkextlib/iwidgets'
TkOption.add('*textBackground', 'white')
sh = Tk::Iwidgets::Scrolledhtml.new(:fontname=>'helvetica',
- :linkcommand=>proc{|href|
- sh.import_link(href)
- })
+ :linkcommand=>proc{|href|
+ sh.import_link(href)
+ })
sh.pack(:expand=>true, :fill=>:both, :padx=>10, :pady=>10)
sh.import(Tk.getOpenFile(:title=>'select HTML document'))
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/scrolledlistbox.rb b/ext/tk/sample/tkextlib/iwidgets/sample/scrolledlistbox.rb
index 98f932d058..0b69751911 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/scrolledlistbox.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/scrolledlistbox.rb
@@ -5,16 +5,16 @@ require 'tkextlib/iwidgets'
TkOption.add('*textBackground', 'white')
slb = Tk::Iwidgets::Scrolledlistbox.new(:selectmode=>:single,
- :vscrollmode=>:static,
- :hscrollmode=>:dynamic,
- :labeltext=>'List',
- :selectioncommand=>proc{
- puts(slb.get_curselection)
- },
- :dblclickcommand=>proc{
- puts('Double Click')
- puts(slb.get_curselection)
- })
+ :vscrollmode=>:static,
+ :hscrollmode=>:dynamic,
+ :labeltext=>'List',
+ :selectioncommand=>proc{
+ puts(slb.get_curselection)
+ },
+ :dblclickcommand=>proc{
+ puts('Double Click')
+ puts(slb.get_curselection)
+ })
slb.pack(:expand=>true, :fill=>:both, :padx=>10, :pady=>10)
slb.insert('end', *['Hello', 'Out There', 'World'])
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/scrolledtext.rb b/ext/tk/sample/tkextlib/iwidgets/sample/scrolledtext.rb
index 59a96fb9f6..dd1a99a829 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/scrolledtext.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/scrolledtext.rb
@@ -3,7 +3,7 @@ require 'tk'
require 'tkextlib/iwidgets'
st = Tk::Iwidgets::Scrolledtext.new(:hscrollmode=>:dynamic, :wrap=>:none,
- :labeltext=>'Password File')
+ :labeltext=>'Password File')
st.pack(:expand=>true, :fill=>:both, :padx=>10, :pady=>10)
st.import('/etc/passwd')
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/selectionbox.rb b/ext/tk/sample/tkextlib/iwidgets/sample/selectionbox.rb
index d19970fac9..a5d623ae80 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/selectionbox.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/selectionbox.rb
@@ -5,12 +5,12 @@ require 'tkextlib/iwidgets'
TkOption.add('*textBackground', 'white')
sb = Tk::Iwidgets::Selectionbox.new.pack(:padx=>10, :pady=>10,
- :fill=>:both, :expand=>true)
+ :fill=>:both, :expand=>true)
sb.insert_items('end', *['Hello', 'Out There', 'World'])
TkLabel.new(sb.child_site,
- :text=>'Child Site is Here').pack(:fill=>:x, :padx=>10, :pady=>10)
+ :text=>'Child Site is Here').pack(:fill=>:x, :padx=>10, :pady=>10)
sb.insert_items(2, 'Cruel Cruel')
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/selectiondialog.rb b/ext/tk/sample/tkextlib/iwidgets/sample/selectiondialog.rb
index 4fbb2aa378..f40b419180 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/selectiondialog.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/selectiondialog.rb
@@ -5,7 +5,7 @@ require 'tkextlib/iwidgets'
mainloop = Thread.new{Tk.mainloop}
TkButton.new(:text=>'QUIT',
- :command=>proc{Tk.root.destroy}).pack(:padx=>10, :pady=>10)
+ :command=>proc{Tk.root.destroy}).pack(:padx=>10, :pady=>10)
Tk::Iwidgets::Selectiondialog.new.activate
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/shell.rb b/ext/tk/sample/tkextlib/iwidgets/sample/shell.rb
index 850ddb29d4..c44b5554a6 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/shell.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/shell.rb
@@ -3,15 +3,15 @@ require 'tk'
require 'tkextlib/iwidgets'
sh = Tk::Iwidgets::Shell.new(:modality=>:application,
- :padx=>20, :pady=>20, :title=>'Shell')
+ :padx=>20, :pady=>20, :title=>'Shell')
TkButton.new(:text=>'ACTIVATE', :padx=>7, :pady=>7,
- :command=>proc{puts sh.activate}).pack(:padx=>10, :pady=>10)
+ :command=>proc{puts sh.activate}).pack(:padx=>10, :pady=>10)
TkLabel.new(sh.child_site, :text=>'SHELL').pack
TkButton.new(sh.child_site, :text=>'YES',
- :command=>proc{sh.deactivate 'press YES'}).pack(:fill=>:x)
+ :command=>proc{sh.deactivate 'press YES'}).pack(:fill=>:x)
TkButton.new(sh.child_site, :text=>'NO',
- :command=>proc{sh.deactivate 'press NO'}).pack(:fill=>:x)
+ :command=>proc{sh.deactivate 'press NO'}).pack(:fill=>:x)
Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/spinint.rb b/ext/tk/sample/tkextlib/iwidgets/sample/spinint.rb
index 4064081740..0bcdefb763 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/spinint.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/spinint.rb
@@ -5,6 +5,6 @@ require 'tkextlib/iwidgets'
TkOption.add('*textBackground', 'white')
Tk::Iwidgets::Spinint.new(:labeltext=>'Temperature', :labelpos=>:w, :width=>5,
- :fixed=>true, :range=>[32, 212]).pack(:pady=>10)
+ :fixed=>true, :range=>[32, 212]).pack(:pady=>10)
Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/spinner.rb b/ext/tk/sample/tkextlib/iwidgets/sample/spinner.rb
index 44e8ec3034..295d38ee96 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/spinner.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/spinner.rb
@@ -19,10 +19,10 @@ class Spinner_demo < TkWindow
def initialize(parent=nil)
@spinner = Tk::Iwidgets::Spinner.new(parent, :labeltext=>'Month : ',
- :width=>10, :fixed=>10,
- :validate=>proc{|c| block_input},
- :decrement=>proc{spin_month -1},
- :increment=>proc{spin_month 1})
+ :width=>10, :fixed=>10,
+ :validate=>proc{|c| block_input},
+ :decrement=>proc{spin_month -1},
+ :increment=>proc{spin_month 1})
@path = @spinner
@spinner.insert(0, Months[0])
end
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook.rb b/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook.rb
index 5a9897845f..6f1ecc4fa4 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook.rb
@@ -5,7 +5,7 @@ require 'tkextlib/iwidgets'
# Create the tabnotebook widget and pack it.
tn = Tk::Iwidgets::Tabnotebook.new(:width=>300, :height=>100)
tn.pack(:anchor=>:nw, :fill=>:both, :expand=>true,
- :side=>:left, :padx=>10, :pady=>10)
+ :side=>:left, :padx=>10, :pady=>10)
# Add two pages to the tabnotebook,
# labelled "Page One" and "Page Two"
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook2.rb b/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook2.rb
index c08603f899..4a5eef5a8f 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook2.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook2.rb
@@ -5,7 +5,7 @@ require 'tkextlib/iwidgets'
# Create the tabnotebook widget and pack it.
tn = Tk::Iwidgets::Tabnotebook.new(:width=>300, :height=>100)
tn.pack(:anchor=>:nw, :fill=>:both, :expand=>true,
- :side=>:top, :padx=>10, :pady=>0)
+ :side=>:top, :padx=>10, :pady=>0)
# Add two pages to the tabnotebook,
# labelled "Page One" and "Page Two"
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/toolbar.rb b/ext/tk/sample/tkextlib/iwidgets/sample/toolbar.rb
index eba52ba5db..355466eb1a 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/toolbar.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/toolbar.rb
@@ -89,7 +89,7 @@ EOD
##########################################
bmp_dir = File.join(File.dirname(File.expand_path(__FILE__)),
- '../catalog_demo/images')
+ '../catalog_demo/images')
##########################################
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/watch.rb b/ext/tk/sample/tkextlib/iwidgets/sample/watch.rb
index d2b6246bf3..808c798aec 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/watch.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/watch.rb
@@ -9,7 +9,7 @@ Thread.new{
}
Tk::Iwidgets::Watch.new(:state=>:disabled, :showampm=>:no,
- :width=>155, :height=>155){|w|
+ :width=>155, :height=>155){|w|
w.pack(:padx=>10, :pady=>10, :fill=>:both, :expand=>true)
# TkTimer.new(1000, -1, proc{w.show; Tk.update}).start
TkTimer.new(25, -1, proc{w.show; Tk.update}).start
diff --git a/ext/tk/sample/tkextlib/tcllib/datefield.rb b/ext/tk/sample/tkextlib/tcllib/datefield.rb
index 1b0a29c0b9..cfeca0c6de 100644
--- a/ext/tk/sample/tkextlib/tcllib/datefield.rb
+++ b/ext/tk/sample/tkextlib/tcllib/datefield.rb
@@ -21,8 +21,8 @@ my_date1.trace('w'){
df = Tk::Tcllib::Datefield.new(:textvariable=>my_date1)
Tk.grid(TkLabel.new(:text=>'Enter a date:', :anchor=>:e), df, :sticky=>:ew)
Tk.grid(TkLabel.new(:text=>'That date ia a:', :anchor=>:e),
- TkLabel.new(:textvariable=>my_date2, :relief=>:sunken, :width=>12),
- :sticky=>:ew)
+ TkLabel.new(:textvariable=>my_date2, :relief=>:sunken, :width=>12),
+ :sticky=>:ew)
df.set_focus
diff --git a/ext/tk/sample/tkextlib/tcllib/plotdemos1.rb b/ext/tk/sample/tkextlib/tcllib/plotdemos1.rb
index 6077d8ab2c..053b0de085 100644
--- a/ext/tk/sample/tkextlib/tcllib/plotdemos1.rb
+++ b/ext/tk/sample/tkextlib/tcllib/plotdemos1.rb
@@ -24,7 +24,7 @@ Tk.pack(vc1,vc2,vc3, :fill=>:both, :side=>:top)
###############################
s = Tk::Tcllib::Plotchart::XYPlot.new(c1, [0.0, 100.0, 10.0],
- [0.0, 100.0, 20.0])
+ [0.0, 100.0, 20.0])
xd = 5.0
@@ -57,7 +57,7 @@ s.save_plot "aha.ps"
s = Tk::Tcllib::Plotchart::Piechart.new(c2)
s.plot([ ["Long names", 10], ["Short names", 30],
- ["Average", 40], ["Ultra-short names", 5] ])
+ ["Average", 40], ["Ultra-short names", 5] ])
#
# Note: title should be shifted up
@@ -79,7 +79,7 @@ s.title "Cardioid"
###############################
s = Tk::Tcllib::Plotchart::Barchart.new(hc1, %w(A B C D E),
- [0.0, 10.0, 2.0], 2)
+ [0.0, 10.0, 2.0], 2)
s.plot('series1', [1.0, 4.0, 6.0, 1.0, 7.0], 'red')
s.plot('series2', [0.0, 3.0, 7.0, 9.3, 2.0], 'green')
@@ -88,7 +88,7 @@ s.title "Arbitrary data"
###############################
s = Tk::Tcllib::Plotchart::Barchart.new(hc2, %w(A B C D E),
- [0.0, 20.0, 5.0], :stacked)
+ [0.0, 20.0, 5.0], :stacked)
s.plot('series1', [1.0, 4.0, 6.0, 1.0, 7.0], 'red')
s.plot('series2', [0.0, 3.0, 7.0, 9.3, 2.0], 'green')
@@ -97,7 +97,7 @@ s.title "Stacked diagram"
###############################
s = Tk::Tcllib::Plotchart::HorizontalBarchart.new(vc1, [0.0, 10.0, 2.0],
- %w(A B C D E), 2)
+ %w(A B C D E), 2)
s.plot('series1', [1.0, 4.0, 6.0, 1.0, 7.0], 'red')
s.plot('series2', [0.0, 3.0, 7.0, 9.3, 2.0], 'green')
@@ -106,7 +106,7 @@ s.title "Arbitrary data"
###############################
s = Tk::Tcllib::Plotchart::HorizontalBarchart.new(vc2, [0.0, 20.0, 5.0],
- %w(A B C D E), :stacked)
+ %w(A B C D E), :stacked)
s.plot('series1', [1.0, 4.0, 6.0, 1.0, 7.0], 'red')
s.plot('series2', [0.0, 3.0, 7.0, 9.3, 2.0], 'green')
@@ -115,7 +115,7 @@ s.title "Stacked diagram"
###############################
s = Tk::Tcllib::Plotchart::Timechart.new(vc3, "1 january 2004",
- "31 december 2004", 4)
+ "31 december 2004", 4)
s.period("Spring", "1 march 2004", "1 june 2004", 'green')
s.period("Summer", "1 june 2004", "1 september 2004", 'yellow')
@@ -135,7 +135,7 @@ zc2 = TkCanvas.new(z, :background=>'white', :width=>400, :height=>250)
Tk.pack(zc1,zc2)
s = Tk::Tcllib::Plotchart::Plot3D.new(zc1,
- [0, 10, 3], [-10, 10, 10], [0, 10, 2.5])
+ [0, 10, 3], [-10, 10, 10], [0, 10, 2.5])
s.title "3D Plot"
s.plot_function{|x, y|
@@ -146,12 +146,12 @@ s.plot_function{|x, y|
}
s = Tk::Tcllib::Plotchart::Plot3D.new(zc2,
- [0, 10, 3], [-10, 10, 10], [0, 10, 2.5])
+ [0, 10, 3], [-10, 10, 10], [0, 10, 2.5])
s.title "3D Plot - data "
s.colour("green", "black")
s.plot_data([ [1.0, 2.0, 1.0, 0.0],
- [1.1, 3.0, 1.1, -0.5],
- [3.0, 1.0, 4.0, 5.0] ])
+ [1.1, 3.0, 1.1, -0.5],
+ [3.0, 1.0, 4.0, 5.0] ])
###############################
diff --git a/ext/tk/sample/tkextlib/tcllib/plotdemos2.rb b/ext/tk/sample/tkextlib/tcllib/plotdemos2.rb
index 3fd57f3804..33a6f29940 100644
--- a/ext/tk/sample/tkextlib/tcllib/plotdemos2.rb
+++ b/ext/tk/sample/tkextlib/tcllib/plotdemos2.rb
@@ -13,21 +13,21 @@ Tk.pack(c1,c2, :fill=>:both, :side=>:top)
# Set up a strip chart
###############################
slipchart = Tk::Tcllib::Plotchart::Stripchart.new(c1, [0.0, 100.0, 10.0],
- [0.0, 100.0, 20.0])
+ [0.0, 100.0, 20.0])
TkTimer.new(500, -1, proc{|obj| # obj --> TkTimer object
- slipchart, xold, xd, yold, yd = obj.return_value
- xnew = xold + xd
- ynew = yold + (rand() - 0.5) * yd
- ynew2 = yold + (rand() - 0.5) * 2.0 * yd
- slipchart.plot('series1', xnew, ynew)
- slipchart.plot('series2', xnew, ynew2)
- obj.stop if xnew >= 200
- [slipchart, xnew, xd, ynew, yd] # return_value
- }).start(100, proc{
- # init return_value
- [slipchart, 0.0, 15.0, 50.0, 30.0]
- })
+ slipchart, xold, xd, yold, yd = obj.return_value
+ xnew = xold + xd
+ ynew = yold + (rand() - 0.5) * yd
+ ynew2 = yold + (rand() - 0.5) * 2.0 * yd
+ slipchart.plot('series1', xnew, ynew)
+ slipchart.plot('series2', xnew, ynew2)
+ obj.stop if xnew >= 200
+ [slipchart, xnew, xd, ynew, yd] # return_value
+ }).start(100, proc{
+ # init return_value
+ [slipchart, 0.0, 15.0, 50.0, 30.0]
+ })
slipchart.title "Aha!"
@@ -35,7 +35,7 @@ slipchart.title "Aha!"
# Set up an isometric plot
###############################
s = Tk::Tcllib::Plotchart::IsometricPlot.new(c2, [0.0, 100.0], [0.0, 200.0],
- :noaxes)
+ :noaxes)
s.set_zoom_pan
@@ -51,7 +51,7 @@ h = TkToplevel.new(:title=>'h')
c = TkCanvas.new(h, :bg=>'white', :width=>400, :height=>200).pack(:fill=>:both)
s = Tk::Tcllib::Plotchart::XYPlot.new(c, [0.0, 100.0, 10.0],
- [0.0, 100.0, 20.0])
+ [0.0, 100.0, 20.0])
s.dataconfig('series1', :colour=>'red', :type=>:symbol)
s.dataconfig('series2', :colour=>'green', :type=>:both)
diff --git a/ext/tk/sample/tkextlib/tcllib/plotdemos3.rb b/ext/tk/sample/tkextlib/tcllib/plotdemos3.rb
index 3b74b1f592..2b5c7642bb 100644
--- a/ext/tk/sample/tkextlib/tcllib/plotdemos3.rb
+++ b/ext/tk/sample/tkextlib/tcllib/plotdemos3.rb
@@ -8,9 +8,9 @@ require 'tkextlib/tcllib/plotchart'
###############################
Tk::Tcllib::Plotchart::Stripchart.new([0.0, 100.0, 10.0],
- [0.0, 100.0, 20.0],
- :background=>'white',
- :width=>400, :height=>200){|chart|
+ [0.0, 100.0, 20.0],
+ :background=>'white',
+ :width=>400, :height=>200){|chart|
title "Aha!"
pack(:fill=>:both, :side=>:top)
@@ -21,26 +21,26 @@ Tk::Tcllib::Plotchart::Stripchart.new([0.0, 100.0, 10.0],
yd = 30.0
TkTimer.new(500, -1, proc{|obj| # obj --> TkTimer object
- xold, yold = obj.return_value
- xnew = xold + xd
- ynew = yold + (rand() - 0.5) * yd
- ynew2 = yold + (rand() - 0.5) * 2.0 * yd
+ xold, yold = obj.return_value
+ xnew = xold + xd
+ ynew = yold + (rand() - 0.5) * yd
+ ynew2 = yold + (rand() - 0.5) * 2.0 * yd
- series1.plot(xnew, ynew)
- series2.plot(xnew, ynew2)
+ series1.plot(xnew, ynew)
+ series2.plot(xnew, ynew2)
- obj.stop if xnew >= 200
+ obj.stop if xnew >= 200
- [xnew, ynew] # return_value
- }).start(100, proc{ [0.0, 50.0] }) # init return_value
+ [xnew, ynew] # return_value
+ }).start(100, proc{ [0.0, 50.0] }) # init return_value
}
###############################
# Set up an isometric plot
###############################
Tk::Tcllib::Plotchart::IsometricPlot.new([0.0, 100.0], [0.0, 200.0], :noaxes,
- :background=>'white',
- :width=>400, :height=>200){|chart|
+ :background=>'white',
+ :width=>400, :height=>200){|chart|
pack(:fill=>:both, :side=>:top)
set_zoom_pan
@@ -55,17 +55,17 @@ Tk::Tcllib::Plotchart::IsometricPlot.new([0.0, 100.0], [0.0, 200.0], :noaxes,
###############################
TkToplevel.new(:title=>'h'){|h|
Tk::Tcllib::Plotchart::XYPlot.new(h, [0.0, 100.0, 10.0],
- [0.0, 100.0, 20.0],
- :bg=>'white',
- :width=>400, :height=>200){|chart|
+ [0.0, 100.0, 20.0],
+ :bg=>'white',
+ :width=>400, :height=>200){|chart|
pack(:fill=>:both)
yconfig(:format=>"%12.2e")
series1 = Tk::Tcllib::Plotchart::PlotSeries.new(chart, :colour=>'red',
- :type=>:symbol)
+ :type=>:symbol)
series2 = Tk::Tcllib::Plotchart::PlotSeries.new(chart, :colour=>'green',
- :type=>:both)
+ :type=>:both)
x = 5.0
%w(plus cross circle up down dot upfilled downfilled).each{|sym|
diff --git a/ext/tk/sample/tkextlib/tcllib/xyplot.rb b/ext/tk/sample/tkextlib/tcllib/xyplot.rb
index 116609e34f..8f8c3eb880 100644
--- a/ext/tk/sample/tkextlib/tcllib/xyplot.rb
+++ b/ext/tk/sample/tkextlib/tcllib/xyplot.rb
@@ -6,7 +6,7 @@ require 'tkextlib/tcllib/plotchart'
TkCanvas.new(:background=>'white', :width=>400, :height=>200){|c|
pack(:fill=>:both)
Tk::Tcllib::Plotchart::XYPlot.new(c, [0.0, 100.0, 10.0],
- [0.0, 100.0, 20.0]){
+ [0.0, 100.0, 20.0]){
[ [0.0, 32.0], [10.0, 50.0], [25.0, 60.0], [78.0, 11.0] ].each{|x, y|
plot('series1', x, y)
}
diff --git a/ext/tk/sample/tkextlib/tkHTML/hv.rb b/ext/tk/sample/tkextlib/tkHTML/hv.rb
index cf93ad3ba5..d9f3ea7d7c 100644
--- a/ext/tk/sample/tkextlib/tkHTML/hv.rb
+++ b/ext/tk/sample/tkextlib/tkHTML/hv.rb
@@ -130,12 +130,12 @@ applet_cmd = proc{|w, arglist|
# Construct the main HTML viewer
#
html = Tk::HTML_Widget.new(:padx=>5, :pady=>9,
- :formcommand=>form_cmd,
- :imagecommand=>image_cmd,
- :scriptcommand=>script_cmd,
- :appletcommand=>applet_cmd,
- :underlinehyperlinks=>0,
- :bg=>'white', :tablerelief=>:raised)
+ :formcommand=>form_cmd,
+ :imagecommand=>image_cmd,
+ :scriptcommand=>script_cmd,
+ :appletcommand=>applet_cmd,
+ :underlinehyperlinks=>0,
+ :bg=>'white', :tablerelief=>:raised)
vscr = html.yscrollbar(TkScrollbar.new)
hscr = html.xscrollbar(TkScrollbar.new)
@@ -162,7 +162,7 @@ read_file = proc{|name|
ret = nil
fp = nil
Tk.messageBox(:icon=>'error', :message=>"fail to open '#{name}'",
- :type=>:ok)
+ :type=>:ok)
ensure
fp.close if fp
end
@@ -212,15 +212,15 @@ html.clipping_window.bind('1', href_binding, '%x %y')
# marking text with the mouse and copying to the clipboard just with tkhtml2.0 working
html.clipping_window.bind('B1-Motion', proc{|w, x, y|
- w.selection_set(priv['mark'], "@#{x},#{y}")
- TkClipboard.clear
- # avoid tkhtml0.0 errors
- # anyone can fix this for tkhtml0.0
- begin
- TkClipboard.append(TkSelection.get)
- rescue
- end
- }, '%W %x %y')
+ w.selection_set(priv['mark'], "@#{x},#{y}")
+ TkClipboard.clear
+ # avoid tkhtml0.0 errors
+ # anyone can fix this for tkhtml0.0
+ begin
+ TkClipboard.append(TkSelection.get)
+ rescue
+ end
+ }, '%W %x %y')
# This procedure is called when the user selects the File/Open
# menu option.
@@ -249,14 +249,14 @@ refresh = proc{|*args|
# top of a hyperlink.
#
Tk::HTML_Widget::ClippingWindow.bind('Motion', proc{|w, x, y|
- parent = w.winfo_parent
- url = parent.href(x, y)
- unless url.empty?
- parent[:cursor] = 'hand2'
- else
- parent[:cursor] = ''
- end
- }, '%W %x %y')
+ parent = w.winfo_parent
+ url = parent.href(x, y)
+ unless url.empty?
+ parent[:cursor] = 'hand2'
+ else
+ parent[:cursor] = ''
+ end
+ }, '%W %x %y')
#
# Setup menu
#
@@ -279,18 +279,18 @@ mbar = Tk.root.add_menubar(menu_spec)
# Setup trace
#
ul_hyper.trace('w', proc{
- html[:underlinehyperlinks] = ul_hyper.value
- refresh.call
- })
+ html[:underlinehyperlinks] = ul_hyper.value
+ refresh.call
+ })
show_tbl.trace('w', proc{
- if show_tbl.bool
- html[:tablerelief] = :flat
- else
- html[:tablerelief] = :raised
- end
- refresh.call
- })
+ if show_tbl.bool
+ html[:tablerelief] = :flat
+ else
+ html[:tablerelief] = :raised
+ end
+ refresh.call
+ })
show_img.trace('w', refresh)
diff --git a/ext/tk/sample/tkextlib/tkHTML/ss.rb b/ext/tk/sample/tkextlib/tkHTML/ss.rb
index e71c26f7dc..179bdc13cd 100644
--- a/ext/tk/sample/tkextlib/tkHTML/ss.rb
+++ b/ext/tk/sample/tkextlib/tkHTML/ss.rb
@@ -198,7 +198,7 @@ read_file = proc{|name|
ret = nil
fp = nil
Tk.messageBox(:icon=>'error', :message=>"fail to open '#{name}'",
- :type=>:ok)
+ :type=>:ok)
ensure
fp.close if fp
end
@@ -291,20 +291,20 @@ fullscreen = proc{
width = root.winfo_screenwidth
height = root.winfo_screenheight
fswin = TkToplevel.new(:overrideredirect=>true,
- :geometry=>"#{width}x#{height}+0+0")
+ :geometry=>"#{width}x#{height}+0+0")
html_fs = Tk::HTML_Widget.new(fswin, :padx=>5, :pady=>9,
- :formcommand=>form_cmd,
- :imagecommand=>proc{image_cmd.call(0)},
- :scriptcommand=>script_cmd,
- :appletcommand=>applet_cmd,
- :hyperlinkcommand=>hyper_cmd,
- :bg=>'white', :tablerelief=>:raised,
- :appletcommand=>proc{|*args|
- run_applet('big', *args)
- },
- :fontcommand=>pick_font_fs,
- :cursor=>:tcross) {
+ :formcommand=>form_cmd,
+ :imagecommand=>proc{image_cmd.call(0)},
+ :scriptcommand=>script_cmd,
+ :appletcommand=>applet_cmd,
+ :hyperlinkcommand=>hyper_cmd,
+ :bg=>'white', :tablerelief=>:raised,
+ :appletcommand=>proc{|*args|
+ run_applet('big', *args)
+ },
+ :fontcommand=>pick_font_fs,
+ :cursor=>:tcross) {
pack(:fill=>:both, :expand=>true)
token_handler('meta', proc{|*args| meta.call(self, *args)})
}
@@ -361,19 +361,19 @@ menu_spec = [
mbar = root.add_menubar(menu_spec)
html = Tk::HTML_Widget.new(:width=>512, :height=>384,
- :padx=>5, :pady=>9,
- :formcommand=>form_cmd,
- :imagecommand=>proc{|*args|
- image_cmd.call(1, *args)
- },
- :scriptcommand=>script_cmd,
- :appletcommand=>applet_cmd,
- :hyperlinkcommand=>hyper_cmd,
- :fontcommand=>pick_font,
- :appletcommand=>proc{|*args|
- run_applet.call('small', *args)
- },
- :bg=>'white', :tablerelief=>:raised)
+ :padx=>5, :pady=>9,
+ :formcommand=>form_cmd,
+ :imagecommand=>proc{|*args|
+ image_cmd.call(1, *args)
+ },
+ :scriptcommand=>script_cmd,
+ :appletcommand=>applet_cmd,
+ :hyperlinkcommand=>hyper_cmd,
+ :fontcommand=>pick_font,
+ :appletcommand=>proc{|*args|
+ run_applet.call('small', *args)
+ },
+ :bg=>'white', :tablerelief=>:raised)
html.token_handler('meta', proc{|*args| meta.call(html, *args)})
diff --git a/ext/tk/sample/tkextlib/tktable/basic.rb b/ext/tk/sample/tkextlib/tktable/basic.rb
index a7dfe2a789..ece46b318e 100644
--- a/ext/tk/sample/tkextlib/tktable/basic.rb
+++ b/ext/tk/sample/tkextlib/tktable/basic.rb
@@ -23,19 +23,19 @@ cols = 8
lbl = TkLabel.new(:text=>"TkTable v1 Example")
table = Tk::TkTable.new(:rows=>rows, :cols=>cols, :variable=>ary,
- :width=>6, :height=>6,
- :titlerows=>1, :titlecols=>2,
- :roworigin=>-1, :colorigin=>-2,
- :rowstretchmode=>:last, :colstretchmode=>:last,
- :rowtagcommand=>proc{|row|
- row = Integer(row)
- return 'OddRow' if row>0 && row%2 == 1
- },
- :coltagcommand=>proc{|col|
- col = Integer(col)
- return 'OddCol' if col>0 && col%2 == 1
- },
- :selectmode=>:extended, :sparsearray=>false)
+ :width=>6, :height=>6,
+ :titlerows=>1, :titlecols=>2,
+ :roworigin=>-1, :colorigin=>-2,
+ :rowstretchmode=>:last, :colstretchmode=>:last,
+ :rowtagcommand=>proc{|row|
+ row = Integer(row)
+ return 'OddRow' if row>0 && row%2 == 1
+ },
+ :coltagcommand=>proc{|col|
+ col = Integer(col)
+ return 'OddCol' if col>0 && col%2 == 1
+ },
+ :selectmode=>:extended, :sparsearray=>false)
sx = table.xscrollbar(TkScrollbar.new)
sy = table.yscrollbar(TkScrollbar.new)
diff --git a/ext/tk/sample/tkextlib/tktable/buttons.rb b/ext/tk/sample/tkextlib/tktable/buttons.rb
index b6995bb54b..b21e8673c2 100644
--- a/ext/tk/sample/tkextlib/tktable/buttons.rb
+++ b/ext/tk/sample/tkextlib/tktable/buttons.rb
@@ -15,11 +15,11 @@ rows = 20
cols = 20
table = Tk::TkTable.new(:rows=>rows + 1, :cols=>cols + 1,
- :variable=>tab, :titlerows=>1, :titlecols=>1,
- :roworigin=>-1, :colorigin=>-1,
- :colwidth=>4, :width=>8, :height=>8,
- :cursor=>'top_left_arrow', :borderwidth=>2,
- :flashmode=>false, :state=>:disabled)
+ :variable=>tab, :titlerows=>1, :titlecols=>1,
+ :roworigin=>-1, :colorigin=>-1,
+ :colwidth=>4, :width=>8, :height=>8,
+ :cursor=>'top_left_arrow', :borderwidth=>2,
+ :flashmode=>false, :state=>:disabled)
sx = table.xscrollbar(TkScrollbar.new)
sy = table.yscrollbar(TkScrollbar.new)
@@ -40,25 +40,25 @@ table.bind('Leave', proc{|w| w.selection_clear_all}, '%W')
# highlight the cell under the mouse
table.bind('Motion', proc{|w, x, y|
- Tk.callback_break if w.selection_include?(TkComm._at(x,y))
- w.selection_clear_all
- w.selection_set(TkComm._at(x,y))
- Tk.callback_break
- ## "break" prevents the call to tkTableCheckBorder
- }, '%W %x %y')
+ Tk.callback_break if w.selection_include?(TkComm._at(x,y))
+ w.selection_clear_all
+ w.selection_set(TkComm._at(x,y))
+ Tk.callback_break
+ ## "break" prevents the call to tkTableCheckBorder
+ }, '%W %x %y')
# mousebutton 1 toggles the value of the cell
# use of "selection includes" would work here
table.bind('1', proc{|w, x, y|
- #rc = w.curselection[0]
- rc = w.index(TkComm._at(x,y))
- if tab[rc] == 'ON'
- tab[rc] = 'OFF'
- w.tag_cell('OFF', rc)
- else
- tab[rc] = 'ON'
- w.tag_cell('ON', rc)
- end}, '%W %x %y')
+ #rc = w.curselection[0]
+ rc = w.index(TkComm._at(x,y))
+ if tab[rc] == 'ON'
+ tab[rc] = 'OFF'
+ w.tag_cell('OFF', rc)
+ else
+ tab[rc] = 'ON'
+ w.tag_cell('ON', rc)
+ end}, '%W %x %y')
# inititialize the array, titles, and celltags
diff --git a/ext/tk/sample/tkextlib/tktable/command.rb b/ext/tk/sample/tkextlib/tktable/command.rb
index 950bc0ccb1..eb9ddffb78 100644
--- a/ext/tk/sample/tkextlib/tktable/command.rb
+++ b/ext/tk/sample/tkextlib/tktable/command.rb
@@ -28,44 +28,44 @@ ent_var = TkVariable.new
entry = TkEntry.new(:textvariable=>ent_var)
table = Tk::TkTable.new(:rows=>rows, :cols=>cols,
- :command=>[proc{|mode, cell, val|
- if (mode == :w)
- data[cell] = val
- else
- begin
- data[cell] # exist
- rescue
- '' # not exist
- end
- end
- }, '%i %C %s'],
- :width=>6, :height=>6,
- :titlerows=>1, :titlecols=>1,
- :roworigin=>-1, :colorigin=>-1,
- :rowstretchmode=>:last, :colstretchmode=>:last,
- :rowtagcommand=>proc{|row|
- row = Integer(row)
- return 'OddRow' if row>0 && row%2 == 1
- },
- :coltagcommand=>proc{|col|
- col = Integer(col)
- return 'OddCol' if col>0 && col%2 == 1
- },
- :selectmode=>:extended, :flashmode=>true,
- :rowstretch=>:unset, :colstretch=>:unset,
- :browsecommand=>[proc{|w, s|
- cur_var.value = s
- ent_var.value = w.get(s)
- }, '%W %S'],
- :validate=>true,
- :validatecommand=>proc{|e|
- ent_var.value = e.new_value; true
- })
+ :command=>[proc{|mode, cell, val|
+ if (mode == :w)
+ data[cell] = val
+ else
+ begin
+ data[cell] # exist
+ rescue
+ '' # not exist
+ end
+ end
+ }, '%i %C %s'],
+ :width=>6, :height=>6,
+ :titlerows=>1, :titlecols=>1,
+ :roworigin=>-1, :colorigin=>-1,
+ :rowstretchmode=>:last, :colstretchmode=>:last,
+ :rowtagcommand=>proc{|row|
+ row = Integer(row)
+ return 'OddRow' if row>0 && row%2 == 1
+ },
+ :coltagcommand=>proc{|col|
+ col = Integer(col)
+ return 'OddCol' if col>0 && col%2 == 1
+ },
+ :selectmode=>:extended, :flashmode=>true,
+ :rowstretch=>:unset, :colstretch=>:unset,
+ :browsecommand=>[proc{|w, s|
+ cur_var.value = s
+ ent_var.value = w.get(s)
+ }, '%W %S'],
+ :validate=>true,
+ :validatecommand=>proc{|e|
+ ent_var.value = e.new_value; true
+ })
=begin
- :validatecommand=>[
- proc{|s|
- ent_var.value = s; true
- }, '%S'])
+ :validatecommand=>[
+ proc{|s|
+ ent_var.value = s; true
+ }, '%S'])
=end
sx = table.xscrollbar(TkScrollbar.new)
diff --git a/ext/tk/sample/tkextlib/tktable/debug.rb b/ext/tk/sample/tkextlib/tktable/debug.rb
index 30508acea6..3200c1c77a 100644
--- a/ext/tk/sample/tkextlib/tktable/debug.rb
+++ b/ext/tk/sample/tkextlib/tktable/debug.rb
@@ -24,16 +24,16 @@ cols = 20
lbl = TkLabel.new(:text=>"TkTable v2 Example")
table = Tk::TkTable.new(:rows=>rows, :cols=>cols, :variable=>ary,
- :width=>6, :height=>6,
- :titlerows=>1, :titlecols=>2,
- :roworigin=>-5, :colorigin=>-2,
- :coltagcommand=>proc{|col|
- col = Integer(col)
- return 'OddCol' if col>0 && col%2 == 1
- },
- :selectmode=>:extended, :flashmode=>true,
- :rowstretch=>:unset, :colstretch=>:unset,
- :selecttitles=>false, :drawmode=>:single)
+ :width=>6, :height=>6,
+ :titlerows=>1, :titlecols=>2,
+ :roworigin=>-5, :colorigin=>-2,
+ :coltagcommand=>proc{|col|
+ col = Integer(col)
+ return 'OddCol' if col>0 && col%2 == 1
+ },
+ :selectmode=>:extended, :flashmode=>true,
+ :rowstretch=>:unset, :colstretch=>:unset,
+ :selecttitles=>false, :drawmode=>:single)
sx = table.xscrollbar(TkScrollbar.new)
sy = table.yscrollbar(TkScrollbar.new)
@@ -68,8 +68,8 @@ table.tag_cell('dis', [2,1], [1,-1], [3,0])
table.set_width([-2,8], [-1,9], [0, 12], [4, 14])
table.set([1,1], "multi-line\ntext\nmight be\ninteresting",
- [3,2], "more\nmulti-line\nplaying\n",
- [2,2], "null\0byte")
+ [3,2], "more\nmulti-line\nplaying\n",
+ [2,2], "null\0byte")
# This is in the row span
l = TkLabel.new(table, :text=>'Window s', :bg=>'yellow')
diff --git a/ext/tk/sample/tkextlib/tktable/dynarows.rb b/ext/tk/sample/tkextlib/tktable/dynarows.rb
index 35359046f7..d083e26559 100644
--- a/ext/tk/sample/tkextlib/tktable/dynarows.rb
+++ b/ext/tk/sample/tkextlib/tktable/dynarows.rb
@@ -25,21 +25,21 @@ def table_validate(w, idx)
time = Tk.tk_call('clock', 'scan', val)
date = []
Tk.tk_call('clock', 'format', time,
- :format=>'%m %d %Y').split(' ').each{|item|
+ :format=>'%m %d %Y').split(' ').each{|item|
date << item.sub(/^\s*0*/,'')
}
w.set(idx, date.join('/'))
if row == nrows - 1
if w.get([row,1]) != '' && w.get([row,2]) != ''
- w.tag_row_reset(row)
- w.set([row,0], row)
- nrows += 1
- row += 1
- w.configure(:rows=>nrows)
- w.tag_row('unset', row)
- w.set([row,0], '*')
- w.see([row,1])
- w.activate([row,1])
+ w.tag_row_reset(row)
+ w.set([row,0], row)
+ nrows += 1
+ row += 1
+ w.configure(:rows=>nrows)
+ w.tag_row('unset', row)
+ w.set([row,0], '*')
+ w.see([row,1])
+ w.activate([row,1])
end
end
rescue
@@ -55,13 +55,13 @@ end
lbl = TkLabel.new(:text=>"Dynamic Date Validated Rows")
table = Tk::TkTable.new(:rows=>2, :cols=>3, :cache=>1, :selecttype=>:row,
- :titlerows=>1, :titlecols=>1, :height=>5,
- :colstretch=>:unset, :rowstretch=>:unset,
- :autoclear=>true,
- :browsecommand=>[
- proc{|w,s| table_validate(w, s)},
- '%W %s'
- ])
+ :titlerows=>1, :titlecols=>1, :height=>5,
+ :colstretch=>:unset, :rowstretch=>:unset,
+ :autoclear=>true,
+ :browsecommand=>[
+ proc{|w,s| table_validate(w, s)},
+ '%W %s'
+ ])
table.set([0,1], 'Begin', [0,2], 'End', [1,0], '*')
table.tag_configure('unset', :fg=>'#008811')
table.tag_configure('title', :fg=>'red')
diff --git a/ext/tk/sample/tkextlib/tktable/maxsize.rb b/ext/tk/sample/tkextlib/tktable/maxsize.rb
index a2c5f606a8..c9ca745ee5 100644
--- a/ext/tk/sample/tkextlib/tktable/maxsize.rb
+++ b/ext/tk/sample/tkextlib/tktable/maxsize.rb
@@ -24,15 +24,15 @@ cols = 10
lbl = TkLabel.new(:text=>"TkTable v2 Example")
table = Tk::TkTable.new(:rows=>rows, :cols=>cols, :variable=>ary,
- :width=>6, :height=>8,
- :titlerows=>1, :titlecols=>1,
- :coltagcommand=>proc{|col|
- col = Integer(col)
- return 'OddCol' if col>0 && col%2 == 1
- },
- :selectmode=>:extended,
- :colstretch=>:unset, :rowstretch=>:unset,
- :selecttitles=>false, :drawmode=>:slow)
+ :width=>6, :height=>8,
+ :titlerows=>1, :titlecols=>1,
+ :coltagcommand=>proc{|col|
+ col = Integer(col)
+ return 'OddCol' if col>0 && col%2 == 1
+ },
+ :selectmode=>:extended,
+ :colstretch=>:unset, :rowstretch=>:unset,
+ :selecttitles=>false, :drawmode=>:slow)
sx = table.xscrollbar(TkScrollbar.new)
sy = table.yscrollbar(TkScrollbar.new)
diff --git a/ext/tk/sample/tkextlib/tktable/spreadsheet.rb b/ext/tk/sample/tkextlib/tktable/spreadsheet.rb
index 5f3ba63bb3..9da896f5a7 100644
--- a/ext/tk/sample/tkextlib/tktable/spreadsheet.rb
+++ b/ext/tk/sample/tkextlib/tktable/spreadsheet.rb
@@ -31,11 +31,11 @@ def fill_table(tbl_list, page, r=10, c=10)
(0...r).each{|i|
(0...c).each{|j|
if i!=0 && j!=0
- ary[i,j] = "#{page} #{i},#{j}"
+ ary[i,j] = "#{page} #{i},#{j}"
elsif i!=0
- ary[i,j] = i.to_s
+ ary[i,j] = i.to_s
else
- ary[i,j] = (64+j).chr
+ ary[i,j] = (64+j).chr
end
}
}
@@ -68,16 +68,16 @@ fill_table(table_list, page.value)
fill_table(table_list, 'BB', Integer(rows/2), Integer(cols/2))
table = Tk::TkTable.new(:rows=>rows, :cols=>cols, :width=>5, :height=>5,
- :variable=>table_list[page.value],
- :titlerows=>1, :titlecols=>1,
- :coltagcommand=>proc{|n| colorize(n)},
- :flashmode=>true, :selectmode=>:extended,
- :colstretch=>:unset, :rowstretch=>:unset,
- :browsecommand=>proc{|e| cur_var.value = e.new_index})
+ :variable=>table_list[page.value],
+ :titlerows=>1, :titlecols=>1,
+ :coltagcommand=>proc{|n| colorize(n)},
+ :flashmode=>true, :selectmode=>:extended,
+ :colstretch=>:unset, :rowstretch=>:unset,
+ :browsecommand=>proc{|e| cur_var.value = e.new_index})
page.trace(:w, proc{|var, elem, op|
- changepage(table_list, table, entry, color, var, elem, op)
- })
+ changepage(table_list, table, entry, color, var, elem, op)
+ })
table.tag_configure('colored', :bg=>color[page.value])
table.tag_configure('title', :fg=>'red', :relief=>:groove)
@@ -107,29 +107,29 @@ Tk.root.grid_rowconfig(2, :weight=>1)
table.grid_configure(:sticky=>:news)
entry.bind('Return', proc{
- r = table.row_index(:active)
- c = table.col_index(:active)
- rmax = table[:rows]
- cmax = table[:cols]
-
- c += 1
- if c == cmax
- c = table[:titlecols]
- r += 1
- if r == rmax
- r = table[:titlerows]
- end
- end
- table.activate([r, c])
- table.see('active')
- })
+ r = table.row_index(:active)
+ c = table.col_index(:active)
+ rmax = table[:rows]
+ cmax = table[:cols]
+
+ c += 1
+ if c == cmax
+ c = table[:titlecols]
+ r += 1
+ if r == rmax
+ r = table[:titlerows]
+ end
+ end
+ table.activate([r, c])
+ table.see('active')
+ })
menu = TkMenu.new
m_file = TkMenu.new(menu)
Tk.root.menu(menu)
menu.add(:cascade, :label=>'File', :underline=>0, :menu=>m_file)
m_file.add(:command, :label=>'Fill Array',
- :command=>proc{ fill_table(table_list, page.value) })
+ :command=>proc{ fill_table(table_list, page.value) })
m_file.add(:command, :label=>'Quit', :command=>proc{exit})
puts "Table is #{table.path} with array #{(table['variable'])}"
diff --git a/ext/tk/sample/tkextlib/tktable/valid.rb b/ext/tk/sample/tkextlib/tktable/valid.rb
index 4570441667..e5d3f11d84 100644
--- a/ext/tk/sample/tkextlib/tktable/valid.rb
+++ b/ext/tk/sample/tkextlib/tktable/valid.rb
@@ -54,15 +54,15 @@ end
lbl = TkLabel.new(:text=>"TkTable v1 Validated Table Example")
table = Tk::TkTable.new(:rows=>rows, :cols=>cols, :cache=>1,
- :width=>5, :height=>5, :titlerows=>1, :titlecols=>1,
- :coltagcommand=>proc{|n| colorize(n)},
- :flashmode=>true, :selectmode=>:extended,
- :colstretch=>:unset, :rowstretch=>:unset,
- :validate=>true,
- :validatecommand=>proc{|e|
- unless e.widget.tag_include?('title', e.index)
- validate_proc(e.column, e.new_value)
- end } )
+ :width=>5, :height=>5, :titlerows=>1, :titlecols=>1,
+ :coltagcommand=>proc{|n| colorize(n)},
+ :flashmode=>true, :selectmode=>:extended,
+ :colstretch=>:unset, :rowstretch=>:unset,
+ :validate=>true,
+ :validatecommand=>proc{|e|
+ unless e.widget.tag_include?('title', e.index)
+ validate_proc(e.column, e.new_value)
+ end } )
fill_headers(table)
diff --git a/ext/tk/sample/tkextlib/vu/canvItems.rb b/ext/tk/sample/tkextlib/vu/canvItems.rb
index c3e563058c..33acf4f7e7 100644
--- a/ext/tk/sample/tkextlib/vu/canvItems.rb
+++ b/ext/tk/sample/tkextlib/vu/canvItems.rb
@@ -10,63 +10,63 @@ xbm = File.join(File.dirname(File.expand_path(__FILE__)), 'm128_000.xbm')
sval = [ 11, 22, 33, 44, 55, 66, 77, 88, 99 ]
l0 = TkLabel.new(:width=>128, :height=>128,
- :bitmap=>"@#{xbm}", :relief=>:groove).pack(:side=>:left)
+ :bitmap=>"@#{xbm}", :relief=>:groove).pack(:side=>:left)
c0 = TkCanvas.new(:width=>80, :height=>80,
- :insertwidth=>0, :highlightthickness=>0,
- :selectborderwidth=>0, :borderwidth=>2,
- :relief=>:ridge).place(:in=>l0, :relx=>0.5, :rely=>0.5,
- :anchor=>:c)
+ :insertwidth=>0, :highlightthickness=>0,
+ :selectborderwidth=>0, :borderwidth=>2,
+ :relief=>:ridge).place(:in=>l0, :relx=>0.5, :rely=>0.5,
+ :anchor=>:c)
st = Tk::Vu::TkcStripchart.new(c0, 3, 3, 80, 80,
- :background=>"#b7c0d7", :fill=>'slategray3',
- :jumpscroll=>1, :outline=>'black',
- :scaleline=>'blue', :stripline=>'red',
- :selected=>1, :values=>sval)
+ :background=>"#b7c0d7", :fill=>'slategray3',
+ :jumpscroll=>1, :outline=>'black',
+ :scaleline=>'blue', :stripline=>'red',
+ :selected=>1, :values=>sval)
TkcText.create(c0, 40, 40,
- :text=>Tk::TCL_PATCHLEVEL, :fill=>'cyan', :tags=>'text')
+ :text=>Tk::TCL_PATCHLEVEL, :fill=>'cyan', :tags=>'text')
l1 = TkLabel.new(:width=>128, :height=>128,
- :bitmap=>"@#{xbm}", :relief=>:groove).pack(:side=>:left)
+ :bitmap=>"@#{xbm}", :relief=>:groove).pack(:side=>:left)
c1 = TkCanvas.new(:width=>80, :height=>80,
- :insertwidth=>0, :highlightthickness=>0,
- :selectborderwidth=>0, :borderwidth=>2,
- :relief=>:ridge).place(:in=>l1, :relx=>0.5, :rely=>0.5,
- :anchor=>:c)
+ :insertwidth=>0, :highlightthickness=>0,
+ :selectborderwidth=>0, :borderwidth=>2,
+ :relief=>:ridge).place(:in=>l1, :relx=>0.5, :rely=>0.5,
+ :anchor=>:c)
bar1 = Tk::Vu::TkcBarchart.new(c1, 3, 3, 80, 80,
- :background=>"#b7c0d7", :scalevalue=>10.0,
- :autocolor=>true, :selected=>1,
- :outline=>'black', :barline=>'yellow',
- :scalelinestyle=>0)
+ :background=>"#b7c0d7", :scalevalue=>10.0,
+ :autocolor=>true, :selected=>1,
+ :outline=>'black', :barline=>'yellow',
+ :scalelinestyle=>0)
bar2 = Tk::Vu::TkcBarchart.new(c1, 53, 3, 80, 80,
- :background=>"#b7c0d7", :scalevalue=>10.0,
- :autocolor=>true, :selected=>1,
- :outline=>'black', :fill=>"#b7c0d7",
- :barline=>'red', :scalelinestyle=>22)
+ :background=>"#b7c0d7", :scalevalue=>10.0,
+ :autocolor=>true, :selected=>1,
+ :outline=>'black', :fill=>"#b7c0d7",
+ :barline=>'red', :scalelinestyle=>22)
l2 = TkLabel.new(:width=>128, :height=>128,
- :bitmap=>"@#{xbm}", :relief=>:groove).pack(:side=>:left)
+ :bitmap=>"@#{xbm}", :relief=>:groove).pack(:side=>:left)
c2 = TkCanvas.new(:width=>80, :height=>80,
- :insertwidth=>0, :highlightthickness=>0,
- :selectborderwidth=>0, :borderwidth=>2,
- :relief=>:ridge).place(:in=>l2, :relx=>0.5, :rely=>0.5,
- :anchor=>:c)
+ :insertwidth=>0, :highlightthickness=>0,
+ :selectborderwidth=>0, :borderwidth=>2,
+ :relief=>:ridge).place(:in=>l2, :relx=>0.5, :rely=>0.5,
+ :anchor=>:c)
begin
stick = Tk::Vu::TkcSticker.new(c2, 3, 3, 80, 80,
- :text=>"Tcl/Tk", :space=>0, :color=>'red',
- :outline=>'red', :font=>'Helvetica 14 bold',
- :fill=>'', :stipple=>'', :bar=>'blue',
- :orient=>:vertical, :anchor=>:s,
- :relheight=>1.0, :relwidth=>0.15,
- :relx=>0.1, :rely=>0.0)
+ :text=>"Tcl/Tk", :space=>0, :color=>'red',
+ :outline=>'red', :font=>'Helvetica 14 bold',
+ :fill=>'', :stipple=>'', :bar=>'blue',
+ :orient=>:vertical, :anchor=>:s,
+ :relheight=>1.0, :relwidth=>0.15,
+ :relx=>0.1, :rely=>0.0)
rescue
stick = nil
TkcText.new(c2, 40, 10, :text=>"No Sticker Item")
diff --git a/ext/tk/sample/tkextlib/vu/canvSticker.rb b/ext/tk/sample/tkextlib/vu/canvSticker.rb
index 431ca56fd7..e2cd604975 100644
--- a/ext/tk/sample/tkextlib/vu/canvSticker.rb
+++ b/ext/tk/sample/tkextlib/vu/canvSticker.rb
@@ -15,7 +15,7 @@ begin
st = Tk::Vu::TkcSticker.new(c, 0, 0, 10, 10)
rescue
Tk.messageBox(:type=>'ok', :title=>"No sticker Item",
- :message=>"This build of vu does not include the sticker item")
+ :message=>"This build of vu does not include the sticker item")
exit
end
#st.delete
@@ -57,7 +57,7 @@ steps << proc{
steps << proc{
puts 'A vertical bar appears in the lower right region and text jumps to the left.'
st.configure(:anchor=>:n, :relw=>0.3, :relh=>0.7,
- :relx=>0.6, :rely=>0.3, :bar=>'red')
+ :relx=>0.6, :rely=>0.3, :bar=>'red')
}
steps << proc{
diff --git a/ext/tk/sample/tkextlib/vu/canvSticker2.rb b/ext/tk/sample/tkextlib/vu/canvSticker2.rb
index 1e6b59a186..f54e748660 100644
--- a/ext/tk/sample/tkextlib/vu/canvSticker2.rb
+++ b/ext/tk/sample/tkextlib/vu/canvSticker2.rb
@@ -11,7 +11,7 @@ begin
st = Tk::Vu::TkcSticker.new(c, 0, 0, 10, 10)
rescue
Tk.messageBox(:type=>'ok', :title=>"No sticker Item",
- :message=>"This build of vu does not include the sticker item")
+ :message=>"This build of vu does not include the sticker item")
exit
end
@@ -21,7 +21,7 @@ c.destroy
#--- set STRING {{x0 y0 x1 y1} {...text...} {resize point: center}
#sti_conf = [ [10, 10, 180, 180], "Sticker äöüß@²³¼½¾", :center ]
-#txt_conf = [ [210, 210], "Text äöüß@²³¼½¾", :center ]
+#txt_conf = [ [210, 210], "Text äöüß@²³¼½¾", :center ]
sti_conf = [ [10, 10, 350, 350],
Tk::UTF8_String("Sticker äöüß@²³¼½¾"), :center ]
txt_conf = [ [250, 250],
@@ -65,32 +65,32 @@ txt = TkcText.new(c, txt_conf[0]){
anchor txt_conf[2]
disabledfill ''
disabledstipple ''
- fill 'blue'
- font fnt
+ fill 'blue'
+ font fnt
justify :left
offset '0,0'
state ''
stipple ''
- tags ['tex']
+ tags ['tex']
text txt_conf[1]
width 0
}
#---BINDINGS
c.bind('2', proc{
- sti[:orient] = :horizontal
- txt[:width] = 0 # horizontal
+ sti[:orient] = :horizontal
+ txt[:width] = 0 # horizontal
})
c.bind('3', proc{
- sti[:orient] = :vertical
- txt[:width] = 1 # top down
+ sti[:orient] = :vertical
+ txt[:width] = 1 # top down
})
Tk.root.bind('p', proc{
- c.postscript(:file=>'DEMO.ps')
- puts "DEMO.ps printed"
- })
+ c.postscript(:file=>'DEMO.ps')
+ puts "DEMO.ps printed"
+ })
Tk.root.bind('q', proc{exit})
diff --git a/ext/tk/sample/tkextlib/vu/dial.rb b/ext/tk/sample/tkextlib/vu/dial.rb
index d2ae0990c0..09bd3e9186 100644
--- a/ext/tk/sample/tkextlib/vu/dial.rb
+++ b/ext/tk/sample/tkextlib/vu/dial.rb
@@ -13,61 +13,61 @@ v_linked = TkVariable.new
v_needle = TkVariable.new
volume = Tk::Vu::Dial.new(:label=>"Volume", :from=>-0.1, :to=>0.1,
- :resolution=>0.001, :minortickinterval=>0.01,
- :tickinterval=>0.1, :beginangle=>-20,
- :endangle=>260, :variable=>v_volume)
+ :resolution=>0.001, :minortickinterval=>0.01,
+ :tickinterval=>0.1, :beginangle=>-20,
+ :endangle=>260, :variable=>v_volume)
speed = Tk::Vu::Dial.new(:label=>"Speed", :from=>2000, :to=>100,
- :resolution=>10, :tickinterval=>100,
- :minortickinterval=>0, :variable=>v_speed,
- :showtags=>:label, :showvalue=>false)
+ :resolution=>10, :tickinterval=>100,
+ :minortickinterval=>0, :variable=>v_speed,
+ :showtags=>:label, :showvalue=>false)
speed.set_tag_constrain(100, 'Fast', 2000, 'Slow')
fwd = Tk::Vu::Dial.new(:from=>-10.0, :to=>-20.0, :resolution=>0.1,
- :tickinterval=>5.0, :minortickinterval=>1.0,
- :variable=>v_dir)
+ :tickinterval=>5.0, :minortickinterval=>1.0,
+ :variable=>v_dir)
rev = Tk::Vu::Dial.new(:from=>-20.0, :to=>-10.0, :resolution=>0.1,
- :tickinterval=>5.0, :minortickinterval=>1.0,
- :variable=>v_dir)
+ :tickinterval=>5.0, :minortickinterval=>1.0,
+ :variable=>v_dir)
small = Tk::Vu::Dial.new(:font=>"Helvetica -10", :from=>0, :to=>10,
- :resolution=>0.05, :tickinterval=>2,
- :minortickinterval=>0.5, :radius=>20,
- :dialcolor=>'red2', :activebackground=>'red',
- :variable=>v_rot)
+ :resolution=>0.05, :tickinterval=>2,
+ :minortickinterval=>0.5, :radius=>20,
+ :dialcolor=>'red2', :activebackground=>'red',
+ :variable=>v_rot)
large = Tk::Vu::Dial.new(:font=>"Helvetica -8", :from=>0, :to=>10,
- :resolution=>0.05, :tickinterval=>1,
- :minortickinterval=>0.25, :radius=>40,
- :dialcolor=>'red2', :activebackground=>'red',
- :variable=>v_rot)
+ :resolution=>0.05, :tickinterval=>1,
+ :minortickinterval=>0.25, :radius=>40,
+ :dialcolor=>'red2', :activebackground=>'red',
+ :variable=>v_rot)
turn = Tk::Vu::Dial.new(:needlecolor=>'red', :label=>"Linked",
- :variable=>v_linked)
+ :variable=>v_linked)
scale = TkScale.new(:label=>"Linked", :variable=>v_linked)
d1 = Tk::Vu::Dial.new(:resolution=>0.0001, :from=>-0.1, :to=>0.1,
- :showvalue=>true, :minortickinterval=>0.01,
- :tickinterval=>0.1, :radius=>30, :label=>"Dial",
- :beginangle=>-20, :endangle=>260, :variable=>v_needle,
- :relief=>:raised)
+ :showvalue=>true, :minortickinterval=>0.01,
+ :tickinterval=>0.1, :radius=>30, :label=>"Dial",
+ :beginangle=>-20, :endangle=>260, :variable=>v_needle,
+ :relief=>:raised)
d2 = Tk::Vu::Dial.new(:resolution=>0.01, :from=>-0.1, :to=>0.1,
- :showvalue=>true, :minortickinterval=>0.01,
- :tickinterval=>0.1, :radius=>30, :label=>"Dial 2",
- :beginangle=>-20, :endangle=>260, :variable=>v_needle,
- :dialrelief=>:flat, :needlecolor=>'red',
- :needletype=>:triangle, :relief=>:sunken)
+ :showvalue=>true, :minortickinterval=>0.01,
+ :tickinterval=>0.1, :radius=>30, :label=>"Dial 2",
+ :beginangle=>-20, :endangle=>260, :variable=>v_needle,
+ :dialrelief=>:flat, :needlecolor=>'red',
+ :needletype=>:triangle, :relief=>:sunken)
d3 = Tk::Vu::Dial.new(:resolution=>0.001, :from=>-0.1, :to=>0.1,
- :showvalue=>true, :minortickinterval=>0.01,
- :tickinterval=>0.1, :radius=>30, :label=>"Dial 3",
- :beginangle=>-20, :endangle=>260, :variable=>v_needle,
- :dialrelief=>:flat, :needlecolor=>'blue',
- :needletype=>:arc, :relief=>:ridge)
+ :showvalue=>true, :minortickinterval=>0.01,
+ :tickinterval=>0.1, :radius=>30, :label=>"Dial 3",
+ :beginangle=>-20, :endangle=>260, :variable=>v_needle,
+ :dialrelief=>:flat, :needlecolor=>'blue',
+ :needletype=>:arc, :relief=>:ridge)
f_btns = TkFrame.new
f_sep = TkFrame.new(:height=>2, :relief=>:sunken, :bd=>1)
@@ -77,12 +77,12 @@ v_volume.value = -0.1
v_speed.value = 500
update = TkTimer.new(proc{v_speed.numeric}, -1, proc{
- if v_volume == volume[:to]
- v_volume.numeric = volume[:from]
- else
- v_volume.numeric += volume[:resolution]
- end
- })
+ if v_volume == volume[:to]
+ v_volume.numeric = volume[:from]
+ else
+ v_volume.numeric += volume[:resolution]
+ end
+ })
b_start = TkButton.new(:text=>"Start", :command=>proc{update.start})
b_stop = TkButton.new(:text=>"Stop", :command=>proc{update.stop})
diff --git a/ext/tk/sample/tkextlib/vu/oscilloscope.rb b/ext/tk/sample/tkextlib/vu/oscilloscope.rb
index 43254c9b2e..2015e46645 100644
--- a/ext/tk/sample/tkextlib/vu/oscilloscope.rb
+++ b/ext/tk/sample/tkextlib/vu/oscilloscope.rb
@@ -23,43 +23,43 @@ c = TkCanvas.new(:width=>220, :height=>190).pack(:fill=>:both, :expand=>true)
#---background
TkcRectangle.new(c, geo_fr, :width=>4, :fill=>'aquamarine3',
- :tags=>['osc', 'frbg'])
+ :tags=>['osc', 'frbg'])
#---channel 0
ch0 = Tk::Vu::TkcStripchart.new(c, geo_ch0,
- :fill=>'', :jumpscroll=>false,
- :outline=>'', :scaleline=>'',
- :stripline=>'cyan', :tags=>['osc', 'ch0'])
+ :fill=>'', :jumpscroll=>false,
+ :outline=>'', :scaleline=>'',
+ :stripline=>'cyan', :tags=>['osc', 'ch0'])
#---channel 1
ch1 = Tk::Vu::TkcStripchart.new(c, geo_ch1,
- :fill=>'', :jumpscroll=>0,
- :outline=>'', :scaleline=>'',
- :stripline=>'red', :tags=>['osc', 'ch1'])
+ :fill=>'', :jumpscroll=>0,
+ :outline=>'', :scaleline=>'',
+ :stripline=>'red', :tags=>['osc', 'ch1'])
#---frame
TkcRectangle.new(c, geo_fr, :width=>4, :tags=>['osc', 'frfg'])
#---position
txt1 = TkcText.new(c, geo_t1, :text=>"B1-Motion: X:%X\tY:%Y",
- :anchor=>:nw, :tags=>['osc', 'txt1'])
+ :anchor=>:nw, :tags=>['osc', 'txt1'])
#---BINDINGS
c.bind('B1-Motion', proc{|x, y, xx, yy|
- ch0[:values] = x
- ch1[:values] = y
- txt1[:text] = "B1-Motion: X:#{xx}\tY:#{yy}"
+ ch0[:values] = x
+ ch1[:values] = y
+ txt1[:text] = "B1-Motion: X:#{xx}\tY:#{yy}"
}, '%x %y %X %Y')
Tk.root.bind('v', proc{
- puts ch0[:values].join(' ')
- puts ch0[:values].size
- })
+ puts ch0[:values].join(' ')
+ puts ch0[:values].size
+ })
Tk.root.bind('p', proc{
- c.postscript(:file=>'DEMO.ps')
- puts "DEMO.ps printed"
- })
+ c.postscript(:file=>'DEMO.ps')
+ puts "DEMO.ps printed"
+ })
Tk.root.bind('q', proc{exit})
diff --git a/ext/tk/sample/tkextlib/vu/pie.rb b/ext/tk/sample/tkextlib/vu/pie.rb
index a567f840a0..ed598d6233 100644
--- a/ext/tk/sample/tkextlib/vu/pie.rb
+++ b/ext/tk/sample/tkextlib/vu/pie.rb
@@ -27,7 +27,7 @@ Tk.grid(pie, :sticky=>:news)
Tk.grid(f, :sticky=>:ew)
Tk.pack(fast_btn, slow_btn, quit_btn,
- :in=>f, :side=>:left, :fill=>:both, :expand=>true, :padx=>6, :pady=>4)
+ :in=>f, :side=>:left, :fill=>:both, :expand=>true, :padx=>6, :pady=>4)
Tk.root.grid_columnconfigure(0, :weight=>1)
Tk.root.grid_rowconfigure(0, :weight=>1)
@@ -37,20 +37,20 @@ priv = {
}
pie.bind('ButtonPress-1', proc{|w, x, y|
- priv[:x] = x
- priv[:y] = y
- priv[:pie_in] = (w.winfo_width/1.8 > x)
- priv[:angle] = w[:angle]
- priv[:origin] = w[:origin]
- }, '%W %x %y')
+ priv[:x] = x
+ priv[:y] = y
+ priv[:pie_in] = (w.winfo_width/1.8 > x)
+ priv[:angle] = w[:angle]
+ priv[:origin] = w[:origin]
+ }, '%W %x %y')
pie.bind('B1-Motion', proc{|w, x, y|
- if priv[:pie_in]
- w.configure(:angle=>priv[:angle] + (priv[:y] - y)/3,
- :origin=>(priv[:origin] +
- ((w.winfo_height/2.2 > y)? -1: 1) *
- (priv[:x] - x)/3) % 360)
- end
- }, '%W %x %y')
+ if priv[:pie_in]
+ w.configure(:angle=>priv[:angle] + (priv[:y] - y)/3,
+ :origin=>(priv[:origin] +
+ ((w.winfo_height/2.2 > y)? -1: 1) *
+ (priv[:x] - x)/3) % 360)
+ end
+ }, '%W %x %y')
Tk.mainloop
diff --git a/ext/tk/sample/tkextlib/vu/vu.rb b/ext/tk/sample/tkextlib/vu/vu.rb
index df9a7f38ad..d078ae16f2 100644
--- a/ext/tk/sample/tkextlib/vu/vu.rb
+++ b/ext/tk/sample/tkextlib/vu/vu.rb
@@ -10,13 +10,13 @@ puts "Show off barchart and dial widgets"
speed = TkVariable.new(0)
dial = Tk::Vu::Dial.new(:resolution=>0.001, :from=>-0.1, :to=>0.1,
- :showvalue=>true, :minortickinterval=>0.01,
- :tickinterval=>0.1, :radius=>50, :label=>"Dial",
- :beginangle=>-20, :endangle=>260, :dialcolor=>'red3',
- :active=>'red2', :variable=>speed)
+ :showvalue=>true, :minortickinterval=>0.01,
+ :tickinterval=>0.1, :radius=>50, :label=>"Dial",
+ :beginangle=>-20, :endangle=>260, :dialcolor=>'red3',
+ :active=>'red2', :variable=>speed)
bar = Tk::Vu::Bargraph.new(:from=>0, :to=>100, :relief=>:groove,
- :border=>2, :label=>"Bar Chart")
+ :border=>2, :label=>"Bar Chart")
#######################################
@@ -30,24 +30,24 @@ def rand_bool
end
update = TkTimer.new(200, -1, proc{
- if (rand() - 0.5 + speed.numeric * 3) > 0
- current += 1
- else
- current -= 1
- end
- bar.set(current)
- if current < green
- current = 100 if current <= 0
- bar[:barcolor] = 'green'
- elsif current < blue
- bar[:barcolor] = 'blue'
- elsif current < purple
- bar[:barcolor] = 'purple'
- else
- bar[:barcolor] = 'red'
- current = 0 if current >= 100
- end
- })
+ if (rand() - 0.5 + speed.numeric * 3) > 0
+ current += 1
+ else
+ current -= 1
+ end
+ bar.set(current)
+ if current < green
+ current = 100 if current <= 0
+ bar[:barcolor] = 'green'
+ elsif current < blue
+ bar[:barcolor] = 'blue'
+ elsif current < purple
+ bar[:barcolor] = 'purple'
+ else
+ bar[:barcolor] = 'red'
+ current = 0 if current >= 100
+ end
+ })
#######################################
@@ -61,7 +61,7 @@ Tk.grid('x', nobar, :sticky=>:ew, :padx=>4, :pady=>4)
Tk.grid(quit, '-', '-', :sticky=>:ew, :padx=>4, :pady=>4)
Tk.root.grid_columnconfigure(2, :weight=>1)
Tk.root.grid_rowconfigure(1, :weight=>1)
-
+
#######################################
Tk.mainloop
diff --git a/ext/tk/sample/tkfrom.rb b/ext/tk/sample/tkfrom.rb
index 25f1d7c429..2cece7337e 100644
--- a/ext/tk/sample/tkfrom.rb
+++ b/ext/tk/sample/tkfrom.rb
@@ -22,13 +22,13 @@ class Mail
@body = []
while line = f.gets()
$_.chop!
- next if /^From / =~ line # skip From-line
- break if /^$/ =~ line # end of header
+ next if /^From / =~ line # skip From-line
+ break if /^$/ =~ line # end of header
if /^(\S+):\s*(.*)/ =~ line
- @header[attr = $1.capitalize] = $2
+ @header[attr = $1.capitalize] = $2
elsif attr
- sub(/^\s*/, '')
- @header[attr] += "\n" + $_
+ sub(/^\s*/, '')
+ @header[attr] += "\n" + $_
end
end
@@ -65,7 +65,7 @@ list = scroll = nil
TkFrame.new{|f|
list = TkListbox.new(f) {
yscroll proc{|*idx|
- scroll.set *idx
+ scroll.set *idx
}
relief 'raised'
# geometry "80x5"
diff --git a/ext/tk/sample/tkhello.rb b/ext/tk/sample/tkhello.rb
index ab236963e8..3b505f4983 100644
--- a/ext/tk/sample/tkhello.rb
+++ b/ext/tk/sample/tkhello.rb
@@ -1,10 +1,10 @@
require "tk"
TkButton.new(nil,
- 'text' => 'hello',
- 'command' => proc{print "hello\n"}).pack('fill'=>'x')
+ :text => 'hello',
+ :command => proc{print "hello\n"}).pack(:fill=>'x')
TkButton.new(nil,
- 'text' => 'quit',
- 'command' => proc{exit}).pack('fill'=>'x')
+ :text => 'quit',
+ :command => proc{exit}).pack(:fill=>'x')
Tk.mainloop
diff --git a/ext/tk/sample/tkline.rb b/ext/tk/sample/tkline.rb
index 5bdf3aec78..3124c2fe0c 100644
--- a/ext/tk/sample/tkline.rb
+++ b/ext/tk/sample/tkline.rb
@@ -8,8 +8,8 @@ def start_random
if defined? Thread
Thread.start do
loop do
- sleep 2
- Line.new($c, rand(400), rand(200), rand(400), rand(200))
+ sleep 2
+ Line.new($c, rand(400), rand(200), rand(400), rand(200))
end
end
end
diff --git a/ext/tk/sample/tkmenubutton.rb b/ext/tk/sample/tkmenubutton.rb
index 1c7f51000b..37f6128fd9 100644
--- a/ext/tk/sample/tkmenubutton.rb
+++ b/ext/tk/sample/tkmenubutton.rb
@@ -11,7 +11,7 @@ TkFrame.new{|f|
TkMenubutton.new(:parent=>f, :text=>'Right', :underline=>0,
- :direction=>:right, :relief=>:raised){|mb|
+ :direction=>:right, :relief=>:raised){|mb|
menu TkMenu.new(:parent=>mb, :tearoff=>0){
add(:command, :label=>'Right menu: first item',
:command=>proc{print 'You have selected the first item' +
@@ -24,7 +24,7 @@ TkFrame.new{|f|
}
TkMenubutton.new(:parent=>f, :text=>'Below', :underline=>0,
- :direction=>:below, :relief=>:raised){|mb|
+ :direction=>:below, :relief=>:raised){|mb|
menu(TkMenu.new(:parent=>mb, :tearoff=>0){
add(:command, :label=>'Below menu: first item',
:command=>proc{print 'You have selected the first item' +
@@ -37,7 +37,7 @@ TkFrame.new{|f|
}
TkMenubutton.new(:parent=>f, :text=>'Above', :underline=>0,
- :direction=>:above, :relief=>:raised){|mb|
+ :direction=>:above, :relief=>:raised){|mb|
menu TkMenu.new(:parent=>mb, :tearoff=>0){
add(:command, :label=>'Above menu: first item',
:command=>proc{print 'You have selected the first item' +
@@ -50,7 +50,7 @@ TkFrame.new{|f|
}
TkMenubutton.new(:parent=>f, :text=>'Left', :underline=>0,
- :direction=>:left, :relief=>:raised){|mb|
+ :direction=>:left, :relief=>:raised){|mb|
menu(TkMenu.new(:parent=>mb, :tearoff=>0){
add(:command, :label=>'Left menu: first item',
:command=>proc{print 'You have selected the first item' +
@@ -65,7 +65,7 @@ TkFrame.new{|f|
############################
TkFrame.new(:borderwidth=>2, :relief=>:sunken,
- :height=>5).pack(:side=>:top, :fill=>:x, :padx=>20)
+ :height=>5).pack(:side=>:top, :fill=>:x, :padx=>20)
############################
TkLabel.new(:text=>'Sample of TkOptionMenu').pack(:side=>:top)
@@ -83,21 +83,21 @@ TkFrame.new{|f|
b2 = TkOptionMenubutton.new(:parent=>f, :values=>colors) {|optMB|
colors.each{|color|
no_sel = TkPhotoImage.new(:height=>16, :width=>16){
- put 'gray50', *[ 0, 0, 16, 1]
- put 'gray50', *[ 0, 1, 1, 16]
- put 'gray75', *[ 0, 15, 16, 16]
- put 'gray75', *[15, 1, 16, 16]
- put color, *[ 1, 1, 15, 15]
+ put 'gray50', *[ 0, 0, 16, 1]
+ put 'gray50', *[ 0, 1, 1, 16]
+ put 'gray75', *[ 0, 15, 16, 16]
+ put 'gray75', *[15, 1, 16, 16]
+ put color, *[ 1, 1, 15, 15]
}
sel = TkPhotoImage.new(:height=>16, :width=>16){
- put 'Black', *[ 0, 0, 16, 2]
- put 'Black', *[ 0, 2, 2, 16]
- put 'Black', *[ 2, 14, 16, 16]
- put 'Black', *[14, 2, 16, 14]
- put color, *[ 2, 2, 14, 14]
+ put 'Black', *[ 0, 0, 16, 2]
+ put 'Black', *[ 0, 2, 2, 16]
+ put 'Black', *[ 2, 14, 16, 16]
+ put 'Black', *[14, 2, 16, 14]
+ put color, *[ 2, 2, 14, 14]
}
optMB.entryconfigure(color, :hidemargin=>1,
- :image=>no_sel, :selectimage=>sel)
+ :image=>no_sel, :selectimage=>sel)
}
optMB.menuconfigure(:tearoff, 1)
%w(Black gray75 gray50 White).each{|color|
@@ -115,7 +115,7 @@ TkFrame.new{|f|
############################
TkFrame.new(:borderwidth=>2, :relief=>:sunken,
- :height=>5).pack(:side=>:top, :fill=>:x, :padx=>20)
+ :height=>5).pack(:side=>:top, :fill=>:x, :padx=>20)
############################
root = TkRoot.new(:title=>'menubutton samples')
@@ -127,8 +127,8 @@ TkButton.new(root, :text=>'exit', :command=>proc{exit}){
# VirtualEvent <<MenuSelect>> on Tcl/Tk ==> '<MenuSelect>' on Ruby/Tk
# ( remove the most external <, > for Ruby/Tk notation )
TkMenu.bind('<MenuSelect>', proc{|widget|
- p widget.entrycget('active', :label)
- }, '%W')
+ p widget.entrycget('active', :label)
+ }, '%W')
############################
diff --git a/ext/tk/sample/tkmsgcat-load_rb.rb b/ext/tk/sample/tkmsgcat-load_rb.rb
index 6a3289e061..5373e0086f 100644
--- a/ext/tk/sample/tkmsgcat-load_rb.rb
+++ b/ext/tk/sample/tkmsgcat-load_rb.rb
@@ -12,19 +12,19 @@ default_locale = msgcat.locale
msgcat.load(msgcat_dir)
col_proc = TkComm.install_bind(proc{|w, color, frame, label|
- TkComm.window(frame).background(color)
- Tk.update
- TkComm.window(label).text(
- msgcat["%1$s:: %2$s", 'Color',
- color.capitalize])
- w.flash; w.flash
- Tk.callback_break;
- }, "%W")
+ TkComm.window(frame).background(color)
+ Tk.update
+ TkComm.window(label).text(
+ msgcat["%1$s:: %2$s", 'Color',
+ color.capitalize])
+ w.flash; w.flash
+ Tk.callback_break;
+ }, "%W")
del_proc = TkComm.install_cmd(proc{top_win.destroy; top_win = nil})
err_proc = TkComm.install_cmd(proc{fail(RuntimeError,
- msgcat['Application Error'])})
+ msgcat['Application Error'])})
show_sample = proc{|loc|
top_win = TkToplevel.new(:title=>loc)
@@ -39,24 +39,24 @@ show_sample = proc{|loc|
}
lbl = TkLabel.new(top_win, :text=>msgcat["%1$s:: %2$s",
- 'Color', '']).pack(:anchor=>'w')
+ 'Color', '']).pack(:anchor=>'w')
bg = TkFrame.new(top_win).pack(:ipadx=>20, :ipady=>10,
- :expand=>true, :fill=>:both)
+ :expand=>true, :fill=>:both)
TkFrame.new(bg){|f|
['blue', 'green', 'red'].each{|col|
TkButton.new(f, :text=>msgcat[col]){
- bind('ButtonRelease-1', col_proc, "#{col} #{bg.path} #{lbl.path}")
+ bind('ButtonRelease-1', col_proc, "#{col} #{bg.path} #{lbl.path}")
}.pack(:fill=>:x)
}
}.pack(:anchor=>'center', :pady=>15)
TkFrame.new(top_win){|f|
TkButton.new(f, :text=>msgcat['Delete'],
- :command=>del_proc).pack(:side=>:right, :padx=>5)
+ :command=>del_proc).pack(:side=>:right, :padx=>5)
TkButton.new(f, :text=>msgcat['Error'],
- :command=>err_proc).pack(:side=>:left, :padx=>5)
+ :command=>err_proc).pack(:side=>:left, :padx=>5)
}.pack(:side=>:bottom, :fill=>:x)
top_win
@@ -68,7 +68,7 @@ TkLabel.new(:text=>"Please click a locale.").pack(:padx=>5, :pady=>3)
TkFrame.new{|f|
TkButton.new(f, :text=>msgcat['Exit'],
- :command=>proc{exit}).pack(:side=>:right, :padx=>5)
+ :command=>proc{exit}).pack(:side=>:right, :padx=>5)
}.pack(:side=>:bottom, :fill=>:x)
f = TkFrame.new.pack(:side=>:top, :fill=>:both, :expand=>true)
diff --git a/ext/tk/sample/tkmsgcat-load_rb2.rb b/ext/tk/sample/tkmsgcat-load_rb2.rb
index 720ab94e13..55246545c8 100644
--- a/ext/tk/sample/tkmsgcat-load_rb2.rb
+++ b/ext/tk/sample/tkmsgcat-load_rb2.rb
@@ -12,19 +12,19 @@ default_locale = msgcat.locale
msgcat.load(msgcat_dir)
col_proc = TkComm.install_bind(proc{|w, color, frame, label|
- TkComm.window(frame).background(color)
- Tk.update
- TkComm.window(label).text(
- msgcat["%1$s:: %2$s", 'Color',
- color.capitalize])
- w.flash; w.flash
- Tk.callback_break;
- }, "%W")
+ TkComm.window(frame).background(color)
+ Tk.update
+ TkComm.window(label).text(
+ msgcat["%1$s:: %2$s", 'Color',
+ color.capitalize])
+ w.flash; w.flash
+ Tk.callback_break;
+ }, "%W")
del_proc = TkComm.install_cmd(proc{top_win.destroy; top_win = nil})
err_proc = TkComm.install_cmd(proc{fail(RuntimeError,
- msgcat['Application Error'])})
+ msgcat['Application Error'])})
show_sample = proc{|loc|
top_win = TkToplevel.new(:title=>loc)
@@ -39,24 +39,24 @@ show_sample = proc{|loc|
}
lbl = TkLabel.new(top_win, :text=>msgcat["%1$s:: %2$s",
- 'Color', '']).pack(:anchor=>'w')
+ 'Color', '']).pack(:anchor=>'w')
bg = TkFrame.new(top_win).pack(:ipadx=>20, :ipady=>10,
- :expand=>true, :fill=>:both)
+ :expand=>true, :fill=>:both)
TkFrame.new(bg){|f|
['blue', 'green', 'red'].each{|col|
TkButton.new(f, :text=>msgcat[col]){
- bind('ButtonRelease-1', col_proc, "#{col} #{bg.path} #{lbl.path}")
+ bind('ButtonRelease-1', col_proc, "#{col} #{bg.path} #{lbl.path}")
}.pack(:fill=>:x)
}
}.pack(:anchor=>'center', :pady=>15)
TkFrame.new(top_win){|f|
TkButton.new(f, :text=>msgcat['Delete'],
- :command=>del_proc).pack(:side=>:right, :padx=>5)
+ :command=>del_proc).pack(:side=>:right, :padx=>5)
TkButton.new(f, :text=>msgcat['Error'],
- :command=>err_proc).pack(:side=>:left, :padx=>5)
+ :command=>err_proc).pack(:side=>:left, :padx=>5)
}.pack(:side=>:bottom, :fill=>:x)
top_win
@@ -68,7 +68,7 @@ TkLabel.new(:text=>"Please click a locale.").pack(:padx=>5, :pady=>3)
TkFrame.new{|f|
TkButton.new(f, :text=>msgcat['Exit'],
- :command=>proc{exit}).pack(:side=>:right, :padx=>5)
+ :command=>proc{exit}).pack(:side=>:right, :padx=>5)
}.pack(:side=>:bottom, :fill=>:x)
f = TkFrame.new.pack(:side=>:top, :fill=>:both, :expand=>true)
diff --git a/ext/tk/sample/tkmsgcat-load_tk.rb b/ext/tk/sample/tkmsgcat-load_tk.rb
index 8ad26a5f27..45d68e4e0b 100644
--- a/ext/tk/sample/tkmsgcat-load_tk.rb
+++ b/ext/tk/sample/tkmsgcat-load_tk.rb
@@ -11,19 +11,19 @@ default_locale = msgcat.locale
msgcat.load_tk(msgcat_dir)
col_proc = TkComm.install_bind(proc{|w, color, frame, label|
- TkComm.window(frame).background(color)
- Tk.update
- TkComm.window(label).text(
- msgcat.mc("%1$s:: %2$s", 'Color',
- color.capitalize))
- w.flash; w.flash
- Tk.callback_break;
- }, "%W")
+ TkComm.window(frame).background(color)
+ Tk.update
+ TkComm.window(label).text(
+ msgcat.mc("%1$s:: %2$s", 'Color',
+ color.capitalize))
+ w.flash; w.flash
+ Tk.callback_break;
+ }, "%W")
del_proc = TkComm.install_cmd(proc{top_win.destroy; top_win = nil})
err_proc = TkComm.install_cmd(proc{fail(RuntimeError,
- msgcat.mc('Application Error'))})
+ msgcat.mc('Application Error'))})
show_sample = proc{|loc|
top_win = TkToplevel.new(:title=>loc)
@@ -37,41 +37,41 @@ show_sample = proc{|loc|
}
lbl = TkLabel.new(top_win, :text=>msgcat.mc("%1$s:: %2$s",
- 'Color', '')).pack(:anchor=>'w')
+ 'Color', '')).pack(:anchor=>'w')
bg = TkFrame.new(top_win).pack(:ipadx=>20, :ipady=>10,
- :expand=>true, :fill=>:both)
+ :expand=>true, :fill=>:both)
TkFrame.new(bg){|f|
['blue', 'green', 'red'].each{|col|
TkButton.new(f, :text=>msgcat.mc(col)){
- bind('ButtonRelease-1', col_proc, "#{col} #{bg.path} #{lbl.path}")
+ bind('ButtonRelease-1', col_proc, "#{col} #{bg.path} #{lbl.path}")
}.pack(:fill=>:x)
=begin
TkButton.new(f, :text=>msgcat.mc(col),
- :command=>proc{
- bg.background col
- lbl.text msgcat.mc("%1$s:: %2$s", 'Color', col.capitalize)
- }).pack(:fill=>:x)
+ :command=>proc{
+ bg.background col
+ lbl.text msgcat.mc("%1$s:: %2$s", 'Color', col.capitalize)
+ }).pack(:fill=>:x)
=end
}
}.pack(:anchor=>'center', :pady=>15)
TkFrame.new(top_win){|f|
TkButton.new(f, :text=>msgcat.mc('Delete'),
- :command=>del_proc).pack(:side=>:right, :padx=>5)
+ :command=>del_proc).pack(:side=>:right, :padx=>5)
TkButton.new(f, :text=>msgcat.mc('Error'),
- :command=>err_proc).pack(:side=>:left, :padx=>5)
+ :command=>err_proc).pack(:side=>:left, :padx=>5)
=begin
TkButton.new(f, :text=>msgcat.mc('Delete'),
- :command=>proc{
- top_win.destroy
- top_win = nil
- }).pack(:side=>:right, :padx=>5)
+ :command=>proc{
+ top_win.destroy
+ top_win = nil
+ }).pack(:side=>:right, :padx=>5)
TkButton.new(f, :text=>msgcat.mc('Error'),
- :command=>proc{
- fail RuntimeError, msgcat.mc('Application Error')
- }).pack(:side=>:left, :padx=>5)
+ :command=>proc{
+ fail RuntimeError, msgcat.mc('Application Error')
+ }).pack(:side=>:left, :padx=>5)
=end
}.pack(:side=>:bottom, :fill=>:x)
@@ -84,7 +84,7 @@ TkLabel.new(:text=>"Please click a locale.").pack(:padx=>5, :pady=>3)
TkFrame.new{|f|
TkButton.new(f, :text=>msgcat.mc('Exit'),
- :command=>proc{exit}).pack(:side=>:right, :padx=>5)
+ :command=>proc{exit}).pack(:side=>:right, :padx=>5)
}.pack(:side=>:bottom, :fill=>:x)
f = TkFrame.new.pack(:side=>:top, :fill=>:both, :expand=>true)
diff --git a/ext/tk/sample/tkmulticolumnlist.rb b/ext/tk/sample/tkmulticolumnlist.rb
index 5d6aa81bcd..255eb691e5 100644
--- a/ext/tk/sample/tkmulticolumnlist.rb
+++ b/ext/tk/sample/tkmulticolumnlist.rb
@@ -55,28 +55,28 @@ class TkMultiColumnList < TkText
# virtical scrollbar
@v_scroll = TkYScrollbar.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'borderwidth'=>@scrbar_border,
- 'width'=>@scrbar_width)
+ 'borderwidth'=>@scrbar_border,
+ 'width'=>@scrbar_width)
# horizontal scrollbar
@h_scroll = TkXScrollbar.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'borderwidth'=>@scrbar_border,
- 'width'=>@scrbar_width)
+ 'borderwidth'=>@scrbar_border,
+ 'width'=>@scrbar_width)
# create base flames
@c_title = TkCanvas.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'width'=>@window_width)
+ 'width'=>@window_width)
@f_title = TkFrame.new(@c_title, 'width'=>@width_total)
@w_title = TkcWindow.new(@c_title, 0, 0,
- 'window'=>@f_title, 'anchor'=>'nw')
+ 'window'=>@f_title, 'anchor'=>'nw')
@c_lbox = TkCanvas.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'width'=>@window_width)
+ 'width'=>@window_width)
@f_lbox = TkFrame.new(@c_lbox, 'width'=>@width_total)
@w_lbox = TkcWindow.new(@c_lbox, 0, 0, 'window'=>@f_lbox, 'anchor'=>'nw')
@c_hscr = TkCanvas.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'width'=>@window_width)
+ 'width'=>@window_width)
@f_hscr = TkFrame.new(@c_hscr, 'width'=>@width_total)
@w_hscr = TkcWindow.new(@c_hscr, 0, 0, 'window'=>@f_hscr, 'anchor'=>'nw')
@@ -86,9 +86,9 @@ class TkMultiColumnList < TkText
title_info.each_with_index{|(label, width), idx|
# set relation between label and index
if @name_index.include?(label)
- @name_index[label] << idx
+ @name_index[label] << idx
else
- @name_index[label] = [idx]
+ @name_index[label] = [idx]
end
# calculate relative positioning
@@ -100,69 +100,69 @@ class TkMultiColumnList < TkText
base = [f]
title = TkLabel.new(f, 'text'=>label, 'borderwidth'=>@title_border,
- 'relief'=>'raised', 'highlightthickness'=>@h_l_thick)
+ 'relief'=>'raised', 'highlightthickness'=>@h_l_thick)
title_binding(title, idx)
title.pack('fill'=>'x')
@title_list << title
f.place('relx'=>@rel_list[idx], 'y'=>0, 'anchor'=>'nw', 'width'=>1,
- 'relheight'=>1.0,
- 'relwidth'=>@rel_list[idx+1] - @rel_list[idx])
+ 'relheight'=>1.0,
+ 'relwidth'=>@rel_list[idx+1] - @rel_list[idx])
# listbox field
f = TkFrame.new(@f_lbox, 'width'=>width)
base << f
@lbox_list << TkText.new(f, 'highlightthickness'=>@h_l_thick,
- 'borderwidth'=>@lbox_border,
- 'takefocus'=>false,
- 'wrap'=>'none') {
-
- bindtags(bindtags - [TkText])
-
- @seltag = TkTextTag.new(self, 'background'=>'#b3b3b3',
- 'borderwidth'=>1, 'relief'=>'raised')
- def self.nearest(y)
- self.index("@1,#{y}").split('.')[0].to_i
- end
-
- def self.select_clear(first, last=nil)
- first = "#{first}.0" if first.kind_of?(Integer)
- first = self.index(first.to_s + ' linestart')
- last = first unless last
- last = "#{last}.0" if first.kind_of?(Integer)
- last = self.index(last.to_s + ' + 1 lines linestart')
- @seltag.remove(first, last)
- end
-
- def self.select_set(first, last=nil)
- first = "#{first}.0" if first.kind_of?(Integer)
- first = self.index(first.to_s + ' linestart')
- last = first unless last
- last = "#{last}.0" if first.kind_of?(Integer)
- last = self.index(last.to_s + ' + 1 lines linestart')
- @seltag.add(first, last)
- end
-
- def self.select_index
- self.index(@seltag.first).split('.')[0].to_i
- end
-
- pack('fill'=>'both', 'expand'=>true)
+ 'borderwidth'=>@lbox_border,
+ 'takefocus'=>false,
+ 'wrap'=>'none') {
+
+ bindtags(bindtags - [TkText])
+
+ @seltag = TkTextTag.new(self, 'background'=>'#b3b3b3',
+ 'borderwidth'=>1, 'relief'=>'raised')
+ def self.nearest(y)
+ self.index("@1,#{y}").split('.')[0].to_i
+ end
+
+ def self.select_clear(first, last=nil)
+ first = "#{first}.0" if first.kind_of?(Integer)
+ first = self.index(first.to_s + ' linestart')
+ last = first unless last
+ last = "#{last}.0" if first.kind_of?(Integer)
+ last = self.index(last.to_s + ' + 1 lines linestart')
+ @seltag.remove(first, last)
+ end
+
+ def self.select_set(first, last=nil)
+ first = "#{first}.0" if first.kind_of?(Integer)
+ first = self.index(first.to_s + ' linestart')
+ last = first unless last
+ last = "#{last}.0" if first.kind_of?(Integer)
+ last = self.index(last.to_s + ' + 1 lines linestart')
+ @seltag.add(first, last)
+ end
+
+ def self.select_index
+ self.index(@seltag.first).split('.')[0].to_i
+ end
+
+ pack('fill'=>'both', 'expand'=>true)
}
f.place('relx'=>@rel_list[idx], 'y'=>0, 'anchor'=>'nw', 'width'=>1,
- 'relwidth'=>@rel_list[idx+1] - @rel_list[idx], 'relheight'=>1.0)
+ 'relwidth'=>@rel_list[idx+1] - @rel_list[idx], 'relheight'=>1.0)
# scrollbar field
f = TkFrame.new(@f_hscr, 'width'=>width)
base << f
@hscr_list << TkXScrollbar.new(f, 'width'=>@scrbar_width,
- 'borderwidth'=>@scrbar_border,
- 'highlightthickness'=>@h_l_thick
- ).pack('fill'=>'x', 'anchor'=>'w')
+ 'borderwidth'=>@scrbar_border,
+ 'highlightthickness'=>@h_l_thick
+ ).pack('fill'=>'x', 'anchor'=>'w')
f.place('relx'=>@rel_list[idx], 'y'=>0, 'anchor'=>'nw', 'width'=>1,
- 'relwidth'=>@rel_list[idx+1] - @rel_list[idx])
+ 'relwidth'=>@rel_list[idx+1] - @rel_list[idx])
@lbox_list[idx].xscrollbar(@hscr_list[idx])
@@ -172,12 +172,12 @@ class TkMultiColumnList < TkText
# pad
@f_title_pad = TkFrame.new(@frame, 'relief'=>'raised',
- 'borderwidth'=>@title_border,
- 'highlightthickness'=>@h_l_thick)
+ 'borderwidth'=>@title_border,
+ 'highlightthickness'=>@h_l_thick)
@f_scr_pad = TkFrame.new(@frame, 'relief'=>'sunken',
- 'borderwidth'=>1,
- 'highlightthickness'=>@h_l_thick)
+ 'borderwidth'=>1,
+ 'highlightthickness'=>@h_l_thick)
# height check
title_height = 0
@@ -205,27 +205,27 @@ class TkMultiColumnList < TkText
# binding for listboxes
@lbox_list.each_with_index{|l, idx|
l.bind('Button-1', proc{|w, y|
- @frame.focus
- select_line(w, w.nearest(y))
- }, '%W %y')
+ @frame.focus
+ select_line(w, w.nearest(y))
+ }, '%W %y')
l.bind('B1-Motion', proc{|w, y|
- select_line(w, w.nearest(y))
- }, '%W %y')
+ select_line(w, w.nearest(y))
+ }, '%W %y')
l.bind('Double-Button-1', proc{
- @command.call(get_select) if @command
- })
+ @command.call(get_select) if @command
+ })
l.bind('Control-Home', proc{|w| select_line(w, 0)}, '%W')
l.bind('Control-End', proc{|w| select_line(w, 'end')}, '%W')
l.bind('Button-2', proc{|x, y|
- @lbox_mark_x = x
- @lbox_list.each{|lbox| lbox.scan_mark(x, y)}
- }, '%x %y')
+ @lbox_mark_x = x
+ @lbox_list.each{|lbox| lbox.scan_mark(x, y)}
+ }, '%x %y')
l.bind('B2-Motion', proc{|x, y|
- @lbox_list.each{|lbox| lbox.scan_dragto(@lbox_mark_x, y)}
- l.scan_dragto(x, y)
- }, '%x %y')
+ @lbox_list.each{|lbox| lbox.scan_dragto(@lbox_mark_x, y)}
+ l.scan_dragto(x, y)
+ }, '%x %y')
}
bbox = @w_title.bbox
@@ -266,8 +266,8 @@ class TkMultiColumnList < TkText
# binding for 'Configure' event
@c_lbox.bind('Configure',
- proc{|height, width| reconstruct(height, width)},
- '%h %w')
+ proc{|height, width| reconstruct(height, width)},
+ '%h %w')
# set default receiver of method calls
@path = @frame.path
@@ -433,9 +433,9 @@ class TkMultiColumnList < TkText
def delete(*idx)
idx = idx.collect{|i|
if i.kind_of?(Integer)
- "#{i}.0"
+ "#{i}.0"
else
- i.to_s
+ i.to_s
end
}
@lbox_list.collect{|lbox| lbox.delete(*idx)}
@@ -444,30 +444,30 @@ class TkMultiColumnList < TkText
def get(idx_s, idx_e=nil)
unless idx_e
if idx_s.kind_of?(Integer)
- idx_s = "#{idx_s}.0"
- idx_e = "#{idx_s} lineend"
+ idx_s = "#{idx_s}.0"
+ idx_e = "#{idx_s} lineend"
else
- idx_s = idx_s.to_s
- idx_e = "#{idx_s} lineend"
+ idx_s = idx_s.to_s
+ idx_e = "#{idx_s} lineend"
end
@lbox_list.collect{|lbox|
- lbox.get(idx_s, idx_e)
+ lbox.get(idx_s, idx_e)
}
else
if idx_s.kind_of?(Integer)
- idx_s = "#{idx_s}.0"
+ idx_s = "#{idx_s}.0"
else
- idx_s = idx_s.to_s
+ idx_s = idx_s.to_s
end
if idx_e.kind_of?(Integer)
- idx_e = "#{idx_e}.end"
+ idx_e = "#{idx_e}.end"
else
- idx_e = "#{idx_e} lineend"
+ idx_e = "#{idx_e} lineend"
end
list = @lbox_list.collect{|lbox| lbox.get(idx_s, idx_e).split(/\n/)}
result = []
list[0].each_with_index{|line, index|
- result << list.collect{|lines| lines[index]}
+ result << list.collect{|lines| lines[index]}
}
result
end
@@ -481,9 +481,9 @@ class TkMultiColumnList < TkText
result = {}
@name_index.each_pair{|label, indices|
if indices.size == 1
- result[label] = line[indices[0]]
+ result[label] = line[indices[0]]
else
- result[label] = indices.collect{|index| line[index]}
+ result[label] = indices.collect{|index| line[index]}
end
}
result
@@ -517,31 +517,31 @@ class TkMultiColumnList < TkText
lines.each{|line|
if line.kind_of? Hash
- array = []
- @name_index.each_pair{|label, indices|
- if indices.size == 1
- array[indices[0]] = line[label]
- else
- if line[label].kind_of? Array
- indices.each_with_index{|index, num|
- array[index] = line[label][num]
- }
- else
- array[indices[0]] = line[label]
- end
- end
- }
- line = array
+ array = []
+ @name_index.each_pair{|label, indices|
+ if indices.size == 1
+ array[indices[0]] = line[label]
+ else
+ if line[label].kind_of? Array
+ indices.each_with_index{|index, num|
+ array[index] = line[label][num]
+ }
+ else
+ array[indices[0]] = line[label]
+ end
+ end
+ }
+ line = array
end
@name_index.each_pair{|label, indices|
- if indices.size == 1
- lbox_ins[indices[0]] << line[indices[0]]
- else
- indices.each{|index| lbox_ins[index] << line[index]}
- end
+ if indices.size == 1
+ lbox_ins[indices[0]] << line[indices[0]]
+ else
+ indices.each{|index| lbox_ins[index] << line[index]}
+ end
}
- }
+ }
@lbox_list.each_with_index{|lbox, index|
lbox.insert(idx, cr + lbox_ins[index].join("\n")) if lbox_ins[index]
@@ -582,7 +582,7 @@ class TkMultiColumnList < TkText
title, lbox, hscr = @base_list[idx]
title.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx])
lbox.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relheight'=>1.0)
+ 'relheight'=>1.0)
hscr.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx])
}
end
@@ -609,11 +609,11 @@ class TkMultiColumnList < TkText
# adjustment of rightside widget of the sash
title, lbox, hscr = @base_list[idx]
title.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relx'=>@rel_list[idx])
+ 'relx'=>@rel_list[idx])
lbox.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relx'=>@rel_list[idx], 'relheight'=>1.0)
+ 'relx'=>@rel_list[idx], 'relheight'=>1.0)
hscr.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relx'=>@rel_list[idx])
+ 'relx'=>@rel_list[idx])
# update reference position
@x = x
@@ -637,34 +637,34 @@ class TkMultiColumnList < TkText
def title_binding(title, index)
title.bind('Motion', proc{|w, x, idx| motion_cb(w, x, idx.to_i)},
- "%W %x #{index}")
+ "%W %x #{index}")
title.bind('Enter', proc{|w, x, idx| motion_cb(w, x, idx.to_i)},
- "%W %x #{index}")
+ "%W %x #{index}")
title.bind('Leave', proc{|w| w.cursor ""}, "%W")
title.bind('Button-1',
- proc{|w, x|
- if @mode == :sash
- @x = x
- @frame_width = TkWinfo.width(@f_title).to_f
- else
- title.relief 'sunken'
- end
- },
- '%W %X')
+ proc{|w, x|
+ if @mode == :sash
+ @x = x
+ @frame_width = TkWinfo.width(@f_title).to_f
+ else
+ title.relief 'sunken'
+ end
+ },
+ '%W %X')
title.bind('ButtonRelease-1',
- proc{|w, x, idx|
- i = idx.to_i
- if @mode == :title && @title_cmd[i].kind_of?(Proc)
- @title_cmd[i].call
- end
- title.relief 'raised'
- motion_cb(w,x,i)
- },
- "%W %x #{index}")
+ proc{|w, x, idx|
+ i = idx.to_i
+ if @mode == :title && @title_cmd[i].kind_of?(Proc)
+ @title_cmd[i].call
+ end
+ title.relief 'raised'
+ motion_cb(w,x,i)
+ },
+ "%W %x #{index}")
title.bind('B1-Motion', proc{|x| resize(x) if @mode == :sash}, "%X")
end
@@ -706,21 +706,21 @@ end
################################################
if __FILE__ == $0
l = TkMultiColumnList.new(nil, 200,
- [ ['L1', 200, proc{p 'click L1'}],
- ['L2', 100],
- ['L3', 200] ],
- 'width'=>350,
- #'titleforeground'=>'yellow',
- 'titleforeground'=>'white',
- #'titlebackground'=>'navy',
- 'titlebackground'=>'blue',
- 'titlefont'=>'courier'
- ).pack('fill'=>'both', 'expand'=>true)
+ [ ['L1', 200, proc{p 'click L1'}],
+ ['L2', 100],
+ ['L3', 200] ],
+ 'width'=>350,
+ #'titleforeground'=>'yellow',
+ 'titleforeground'=>'white',
+ #'titlebackground'=>'navy',
+ 'titlebackground'=>'blue',
+ 'titlefont'=>'courier'
+ ).pack('fill'=>'both', 'expand'=>true)
l.insert('end', [1,2,3])
l.insert('end', [4,5,6])
l.insert('end', [4,5,6], [4,5,6])
l.insert('end', ['aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
- 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',
+ 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',
'cccccccccccccccccccccccccccccccccccccccccccccccccccc'])
l.insert('end', [1,2,3])
l.insert('end', [4,5,6], [4,5,6])
diff --git a/ext/tk/sample/tkmultilistbox.rb b/ext/tk/sample/tkmultilistbox.rb
index c3787a0cf0..6f956d0edb 100644
--- a/ext/tk/sample/tkmultilistbox.rb
+++ b/ext/tk/sample/tkmultilistbox.rb
@@ -36,10 +36,10 @@ class TkMultiListbox < TkListbox
# create base flames
@f_title = TkFrame.new(@frame, 'width'=>@width_total)
@f_lbox = TkFrame.new(@frame,
- 'width'=>@width_total, 'height'=>lbox_height)
+ 'width'=>@width_total, 'height'=>lbox_height)
@f_hscr = TkFrame.new(@frame, 'width'=>@width_total,
- 'height'=>@v_scroll.cget('width') +
- 2 * @v_scroll.cget('borderwidth'))
+ 'height'=>@v_scroll.cget('width') +
+ 2 * @v_scroll.cget('borderwidth'))
# dummy label to keep the hight of title space
TkLabel.new(@f_title, 'text'=>' ').pack
@@ -50,9 +50,9 @@ class TkMultiListbox < TkListbox
title_info.each_with_index{|(label, width), idx|
# set relation between label and index
if @name_index.include?(label)
- @name_index[label] << idx
+ @name_index[label] << idx
else
- @name_index[label] = [idx]
+ @name_index[label] = [idx]
end
# calculate relative positioning
@@ -64,25 +64,25 @@ class TkMultiListbox < TkListbox
base = [f]
@title_list << TkLabel.new(f, 'text'=>label).pack('fill'=>'x')
f.place('relx'=>@rel_list[idx], 'y'=>0, 'anchor'=>'nw', 'width'=>-6,
- 'relwidth'=>@rel_list[idx+1] - @rel_list[idx])
+ 'relwidth'=>@rel_list[idx+1] - @rel_list[idx])
# listbox field
f = TkFrame.new(@f_lbox, 'width'=>width)
base << f
@lbox_list << TkListbox.new(f).pack('fill'=>'both', 'expand'=>true)
f.place('relx'=>@rel_list[idx], 'y'=>0, 'anchor'=>'nw', 'width'=>-4,
- 'relwidth'=>@rel_list[idx+1] - @rel_list[idx], 'relheight'=>1.0)
+ 'relwidth'=>@rel_list[idx+1] - @rel_list[idx], 'relheight'=>1.0)
# scrollbar field
f = TkFrame.new(@f_hscr, 'width'=>width)
base << f
@hscr_list << TkScrollbar.new(f, 'orient'=>'horizontal') .
- pack('fill'=>'x', 'anchor'=>'w')
+ pack('fill'=>'x', 'anchor'=>'w')
f.place('relx'=>@rel_list[idx], 'y'=>0, 'anchor'=>'nw', 'width'=>-4,
- 'relwidth'=>@rel_list[idx+1] - @rel_list[idx])
+ 'relwidth'=>@rel_list[idx+1] - @rel_list[idx])
@lbox_list[idx].xscrollcommand proc{|first, last|
- @hscr_list[idx].set first, last
+ @hscr_list[idx].set first, last
}
@hscr_list[idx].command proc{|*args| @lbox_list[idx].xview *args}
@@ -94,19 +94,19 @@ class TkMultiListbox < TkListbox
@tab_list = [nil]
(1..(@rel_list.size - 2)).each{|idx|
tab = TkFrame.new(@f_title, 'cursor'=>'sb_h_double_arrow',
- 'width'=>6, 'borderwidth'=>2, 'relief'=>'raised')
+ 'width'=>6, 'borderwidth'=>2, 'relief'=>'raised')
@tab_list << tab
tab.place('relx'=>@rel_list[idx], 'anchor'=>'ne', 'relheight'=>0.95)
tab.bind('Button-1',
- proc{|x| @x = x; @frame_width = TkWinfo.width(@f_title).to_f},
- '%X')
+ proc{|x| @x = x; @frame_width = TkWinfo.width(@f_title).to_f},
+ '%X')
tab.bind('B1-Motion', proc{|x, idx| resize(x, idx.to_i)}, "%X #{idx}")
}
# set control procedure for virtical scroll
@lbox_list.each{|lbox|
lbox.yscrollcommand proc{|first, last|
- @v_scroll.set first, last
+ @v_scroll.set first, last
}
}
@v_scroll.command proc{|*args| @lbox_list.each{|lbox| lbox.yview *args} }
@@ -120,18 +120,18 @@ class TkMultiListbox < TkListbox
@current_mode = 'browse'
@lbox_list.each{|l|
l.bind('Shift-Key-Left',
- proc{|w| focus_shift(w, -1); Tk.callback_break}, '%W')
+ proc{|w| focus_shift(w, -1); Tk.callback_break}, '%W')
l.bind('Shift-Key-Right',
- proc{|w| focus_shift(w, 1); Tk.callback_break}, '%W')
+ proc{|w| focus_shift(w, 1); Tk.callback_break}, '%W')
l.bind('Button-2', proc{|x, y|
- @lbox_mark_x = x
- @lbox_list.each{|lbox| lbox.scan_mark(x, y)}
- }, '%x %y')
+ @lbox_mark_x = x
+ @lbox_list.each{|lbox| lbox.scan_mark(x, y)}
+ }, '%x %y')
l.bind('B2-Motion', proc{|x, y|
- @lbox_list.each{|lbox| lbox.scan_dragto(@lbox_mark_x, y)}
- l.scan_dragto(x, y)
- }, '%x %y')
+ @lbox_list.each{|lbox| lbox.scan_dragto(@lbox_mark_x, y)}
+ l.scan_dragto(x, y)
+ }, '%x %y')
l.bindtags(l.bindtags.unshift(@mode[@current_mode]))
}
@@ -242,7 +242,7 @@ class TkMultiListbox < TkListbox
list = @lbox_list.collect{|lbox| lbox.get(*idx)}
result = []
list[0].each_with_index{|line, index|
- result << list.collect{|lines| lines[index]}
+ result << list.collect{|lines| lines[index]}
}
result
end
@@ -252,9 +252,9 @@ class TkMultiListbox < TkListbox
result = {}
@name_index.each_pair{|label, indices|
if indices.size == 1
- result[label] = line[indices[0]]
+ result[label] = line[indices[0]]
else
- result[label] = indices.collect{|index| line[index]}
+ result[label] = indices.collect{|index| line[index]}
end
}
result
@@ -276,31 +276,31 @@ class TkMultiListbox < TkListbox
lines.each{|line|
if line.kind_of? Hash
- array = []
- @name_index.each_pair{|label, indices|
- if indices.size == 1
- array[indices[0]] = line[label]
- else
- if line[label].kind_of? Array
- indices.each_with_index{|index, num|
- array[index] = line[label][num]
- }
- else
- array[indices[0]] = line[label]
- end
- end
- }
- line = array
+ array = []
+ @name_index.each_pair{|label, indices|
+ if indices.size == 1
+ array[indices[0]] = line[label]
+ else
+ if line[label].kind_of? Array
+ indices.each_with_index{|index, num|
+ array[index] = line[label][num]
+ }
+ else
+ array[indices[0]] = line[label]
+ end
+ end
+ }
+ line = array
end
@name_index.each_pair{|label, indices|
- if indices.size == 1
- lbox_ins[indices[0]] << line[indices[0]]
- else
- indices.each{|index| lbox_ins[index] << line[index]}
- end
+ if indices.size == 1
+ lbox_ins[indices[0]] << line[indices[0]]
+ else
+ indices.each{|index| lbox_ins[index] << line[index]}
+ end
}
- }
+ }
@lbox_list.each_with_index{|lbox, index|
lbox.insert(idx, *lbox_ins[index]) if lbox_ins[index]
@@ -327,7 +327,7 @@ class TkMultiListbox < TkListbox
title, lbox, hscr = @base_list[idx]
title.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx])
lbox.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relheight'=>1.0)
+ 'relheight'=>1.0)
hscr.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx])
tab = @tab_list[idx]
@@ -357,11 +357,11 @@ class TkMultiListbox < TkListbox
# adjustment of rightside widget of the tab
title, lbox, hscr = @base_list[idx]
title.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relx'=>@rel_list[idx])
+ 'relx'=>@rel_list[idx])
lbox.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relx'=>@rel_list[idx], 'relheight'=>1.0)
+ 'relx'=>@rel_list[idx], 'relheight'=>1.0)
hscr.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relx'=>@rel_list[idx])
+ 'relx'=>@rel_list[idx])
# update reference position
@x = x
@@ -371,11 +371,11 @@ class TkMultiListbox < TkListbox
def browse_mode_bindtag
t = TkBindTag.new
t.bind('Button-1',
- proc{|w, y| w.focus; select_line(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| w.focus; select_line(w, w.nearest(y))}, '%W %y')
t.bind('B1-Motion', proc{|w, y| select_line(w, w.nearest(y))}, '%W %y')
t.bind('Shift-Button-1',
- proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
t.bind('Key-Up', proc{|w| select_shift(w, -1)}, '%W')
t.bind('Key-Down', proc{|w| select_shift(w, 1)}, '%W')
@@ -386,7 +386,7 @@ class TkMultiListbox < TkListbox
t.bind('space', proc{|w| select_line(w, w.index('active').to_i)}, '%W')
t.bind('Select', proc{|w| select_line(w, w.index('active').to_i)}, '%W')
t.bind('Control-slash',
- proc{|w| select_line(w, w.index('active').to_i)}, '%W')
+ proc{|w| select_line(w, w.index('active').to_i)}, '%W')
t
end
@@ -395,12 +395,12 @@ class TkMultiListbox < TkListbox
def single_mode_bindtag
t = TkBindTag.new
t.bind('Button-1',
- proc{|w, y| w.focus; select_only(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| w.focus; select_only(w, w.nearest(y))}, '%W %y')
t.bind('ButtonRelease-1',
- proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
t.bind('Shift-Button-1',
- proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
t.bind('Key-Up', proc{|w| select_shift(w, -1)}, '%W')
t.bind('Key-Down', proc{|w| select_shift(w, 1)}, '%W')
@@ -411,9 +411,9 @@ class TkMultiListbox < TkListbox
t.bind('space', proc{|w| select_line(w, w.index('active').to_i)}, '%W')
t.bind('Select', proc{|w| select_line(w, w.index('active').to_i)}, '%W')
t.bind('Control-slash',
- proc{|w| select_line(w, w.index('active').to_i)}, '%W')
+ proc{|w| select_line(w, w.index('active').to_i)}, '%W')
t.bind('Control-backslash',
- proc{@lbox_list.each{|l| l.selection_clear(0, 'end')}})
+ proc{@lbox_list.each{|l| l.selection_clear(0, 'end')}})
t
end
@@ -422,22 +422,22 @@ class TkMultiListbox < TkListbox
def extended_mode_bindtag
t = TkBindTag.new
t.bind('Button-1',
- proc{|w, y| w.focus; select_only(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| w.focus; select_only(w, w.nearest(y))}, '%W %y')
t.bind('B1-Motion', proc{|w, y| select_range(w, w.nearest(y))}, '%W %y')
t.bind('ButtonRelease-1',
- proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
t.bind('Shift-Button-1',
- proc{|w, y| select_range(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| select_range(w, w.nearest(y))}, '%W %y')
t.bind('Shift-B1-Motion',
- proc{|w, y| select_range(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| select_range(w, w.nearest(y))}, '%W %y')
t.bind('Control-Button-1',
- proc{|w, y| select_toggle(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| select_toggle(w, w.nearest(y))}, '%W %y')
t.bind('Control-B1-Motion',
- proc{|w, y| select_drag(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| select_drag(w, w.nearest(y))}, '%W %y')
t.bind('Key-Up', proc{|w| active_shift(w, -1)}, '%W')
t.bind('Key-Down', proc{|w| active_shift(w, 1)}, '%W')
@@ -463,9 +463,9 @@ class TkMultiListbox < TkListbox
def multiple_mode_bindtag
t = TkBindTag.new
t.bind('Button-1',
- proc{|w, y| w.focus; select_line3(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| w.focus; select_line3(w, w.nearest(y))}, '%W %y')
t.bind('ButtonRelease-1',
- proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
t.bind('Key-Up', proc{|w| active_shift(w, -1)}, '%W')
t.bind('Key-Down', proc{|w| active_shift(w, 1)}, '%W')
@@ -509,9 +509,9 @@ class TkMultiListbox < TkListbox
@lbox_list.each{|l|
l.selection_anchor(idx)
if st == 1
- l.selection_clear(idx)
+ l.selection_clear(idx)
else
- l.selection_set(idx)
+ l.selection_set(idx)
end
}
end
@@ -520,9 +520,9 @@ class TkMultiListbox < TkListbox
st = w.selection_includes('anchor')
@lbox_list.each{|l|
if st == 1
- l.selection_set('anchor', idx)
+ l.selection_set('anchor', idx)
else
- l.selection_clear('anchor', idx)
+ l.selection_clear('anchor', idx)
end
}
end
@@ -625,16 +625,16 @@ end
################################################
if __FILE__ == $0
f = TkFrame.new(nil, 'width'=>300,
- 'height'=>200).pack('fill'=>'both', 'expand'=>'true')
+ 'height'=>200).pack('fill'=>'both', 'expand'=>'true')
#f = TkFrame.new.pack('fill'=>'both', 'expand'=>'true')
l = TkMultiListbox.new(f, 150,
- [ ['L1', 100],
- ['L2', 200],
- ['L3', 50] ],
- 'titlefont'=>'courier',
- 'titleforeground'=>'yellow',
- 'titlebackground'=>'navy'
- ).pack('fill'=>'both', 'expand'=>true)
+ [ ['L1', 100],
+ ['L2', 200],
+ ['L3', 50] ],
+ 'titlefont'=>'courier',
+ 'titleforeground'=>'yellow',
+ 'titlebackground'=>'navy'
+ ).pack('fill'=>'both', 'expand'=>true)
l.insert('end', [1,2,3])
l.insert('end', [4,5,6])
l.insert('end', [4,5,6], [4,5,6])
diff --git a/ext/tk/sample/tkmultilistframe.rb b/ext/tk/sample/tkmultilistframe.rb
index dac1df5513..ef1a0a824d 100644
--- a/ext/tk/sample/tkmultilistframe.rb
+++ b/ext/tk/sample/tkmultilistframe.rb
@@ -55,37 +55,37 @@ class TkMultiListFrame < TkListbox
# virtical scrollbar
=begin
@v_scroll = TkScrollbar.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'borderwidth'=>@scrbar_border,
- 'orient'=>'vertical', 'width'=>@scrbar_width)
+ 'borderwidth'=>@scrbar_border,
+ 'orient'=>'vertical', 'width'=>@scrbar_width)
=end
@v_scroll = TkYScrollbar.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'borderwidth'=>@scrbar_border,
- 'width'=>@scrbar_width)
+ 'borderwidth'=>@scrbar_border,
+ 'width'=>@scrbar_width)
# horizontal scrollbar
=begin
@h_scroll = TkScrollbar.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'borderwidth'=>@scrbar_border,
- 'orient'=>'horizontal', 'width'=>@scrbar_width)
+ 'borderwidth'=>@scrbar_border,
+ 'orient'=>'horizontal', 'width'=>@scrbar_width)
=end
@h_scroll = TkXScrollbar.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'borderwidth'=>@scrbar_border,
- 'width'=>@scrbar_width)
+ 'borderwidth'=>@scrbar_border,
+ 'width'=>@scrbar_width)
# create base flames
@c_title = TkCanvas.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'width'=>@window_width)
+ 'width'=>@window_width)
@f_title = TkFrame.new(@c_title, 'width'=>@width_total)
@w_title = TkcWindow.new(@c_title, 0, 0,
- 'window'=>@f_title, 'anchor'=>'nw')
+ 'window'=>@f_title, 'anchor'=>'nw')
@c_lbox = TkCanvas.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'width'=>@window_width)
+ 'width'=>@window_width)
@f_lbox = TkFrame.new(@c_lbox, 'width'=>@width_total)
@w_lbox = TkcWindow.new(@c_lbox, 0, 0, 'window'=>@f_lbox, 'anchor'=>'nw')
@c_hscr = TkCanvas.new(@frame, 'highlightthickness'=>@h_l_thick,
- 'width'=>@window_width)
+ 'width'=>@window_width)
@f_hscr = TkFrame.new(@c_hscr, 'width'=>@width_total)
@w_hscr = TkcWindow.new(@c_hscr, 0, 0, 'window'=>@f_hscr, 'anchor'=>'nw')
@@ -95,9 +95,9 @@ class TkMultiListFrame < TkListbox
title_info.each_with_index{|(label, width), idx|
# set relation between label and index
if @name_index.include?(label)
- @name_index[label] << idx
+ @name_index[label] << idx
else
- @name_index[label] = [idx]
+ @name_index[label] = [idx]
end
# calculate relative positioning
@@ -109,45 +109,45 @@ class TkMultiListFrame < TkListbox
base = [f]
title = TkLabel.new(f, 'text'=>label, 'borderwidth'=>@title_border,
- 'relief'=>'raised', 'highlightthickness'=>@h_l_thick)
+ 'relief'=>'raised', 'highlightthickness'=>@h_l_thick)
title_binding(title, idx)
title.pack('fill'=>'x')
@title_list << title
f.place('relx'=>@rel_list[idx], 'y'=>0, 'anchor'=>'nw', 'width'=>1,
- 'relheight'=>1.0,
- 'relwidth'=>@rel_list[idx+1] - @rel_list[idx])
+ 'relheight'=>1.0,
+ 'relwidth'=>@rel_list[idx+1] - @rel_list[idx])
# listbox field
f = TkFrame.new(@f_lbox, 'width'=>width)
base << f
@lbox_list << TkListbox.new(f, 'highlightthickness'=>@h_l_thick,
- 'borderwidth'=>@lbox_border
- ).pack('fill'=>'both', 'expand'=>true)
+ 'borderwidth'=>@lbox_border
+ ).pack('fill'=>'both', 'expand'=>true)
f.place('relx'=>@rel_list[idx], 'y'=>0, 'anchor'=>'nw', 'width'=>1,
- 'relwidth'=>@rel_list[idx+1] - @rel_list[idx], 'relheight'=>1.0)
+ 'relwidth'=>@rel_list[idx+1] - @rel_list[idx], 'relheight'=>1.0)
# scrollbar field
f = TkFrame.new(@f_hscr, 'width'=>width)
base << f
=begin
@hscr_list << TkScrollbar.new(f, 'orient'=>'horizontal',
- 'width'=>@scrbar_width,
- 'borderwidth'=>@scrbar_border,
- 'highlightthickness'=>@h_l_thick
- ).pack('fill'=>'x', 'anchor'=>'w')
+ 'width'=>@scrbar_width,
+ 'borderwidth'=>@scrbar_border,
+ 'highlightthickness'=>@h_l_thick
+ ).pack('fill'=>'x', 'anchor'=>'w')
=end
@hscr_list << TkXScrollbar.new(f, 'width'=>@scrbar_width,
- 'borderwidth'=>@scrbar_border,
- 'highlightthickness'=>@h_l_thick
- ).pack('fill'=>'x', 'anchor'=>'w')
+ 'borderwidth'=>@scrbar_border,
+ 'highlightthickness'=>@h_l_thick
+ ).pack('fill'=>'x', 'anchor'=>'w')
f.place('relx'=>@rel_list[idx], 'y'=>0, 'anchor'=>'nw', 'width'=>1,
- 'relwidth'=>@rel_list[idx+1] - @rel_list[idx])
+ 'relwidth'=>@rel_list[idx+1] - @rel_list[idx])
=begin
@lbox_list[idx].xscrollcommand proc{|first, last|
- @hscr_list[idx].set first, last
+ @hscr_list[idx].set first, last
}
@hscr_list[idx].command proc{|*args| @lbox_list[idx].xview *args}
=end
@@ -160,12 +160,12 @@ class TkMultiListFrame < TkListbox
# pad
# @f_title_pad = TkFrame.new(@frame)
@f_title_pad = TkFrame.new(@frame, 'relief'=>'raised',
- 'borderwidth'=>@title_border,
- 'highlightthickness'=>@h_l_thick)
+ 'borderwidth'=>@title_border,
+ 'highlightthickness'=>@h_l_thick)
@f_scr_pad = TkFrame.new(@frame, 'relief'=>'sunken',
- 'borderwidth'=>1,
- 'highlightthickness'=>@h_l_thick)
+ 'borderwidth'=>1,
+ 'highlightthickness'=>@h_l_thick)
# height check
title_height = 0
@@ -188,7 +188,7 @@ class TkMultiListFrame < TkListbox
=begin
@lbox_list.each{|lbox|
lbox.yscrollcommand proc{|first, last|
- @v_scroll.set first, last
+ @v_scroll.set first, last
}
}
@v_scroll.command proc{|*args| @lbox_list.each{|lbox| lbox.yview *args} }
@@ -223,18 +223,18 @@ class TkMultiListFrame < TkListbox
@current_mode = 'browse'
@lbox_list.each_with_index{|l, idx|
l.bind('Shift-Key-Left',
- proc{|w| focus_shift(w, -1); Tk.callback_break}, '%W')
+ proc{|w| focus_shift(w, -1); Tk.callback_break}, '%W')
l.bind('Shift-Key-Right',
- proc{|w| focus_shift(w, 1); Tk.callback_break}, '%W')
+ proc{|w| focus_shift(w, 1); Tk.callback_break}, '%W')
l.bind('Button-2', proc{|x, y|
- @lbox_mark_x = x
- @lbox_list.each{|lbox| lbox.scan_mark(x, y)}
- }, '%x %y')
+ @lbox_mark_x = x
+ @lbox_list.each{|lbox| lbox.scan_mark(x, y)}
+ }, '%x %y')
l.bind('B2-Motion', proc{|x, y|
- @lbox_list.each{|lbox| lbox.scan_dragto(@lbox_mark_x, y)}
- l.scan_dragto(x, y)
- }, '%x %y')
+ @lbox_list.each{|lbox| lbox.scan_dragto(@lbox_mark_x, y)}
+ l.scan_dragto(x, y)
+ }, '%x %y')
l.bindtags(l.bindtags.unshift(@lbox_mode[@current_mode]))
}
@@ -271,8 +271,8 @@ class TkMultiListFrame < TkListbox
# binding for 'Configure' event
@c_lbox.bind('Configure',
- proc{|height, width| reconstruct(height, width)},
- '%h %w')
+ proc{|height, width| reconstruct(height, width)},
+ '%h %w')
# set default receiver of method calls
@path = @lbox_list[0].path
@@ -458,7 +458,7 @@ class TkMultiListFrame < TkListbox
list = @lbox_list.collect{|lbox| lbox.get(*idx)}
result = []
list[0].each_with_index{|line, index|
- result << list.collect{|lines| lines[index]}
+ result << list.collect{|lines| lines[index]}
}
result
end
@@ -468,9 +468,9 @@ class TkMultiListFrame < TkListbox
result = {}
@name_index.each_pair{|label, indices|
if indices.size == 1
- result[label] = line[indices[0]]
+ result[label] = line[indices[0]]
else
- result[label] = indices.collect{|index| line[index]}
+ result[label] = indices.collect{|index| line[index]}
end
}
result
@@ -492,31 +492,31 @@ class TkMultiListFrame < TkListbox
lines.each{|line|
if line.kind_of? Hash
- array = []
- @name_index.each_pair{|label, indices|
- if indices.size == 1
- array[indices[0]] = line[label]
- else
- if line[label].kind_of? Array
- indices.each_with_index{|index, num|
- array[index] = line[label][num]
- }
- else
- array[indices[0]] = line[label]
- end
- end
- }
- line = array
+ array = []
+ @name_index.each_pair{|label, indices|
+ if indices.size == 1
+ array[indices[0]] = line[label]
+ else
+ if line[label].kind_of? Array
+ indices.each_with_index{|index, num|
+ array[index] = line[label][num]
+ }
+ else
+ array[indices[0]] = line[label]
+ end
+ end
+ }
+ line = array
end
@name_index.each_pair{|label, indices|
- if indices.size == 1
- lbox_ins[indices[0]] << line[indices[0]]
- else
- indices.each{|index| lbox_ins[index] << line[index]}
- end
+ if indices.size == 1
+ lbox_ins[indices[0]] << line[indices[0]]
+ else
+ indices.each{|index| lbox_ins[index] << line[index]}
+ end
}
- }
+ }
@lbox_list.each_with_index{|lbox, index|
lbox.insert(idx, *lbox_ins[index]) if lbox_ins[index]
@@ -561,7 +561,7 @@ class TkMultiListFrame < TkListbox
title, lbox, hscr = @base_list[idx]
title.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx])
lbox.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relheight'=>1.0)
+ 'relheight'=>1.0)
hscr.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx])
}
end
@@ -588,11 +588,11 @@ class TkMultiListFrame < TkListbox
# adjustment of rightside widget of the sash
title, lbox, hscr = @base_list[idx]
title.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relx'=>@rel_list[idx])
+ 'relx'=>@rel_list[idx])
lbox.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relx'=>@rel_list[idx], 'relheight'=>1.0)
+ 'relx'=>@rel_list[idx], 'relheight'=>1.0)
hscr.place('relwidth'=>@rel_list[idx+1] - @rel_list[idx],
- 'relx'=>@rel_list[idx])
+ 'relx'=>@rel_list[idx])
# update reference position
@x = x
@@ -616,34 +616,34 @@ class TkMultiListFrame < TkListbox
def title_binding(title, index)
title.bind('Motion', proc{|w, x, idx| motion_cb(w, x, idx.to_i)},
- "%W %x #{index}")
+ "%W %x #{index}")
title.bind('Enter', proc{|w, x, idx| motion_cb(w, x, idx.to_i)},
- "%W %x #{index}")
+ "%W %x #{index}")
title.bind('Leave', proc{|w| w.cursor ""}, "%W")
title.bind('Button-1',
- proc{|w, x|
- if @mode == :sash
- @x = x
- @frame_width = TkWinfo.width(@f_title).to_f
- else
- title.relief 'sunken'
- end
- },
- '%W %X')
+ proc{|w, x|
+ if @mode == :sash
+ @x = x
+ @frame_width = TkWinfo.width(@f_title).to_f
+ else
+ title.relief 'sunken'
+ end
+ },
+ '%W %X')
title.bind('ButtonRelease-1',
- proc{|w, x, idx|
- i = idx.to_i
- if @mode == :title && @title_cmd[i].kind_of?(Proc)
- @title_cmd[i].call
- end
- title.relief 'raised'
- motion_cb(w,x,i)
- },
- "%W %x #{index}")
+ proc{|w, x, idx|
+ i = idx.to_i
+ if @mode == :title && @title_cmd[i].kind_of?(Proc)
+ @title_cmd[i].call
+ end
+ title.relief 'raised'
+ motion_cb(w,x,i)
+ },
+ "%W %x #{index}")
title.bind('B1-Motion', proc{|x| resize(x) if @mode == :sash}, "%X")
end
@@ -652,11 +652,11 @@ class TkMultiListFrame < TkListbox
def browse_mode_bindtag
t = TkBindTag.new
t.bind('Button-1',
- proc{|w, y| w.focus; select_line(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| w.focus; select_line(w, w.nearest(y))}, '%W %y')
t.bind('B1-Motion', proc{|w, y| select_line(w, w.nearest(y))}, '%W %y')
t.bind('Shift-Button-1',
- proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
t.bind('Key-Up', proc{|w| select_shift(w, -1)}, '%W')
t.bind('Key-Down', proc{|w| select_shift(w, 1)}, '%W')
@@ -667,7 +667,7 @@ class TkMultiListFrame < TkListbox
t.bind('space', proc{|w| select_line(w, w.index('active').to_i)}, '%W')
t.bind('Select', proc{|w| select_line(w, w.index('active').to_i)}, '%W')
t.bind('Control-slash',
- proc{|w| select_line(w, w.index('active').to_i)}, '%W')
+ proc{|w| select_line(w, w.index('active').to_i)}, '%W')
t
end
@@ -676,12 +676,12 @@ class TkMultiListFrame < TkListbox
def single_mode_bindtag
t = TkBindTag.new
t.bind('Button-1',
- proc{|w, y| w.focus; select_only(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| w.focus; select_only(w, w.nearest(y))}, '%W %y')
t.bind('ButtonRelease-1',
- proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
t.bind('Shift-Button-1',
- proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
t.bind('Key-Up', proc{|w| select_shift(w, -1)}, '%W')
t.bind('Key-Down', proc{|w| select_shift(w, 1)}, '%W')
@@ -692,9 +692,9 @@ class TkMultiListFrame < TkListbox
t.bind('space', proc{|w| select_line(w, w.index('active').to_i)}, '%W')
t.bind('Select', proc{|w| select_line(w, w.index('active').to_i)}, '%W')
t.bind('Control-slash',
- proc{|w| select_line(w, w.index('active').to_i)}, '%W')
+ proc{|w| select_line(w, w.index('active').to_i)}, '%W')
t.bind('Control-backslash',
- proc{@lbox_list.each{|l| l.selection_clear(0, 'end')}})
+ proc{@lbox_list.each{|l| l.selection_clear(0, 'end')}})
t
end
@@ -703,22 +703,22 @@ class TkMultiListFrame < TkListbox
def extended_mode_bindtag
t = TkBindTag.new
t.bind('Button-1',
- proc{|w, y| w.focus; select_only(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| w.focus; select_only(w, w.nearest(y))}, '%W %y')
t.bind('B1-Motion', proc{|w, y| select_range(w, w.nearest(y))}, '%W %y')
t.bind('ButtonRelease-1',
- proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
t.bind('Shift-Button-1',
- proc{|w, y| select_range(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| select_range(w, w.nearest(y))}, '%W %y')
t.bind('Shift-B1-Motion',
- proc{|w, y| select_range(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| select_range(w, w.nearest(y))}, '%W %y')
t.bind('Control-Button-1',
- proc{|w, y| select_toggle(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| select_toggle(w, w.nearest(y))}, '%W %y')
t.bind('Control-B1-Motion',
- proc{|w, y| select_drag(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| select_drag(w, w.nearest(y))}, '%W %y')
t.bind('Key-Up', proc{|w| active_shift(w, -1)}, '%W')
t.bind('Key-Down', proc{|w| active_shift(w, 1)}, '%W')
@@ -744,9 +744,9 @@ class TkMultiListFrame < TkListbox
def multiple_mode_bindtag
t = TkBindTag.new
t.bind('Button-1',
- proc{|w, y| w.focus; select_line3(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| w.focus; select_line3(w, w.nearest(y))}, '%W %y')
t.bind('ButtonRelease-1',
- proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
+ proc{|w, y| active_line(w, w.nearest(y))}, '%W %y')
t.bind('Key-Up', proc{|w| active_shift(w, -1)}, '%W')
t.bind('Key-Down', proc{|w| active_shift(w, 1)}, '%W')
@@ -790,9 +790,9 @@ class TkMultiListFrame < TkListbox
@lbox_list.each{|l|
l.selection_anchor(idx)
if st == 1
- l.selection_clear(idx)
+ l.selection_clear(idx)
else
- l.selection_set(idx)
+ l.selection_set(idx)
end
}
end
@@ -801,9 +801,9 @@ class TkMultiListFrame < TkListbox
st = w.selection_includes('anchor')
@lbox_list.each{|l|
if st == 1
- l.selection_set('anchor', idx)
+ l.selection_set('anchor', idx)
else
- l.selection_clear('anchor', idx)
+ l.selection_clear('anchor', idx)
end
}
end
@@ -906,21 +906,21 @@ end
################################################
if __FILE__ == $0
l = TkMultiListFrame.new(nil, 200,
- [ ['L1', 200, proc{p 'click L1'}],
- ['L2', 100],
- ['L3', 200] ],
- 'width'=>350,
- #'titleforeground'=>'yellow',
- 'titleforeground'=>'white',
- #'titlebackground'=>'navy',
- 'titlebackground'=>'blue',
- 'titlefont'=>'courier'
- ).pack('fill'=>'both', 'expand'=>true)
+ [ ['L1', 200, proc{p 'click L1'}],
+ ['L2', 100],
+ ['L3', 200] ],
+ 'width'=>350,
+ #'titleforeground'=>'yellow',
+ 'titleforeground'=>'white',
+ #'titlebackground'=>'navy',
+ 'titlebackground'=>'blue',
+ 'titlefont'=>'courier'
+ ).pack('fill'=>'both', 'expand'=>true)
l.insert('end', [1,2,3])
l.insert('end', [4,5,6])
l.insert('end', [4,5,6], [4,5,6])
l.insert('end', ['aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
- 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',
+ 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',
'cccccccccccccccccccccccccccccccccccccccccccccccccccc'])
l.insert('end', [1,2,3])
l.insert('end', [4,5,6], [4,5,6])
diff --git a/ext/tk/sample/tkoptdb-safeTk.rb b/ext/tk/sample/tkoptdb-safeTk.rb
index 4b0816d304..a06098323f 100644
--- a/ext/tk/sample/tkoptdb-safeTk.rb
+++ b/ext/tk/sample/tkoptdb-safeTk.rb
@@ -19,12 +19,12 @@ EOM
if ENV['LANG'] =~ /^ja/
# read Japanese resource
ent = TkOptionDB.read_entries(File.expand_path('resource.ja',
- File.dirname(__FILE__)),
- 'euc-jp')
+ File.dirname(__FILE__)),
+ 'euc-jp')
else
# read English resource
ent = TkOptionDB.read_entries(File.expand_path('resource.en',
- File.dirname(__FILE__)))
+ File.dirname(__FILE__)))
end
file = File.expand_path('tkoptdb.rb', File.dirname(__FILE__))
diff --git a/ext/tk/sample/tkoptdb.rb b/ext/tk/sample/tkoptdb.rb
index 897701c222..47784ea238 100644
--- a/ext/tk/sample/tkoptdb.rb
+++ b/ext/tk/sample/tkoptdb.rb
@@ -12,12 +12,12 @@ if __FILE__ == $0 || !TkCore::INTERP.safe?
if ENV['LANG'] =~ /^ja/
# read Japanese resource
TkOptionDB.read_with_encoding(File.expand_path('resource.ja',
- File.dirname(__FILE__)),
- 'euc-jp')
+ File.dirname(__FILE__)),
+ 'euc-jp')
else
# read English resource
TkOptionDB.readfile(File.expand_path('resource.en',
- File.dirname(__FILE__)))
+ File.dirname(__FILE__)))
end
end
@@ -49,12 +49,12 @@ TkFrame.new(:class=>'BtnFrame'){|f|
pack(:fill=>:x, :padx=>10, :pady=>10)
}
TkButton.new(:command=>proc{
- print "($SAFE=#{$SAFE} >>>) : "
- cmd.bye_msg
- print "(<<< $SAFE=#{$SAFE} ) : "
- exit
- },
- :parent=>f, :widgetname=>'quit'){
+ print "($SAFE=#{$SAFE} >>>) : "
+ cmd.bye_msg
+ print "(<<< $SAFE=#{$SAFE} ) : "
+ exit
+ },
+ :parent=>f, :widgetname=>'quit'){
pack(:fill=>:x, :padx=>10, :pady=>10)
}
}
@@ -71,12 +71,12 @@ BtnFrame.new{|f|
pack(:fill=>:x, :padx=>10, :pady=>10)
}
TkButton.new(:command=>proc{
- print "($SAFE=#{$SAFE} >>>) : "
- cmd.bye_msg
- print "(<<< $SAFE=#{$SAFE})"
- exit
- },
- :parent=>f, :widgetname=>'quit'){
+ print "($SAFE=#{$SAFE} >>>) : "
+ cmd.bye_msg
+ print "(<<< $SAFE=#{$SAFE})"
+ exit
+ },
+ :parent=>f, :widgetname=>'quit'){
pack(:fill=>:x, :padx=>10, :pady=>10)
}
}
@@ -93,12 +93,12 @@ TkFrame.new(:class=>'BtnFrame2'){|f|
pack(:fill=>:x, :padx=>10, :pady=>10)
}
TkButton.new(:command=>proc{
- print "($SAFE=#{$SAFE} >>>) : "
- cmd.bye_msg
- print "(<<< $SAFE=#{$SAFE})"
- exit
- },
- :parent=>f, :widgetname=>'quit'){
+ print "($SAFE=#{$SAFE} >>>) : "
+ cmd.bye_msg
+ print "(<<< $SAFE=#{$SAFE})"
+ exit
+ },
+ :parent=>f, :widgetname=>'quit'){
pack(:fill=>:x, :padx=>10, :pady=>10)
}
}
diff --git a/ext/tk/sample/tktextframe.rb b/ext/tk/sample/tktextframe.rb
index 72bc7c1876..bdab057d34 100644
--- a/ext/tk/sample/tktextframe.rb
+++ b/ext/tk/sample/tktextframe.rb
@@ -147,16 +147,16 @@ if __FILE__ == $0
f = TkFrame.new.pack('fill'=>'x')
#t = TkTextFrame.new.pack
t = TkTextFrame.new(:textborderwidth=>3,
- :textrelief=>:ridge,
- :scrollbarrelief=>:ridge).pack
+ :textrelief=>:ridge,
+ :scrollbarrelief=>:ridge).pack
p t.configinfo
TkButton.new(f, 'text'=>'vscr OFF',
- 'command'=>proc{t.vscroll(false)}).pack('side'=>'right')
+ 'command'=>proc{t.vscroll(false)}).pack('side'=>'right')
TkButton.new(f, 'text'=>'vscr ON',
- 'command'=>proc{t.vscroll(true)}).pack('side'=>'right')
+ 'command'=>proc{t.vscroll(true)}).pack('side'=>'right')
TkButton.new(f, 'text'=>'hscr ON',
- 'command'=>proc{t.hscroll(true)}).pack('side'=>'left')
+ 'command'=>proc{t.hscroll(true)}).pack('side'=>'left')
TkButton.new(f, 'text'=>'hscr OFF',
- 'command'=>proc{t.hscroll(false)}).pack('side'=>'left')
+ 'command'=>proc{t.hscroll(false)}).pack('side'=>'left')
Tk.mainloop
end
diff --git a/ext/tk/sample/tktree.rb b/ext/tk/sample/tktree.rb
index bcb94d3601..d16d3344bd 100644
--- a/ext/tk/sample/tktree.rb
+++ b/ext/tk/sample/tktree.rb
@@ -80,14 +80,14 @@ EOL
items.each{|item|
tr1.newitem(item,
- :command=>proc{Tk.messageBox(:message=>"#{item} executed")})
+ :command=>proc{Tk.messageBox(:message=>"#{item} executed")})
}
f = TkFrame.new.pack(:expand=>true, :fill=>:both)
tr2 = TkTree.new(f, :bg=>'black', #:itemfont=>{:family=>'Times', :size=>14},
- :textcolor=>'red', :bd=>4, :relief=>:ridge,
- :selectbackground=>'darkBlue', :selectforeground=>'yellow',
- :selectborderwidth=>3, :linecolor=>'yellow') {
+ :textcolor=>'red', :bd=>4, :relief=>:ridge,
+ :selectbackground=>'darkBlue', :selectforeground=>'yellow',
+ :selectborderwidth=>3, :linecolor=>'yellow') {
yscrollbar(TkScrollbar.new(f, :width=>10).pack(:side=>:right, :fill=>:y))
xscrollbar(TkScrollbar.new(f, :width=>10).pack(:side=>:bottom, :fill=>:x))
pack(:expand=>true, :fill=>:both)
@@ -95,8 +95,8 @@ EOL
items.each{|item|
tr2.newitem(item, :textcolor=>'green', :image=>'',
- :itemfont=>{:family=>'Times', :size=>10},
- :command=>proc{Tk.messageBox(:message=>"#{item} executed")})
+ :itemfont=>{:family=>'Times', :size=>10},
+ :command=>proc{Tk.messageBox(:message=>"#{item} executed")})
}
Tk.mainloop