summaryrefslogtreecommitdiff
path: root/ext/tk/sample/demos-jp
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
commit287a34ae0dfc23e4158f67cb7783d239f202c368 (patch)
tree5e35d5b41aae961b37cf6632f60c42f51c7aa775 /ext/tk/sample/demos-jp
parent9b52ae2e6491bb5d6c59e1799449f6268baf6f89 (diff)
* {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/demos-jp')
-rw-r--r--ext/tk/sample/demos-jp/anilabel.rb14
-rw-r--r--ext/tk/sample/demos-jp/aniwave.rb10
-rw-r--r--ext/tk/sample/demos-jp/arrow.rb62
-rw-r--r--ext/tk/sample/demos-jp/bind.rb26
-rw-r--r--ext/tk/sample/demos-jp/bitmap.rb6
-rw-r--r--ext/tk/sample/demos-jp/button.rb2
-rw-r--r--ext/tk/sample/demos-jp/check.rb4
-rw-r--r--ext/tk/sample/demos-jp/check2.rb34
-rw-r--r--ext/tk/sample/demos-jp/clrpick.rb6
-rw-r--r--ext/tk/sample/demos-jp/colors.rb2
-rw-r--r--ext/tk/sample/demos-jp/combo.rb40
-rw-r--r--ext/tk/sample/demos-jp/cscroll.rb24
-rw-r--r--ext/tk/sample/demos-jp/ctext.rb38
-rw-r--r--ext/tk/sample/demos-jp/entry1.rb2
-rw-r--r--ext/tk/sample/demos-jp/entry2.rb2
-rw-r--r--ext/tk/sample/demos-jp/entry3.rb36
-rw-r--r--ext/tk/sample/demos-jp/filebox.rb32
-rw-r--r--ext/tk/sample/demos-jp/floor.rb546
-rw-r--r--ext/tk/sample/demos-jp/floor2.rb546
-rw-r--r--ext/tk/sample/demos-jp/form.rb2
-rw-r--r--ext/tk/sample/demos-jp/goldberg.rb408
-rw-r--r--ext/tk/sample/demos-jp/icon.rb2
-rw-r--r--ext/tk/sample/demos-jp/image1.rb2
-rw-r--r--ext/tk/sample/demos-jp/image2.rb2
-rw-r--r--ext/tk/sample/demos-jp/image3.rb16
-rw-r--r--ext/tk/sample/demos-jp/items.rb80
-rw-r--r--ext/tk/sample/demos-jp/knightstour.rb32
-rw-r--r--ext/tk/sample/demos-jp/label.rb6
-rw-r--r--ext/tk/sample/demos-jp/labelframe.rb22
-rw-r--r--ext/tk/sample/demos-jp/mclist.rb56
-rw-r--r--ext/tk/sample/demos-jp/menu.rb48
-rw-r--r--ext/tk/sample/demos-jp/menu84.rb58
-rw-r--r--ext/tk/sample/demos-jp/menu8x.rb56
-rw-r--r--ext/tk/sample/demos-jp/menubu.rb4
-rw-r--r--ext/tk/sample/demos-jp/msgbox.rb24
-rw-r--r--ext/tk/sample/demos-jp/msgbox2.rb26
-rw-r--r--ext/tk/sample/demos-jp/paned1.rb8
-rw-r--r--ext/tk/sample/demos-jp/paned2.rb48
-rw-r--r--ext/tk/sample/demos-jp/pendulum.rb32
-rw-r--r--ext/tk/sample/demos-jp/plot.rb24
-rw-r--r--ext/tk/sample/demos-jp/puzzle.rb8
-rw-r--r--ext/tk/sample/demos-jp/radio.rb2
-rw-r--r--ext/tk/sample/demos-jp/radio2.rb28
-rw-r--r--ext/tk/sample/demos-jp/radio3.rb50
-rw-r--r--ext/tk/sample/demos-jp/ruler.rb32
-rw-r--r--ext/tk/sample/demos-jp/sayings.rb8
-rw-r--r--ext/tk/sample/demos-jp/search.rb34
-rw-r--r--ext/tk/sample/demos-jp/spin.rb18
-rw-r--r--ext/tk/sample/demos-jp/states.rb2
-rw-r--r--ext/tk/sample/demos-jp/style.rb38
-rw-r--r--ext/tk/sample/demos-jp/text.rb2
-rw-r--r--ext/tk/sample/demos-jp/textpeer.rb12
-rw-r--r--ext/tk/sample/demos-jp/toolbar.rb30
-rw-r--r--ext/tk/sample/demos-jp/tree.rb26
-rw-r--r--ext/tk/sample/demos-jp/ttkbut.rb48
-rw-r--r--ext/tk/sample/demos-jp/ttkmenu.rb18
-rw-r--r--ext/tk/sample/demos-jp/ttknote.rb22
-rw-r--r--ext/tk/sample/demos-jp/ttkpane.rb48
-rw-r--r--ext/tk/sample/demos-jp/ttkprogress.rb22
-rw-r--r--ext/tk/sample/demos-jp/twind.rb58
-rw-r--r--ext/tk/sample/demos-jp/twind2.rb108
-rw-r--r--ext/tk/sample/demos-jp/unicodeout.rb38
62 files changed, 1520 insertions, 1520 deletions
diff --git a/ext/tk/sample/demos-jp/anilabel.rb b/ext/tk/sample/demos-jp/anilabel.rb
index aee57f9f6a..d2f5b12041 100644
--- a/ext/tk/sample/demos-jp/anilabel.rb
+++ b/ext/tk/sample/demos-jp/anilabel.rb
@@ -6,7 +6,7 @@
# toplevel widget が存在すれば削除する
if defined?($anilabel_demo) && $anilabel_demo
- $anilabel_demo.destroy
+ $anilabel_demo.destroy
$anilabel_demo = nil
end
@@ -50,7 +50,7 @@ TkFrame.new(base_frame) {|frame|
# label demo 用フレーム生成
f_left = TkLabelFrame.new(base_frame, :text=>'Scrolling Texts')
f_right = TkLabelFrame.new(base_frame, :text=>'GIF Image')
-Tk.pack(f_left, f_right, 'side'=>'left', 'expand'=>'yes', 'fill'=>'both',
+Tk.pack(f_left, f_right, 'side'=>'left', 'expand'=>'yes', 'fill'=>'both',
'padx'=>10, 'pady'=>10)
# animated label
@@ -88,7 +88,7 @@ class AnimatedImageLabel < AnimatedTextLabel
@btag.bind_append('Destroy'){
if @destroy_image
begin
- self.image.delete
+ self.image.delete
rescue
end
end
@@ -124,13 +124,13 @@ class AnimatedImageLabel < AnimatedTextLabel
end
# label 生成
-l1 = AnimatedTextLabel.new(f_left, :borderwidth=>4, :relief=>:ridge,
+l1 = AnimatedTextLabel.new(f_left, :borderwidth=>4, :relief=>:ridge,
:font=>{:family=>'Courier', :size=>10})
-l2 = AnimatedTextLabel.new(f_left, :borderwidth=>4, :relief=>:groove,
+l2 = AnimatedTextLabel.new(f_left, :borderwidth=>4, :relief=>:groove,
:font=>{:family=>'Courier', :size=>10})
-l3 = AnimatedTextLabel.new(f_left, :borderwidth=>4, :relief=>:flat,
+l3 = AnimatedTextLabel.new(f_left, :borderwidth=>4, :relief=>:flat,
:font=>{:family=>'Courier', :size=>10}, :width=>18)
-Tk.pack(l1, l2, l3,
+Tk.pack(l1, l2, l3,
:side=>:top, :expand=>true, :anchor=>:w, :padx=>10, :pady=>10)
limg = AnimatedImageLabel.new(f_right, :borderwidth=>0)
diff --git a/ext/tk/sample/demos-jp/aniwave.rb b/ext/tk/sample/demos-jp/aniwave.rb
index 8fa14f65fe..973c1be1e9 100644
--- a/ext/tk/sample/demos-jp/aniwave.rb
+++ b/ext/tk/sample/demos-jp/aniwave.rb
@@ -6,7 +6,7 @@
# destroy toplevel widget for this demo script
if defined?($aniwave_demo) && $aniwave_demo
- $aniwave_demo.destroy
+ $aniwave_demo.destroy
$aniwave_demo = nil
end
@@ -53,11 +53,11 @@ class AnimatedWaveDemo
@direction = dir
# create canvas widget
- @c = TkCanvas.new(frame, :width=>300, :height=>200,
+ @c = TkCanvas.new(frame, :width=>300, :height=>200,
:background=>'black')
@c.pack(:padx=>10, :pady=>10, :expand=>true)
- # Creates a coordinates list of a wave.
+ # Creates a coordinates list of a wave.
@waveCoords = []
@backupCoords = []
n = 0
@@ -69,10 +69,10 @@ class AnimatedWaveDemo
# Create a smoothed line and arrange for its coordinates to be the
# contents of the variable waveCoords.
- @line = TkcLine.new(@c, @waveCoords,
+ @line = TkcLine.new(@c, @waveCoords,
:width=>1, :fill=>'green', :smooth=>true)
- # Main animation "loop".
+ # Main animation "loop".
# Theoretically 100 frames-per-second (==10ms between frames)
@timer = TkTimer.new(10){ basicMotion; reverser }
diff --git a/ext/tk/sample/demos-jp/arrow.rb b/ext/tk/sample/demos-jp/arrow.rb
index 3c49e67b09..a1694d019d 100644
--- a/ext/tk/sample/demos-jp/arrow.rb
+++ b/ext/tk/sample/demos-jp/arrow.rb
@@ -25,65 +25,65 @@ 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'
+ 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) )
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,
+ 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')
# 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,
+ 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) )
- TkcRectangle.new(c, xtip-5, v.y-deltaY-5, xtip+5, v.y-deltaY+5,
+ TkcRectangle.new(c, xtip-5, v.y-deltaY-5, xtip+5, v.y-deltaY+5,
{'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,
+ 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) )
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,
+ TkcLine.new(c, tmp, v.y-125, tmp, v.y-75, 'width'=>v.width,
'arrow'=>'both', 'arrowshape'=>[v.a, v.b, v.c])
- TkcLine.new(c, tmp-25, v.y, tmp+25, v.y, 'width'=>v.width,
+ TkcLine.new(c, tmp-25, v.y, tmp+25, v.y, 'width'=>v.width,
'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,
+ 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])
- # Create a bunch of other arrows and text items showing the
+ # 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,
+ TkcLine.new(c, tmp, v.y-5*v.width, tmp, v.y-deltaY,
'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,
+ TkcLine.new(c, tmp, v.y-5*v.width, tmp, v.y+5*v.width,
'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,
+ TkcLine.new(c, v.x2-10*v.a, tmp, v.x2, tmp,
'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,
+ TkcLine.new(c, v.x2-10*v.b, tmp, v.x2, tmp,
'arrow'=>'both', 'arrowshape'=>v.smallTips)
TkcText.new(c, v.x2-5*v.b, tmp+5, 'text'=>v.b, 'anchor'=>'n')
if $tk_version =~ /^4.*/
- TkcText.new(c, v.x1, 310, 'text'=>"'width'=>#{v.width}", 'anchor'=>'w',
+ TkcText.new(c, v.x1, 310, 'text'=>"'width'=>#{v.width}", 'anchor'=>'w',
'font'=>'-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*')
- TkcText.new(c, v.x1, 330,
+ TkcText.new(c, v.x1, 330,
'text'=>"'arrowshape'=>[#{v.a}, #{v.b}, #{v.c}]",'anchor'=>'w',
'font'=>'-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*')
else
- TkcText.new(c, v.x1, 310, 'text'=>"'width'=>#{v.width}", 'anchor'=>'w',
+ TkcText.new(c, v.x1, 310, 'text'=>"'width'=>#{v.width}", 'anchor'=>'w',
'font'=>'Helvetica 18')
- TkcText.new(c, v.x1, 330,
+ TkcText.new(c, v.x1, 330,
'text'=>"'arrowshape'=>[#{v.a}, #{v.b}, #{v.c}]",
'anchor'=>'w', 'font'=>'Helvetica 18')
end
@@ -93,7 +93,7 @@ end
# toplevel widget が存在すれば削除する
if defined?($arrow_demo) && $arrow_demo
- $arrow_demo.destroy
+ $arrow_demo.destroy
$arrow_demo = nil
end
@@ -107,7 +107,7 @@ $arrow_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($arrow_demo).pack(:fill=>:both, :expand=>true)
# label 生成
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left',
+TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left',
'text'=>"この widget で、キャンバスで使われるラインについて様々な幅や矢印の頭の形を試してみることができます。線の幅や矢印の形を変えるには、拡大された矢印についている 3つの四角をドラッグしてください。右側の矢印は普通の大きさでのサンプルを示しています。下のテキストはラインアイテムに対する設定オプションです。"){
pack('side'=>'top')
}
@@ -132,14 +132,14 @@ $arrow_buttons = TkFrame.new(base_frame) {|frame|
$arrow_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
# canvas 設定
-$arrow_canvas = TkCanvas.new(base_frame, 'width'=>500, 'height'=>350,
+$arrow_canvas = TkCanvas.new(base_frame, 'width'=>500, 'height'=>350,
'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,
+ $demo_arrowInfo = Struct.new("ArrowInfo", :a, :b, :c, :width, :motionProc,
+ :x1, :x2, :y, :smallTips, :count,
:bigLineStyle, :boxStyle, :activeStyle).new
end
$demo_arrowInfo.a = 8
@@ -157,7 +157,7 @@ if TkWinfo.depth($arrow_canvas) > 1
$demo_arrowInfo.boxStyle = {'fill'=>'', 'outline'=>'black', 'width'=>1}
$demo_arrowInfo.activeStyle = {'fill'=>'red', 'outline'=>'black', 'width'=>1}
else
- $demo_arrowInfo.bigLineStyle = {'fill'=>'black',
+ $demo_arrowInfo.bigLineStyle = {'fill'=>'black',
'stipple'=>'@'+[$demo_dir,'..','images','grey.25'].join(File::Separator)}
$demo_arrowInfo.boxStyle = {'fill'=>'', 'outline'=>'black', 'width'=>1}
$demo_arrowInfo.activeStyle = {'fill'=>'black','outline'=>'black','width'=>1}
@@ -168,16 +168,16 @@ $arrowTag_box.bind('Enter', proc{$arrow_canvas.itemconfigure('current', $demo_ar
$arrowTag_box.bind('Leave', proc{$arrow_canvas.itemconfigure('current', $demo_arrowInfo.boxStyle)})
$arrowTag_box.bind('B1-Enter', proc{})
$arrowTag_box.bind('B1-Leave', proc{})
-$arrow_canvas.itembind('box1', '1',
+$arrow_canvas.itembind('box1', '1',
proc{$demo_arrowInfo.motionProc \
= proc{|x,y| arrowMove1 $arrow_canvas, x, y}})
-$arrow_canvas.itembind('box2', '1',
+$arrow_canvas.itembind('box2', '1',
proc{$demo_arrowInfo.motionProc \
= proc{|x,y| arrowMove2 $arrow_canvas, x, y}})
-$arrow_canvas.itembind('box3', '1',
+$arrow_canvas.itembind('box3', '1',
proc{$demo_arrowInfo.motionProc \
= proc{|x,y| arrowMove3 $arrow_canvas, x, y}})
-$arrowTag_box.bind('B1-Motion',
+$arrowTag_box.bind('B1-Motion',
proc{|x,y| $demo_arrowInfo.motionProc.call(x,y)}, "%x %y")
$arrow_canvas.bind('Any-ButtonRelease-1', proc{arrowSetup $arrow_canvas})
diff --git a/ext/tk/sample/demos-jp/bind.rb b/ext/tk/sample/demos-jp/bind.rb
index a1bcfdd2e7..99e5c1718c 100644
--- a/ext/tk/sample/demos-jp/bind.rb
+++ b/ext/tk/sample/demos-jp/bind.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($bind_demo) && $bind_demo
- $bind_demo.destroy
+ $bind_demo.destroy
$bind_demo = nil
end
@@ -59,7 +59,7 @@ txt = TkText.new(base_frame){|t|
# スタイル設定
if TkWinfo.depth($root).to_i > 1
- tagstyle_bold = {'background'=>'#43ce80', 'relief'=>'raised',
+ tagstyle_bold = {'background'=>'#43ce80', 'relief'=>'raised',
'borderwidth'=>1}
tagstyle_normal = {'background'=>'', 'relief'=>'flat'}
else
@@ -75,44 +75,44 @@ txt = TkText.new(base_frame){|t|
insert('end', "\n\n")
insert('end', '2. 簡単な 2次元のプロット。データを表す点を動かすことができる。', (d2 = TkTextTag.new(t)) )
insert('end', "\n\n")
- insert('end', '3. テキストアイテムのアンカーと行揃え。',
+ insert('end', '3. テキストアイテムのアンカーと行揃え。',
(d3 = TkTextTag.new(t)) )
insert('end', "\n\n")
- insert('end', '4. ラインアイテムのための矢印の頭の形のエディタ。',
+ insert('end', '4. ラインアイテムのための矢印の頭の形のエディタ。',
(d4 = TkTextTag.new(t)) )
insert('end', "\n\n")
- insert('end', '5. タブストップを変更するための機能つきのルーラー。',
+ insert('end', '5. タブストップを変更するための機能つきのルーラー。',
(d5 = TkTextTag.new(t)) )
insert('end', "\n\n")
- insert('end',
- '6. キャンバスがどうやってスクロールするのかを示すグリッド。',
+ insert('end',
+ '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',
+ d1.bind('1',
proc{
eval_samplecode(`cat #{[$demo_dir,'items.rb'].join(File::Separator)}`, 'items.rb')
})
- d2.bind('1',
+ d2.bind('1',
proc{
eval_samplecode(`cat #{[$demo_dir,'plot.rb'].join(File::Separator)}`, 'plot.rb')
})
- d3.bind('1',
+ d3.bind('1',
proc{
eval_samplecode(`cat #{[$demo_dir,'ctext.rb'].join(File::Separator)}`, 'ctext.rb')
})
- d4.bind('1',
+ d4.bind('1',
proc{
eval_samplecode(`cat #{[$demo_dir,'arrow.rb'].join(File::Separator)}`, 'arrow.rb')
})
- d5.bind('1',
+ d5.bind('1',
proc{
eval_samplecode(`cat #{[$demo_dir,'ruler.rb'].join(File::Separator)}`, 'ruler.rb')
})
- d6.bind('1',
+ d6.bind('1',
proc{
eval_samplecode(`cat #{[$demo_dir,'cscroll.rb'].join(File::Separator)}`, 'cscroll.rb')
})
diff --git a/ext/tk/sample/demos-jp/bitmap.rb b/ext/tk/sample/demos-jp/bitmap.rb
index b6b0e54bbe..1193e8de24 100644
--- a/ext/tk/sample/demos-jp/bitmap.rb
+++ b/ext/tk/sample/demos-jp/bitmap.rb
@@ -15,7 +15,7 @@
def bitmapRow(w,*args)
TkFrame.new(w){|row|
pack('side'=>'top', 'fill'=>'both')
- for bitmap in args
+ 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')
@@ -27,7 +27,7 @@ end
# toplevel widget が存在すれば削除する
if defined?($bitmap_demo) && $bitmap_demo
- $bitmap_demo.destroy
+ $bitmap_demo.destroy
$bitmap_demo = nil
end
@@ -41,7 +41,7 @@ $bitmap_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($bitmap_demo).pack(:fill=>:both, :expand=>true)
# label 生成
-TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left',
+TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left',
'text'=>"このウィンドウには、Tk に組み込まれたすべてのビットマップが、それらの名前と共に表示されています。Tcl のスクリプト中では、それぞれの名前を用いて参照します。"){
pack('side'=>'top')
}
diff --git a/ext/tk/sample/demos-jp/button.rb b/ext/tk/sample/demos-jp/button.rb
index 18e42008c9..87ced45810 100644
--- a/ext/tk/sample/demos-jp/button.rb
+++ b/ext/tk/sample/demos-jp/button.rb
@@ -6,7 +6,7 @@
# toplevel widget が存在すれば削除する
if defined?($button_demo) && $button_demo
- $button_demo.destroy
+ $button_demo.destroy
$button_demo = nil
end
diff --git a/ext/tk/sample/demos-jp/check.rb b/ext/tk/sample/demos-jp/check.rb
index b953e7f623..762b99778b 100644
--- a/ext/tk/sample/demos-jp/check.rb
+++ b/ext/tk/sample/demos-jp/check.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($check_demo) && $check_demo
- $check_demo.destroy
+ $check_demo.destroy
$check_demo = nil
end
@@ -54,7 +54,7 @@ TkFrame.new(base_frame) {|frame|
TkButton.new(frame) {
text '変数参照'
command proc{
- showVars(base_frame,
+ showVars(base_frame,
['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 7f7cb9e932..9f845183f3 100644
--- a/ext/tk/sample/demos-jp/check2.rb
+++ b/ext/tk/sample/demos-jp/check2.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($check2_demo) && $check2_demo
- $check2_demo.destroy
+ $check2_demo.destroy
$check2_demo = nil
end
@@ -35,35 +35,35 @@ sober = TkVariable.new(0)
# frame 生成
TkFrame.new(base_frame) {|frame|
- TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2),
+ TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2),
:columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- TkButton.new(frame, :text=>'変数参照',
- :image=>$image['view'], :compound=>:left,
+ TkGrid('x',
+ TkButton.new(frame, :text=>'変数参照',
+ :image=>$image['view'], :compound=>:left,
:command=>proc{
- showVars($check2_demo,
- ['safety', safety], ['wipers', wipers],
+ 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,
+ }),
+ 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(base_frame, :text=>'安全性検査', :variable=>safety,
- :relief=>:flat, :onvalue=>'all', :offvalue=>'none',
+TkCheckButton.new(base_frame, :text=>'安全性検査', :variable=>safety,
+ :relief=>:flat, :onvalue=>'all', :offvalue=>'none',
:tristatevalue=>'partial'){
pack('side'=>'top', 'pady'=>2, 'anchor'=>'w')
}
@@ -71,7 +71,7 @@ TkCheckButton.new(base_frame, :text=>'安全性検査', :variable=>safety,
[ TkCheckButton.new(base_frame, 'text'=>'ワイパー OK', 'variable'=>wipers),
TkCheckButton.new(base_frame, 'text'=>'ブレーキ OK', 'variable'=>brakes),
TkCheckButton.new(base_frame, 'text'=>'運転手 素面', 'variable'=>sober)
-].each{|w|
+].each{|w|
w.relief('flat')
w.pack('side'=>'top', 'padx'=>15, 'pady'=>2, 'anchor'=>'w')
}
diff --git a/ext/tk/sample/demos-jp/clrpick.rb b/ext/tk/sample/demos-jp/clrpick.rb
index ce6b99ab94..c188723c5a 100644
--- a/ext/tk/sample/demos-jp/clrpick.rb
+++ b/ext/tk/sample/demos-jp/clrpick.rb
@@ -7,7 +7,7 @@
# toplevel widget が存在すれば削除する
if defined?($clrpick_demo) && $clrpick_demo
- $clrpick_demo.destroy
+ $clrpick_demo.destroy
$clrpick_demo = nil
end
@@ -47,7 +47,7 @@ Tk::Frame.new($clrpick_demo) {|frame|
# button 生成
# TkButton.new($clrpick_demo, 'text'=>'背景色を設定 ...') {|b|
Tk::Button.new($clrpick_demo, 'text'=>'背景色を設定 ...') {|b|
- command(proc{setColor $clrpick_demo, b, 'background',
+ command(proc{setColor $clrpick_demo, b, 'background',
['background', 'highlightbackground']})
pack('side'=>'top', 'anchor'=>'c', 'pady'=>'2m')
}
@@ -61,7 +61,7 @@ Tk::Button.new($clrpick_demo, 'text'=>'前景色を設定 ...') {|b|
def setColor(w,button,name,options)
w.grab
initialColor = button[name]
- color = Tk.chooseColor('title'=>"Choose a #{name} color", 'parent'=>w,
+ color = Tk.chooseColor('title'=>"Choose a #{name} color", 'parent'=>w,
'initialcolor'=>initialColor)
if color != ""
setColor_helper(w,options,color)
diff --git a/ext/tk/sample/demos-jp/colors.rb b/ext/tk/sample/demos-jp/colors.rb
index 91817a947b..9fcf0333b5 100644
--- a/ext/tk/sample/demos-jp/colors.rb
+++ b/ext/tk/sample/demos-jp/colors.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($colors_demo) && $colors_demo
- $colors_demo.destroy
+ $colors_demo.destroy
$colors_demo = nil
end
diff --git a/ext/tk/sample/demos-jp/combo.rb b/ext/tk/sample/demos-jp/combo.rb
index da00d712ba..2059662d48 100644
--- a/ext/tk/sample/demos-jp/combo.rb
+++ b/ext/tk/sample/demos-jp/combo.rb
@@ -7,7 +7,7 @@
# based on "Id: combo.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp"
if defined?($combo_demo) && $combo_demo
- $combo_demo.destroy
+ $combo_demo.destroy
$combo_demo = nil
end
@@ -19,7 +19,7 @@ $combo_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($combo_demo).pack(:fill=>:both, :expand=>true)
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'5i', :justify=>:left,
+Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'5i', :justify=>:left,
:text=><<EOL).pack(:side=>:top, :fill=>:x)
以下では3種類のコンボボックスが表示されています.\
最初のものは,エントリウィジェットと同じ様に,\
@@ -42,24 +42,24 @@ ozCity = TkVariable.new
Ttk::Frame.new(base_frame) {|frame|
sep = Ttk::Separator.new(frame)
Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'変数参照',
- :image=>$image['view'], :compound=>:left,
+ TkGrid('x',
+ Ttk::Button.new(frame, :text=>'変数参照',
+ :image=>$image['view'], :compound=>:left,
:command=>proc{
- showVars(base_frame,
- ['firstVariable', firstValue],
- ['secondVariable', secondValue],
+ showVars(base_frame,
+ ['firstVariable', firstValue],
+ ['secondVariable', secondValue],
['ozCity', ozCity])
- }),
- Ttk::Button.new(frame, :text=>'コード参照',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'combo'}),
- Ttk::Button.new(frame, :text=>'閉じる',
- :image=>$image['delete'], :compound=>:left,
+ }),
+ Ttk::Button.new(frame, :text=>'コード参照',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{showCode 'combo'}),
+ Ttk::Button.new(frame, :text=>'閉じる',
+ :image=>$image['delete'], :compound=>:left,
:command=>proc{
$combo_demo.destroy
$combo_demo = nil
- }),
+ }),
:padx=>4, :pady=>4)
grid_columnconfigure(0, :weight=>1)
pack(:side=>:bottom, :fill=>:x)
@@ -68,7 +68,7 @@ Ttk::Frame.new(base_frame) {|frame|
frame = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true)
australianCities = [
- 'キャンベラ', 'シドニー', 'メルボルン', 'パース', 'アデレード',
+ 'キャンベラ', 'シドニー', 'メルボルン', 'パース', 'アデレード',
'ブリスベーン', 'ホバート', 'ダーウィン', 'アリス スプリングス'
]
@@ -82,17 +82,17 @@ Tk.pack(Ttk::Labelframe.new(frame, :text=>'Fully Editable'){|f|
w.values <<= w.value unless w.values.include?(w.value)
}
}.pack(:pady=>5, :padx=>10)
- },
+ },
Ttk::LabelFrame.new(frame, :text=>'Disabled'){|f|
Ttk::Combobox.new(f, :textvariable=>secondValue, :state=>:disabled) .
pack(:pady=>5, :padx=>10)
- },
+ },
Ttk::LabelFrame.new(frame, :text=>'Defined List Only'){|f|
- Ttk::Combobox.new(f, :textvariable=>ozCity, :state=>:readonly,
+ Ttk::Combobox.new(f, :textvariable=>ozCity, :state=>:readonly,
:values=>australianCities) .
pack(:pady=>5, :padx=>10)
- },
+ },
:side=>:top, :pady=>5, :padx=>10)
diff --git a/ext/tk/sample/demos-jp/cscroll.rb b/ext/tk/sample/demos-jp/cscroll.rb
index 845952679a..0a31f28b5e 100644
--- a/ext/tk/sample/demos-jp/cscroll.rb
+++ b/ext/tk/sample/demos-jp/cscroll.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($cscroll_demo) && $cscroll_demo
- $cscroll_demo.destroy
+ $cscroll_demo.destroy
$cscroll_demo = nil
end
@@ -19,7 +19,7 @@ $cscroll_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($cscroll_demo).pack(:fill=>:both, :expand=>true)
# label 生成
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i',
+TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i',
'justify'=>'left', 'text'=>"このウィンドウにはスクロールバーやマウスのボタン2 でスクロールできるキャンバス widget が表示されています。四角の上でボタン1 をクリックすると、そのインデックスが標準出力に出力されます。"){
pack('side'=>'top')
}
@@ -53,14 +53,14 @@ unless $tk_version =~ /^4\.[01]/
end
# canvas 設定
-$cscroll_canvas = TkCanvas.new(base_frame,
+$cscroll_canvas = TkCanvas.new(base_frame,
'relief'=>'sunken', 'borderwidth'=>2,
'scrollregion'=>['-11c', '-11c', '50c', '20c']
) {|c|
if $tk_version =~ /^4\.[01]/
- pack('expand'=>'yes', 'fill'=>'both')
+ pack('expand'=>'yes', 'fill'=>'both')
else
- grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
+ grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
end
@@ -69,18 +69,18 @@ $cscroll_canvas = TkCanvas.new(base_frame,
if $tk_version =~ /^4\.[01]/
pack('side'=>'right', 'fill'=>'y')
else
- grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
+ grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
end
}
- TkScrollbar.new(base_frame, 'orient'=>'horiz',
+ TkScrollbar.new(base_frame, 'orient'=>'horiz',
'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')
+ pack('side'=>'bottom', 'fill'=>'x')
else
- grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
+ grid('in'=>$cscroll_grid, 'padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
end
}
@@ -91,9 +91,9 @@ bg = $cscroll_canvas.configinfo('bg')[4]
x = -10+3*i
y = -10
(0..9).each{|j|
- TkcRectangle.new($cscroll_canvas, "#{x}c", "#{y}c", "#{x+2}c", "#{y+2}c",
+ TkcRectangle.new($cscroll_canvas, "#{x}c", "#{y}c", "#{x+2}c", "#{y+2}c",
'outline'=>'black', 'fill'=>bg, 'tags'=>'rect')
- TkcText.new($cscroll_canvas, "#{x+1}c", "#{y+1}c",
+ TkcText.new($cscroll_canvas, "#{x+1}c", "#{y+1}c",
'text'=>"#{i},#{j}", 'anchor'=>'center', 'tags'=>'text')
y += 3
}
@@ -104,7 +104,7 @@ $cscroll_canvas.itembind('all', 'Any-Leave', proc{scrollLeave $cscroll_canvas})
$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',
+$cscroll_canvas.bind('B2-Motion',
proc{|x,y| $cscroll_canvas.scan_dragto(x,y)}, '%x %y')
def scrollEnter(c)
diff --git a/ext/tk/sample/demos-jp/ctext.rb b/ext/tk/sample/demos-jp/ctext.rb
index 05ca732cfd..70c1cad1a7 100644
--- a/ext/tk/sample/demos-jp/ctext.rb
+++ b/ext/tk/sample/demos-jp/ctext.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($ctext_demo) && $ctext_demo
- $ctext_demo.destroy
+ $ctext_demo.destroy
$ctext_demo = nil
end
@@ -19,7 +19,7 @@ $ctext_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($ctext_demo).pack(:fill=>:both, :expand=>true)
# label 生成
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left',
+TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left',
'text'=>"このウィンドウにはキャンバスwidgetのテキスト機能をデモするためのテキスト文字列が表示されています。マウスを四角の中に持っていき、クリックすると位置ぎめ用の点からの相対位置を変えたり、行揃えを変えたりすることができます。また以下のような編集のための簡単なバインディングをサポートしています。
1. マウスを持っていき、クリックし、入力できます。
@@ -50,7 +50,7 @@ $ctext_buttons = TkFrame.new(base_frame) {|frame|
$ctext_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
# canvas 生成
-$ctext_canvas = TkCanvas.new(base_frame, 'relief'=>'flat',
+$ctext_canvas = TkCanvas.new(base_frame, 'relief'=>'flat',
'borderwidth'=>0, 'width'=>500, 'height'=>350)
$ctext_canvas.pack('side'=>'top', 'expand'=>'yes', 'fill'=>'both')
@@ -62,7 +62,7 @@ else
end
# canvas 設定
-TkcRectangle.new($ctext_canvas, 245, 195, 255, 205,
+TkcRectangle.new($ctext_canvas, 245, 195, 255, 205,
'outline'=>'black', 'fill'=>'red')
ctag_text_param = {
@@ -80,24 +80,24 @@ $ctag_text.withtag(TkcText.new($ctext_canvas, 250, 200, ctag_text_param))
$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}"},
+$ctag_text.bind('Shift-1',
+ proc{|x,y| $ctext_canvas.seleect_adjust 'current', "@#{x},#{y}"},
"%x %y")
-$ctag_text.bind('Shift-B1-Motion',
+$ctag_text.bind('Shift-B1-Motion',
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}"},
+$ctag_text.bind('2', proc{|x,y| textPaste $ctext_canvas, "@#{x},#{y}"},
"%x %y")
-# Next, create some items that allow the text's anchor position
+# 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,
+ item = TkcRectangle.new(w, x, y, x+30, y+30,
'outline'=>'black', 'fill'=>color, 'width'=>1)
item.bind('1', proc{$ctag_text.configure option, value})
w.addtag_withtag('config', item)
@@ -115,15 +115,15 @@ mkTextConfig $ctext_canvas, x+60, y+30, 'anchor', 'w', color
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,
+item = TkcRectangle.new($ctext_canvas, x+40, y+40, x+50, y+50,
'outline'=>'black', 'fill'=>'red')
item.bind('1', proc{$ctag_text.configure 'anchor', 'center'})
if $tk_version =~ /^4.*/
- TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Text Position',
- 'font'=>'-*-times-medium-r-normal--*-240-*-*-*-*-*-*',
+ TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Text Position',
+ 'font'=>'-*-times-medium-r-normal--*-240-*-*-*-*-*-*',
'anchor'=>'s', 'fill'=>'brown')
else
- TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Text Position',
+ TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Text Position',
'font'=>'Times 24', 'anchor'=>'s', 'fill'=>'brown')
end
@@ -137,18 +137,18 @@ 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
if $tk_version =~ /^4.*/
- TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Justification',
- 'font'=>'-*-times-medium-r-normal--*-240-*-*-*-*-*-*',
+ TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Justification',
+ 'font'=>'-*-times-medium-r-normal--*-240-*-*-*-*-*-*',
'anchor'=>'s', 'fill'=>'brown')
else
- TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Justification',
+ TkcText.new($ctext_canvas, x+45, y-5, 'text'=>'Justification',
'font'=>'Times 24', 'anchor'=>'s', 'fill'=>'brown')
end
$ctext_canvas.itembind('config', 'Enter', proc{textEnter $ctext_canvas})
-$ctext_canvas.itembind('config', 'Leave',
+$ctext_canvas.itembind('config', 'Leave',
proc{$ctext_canvas\
- .itemconfigure('current',
+ .itemconfigure('current',
'fill'=>$textConfigFill)})
$textConfigFill = ''
diff --git a/ext/tk/sample/demos-jp/entry1.rb b/ext/tk/sample/demos-jp/entry1.rb
index 2be29c18d3..eb71e87aec 100644
--- a/ext/tk/sample/demos-jp/entry1.rb
+++ b/ext/tk/sample/demos-jp/entry1.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($entry1_demo) && $entry1_demo
- $entry1_demo.destroy
+ $entry1_demo.destroy
$entry1_demo = nil
end
diff --git a/ext/tk/sample/demos-jp/entry2.rb b/ext/tk/sample/demos-jp/entry2.rb
index 2675b5d324..b5187ab508 100644
--- a/ext/tk/sample/demos-jp/entry2.rb
+++ b/ext/tk/sample/demos-jp/entry2.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($entry2_demo) && $entry2_demo
- $entry2_demo.destroy
+ $entry2_demo.destroy
$entry2_demo = nil
end
diff --git a/ext/tk/sample/demos-jp/entry3.rb b/ext/tk/sample/demos-jp/entry3.rb
index 6b9cd4cf37..2728de0b93 100644
--- a/ext/tk/sample/demos-jp/entry3.rb
+++ b/ext/tk/sample/demos-jp/entry3.rb
@@ -8,7 +8,7 @@
# based on Tcl/Tk8.4.4 widget demos
if defined?($entry3_demo) && $entry3_demo
- $entry3_demo.destroy
+ $entry3_demo.destroy
$entry3_demo = nil
end
@@ -20,8 +20,8 @@ $entry3_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($entry3_demo).pack(:fill=>:both, :expand=>true)
-TkLabel.new(base_frame,
- :font=>$font, :wraplength=>'5i', :justify=>:left,
+TkLabel.new(base_frame,
+ :font=>$font, :wraplength=>'5i', :justify=>:left,
:text=><<EOL).pack(:side=>:top)
以下には4種類のエントリボックスが表示されています.各エントリボックスは,\
マウスクリックで選択し文字を打ち込むことが可能ですが,それぞれがどのような\
@@ -68,20 +68,20 @@ TkFrame.new(base_frame){|f|
def focusAndFlash(widget, fg, bg, count=5)
return if count <= 0
if fg && !fg.empty? && bg && !bg.empty?
- TkTimer.new(200, count,
- proc{widget.configure(:foreground=>bg, :background=>fg)},
+ TkTimer.new(200, count,
+ proc{widget.configure(:foreground=>bg, :background=>fg)},
proc{widget.configure(:foreground=>fg, :background=>bg)}
).start
else
# TkTimer.new(150, 3){Tk.bell}.start
Tk.bell
- TkTimer.new(200, count,
- proc{widget.configure(:foreground=>'white',
- :background=>'black')},
- proc{widget.configure(:foreground=>'black',
+ TkTimer.new(200, count,
+ proc{widget.configure(:foreground=>'white',
+ :background=>'black')},
+ proc{widget.configure(:foreground=>'black',
:background=>'white')}
).at_end{begin
- widget.configure(:foreground=>fg,
+ widget.configure(:foreground=>fg,
:background=>bg)
rescue
# ignore
@@ -91,7 +91,7 @@ def focusAndFlash(widget, fg, bg, count=5)
end
l1 = TkLabelFrame.new(base_frame, :text=>"整数エントリ")
-TkEntry.new(l1, :validate=>:focus,
+TkEntry.new(l1, :validate=>:focus,
:vcmd=>[
proc{|s| s == '' || /^[+-]?\d+$/ =~ s }, '%P'
]) {|e|
@@ -102,7 +102,7 @@ TkEntry.new(l1, :validate=>:focus,
}
l2 = TkLabelFrame.new(base_frame, :text=>"長さ制約付きエントリ")
-TkEntry.new(l2, :validate=>:key, :invcmd=>proc{Tk.bell},
+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')
@@ -176,7 +176,7 @@ end
def validatePhoneChange(widget, vmode, idx, char)
return true if idx == nil
- Tk.after_idle(proc{widget.configure(:validate=>vmode,
+ Tk.after_idle(proc{widget.configure(:validate=>vmode,
:invcmd=>proc{Tk.bell})})
if !(idx<3 || idx==6 || idx==7 || idx==11 || idx>15) && char =~ /[0-9A-Za-z]/
widget.delete(idx)
@@ -191,10 +191,10 @@ end
l3 = TkLabelFrame.new(base_frame, :text=>"米国電話番号エントリ")
-TkEntry.new(l3, :validate=>:key, :invcmd=>proc{Tk.bell},
- :textvariable=>entry3content,
+TkEntry.new(l3, :validate=>:key, :invcmd=>proc{Tk.bell},
+ :textvariable=>entry3content,
:vcmd=>[
- proc{|w,v,i,s| validatePhoneChange(w,v,i,s)},
+ proc{|w,v,i,s| validatePhoneChange(w,v,i,s)},
"%W %v %i %S"
]){|e|
# Click to focus goes to the first editable character...
@@ -210,9 +210,9 @@ TkEntry.new(l3, :validate=>:key, :invcmd=>proc{Tk.bell},
}
l4 = TkLabelFrame.new(base_frame, :text=>"パスワードエントリ")
-TkEntry.new(l4, :validate=>:key, :show=>'*',
+TkEntry.new(l4, :validate=>:key, :show=>'*',
:vcmd=>[
- proc{|s| s.length <= 8},
+ proc{|s| s.length <= 8},
'%P'
]).pack(:fill=>:x, :expand=>true, :padx=>'1m', :pady=>'1m')
diff --git a/ext/tk/sample/demos-jp/filebox.rb b/ext/tk/sample/demos-jp/filebox.rb
index b8846d08a0..ffe5fbc5c6 100644
--- a/ext/tk/sample/demos-jp/filebox.rb
+++ b/ext/tk/sample/demos-jp/filebox.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($filebox_demo) && $entry2_demo
- $filebox_demo.destroy
+ $filebox_demo.destroy
$filebox_demo = nil
end
@@ -49,7 +49,7 @@ TkFrame.new(base_frame) {|frame|
TkEntry.new(f, 'width'=>20) {|e|
pack('side'=>'left', 'expand'=>'yes', 'fill'=>'x')
- TkButton.new(f, 'text'=>'Browse ...',
+ TkButton.new(f, 'text'=>'Browse ...',
'command'=>proc{fileDialog base_frame,e,type})\
.pack('side'=>'left')
}
@@ -60,9 +60,9 @@ TkFrame.new(base_frame) {|frame|
$tk_strictMotif = TkVarAccess.new('tk_strictMotif')
if ($tk_platform['platform'] == 'unix')
- TkCheckButton.new(base_frame,
- 'text'=>'Motifスタイルのダイアログを用いる',
- 'variable'=>$tk_strictMotif,
+ TkCheckButton.new(base_frame,
+ 'text'=>'Motifスタイルのダイアログを用いる',
+ 'variable'=>$tk_strictMotif,
'onvalue'=>1, 'offvalue'=>0 ).pack('anchor'=>'c')
end
@@ -71,23 +71,23 @@ def fileDialog(w,ent,operation)
#
#--------------------------------------------------------
types = [
- ['Text files', ['.txt','.doc'] ],
- ['Text files', [], 'TEXT' ],
- ['Ruby Scripts', ['.rb'], 'TEXT' ],
- ['Tcl Scripts', ['.tcl'], 'TEXT' ],
- ['C Source Files', ['.c','.h'] ],
- ['All Source Files', ['.rb','.tcl','.c','.h'] ],
- ['Image Files', ['.gif'] ],
- ['Image Files', ['.jpeg','.jpg'] ],
- ['Image Files', [], ['GIFF','JPEG']],
+ ['Text files', ['.txt','.doc'] ],
+ ['Text files', [], 'TEXT' ],
+ ['Ruby Scripts', ['.rb'], 'TEXT' ],
+ ['Tcl Scripts', ['.tcl'], 'TEXT' ],
+ ['C Source Files', ['.c','.h'] ],
+ ['All Source Files', ['.rb','.tcl','.c','.h'] ],
+ ['Image Files', ['.gif'] ],
+ ['Image Files', ['.jpeg','.jpg'] ],
+ ['Image Files', [], ['GIFF','JPEG']],
['All files', '*' ]
]
if operation == '開く'
file = Tk.getOpenFile('filetypes'=>types, 'parent'=>w)
else
- file = Tk.getSaveFile('filetypes'=>types, 'parent'=>w,
- 'initialfile'=>'Untitled',
+ file = Tk.getSaveFile('filetypes'=>types, 'parent'=>w,
+ 'initialfile'=>'Untitled',
'defaultextension'=>'.txt')
end
if file != ""
diff --git a/ext/tk/sample/demos-jp/floor.rb b/ext/tk/sample/demos-jp/floor.rb
index a2ec2e9969..78cc23a245 100644
--- a/ext/tk/sample/demos-jp/floor.rb
+++ b/ext/tk/sample/demos-jp/floor.rb
@@ -18,7 +18,7 @@ def floorDisplay(w,active)
w.delete('all')
$activeFloor = active
- # First go through the three floors, displaying the backgrounds for
+ # First go through the three floors, displaying the backgrounds for
# each floor.
floor_bg1(w,$floor_colors['bg1'],$floor_colors['outline1'])
@@ -29,12 +29,12 @@ def floorDisplay(w,active)
w.raise("floor#{active}")
- # Create a dummy item just to mark this point in the display list,
+ # Create a dummy item just to mark this point in the display list,
# so we can insert highlights here.
TkcRectangle.new(w,0,100,1,101, 'fill'=>'', 'outline'=>'', 'tags'=>'marker')
- # Add the walls and labels for the active floor, along with
+ # Add the walls and labels for the active floor, along with
# transparent polygons that define the rooms on the floor.
# Make sure that the room polygons are on top.
@@ -299,7 +299,7 @@ def floor_bg3(w,fill,outline)
TkcLine.new(w,21,331,0,331, 'fill'=>outline, 'tags'=>['floor3','bg'])
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,
+ TkcLine.new(w,107,300,159,300,159,248,107,248,107,300,
'fill'=>outline, 'tags'=>['floor3','bg'])
end
@@ -313,316 +313,316 @@ end
# 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,
+ i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '101'
$floorItems['101'] = i
- TkcText.new(w,358,209, 'text'=>'101', 'fill'=>color,
+ TkcText.new(w,358,209, 'text'=>'101', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
+ i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'Pub Lift1'
$floorItems['Pub Lift1'] = i
- TkcText.new(w,323,223, 'text'=>'Pub Lift1', 'fill'=>color,
+ TkcText.new(w,323,223, 'text'=>'Pub Lift1', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
+ i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'Priv Lift1'
$floorItems['Priv Lift1'] = i
- TkcText.new(w,323,188, 'text'=>'Priv Lift1', 'fill'=>color,
+ TkcText.new(w,323,188, 'text'=>'Priv Lift1', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,42,389,42,337,1,337,1,389,
+ i = TkcPolygon.new(w,42,389,42,337,1,337,1,389,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '110'
$floorItems['110'] = i
- TkcText.new(w,21.5,363, 'text'=>'110', 'fill'=>color,
+ TkcText.new(w,21.5,363, 'text'=>'110', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,59,389,59,385,90,385,90,337,44,337,44,389,
+ i = TkcPolygon.new(w,59,389,59,385,90,385,90,337,44,337,44,389,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '109'
$floorItems['109'] = i
- TkcText.new(w,67,363, 'text'=>'109', 'fill'=>color,
+ TkcText.new(w,67,363, 'text'=>'109', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,51,300,51,253,6,253,6,300,
+ i = TkcPolygon.new(w,51,300,51,253,6,253,6,300,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '111'
$floorItems['111'] = i
- TkcText.new(w,28.5,276.5, 'text'=>'111', 'fill'=>color,
+ TkcText.new(w,28.5,276.5, 'text'=>'111', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,98,248,98,309,79,309,79,248,
+ i = TkcPolygon.new(w,98,248,98,309,79,309,79,248,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '117B'
$floorItems['117B'] = i
- TkcText.new(w,88.5,278.5, 'text'=>'117B', 'fill'=>color,
+ TkcText.new(w,88.5,278.5, 'text'=>'117B', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,51,251,51,204,6,204,6,251,
+ i = TkcPolygon.new(w,51,251,51,204,6,204,6,251,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '112'
$floorItems['112'] = i
- TkcText.new(w,28.5,227.5, 'text'=>'112', 'fill'=>color,
+ TkcText.new(w,28.5,227.5, 'text'=>'112', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,6,156,51,156,51,203,6,203,
+ i = TkcPolygon.new(w,6,156,51,156,51,203,6,203,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '113'
$floorItems['113'] = i
- TkcText.new(w,28.5,179.5, 'text'=>'113', 'fill'=>color,
+ TkcText.new(w,28.5,179.5, 'text'=>'113', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,85,169,79,169,79,192,85,192,
+ i = TkcPolygon.new(w,85,169,79,169,79,192,85,192,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '117A'
$floorItems['117A'] = i
- TkcText.new(w,82,180.5, 'text'=>'117A', 'fill'=>color,
+ TkcText.new(w,82,180.5, 'text'=>'117A', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,77,302,77,168,53,168,53,302,
+ i = TkcPolygon.new(w,77,302,77,168,53,168,53,302,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '117'
$floorItems['117'] = i
- TkcText.new(w,65,235, 'text'=>'117', 'fill'=>color,
+ TkcText.new(w,65,235, 'text'=>'117', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,51,155,51,115,6,115,6,155,
+ i = TkcPolygon.new(w,51,155,51,115,6,115,6,155,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '114'
$floorItems['114'] = i
- TkcText.new(w,28.5,135, 'text'=>'114', 'fill'=>color,
+ TkcText.new(w,28.5,135, 'text'=>'114', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,95,115,53,115,53,168,95,168,
+ i = TkcPolygon.new(w,95,115,53,115,53,168,95,168,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '115'
$floorItems['115'] = i
- TkcText.new(w,74,141.5, 'text'=>'115', 'fill'=>color,
+ TkcText.new(w,74,141.5, 'text'=>'115', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,87,113,87,27,10,27,10,113,
+ i = TkcPolygon.new(w,87,113,87,27,10,27,10,113,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '116'
$floorItems['116'] = i
- TkcText.new(w,48.5,70, 'text'=>'116', 'fill'=>color,
+ TkcText.new(w,48.5,70, 'text'=>'116', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,89,91,128,91,128,113,89,131,
+ i = TkcPolygon.new(w,89,91,128,91,128,113,89,131,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '118'
$floorItems['118'] = i
- TkcText.new(w,108.5,102, 'text'=>'118', 'fill'=>color,
+ TkcText.new(w,108.5,102, 'text'=>'118', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,189.5,111.5, 'text'=>'120', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,131,207.5, 'text'=>'122', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,138,169,154,169,154,191,138,191,
+ i = TkcPolygon.new(w,138,169,154,169,154,191,138,191,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '121'
$floorItems['121'] = i
- TkcText.new(w,146,180, 'text'=>'121', 'fill'=>color,
+ TkcText.new(w,146,180, 'text'=>'121', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,99,300,126,300,126,309,99,309,
+ i = TkcPolygon.new(w,99,300,126,300,126,309,99,309,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '106A'
$floorItems['106A'] = i
- TkcText.new(w,112.5,304.5, 'text'=>'106A', 'fill'=>color,
+ TkcText.new(w,112.5,304.5, 'text'=>'106A', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,128,299,128,309,150,309,150,248,99,248,99,299,
+ i = TkcPolygon.new(w,128,299,128,309,150,309,150,248,99,248,99,299,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '105'
$floorItems['105'] = i
- TkcText.new(w,124.5,278.5, 'text'=>'105', 'fill'=>color,
+ TkcText.new(w,124.5,278.5, 'text'=>'105', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,174,309,174,300,152,300,152,309,
+ i = TkcPolygon.new(w,174,309,174,300,152,300,152,309,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '106B'
$floorItems['106B'] = i
- TkcText.new(w,163,304.5, 'text'=>'106B', 'fill'=>color,
+ TkcText.new(w,163,304.5, 'text'=>'106B', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,176,299,176,309,216,309,216,248,152,248,152,299,
+ i = TkcPolygon.new(w,176,299,176,309,216,309,216,248,152,248,152,299,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '104'
$floorItems['104'] = i
- TkcText.new(w,184,278.5, 'text'=>'104', 'fill'=>color,
+ TkcText.new(w,184,278.5, 'text'=>'104', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,138,385,138,337,91,337,91,385,
+ i = TkcPolygon.new(w,138,385,138,337,91,337,91,385,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '108'
$floorItems['108'] = i
- TkcText.new(w,114.5,361, 'text'=>'108', 'fill'=>color,
+ TkcText.new(w,114.5,361, 'text'=>'108', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,256,337,140,337,140,385,256,385,
+ i = TkcPolygon.new(w,256,337,140,337,140,385,256,385,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '107'
$floorItems['107'] = i
- TkcText.new(w,198,361, 'text'=>'107', 'fill'=>color,
+ TkcText.new(w,198,361, 'text'=>'107', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,300,353,300,329,260,329,260,353,
+ i = TkcPolygon.new(w,300,353,300,329,260,329,260,353,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'Smoking'
$floorItems['Smoking'] = i
- TkcText.new(w,280,341, 'text'=>'Smoking', 'fill'=>color,
+ TkcText.new(w,280,341, 'text'=>'Smoking', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,314,135,314,170,306,170,306,246,177,246,177,135,
+ i = TkcPolygon.new(w,314,135,314,170,306,170,306,246,177,246,177,135,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '123'
$floorItems['123'] = i
- TkcText.new(w,245.5,190.5, 'text'=>'123', 'fill'=>color,
+ TkcText.new(w,245.5,190.5, 'text'=>'123', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,217,248,301,248,301,326,257,326,257,310,217,310,
+ i = TkcPolygon.new(w,217,248,301,248,301,326,257,326,257,310,217,310,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '103'
$floorItems['103'] = i
- TkcText.new(w,259,287, 'text'=>'103', 'fill'=>color,
+ TkcText.new(w,259,287, 'text'=>'103', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,396,188,377,188,377,169,316,169,316,131,396,131,
+ i = TkcPolygon.new(w,396,188,377,188,377,169,316,169,316,131,396,131,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '124'
$floorItems['124'] = i
- TkcText.new(w,356,150, 'text'=>'124', 'fill'=>color,
+ TkcText.new(w,356,150, 'text'=>'124', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,397,226,407,226,407,189,377,189,377,246,397,246,
+ i = TkcPolygon.new(w,397,226,407,226,407,189,377,189,377,246,397,246,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '125'
$floorItems['125'] = i
- TkcText.new(w,392,217.5, 'text'=>'125', 'fill'=>color,
+ TkcText.new(w,392,217.5, 'text'=>'125', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,399,187,409,187,409,207,474,207,474,164,399,164,
+ i = TkcPolygon.new(w,399,187,409,187,409,207,474,207,474,164,399,164,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '126'
$floorItems['126'] = i
- TkcText.new(w,436.5,185.5, 'text'=>'126', 'fill'=>color,
+ TkcText.new(w,436.5,185.5, 'text'=>'126', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,436.5,'231', 'text'=>'127', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,488.5,'184', 'text'=>'MShower', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,497,176,513,176,513,204,492,204,492,190,497,190,
+ i = TkcPolygon.new(w,497,176,513,176,513,204,492,204,492,190,497,190,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'Closet'
$floorItems['Closet'] = i
- TkcText.new(w,502.5,190, 'text'=>'Closet', 'fill'=>color,
+ TkcText.new(w,502.5,190, 'text'=>'Closet', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,476,237,476,206,513,206,513,254,488,254,488,237,
+ i = TkcPolygon.new(w,476,237,476,206,513,206,513,254,488,254,488,237,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = 'WShower'
$floorItems['WShower'] = i
- TkcText.new(w,494.5,230, 'text'=>'WShower', 'fill'=>color,
+ TkcText.new(w,494.5,230, 'text'=>'WShower', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,638.5,205, 'text'=>'130', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,367.5,278.5, 'text'=>'102', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,397,255,486,255,486,276,397,276,
+ i = TkcPolygon.new(w,397,255,486,255,486,276,397,276,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '128'
$floorItems['128'] = i
- TkcText.new(w,441.5,265.5, 'text'=>'128', 'fill'=>color,
+ TkcText.new(w,441.5,265.5, 'text'=>'128', 'fill'=>color,
'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'])
$floorLabels[i.id] = '129'
$floorItems['129'] = i
- TkcText.new(w,535.5,293, 'text'=>'129', 'fill'=>color,
+ TkcText.new(w,535.5,293, 'text'=>'129', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,628.5,335, 'text'=>'133', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,742,387,742,281,800,281,800,387,
+ i = TkcPolygon.new(w,742,387,742,281,800,281,800,387,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '132'
$floorItems['132'] = i
- TkcText.new(w,771,334, 'text'=>'132', 'fill'=>color,
+ TkcText.new(w,771,334, 'text'=>'132', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,800,168,800,280,699,280,699,168,
+ i = TkcPolygon.new(w,800,168,800,280,699,280,699,168,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '134'
$floorItems['134'] = i
- TkcText.new(w,749.5,224, 'text'=>'134', 'fill'=>color,
+ TkcText.new(w,749.5,224, 'text'=>'134', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,726,131,726,166,800,166,800,131,
+ i = TkcPolygon.new(w,726,131,726,166,800,166,800,131,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels[i.id] = '135'
$floorItems['135'] = i
- TkcText.new(w,763,148.5, 'text'=>'135', 'fill'=>color,
+ TkcText.new(w,763,148.5, 'text'=>'135', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,368,323, 'text'=>'Ramona Stair', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,155,77.5, 'text'=>'University Stair', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,317.5,28.5, 'text'=>'Plaza Stair', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,303,81, 'text'=>'Plaza Deck', 'fill'=>color,
'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'])
$floorLabels[i.id] = '106'
$floorItems['106'] = i
- TkcText.new(w,131.5,318.5, 'text'=>'106', 'fill'=>color,
+ TkcText.new(w,131.5,318.5, 'text'=>'106', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,143.5,133, 'text'=>'119', 'fill'=>color,
'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'])
@@ -795,321 +795,321 @@ end
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,
+ 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,
+ TkcText.new(w,774,195, 'text'=>'238', 'fill'=>color,
'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'])
$floorLabels[i.id] = '237'
$floorItems['237'] = i
- TkcText.new(w,763,148.5, 'text'=>'237', 'fill'=>color,
+ TkcText.new(w,763,148.5, 'text'=>'237', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,600,264, 'text'=>'246', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,694,279,643,279,643,314,694,314,
+ i = TkcPolygon.new(w,694,279,643,279,643,314,694,314,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '247'
$floorItems['247'] = i
- TkcText.new(w,668.5,296.5, 'text'=>'247', 'fill'=>color,
+ TkcText.new(w,668.5,296.5, 'text'=>'247', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,285.5,260, 'text'=>'202', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,143,267, 'text'=>'206', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,277,6,277,6,338,51,338,
+ i = TkcPolygon.new(w,51,277,6,277,6,338,51,338,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '212'
$floorItems['212'] = i
- TkcText.new(w,28.5,307.5, 'text'=>'212', 'fill'=>color,
+ TkcText.new(w,28.5,307.5, 'text'=>'212', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,557,276,486,276,486,309,510,309,510,325,557,325,
+ i = TkcPolygon.new(w,557,276,486,276,486,309,510,309,510,325,557,325,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '245'
$floorItems['245'] = i
- TkcText.new(w,521.5,300.5, 'text'=>'245', 'fill'=>color,
+ TkcText.new(w,521.5,300.5, 'text'=>'245', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,560,389,599,389,599,326,560,326,
+ i = TkcPolygon.new(w,560,389,599,389,599,326,560,326,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '244'
$floorItems['244'] = i
- TkcText.new(w,579.5,357.5, 'text'=>'244', 'fill'=>color,
+ TkcText.new(w,579.5,357.5, 'text'=>'244', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,601,389,601,326,643,326,643,389,
+ i = TkcPolygon.new(w,601,389,601,326,643,326,643,389,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '243'
$floorItems['243'] = i
- TkcText.new(w,622,357.5, 'text'=>'243', 'fill'=>color,
+ TkcText.new(w,622,357.5, 'text'=>'243', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,688,316,645,316,645,365,688,365,
+ i = TkcPolygon.new(w,688,316,645,316,645,365,688,365,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '242'
$floorItems['242'] = i
- TkcText.new(w,666.5,340.5, 'text'=>'242', 'fill'=>color,
+ TkcText.new(w,666.5,340.5, 'text'=>'242', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,802,367,759,367,759,226,802,226,
+ i = TkcPolygon.new(w,802,367,759,367,759,226,802,226,
'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,
+ TkcText.new(w,780.5,296.5, 'text'=>'Barbecue Deck', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,755,262,755,314,717,314,717,262,
+ i = TkcPolygon.new(w,755,262,755,314,717,314,717,262,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '240'
$floorItems['240'] = i
- TkcText.new(w,736,288, 'text'=>'240', 'fill'=>color,
+ TkcText.new(w,736,288, 'text'=>'240', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,755,316,689,316,689,365,755,365,
+ i = TkcPolygon.new(w,755,316,689,316,689,365,755,365,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '241'
$floorItems['241'] = i
- TkcText.new(w,722,340.5, 'text'=>'241', 'fill'=>color,
+ TkcText.new(w,722,340.5, 'text'=>'241', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,755,206,717,206,717,261,755,261,
+ i = TkcPolygon.new(w,755,206,717,206,717,261,755,261,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '239'
$floorItems['239'] = i
- TkcText.new(w,736,233.5, 'text'=>'239', 'fill'=>color,
+ TkcText.new(w,736,233.5, 'text'=>'239', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,695,277,643,277,643,206,695,206,
+ i = TkcPolygon.new(w,695,277,643,277,643,206,695,206,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '248'
$floorItems['248'] = i
- TkcText.new(w,669,241.5, 'text'=>'248', 'fill'=>color,
+ TkcText.new(w,669,241.5, 'text'=>'248', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,676,135,676,185,724,185,724,135,
+ i = TkcPolygon.new(w,676,135,676,185,724,185,724,135,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '236'
$floorItems['236'] = i
- TkcText.new(w,700,160, 'text'=>'236', 'fill'=>color,
+ TkcText.new(w,700,160, 'text'=>'236', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,675,135,635,135,635,145,628,145,628,185,675,185,
+ i = TkcPolygon.new(w,675,135,635,135,635,145,628,145,628,185,675,185,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '235'
$floorItems['235'] = i
- TkcText.new(w,651.5,160, 'text'=>'235', 'fill'=>color,
+ TkcText.new(w,651.5,160, 'text'=>'235', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,606,160, 'text'=>'234', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,552.5,158, 'text'=>'233', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,476,249,557,249,557,205,476,205,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '230'
$floorItems['230'] = i
- TkcText.new(w,516.5,227, 'text'=>'230', 'fill'=>color,
+ TkcText.new(w,516.5,227, 'text'=>'230', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,476,164,486,164,486,131,525,131,525,185,476,185,
+ i = TkcPolygon.new(w,476,164,486,164,486,131,525,131,525,185,476,185,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '232'
$floorItems['232'] = i
- TkcText.new(w,500.5,158, 'text'=>'232', 'fill'=>color,
+ TkcText.new(w,500.5,158, 'text'=>'232', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,476,186,495,186,495,204,476,204,
+ i = TkcPolygon.new(w,476,186,495,186,495,204,476,204,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '229'
$floorItems['229'] = i
- TkcText.new(w,485.5,195, 'text'=>'229', 'fill'=>color,
+ TkcText.new(w,485.5,195, 'text'=>'229', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,474,207,409,207,409,187,399,187,399,164,474,164,
+ i = TkcPolygon.new(w,474,207,409,207,409,187,399,187,399,164,474,164,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '227'
$floorItems['227'] = i
- TkcText.new(w,436.5,185.5, 'text'=>'227', 'fill'=>color,
+ TkcText.new(w,436.5,185.5, 'text'=>'227', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,399,228,399,253,474,253,474,209,409,209,409,228,
+ i = TkcPolygon.new(w,399,228,399,253,474,253,474,209,409,209,409,228,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '228'
$floorItems['228'] = i
- TkcText.new(w,436.5,231, 'text'=>'228', 'fill'=>color,
+ TkcText.new(w,436.5,231, 'text'=>'228', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,397,246,397,226,407,226,407,189,377,189,377,246,
+ i = TkcPolygon.new(w,397,246,397,226,407,226,407,189,377,189,377,246,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '226'
$floorItems['226'] = i
- TkcText.new(w,392,217.5, 'text'=>'226', 'fill'=>color,
+ TkcText.new(w,392,217.5, 'text'=>'226', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,377,169,316,169,316,131,397,131,397,188,377,188,
+ i = TkcPolygon.new(w,377,169,316,169,316,131,397,131,397,188,377,188,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '225'
$floorItems['225'] = i
- TkcText.new(w,356.5,150, 'text'=>'225', 'fill'=>color,
+ TkcText.new(w,356.5,150, 'text'=>'225', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,234,198,306,198,306,249,234,249,
+ i = TkcPolygon.new(w,234,198,306,198,306,249,234,249,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '224'
$floorItems['224'] = i
- TkcText.new(w,270,223.5, 'text'=>'224', 'fill'=>color,
+ TkcText.new(w,270,223.5, 'text'=>'224', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,270,179,306,179,306,170,314,170,314,135,270,135,
+ i = TkcPolygon.new(w,270,179,306,179,306,170,314,170,314,135,270,135,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '223'
$floorItems['223'] = i
- TkcText.new(w,292,157, 'text'=>'223', 'fill'=>color,
+ TkcText.new(w,292,157, 'text'=>'223', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,268,179,221,179,221,135,268,135,
+ i = TkcPolygon.new(w,268,179,221,179,221,135,268,135,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '222'
$floorItems['222'] = i
- TkcText.new(w,244.5,157, 'text'=>'222', 'fill'=>color,
+ TkcText.new(w,244.5,157, 'text'=>'222', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,177,179,219,179,219,135,177,135,
+ i = TkcPolygon.new(w,177,179,219,179,219,135,177,135,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '221'
$floorItems['221'] = i
- TkcText.new(w,198,157, 'text'=>'221', 'fill'=>color,
+ TkcText.new(w,198,157, 'text'=>'221', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,299,327,349,327,349,284,341,284,341,276,299,276,
+ i = TkcPolygon.new(w,299,327,349,327,349,284,341,284,341,276,299,276,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '204'
$floorItems['204'] = i
- TkcText.new(w,324,301.5, 'text'=>'204', 'fill'=>color,
+ TkcText.new(w,324,301.5, 'text'=>'204', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,234,276,297,276,297,327,257,327,257,338,234,338,
+ i = TkcPolygon.new(w,234,276,297,276,297,327,257,327,257,338,234,338,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '205'
$floorItems['205'] = i
- TkcText.new(w,265.5,307, 'text'=>'205', 'fill'=>color,
+ TkcText.new(w,265.5,307, 'text'=>'205', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,256,385,256,340,212,340,212,385,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '207'
$floorItems['207'] = i
- TkcText.new(w,234,362.5, 'text'=>'207', 'fill'=>color,
+ TkcText.new(w,234,362.5, 'text'=>'207', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,210,340,164,340,164,385,210,385,
+ i = TkcPolygon.new(w,210,340,164,340,164,385,210,385,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '208'
$floorItems['208'] = i
- TkcText.new(w,187,362.5, 'text'=>'208', 'fill'=>color,
+ TkcText.new(w,187,362.5, 'text'=>'208', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,115,340,162,340,162,385,115,385,
+ i = TkcPolygon.new(w,115,340,162,340,162,385,115,385,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '209'
$floorItems['209'] = i
- TkcText.new(w,138.5,362.5, 'text'=>'209', 'fill'=>color,
+ TkcText.new(w,138.5,362.5, 'text'=>'209', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,89,228,89,156,53,156,53,228,
+ i = TkcPolygon.new(w,89,228,89,156,53,156,53,228,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '217'
$floorItems['217'] = i
- TkcText.new(w,71,192, 'text'=>'217', 'fill'=>color,
+ TkcText.new(w,71,192, 'text'=>'217', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,89,169,97,169,97,190,89,190,
+ i = TkcPolygon.new(w,89,169,97,169,97,190,89,190,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '217A'
$floorItems['217A'] = i
- TkcText.new(w,93,179.5, 'text'=>'217A', 'fill'=>color,
+ TkcText.new(w,93,179.5, 'text'=>'217A', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,89,156,89,168,95,168,95,135,53,135,53,156,
+ i = TkcPolygon.new(w,89,156,89,168,95,168,95,135,53,135,53,156,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '216'
$floorItems['216'] = i
- TkcText.new(w,71,145.5, 'text'=>'216', 'fill'=>color,
+ TkcText.new(w,71,145.5, 'text'=>'216', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,179,51,135,6,135,6,179,
+ i = TkcPolygon.new(w,51,179,51,135,6,135,6,179,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '215'
$floorItems['215'] = i
- TkcText.new(w,28.5,157, 'text'=>'215', 'fill'=>color,
+ TkcText.new(w,28.5,157, 'text'=>'215', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,227,6,227,6,180,51,180,
+ i = TkcPolygon.new(w,51,227,6,227,6,180,51,180,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '214'
$floorItems['214'] = i
- TkcText.new(w,28.5,203.5, 'text'=>'214', 'fill'=>color,
+ TkcText.new(w,28.5,203.5, 'text'=>'214', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,275,6,275,6,229,51,229,
+ i = TkcPolygon.new(w,51,275,6,275,6,229,51,229,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '213'
$floorItems['213'] = i
- TkcText.new(w,28.5,252, 'text'=>'213', 'fill'=>color,
+ TkcText.new(w,28.5,252, 'text'=>'213', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,114,340,67,340,67,385,114,385,
+ i = TkcPolygon.new(w,114,340,67,340,67,385,114,385,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '210'
$floorItems['210'] = i
- TkcText.new(w,90.5,362.5, 'text'=>'210', 'fill'=>color,
+ TkcText.new(w,90.5,362.5, 'text'=>'210', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,59,389,59,385,65,385,65,340,1,340,1,389,
+ i = TkcPolygon.new(w,59,389,59,385,65,385,65,340,1,340,1,389,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '211'
$floorItems['211'] = i
- TkcText.new(w,33,364.5, 'text'=>'211', 'fill'=>color,
+ TkcText.new(w,33,364.5, 'text'=>'211', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,393,309,350,309,350,282,342,282,342,276,393,276,
+ i = TkcPolygon.new(w,393,309,350,309,350,282,342,282,342,276,393,276,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '203'
$floorItems['203'] = i
- TkcText.new(w,367.5,292.5, 'text'=>'203', 'fill'=>color,
+ TkcText.new(w,367.5,292.5, 'text'=>'203', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,132.5,208.5, 'text'=>'220', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
+ i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = 'Priv Lift2'
$floorItems['Priv Lift2'] = i
- TkcText.new(w,323,188, 'text'=>'Priv Lift2', 'fill'=>color,
+ TkcText.new(w,323,188, 'text'=>'Priv Lift2', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
+ i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
'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,
+ TkcText.new(w,323,223, 'text'=>'Pub Lift 2', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
+ i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '218'
$floorItems['218'] = i
- TkcText.new(w,136,149.5, 'text'=>'218', 'fill'=>color,
+ TkcText.new(w,136,149.5, 'text'=>'218', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
+ i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '219'
$floorItems['219'] = i
- TkcText.new(w,132.5,180, 'text'=>'219', 'fill'=>color,
+ TkcText.new(w,132.5,180, 'text'=>'219', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
+ i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels[i.id] = '201'
$floorItems['201'] = i
- TkcText.new(w,358,209, 'text'=>'201', 'fill'=>color,
+ TkcText.new(w,358,209, 'text'=>'201', 'fill'=>color,
'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'])
@@ -1280,206 +1280,206 @@ def floor_fg3(w,color)
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '316'
$floorItems['316'] = i
- TkcText.new(w,79.5,204, 'text'=>'316', 'fill'=>color,
+ TkcText.new(w,79.5,204, 'text'=>'316', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,115,368,162,368,162,323,115,323,
+ i = TkcPolygon.new(w,115,368,162,368,162,323,115,323,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '309'
$floorItems['309'] = i
- TkcText.new(w,138.5,345.5, 'text'=>'309', 'fill'=>color,
+ TkcText.new(w,138.5,345.5, 'text'=>'309', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,164,323,164,368,211,368,211,323,
+ i = TkcPolygon.new(w,164,323,164,368,211,368,211,323,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '308'
$floorItems['308'] = i
- TkcText.new(w,187.5,345.5, 'text'=>'308', 'fill'=>color,
+ TkcText.new(w,187.5,345.5, 'text'=>'308', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,256,368,212,368,212,323,256,323,
+ i = TkcPolygon.new(w,256,368,212,368,212,323,256,323,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '307'
$floorItems['307'] = i
- TkcText.new(w,234,345.5, 'text'=>'307', 'fill'=>color,
+ TkcText.new(w,234,345.5, 'text'=>'307', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,244,276,297,276,297,327,260,327,260,321,244,321,
+ i = TkcPolygon.new(w,244,276,297,276,297,327,260,327,260,321,244,321,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '305'
$floorItems['305'] = i
- TkcText.new(w,270.5,301.5, 'text'=>'305', 'fill'=>color,
+ TkcText.new(w,270.5,301.5, 'text'=>'305', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,251,219,251,203,244,203,244,219,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '324B'
$floorItems['324B'] = i
- TkcText.new(w,247.5,211, 'text'=>'324B', 'fill'=>color,
+ TkcText.new(w,247.5,211, 'text'=>'324B', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,251,249,244,249,244,232,251,232,
+ i = TkcPolygon.new(w,251,249,244,249,244,232,251,232,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '324A'
$floorItems['324A'] = i
- TkcText.new(w,247.5,240.5, 'text'=>'324A', 'fill'=>color,
+ TkcText.new(w,247.5,240.5, 'text'=>'324A', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,223,135,223,179,177,179,177,135,
+ i = TkcPolygon.new(w,223,135,223,179,177,179,177,135,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '320'
$floorItems['320'] = i
- TkcText.new(w,200,157, 'text'=>'320', 'fill'=>color,
+ TkcText.new(w,200,157, 'text'=>'320', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,114,368,114,323,67,323,67,368,
+ i = TkcPolygon.new(w,114,368,114,323,67,323,67,368,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '310'
$floorItems['310'] = i
- TkcText.new(w,90.5,345.5, 'text'=>'310', 'fill'=>color,
+ TkcText.new(w,90.5,345.5, 'text'=>'310', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,23,277,23,321,68,321,68,277,
+ i = TkcPolygon.new(w,23,277,23,321,68,321,68,277,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '312'
$floorItems['312'] = i
- TkcText.new(w,45.5,299, 'text'=>'312', 'fill'=>color,
+ TkcText.new(w,45.5,299, 'text'=>'312', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,23,229,68,229,68,275,23,275,
+ i = TkcPolygon.new(w,23,229,68,229,68,275,23,275,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '313'
$floorItems['313'] = i
- TkcText.new(w,45.5,252, 'text'=>'313', 'fill'=>color,
+ TkcText.new(w,45.5,252, 'text'=>'313', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,68,227,23,227,23,180,68,180,
+ i = TkcPolygon.new(w,68,227,23,227,23,180,68,180,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '314'
$floorItems['314'] = i
- TkcText.new(w,40.5,203.5, 'text'=>'314', 'fill'=>color,
+ TkcText.new(w,40.5,203.5, 'text'=>'314', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,95,179,95,135,23,135,23,179,
+ i = TkcPolygon.new(w,95,179,95,135,23,135,23,179,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '315'
$floorItems['315'] = i
- TkcText.new(w,59,157, 'text'=>'315', 'fill'=>color,
+ TkcText.new(w,59,157, 'text'=>'315', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,99,226,99,204,91,204,91,226,
+ i = TkcPolygon.new(w,99,226,99,204,91,204,91,226,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '316B'
$floorItems['316B'] = i
- TkcText.new(w,95,215, 'text'=>'316B', 'fill'=>color,
+ TkcText.new(w,95,215, 'text'=>'316B', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,91,202,99,202,99,180,91,180,
+ i = TkcPolygon.new(w,91,202,99,202,99,180,91,180,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '316A'
$floorItems['316A'] = i
- TkcText.new(w,95,191, 'text'=>'316A', 'fill'=>color,
+ TkcText.new(w,95,191, 'text'=>'316A', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,141.5,209, 'text'=>'319', 'fill'=>color,
'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,
+ i = TkcPolygon.new(w,65,368,58,368,58,389,1,389,1,333,23,333,23,323,65,323,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '311'
$floorItems['311'] = i
- TkcText.new(w,29.5,361, 'text'=>'311', 'fill'=>color,
+ TkcText.new(w,29.5,361, 'text'=>'311', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
+ i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '318'
$floorItems['318'] = i
- TkcText.new(w,132.5,180, 'text'=>'318', 'fill'=>color,
+ TkcText.new(w,132.5,180, 'text'=>'318', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
+ i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '317'
$floorItems['317'] = i
- TkcText.new(w,136,149.5, 'text'=>'317', 'fill'=>color,
+ TkcText.new(w,136,149.5, 'text'=>'317', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,274,194,274,221,306,221,306,194,
+ i = TkcPolygon.new(w,274,194,274,221,306,221,306,194,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '323'
$floorItems['323'] = i
- TkcText.new(w,290,207.5, 'text'=>'323', 'fill'=>color,
+ TkcText.new(w,290,207.5, 'text'=>'323', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,306,222,274,222,274,249,306,249,
+ i = TkcPolygon.new(w,306,222,274,222,274,249,306,249,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '325'
$floorItems['325'] = i
- TkcText.new(w,290,235.5, 'text'=>'325', 'fill'=>color,
+ TkcText.new(w,290,235.5, 'text'=>'325', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,263,179,224,179,224,135,263,135,
+ i = TkcPolygon.new(w,263,179,224,179,224,135,263,135,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '321'
$floorItems['321'] = i
- TkcText.new(w,243.5,157, 'text'=>'321', 'fill'=>color,
+ TkcText.new(w,243.5,157, 'text'=>'321', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,314,169,306,169,306,192,273,192,
- 264,181,264,135,314,135,
+ 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,
+ TkcText.new(w,293.5,163.5, 'text'=>'322', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
+ i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = 'Pub Lift3'
$floorItems['Pub Lift3'] = i
- TkcText.new(w,323,223, 'text'=>'Pub Lift3', 'fill'=>color,
+ TkcText.new(w,323,223, 'text'=>'Pub Lift3', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
+ i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = 'Priv Lift3'
$floorItems['Priv Lift3'] = i
- TkcText.new(w,323,188, 'text'=>'Priv Lift3', 'fill'=>color,
+ TkcText.new(w,323,188, 'text'=>'Priv Lift3', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,350,284,376,284,376,276,397,276,397,309,350,309,
+ i = TkcPolygon.new(w,350,284,376,284,376,276,397,276,397,309,350,309,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '303'
$floorItems['303'] = i
- TkcText.new(w,373.5,292.5, 'text'=>'303', 'fill'=>color,
+ TkcText.new(w,373.5,292.5, 'text'=>'303', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,262,226, 'text'=>'324', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,299,276,299,327,349,327,349,284,341,284,341,276,
+ i = TkcPolygon.new(w,299,276,299,327,349,327,349,284,341,284,341,276,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '304'
$floorItems['304'] = i
- TkcText.new(w,324,301.5, 'text'=>'304', 'fill'=>color,
+ TkcText.new(w,324,301.5, 'text'=>'304', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
+ i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '301'
$floorItems['301'] = i
- TkcText.new(w,358,209, 'text'=>'301', 'fill'=>color,
+ TkcText.new(w,358,209, 'text'=>'301', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,397,246,377,246,377,185,397,185,
+ i = TkcPolygon.new(w,397,246,377,246,377,185,397,185,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '327'
$floorItems['327'] = i
- TkcText.new(w,387,215.5, 'text'=>'327', 'fill'=>color,
+ TkcText.new(w,387,215.5, 'text'=>'327', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,316,131,316,169,377,169,377,185,397,185,397,131,
+ i = TkcPolygon.new(w,316,131,316,169,377,169,377,185,397,185,397,131,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels[i.id] = '326'
$floorItems['326'] = i
- TkcText.new(w,365.5,150, 'text'=>'326', 'fill'=>color,
+ TkcText.new(w,365.5,150, 'text'=>'326', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,319.5,261, 'text'=>'302', 'fill'=>color,
'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,
+ 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,
+ TkcText.new(w,200.5,284.5, 'text'=>'306', 'fill'=>color,
'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'])
@@ -1574,7 +1574,7 @@ end
# toplevel widget が存在すれば削除する
if defined?($floor_demo) && $floor_demo
- $floor_demo.destroy
+ $floor_demo.destroy
$floor_demo = nil
end
@@ -1590,7 +1590,7 @@ $floor_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($floor_demo).pack(:fill=>:both, :expand=>true)
# label 生成
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'8i', 'justify'=>'left',
+TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'8i', 'justify'=>'left',
'text'=>"このウィンドウにはディジタルエクイップメント社のウェスタンリサーチラボラトリ (DECWRL) の間取りが書かれたキャンバス widget が入っています。これは 3階建てで、常にそのうちの1階分が選択、つまりその間取りが表示されるようになっています。ある階を選択するには、その上でマウスの左ボタンをクリックしてください。マウスが選択されている階の上を動くと、その下にある部屋の色が変わり、部屋番号が「部屋番号:」エントリに表示されます。また、エントリに部屋番号を書くとその部屋の色が変わります。"){
pack('side'=>'top')
}
@@ -1622,10 +1622,10 @@ $floorItems = {}
if $tk_version =~ /^4\.[01]/
$floor_canvas_frame = TkFrame.new(base_frame,'bd'=>2,'relief'=>'sunken',
'highlightthickness'=>2)
- $floor_canvas = TkCanvas.new($floor_canvas_frame,
- 'width'=>900, 'height'=>500, 'borderwidth'=>0,
+ $floor_canvas = TkCanvas.new($floor_canvas_frame,
+ 'width'=>900, 'height'=>500, 'borderwidth'=>0,
'highlightthickness'=>0) {|c|
- TkScrollbar.new(base_frame, 'orient'=>'horiz',
+ TkScrollbar.new(base_frame, 'orient'=>'horiz',
'command'=>proc{|*args| c.xview(*args)}){|hs|
c.xscrollcommand(proc{|first,last| hs.set first,last})
pack('side'=>'bottom', 'fill'=>'x')
@@ -1646,20 +1646,20 @@ else
v = TkScrollbar.new(f, 'highlightthickness'=>0, 'orient'=>'vertical')
TkFrame.new(f, 'bd'=>2, 'relief'=>'sunken') {|f1|
- $floor_canvas = TkCanvas.new(f1, 'width'=>900, 'height'=>500,
- 'borderwidth'=>0,
+ $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')
}
- grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
+ grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
}
- v.grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
+ v.grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- h.grid('padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
+ h.grid('padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
@@ -1676,7 +1676,7 @@ end
# Create an entry for displaying and typing in current room.
$currentRoom = TkVariable.new
-$floor_entry = TkEntry.new($floor_canvas, 'width'=>10, 'relief'=>'sunken',
+$floor_entry = TkEntry.new($floor_canvas, 'width'=>10, 'relief'=>'sunken',
'bd'=>2, 'textvariable'=>$currentRoom)
# Choose colors, then fill in the floorplan.
@@ -1713,7 +1713,7 @@ $floor_canvas.itembind('floor3', '1', proc{floorDisplay $floor_canvas,3})
$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',
+$floor_canvas.bind('B2-Motion',
proc{|x,y| $floor_canvas.scan_dragto x,y}, '%x %y')
$floor_canvas.bind('Destroy', proc{$currentRoom.unset})
$currentRoom.value = ''
diff --git a/ext/tk/sample/demos-jp/floor2.rb b/ext/tk/sample/demos-jp/floor2.rb
index d4381c5543..92ace6b51a 100644
--- a/ext/tk/sample/demos-jp/floor2.rb
+++ b/ext/tk/sample/demos-jp/floor2.rb
@@ -18,7 +18,7 @@ def floorDisplay2(w,active)
w.delete('all')
$activeFloor2 = active
- # First go through the three floors, displaying the backgrounds for
+ # First go through the three floors, displaying the backgrounds for
# each floor.
floor2_bg1(w,$floor2_colors['bg1'],$floor2_colors['outline1'])
@@ -29,12 +29,12 @@ def floorDisplay2(w,active)
w.raise("floor#{active}")
- # Create a dummy item just to mark this point in the display list,
+ # Create a dummy item just to mark this point in the display list,
# so we can insert highlights here.
w.create(TkcRectangle,0,100,1,101,'fill'=>'','outline'=>'','tags'=>'marker')
- # Add the walls and labels for the active floor, along with
+ # Add the walls and labels for the active floor, along with
# transparent polygons that define the rooms on the floor.
# Make sure that the room polygons are on top.
@@ -299,7 +299,7 @@ def floor2_bg3(w,fill,outline)
w.create(TkcLine,21,331,0,331, 'fill'=>outline, 'tags'=>['floor3','bg'])
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,
+ w.create(TkcLine,107,300,159,300,159,248,107,248,107,300,
'fill'=>outline, 'tags'=>['floor3','bg'])
end
@@ -313,316 +313,316 @@ end
# 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,
+ i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '101'
$floorItems2['101'] = i
- w.create(TkcText,358,209, 'text'=>'101', 'fill'=>color,
+ w.create(TkcText,358,209, 'text'=>'101', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
+ i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'Pub Lift1'
$floorItems2['Pub Lift1'] = i
- w.create(TkcText,323,223, 'text'=>'Pub Lift1', 'fill'=>color,
+ w.create(TkcText,323,223, 'text'=>'Pub Lift1', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
+ i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'Priv Lift1'
$floorItems2['Priv Lift1'] = i
- w.create(TkcText,323,188, 'text'=>'Priv Lift1', 'fill'=>color,
+ w.create(TkcText,323,188, 'text'=>'Priv Lift1', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,42,389,42,337,1,337,1,389,
+ i = TkcPolygon.new(w,42,389,42,337,1,337,1,389,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '110'
$floorItems2['110'] = i
- w.create(TkcText,21.5,363, 'text'=>'110', 'fill'=>color,
+ w.create(TkcText,21.5,363, 'text'=>'110', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,59,389,59,385,90,385,90,337,44,337,44,389,
+ i = TkcPolygon.new(w,59,389,59,385,90,385,90,337,44,337,44,389,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '109'
$floorItems2['109'] = i
- w.create(TkcText,67,363, 'text'=>'109', 'fill'=>color,
+ w.create(TkcText,67,363, 'text'=>'109', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,51,300,51,253,6,253,6,300,
+ i = TkcPolygon.new(w,51,300,51,253,6,253,6,300,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '111'
$floorItems2['111'] = i
- w.create(TkcText,28.5,276.5, 'text'=>'111', 'fill'=>color,
+ w.create(TkcText,28.5,276.5, 'text'=>'111', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,98,248,98,309,79,309,79,248,
+ i = TkcPolygon.new(w,98,248,98,309,79,309,79,248,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '117B'
$floorItems2['117B'] = i
- w.create(TkcText,88.5,278.5, 'text'=>'117B', 'fill'=>color,
+ w.create(TkcText,88.5,278.5, 'text'=>'117B', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,51,251,51,204,6,204,6,251,
+ i = TkcPolygon.new(w,51,251,51,204,6,204,6,251,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '112'
$floorItems2['112'] = i
- w.create(TkcText,28.5,227.5, 'text'=>'112', 'fill'=>color,
+ w.create(TkcText,28.5,227.5, 'text'=>'112', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,6,156,51,156,51,203,6,203,
+ i = TkcPolygon.new(w,6,156,51,156,51,203,6,203,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '113'
$floorItems2['113'] = i
- w.create(TkcText,28.5,179.5, 'text'=>'113', 'fill'=>color,
+ w.create(TkcText,28.5,179.5, 'text'=>'113', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,85,169,79,169,79,192,85,192,
+ i = TkcPolygon.new(w,85,169,79,169,79,192,85,192,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '117A'
$floorItems2['117A'] = i
- w.create(TkcText,82,180.5, 'text'=>'117A', 'fill'=>color,
+ w.create(TkcText,82,180.5, 'text'=>'117A', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,77,302,77,168,53,168,53,302,
+ i = TkcPolygon.new(w,77,302,77,168,53,168,53,302,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '117'
$floorItems2['117'] = i
- w.create(TkcText,65,235, 'text'=>'117', 'fill'=>color,
+ w.create(TkcText,65,235, 'text'=>'117', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,51,155,51,115,6,115,6,155,
+ i = TkcPolygon.new(w,51,155,51,115,6,115,6,155,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '114'
$floorItems2['114'] = i
- w.create(TkcText,28.5,135, 'text'=>'114', 'fill'=>color,
+ w.create(TkcText,28.5,135, 'text'=>'114', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,95,115,53,115,53,168,95,168,
+ i = TkcPolygon.new(w,95,115,53,115,53,168,95,168,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '115'
$floorItems2['115'] = i
- w.create(TkcText,74,141.5, 'text'=>'115', 'fill'=>color,
+ w.create(TkcText,74,141.5, 'text'=>'115', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,87,113,87,27,10,27,10,113,
+ i = TkcPolygon.new(w,87,113,87,27,10,27,10,113,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '116'
$floorItems2['116'] = i
- w.create(TkcText,48.5,70, 'text'=>'116', 'fill'=>color,
+ w.create(TkcText,48.5,70, 'text'=>'116', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,89,91,128,91,128,113,89,131,
+ i = TkcPolygon.new(w,89,91,128,91,128,113,89,131,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '118'
$floorItems2['118'] = i
- w.create(TkcText,108.5,102, 'text'=>'118', 'fill'=>color,
+ w.create(TkcText,108.5,102, 'text'=>'118', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,189.5,111.5, 'text'=>'120', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,131,207.5, 'text'=>'122', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,138,169,154,169,154,191,138,191,
+ i = TkcPolygon.new(w,138,169,154,169,154,191,138,191,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '121'
$floorItems2['121'] = i
- w.create(TkcText,146,180, 'text'=>'121', 'fill'=>color,
+ w.create(TkcText,146,180, 'text'=>'121', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,99,300,126,300,126,309,99,309,
+ i = TkcPolygon.new(w,99,300,126,300,126,309,99,309,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '106A'
$floorItems2['106A'] = i
- w.create(TkcText,112.5,304.5, 'text'=>'106A', 'fill'=>color,
+ w.create(TkcText,112.5,304.5, 'text'=>'106A', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,128,299,128,309,150,309,150,248,99,248,99,299,
+ i = TkcPolygon.new(w,128,299,128,309,150,309,150,248,99,248,99,299,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '105'
$floorItems2['105'] = i
- w.create(TkcText,124.5,278.5, 'text'=>'105', 'fill'=>color,
+ w.create(TkcText,124.5,278.5, 'text'=>'105', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,174,309,174,300,152,300,152,309,
+ i = TkcPolygon.new(w,174,309,174,300,152,300,152,309,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '106B'
$floorItems2['106B'] = i
- w.create(TkcText,163,304.5, 'text'=>'106B', 'fill'=>color,
+ w.create(TkcText,163,304.5, 'text'=>'106B', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,176,299,176,309,216,309,216,248,152,248,152,299,
+ i = TkcPolygon.new(w,176,299,176,309,216,309,216,248,152,248,152,299,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '104'
$floorItems2['104'] = i
- w.create(TkcText,184,278.5, 'text'=>'104', 'fill'=>color,
+ w.create(TkcText,184,278.5, 'text'=>'104', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,138,385,138,337,91,337,91,385,
+ i = TkcPolygon.new(w,138,385,138,337,91,337,91,385,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '108'
$floorItems2['108'] = i
- w.create(TkcText,114.5,361, 'text'=>'108', 'fill'=>color,
+ w.create(TkcText,114.5,361, 'text'=>'108', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,256,337,140,337,140,385,256,385,
+ i = TkcPolygon.new(w,256,337,140,337,140,385,256,385,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '107'
$floorItems2['107'] = i
- w.create(TkcText,198,361, 'text'=>'107', 'fill'=>color,
+ w.create(TkcText,198,361, 'text'=>'107', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,300,353,300,329,260,329,260,353,
+ i = TkcPolygon.new(w,300,353,300,329,260,329,260,353,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'Smoking'
$floorItems2['Smoking'] = i
- w.create(TkcText,280,341, 'text'=>'Smoking', 'fill'=>color,
+ w.create(TkcText,280,341, 'text'=>'Smoking', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,314,135,314,170,306,170,306,246,177,246,177,135,
+ i = TkcPolygon.new(w,314,135,314,170,306,170,306,246,177,246,177,135,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '123'
$floorItems2['123'] = i
- w.create(TkcText,245.5,190.5, 'text'=>'123', 'fill'=>color,
+ w.create(TkcText,245.5,190.5, 'text'=>'123', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,217,248,301,248,301,326,257,326,257,310,217,310,
+ i = TkcPolygon.new(w,217,248,301,248,301,326,257,326,257,310,217,310,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '103'
$floorItems2['103'] = i
- w.create(TkcText,259,287, 'text'=>'103', 'fill'=>color,
+ w.create(TkcText,259,287, 'text'=>'103', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,396,188,377,188,377,169,316,169,316,131,396,131,
+ i = TkcPolygon.new(w,396,188,377,188,377,169,316,169,316,131,396,131,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '124'
$floorItems2['124'] = i
- w.create(TkcText,356,150, 'text'=>'124', 'fill'=>color,
+ w.create(TkcText,356,150, 'text'=>'124', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,397,226,407,226,407,189,377,189,377,246,397,246,
+ i = TkcPolygon.new(w,397,226,407,226,407,189,377,189,377,246,397,246,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '125'
$floorItems2['125'] = i
- w.create(TkcText,392,217.5, 'text'=>'125', 'fill'=>color,
+ w.create(TkcText,392,217.5, 'text'=>'125', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,399,187,409,187,409,207,474,207,474,164,399,164,
+ i = TkcPolygon.new(w,399,187,409,187,409,207,474,207,474,164,399,164,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '126'
$floorItems2['126'] = i
- w.create(TkcText,436.5,185.5, 'text'=>'126', 'fill'=>color,
+ w.create(TkcText,436.5,185.5, 'text'=>'126', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,436.5,'231', 'text'=>'127', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,488.5,'184', 'text'=>'MShower', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,497,176,513,176,513,204,492,204,492,190,497,190,
+ i = TkcPolygon.new(w,497,176,513,176,513,204,492,204,492,190,497,190,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'Closet'
$floorItems2['Closet'] = i
- w.create(TkcText,502.5,190, 'text'=>'Closet', 'fill'=>color,
+ w.create(TkcText,502.5,190, 'text'=>'Closet', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,476,237,476,206,513,206,513,254,488,254,488,237,
+ i = TkcPolygon.new(w,476,237,476,206,513,206,513,254,488,254,488,237,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = 'WShower'
$floorItems2['WShower'] = i
- w.create(TkcText,494.5,230, 'text'=>'WShower', 'fill'=>color,
+ w.create(TkcText,494.5,230, 'text'=>'WShower', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,638.5,205, 'text'=>'130', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,367.5,278.5, 'text'=>'102', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,397,255,486,255,486,276,397,276,
+ i = TkcPolygon.new(w,397,255,486,255,486,276,397,276,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '128'
$floorItems2['128'] = i
- w.create(TkcText,441.5,265.5, 'text'=>'128', 'fill'=>color,
+ w.create(TkcText,441.5,265.5, 'text'=>'128', 'fill'=>color,
'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'])
$floorLabels2[i.id] = '129'
$floorItems2['129'] = i
- w.create(TkcText,535.5,293, 'text'=>'129', 'fill'=>color,
+ w.create(TkcText,535.5,293, 'text'=>'129', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,628.5,335, 'text'=>'133', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,742,387,742,281,800,281,800,387,
+ i = TkcPolygon.new(w,742,387,742,281,800,281,800,387,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '132'
$floorItems2['132'] = i
- w.create(TkcText,771,334, 'text'=>'132', 'fill'=>color,
+ w.create(TkcText,771,334, 'text'=>'132', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,800,168,800,280,699,280,699,168,
+ i = TkcPolygon.new(w,800,168,800,280,699,280,699,168,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '134'
$floorItems2['134'] = i
- w.create(TkcText,749.5,224, 'text'=>'134', 'fill'=>color,
+ w.create(TkcText,749.5,224, 'text'=>'134', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor1','label'])
- i = TkcPolygon.new(w,726,131,726,166,800,166,800,131,
+ i = TkcPolygon.new(w,726,131,726,166,800,166,800,131,
'fill'=>'', 'tags'=>['floor1','room'])
$floorLabels2[i.id] = '135'
$floorItems2['135'] = i
- w.create(TkcText,763,148.5, 'text'=>'135', 'fill'=>color,
+ w.create(TkcText,763,148.5, 'text'=>'135', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,368,323, 'text'=>'Ramona Stair', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,155,77.5, 'text'=>'University Stair', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,317.5,28.5, 'text'=>'Plaza Stair', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,303,81, 'text'=>'Plaza Deck', 'fill'=>color,
'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'])
$floorLabels2[i.id] = '106'
$floorItems2['106'] = i
- w.create(TkcText,131.5,318.5, 'text'=>'106', 'fill'=>color,
+ w.create(TkcText,131.5,318.5, 'text'=>'106', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,143.5,133, 'text'=>'119', 'fill'=>color,
'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'])
@@ -795,321 +795,321 @@ end
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,
+ 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,
+ w.create(TkcText,774,195, 'text'=>'238', 'fill'=>color,
'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'])
$floorLabels2[i.id] = '237'
$floorItems2['237'] = i
- w.create(TkcText,763,148.5, 'text'=>'237', 'fill'=>color,
+ w.create(TkcText,763,148.5, 'text'=>'237', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,600,264, 'text'=>'246', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,694,279,643,279,643,314,694,314,
+ i = TkcPolygon.new(w,694,279,643,279,643,314,694,314,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '247'
$floorItems2['247'] = i
- w.create(TkcText,668.5,296.5, 'text'=>'247', 'fill'=>color,
+ w.create(TkcText,668.5,296.5, 'text'=>'247', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,285.5,260, 'text'=>'202', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,143,267, 'text'=>'206', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,277,6,277,6,338,51,338,
+ i = TkcPolygon.new(w,51,277,6,277,6,338,51,338,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '212'
$floorItems2['212'] = i
- w.create(TkcText,28.5,307.5, 'text'=>'212', 'fill'=>color,
+ w.create(TkcText,28.5,307.5, 'text'=>'212', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,557,276,486,276,486,309,510,309,510,325,557,325,
+ i = TkcPolygon.new(w,557,276,486,276,486,309,510,309,510,325,557,325,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '245'
$floorItems2['245'] = i
- w.create(TkcText,521.5,300.5, 'text'=>'245', 'fill'=>color,
+ w.create(TkcText,521.5,300.5, 'text'=>'245', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,560,389,599,389,599,326,560,326,
+ i = TkcPolygon.new(w,560,389,599,389,599,326,560,326,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '244'
$floorItems2['244'] = i
- w.create(TkcText,579.5,357.5, 'text'=>'244', 'fill'=>color,
+ w.create(TkcText,579.5,357.5, 'text'=>'244', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,601,389,601,326,643,326,643,389,
+ i = TkcPolygon.new(w,601,389,601,326,643,326,643,389,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '243'
$floorItems2['243'] = i
- w.create(TkcText,622,357.5, 'text'=>'243', 'fill'=>color,
+ w.create(TkcText,622,357.5, 'text'=>'243', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,688,316,645,316,645,365,688,365,
+ i = TkcPolygon.new(w,688,316,645,316,645,365,688,365,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '242'
$floorItems2['242'] = i
- w.create(TkcText,666.5,340.5, 'text'=>'242', 'fill'=>color,
+ w.create(TkcText,666.5,340.5, 'text'=>'242', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,802,367,759,367,759,226,802,226,
+ i = TkcPolygon.new(w,802,367,759,367,759,226,802,226,
'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,
+ w.create(TkcText,780.5,296.5, 'text'=>'Barbecue Deck', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,755,262,755,314,717,314,717,262,
+ i = TkcPolygon.new(w,755,262,755,314,717,314,717,262,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '240'
$floorItems2['240'] = i
- w.create(TkcText,736,288, 'text'=>'240', 'fill'=>color,
+ w.create(TkcText,736,288, 'text'=>'240', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,755,316,689,316,689,365,755,365,
+ i = TkcPolygon.new(w,755,316,689,316,689,365,755,365,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '241'
$floorItems2['241'] = i
- w.create(TkcText,722,340.5, 'text'=>'241', 'fill'=>color,
+ w.create(TkcText,722,340.5, 'text'=>'241', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,755,206,717,206,717,261,755,261,
+ i = TkcPolygon.new(w,755,206,717,206,717,261,755,261,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '239'
$floorItems2['239'] = i
- w.create(TkcText,736,233.5, 'text'=>'239', 'fill'=>color,
+ w.create(TkcText,736,233.5, 'text'=>'239', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,695,277,643,277,643,206,695,206,
+ i = TkcPolygon.new(w,695,277,643,277,643,206,695,206,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '248'
$floorItems2['248'] = i
- w.create(TkcText,669,241.5, 'text'=>'248', 'fill'=>color,
+ w.create(TkcText,669,241.5, 'text'=>'248', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,676,135,676,185,724,185,724,135,
+ i = TkcPolygon.new(w,676,135,676,185,724,185,724,135,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '236'
$floorItems2['236'] = i
- w.create(TkcText,700,160, 'text'=>'236', 'fill'=>color,
+ w.create(TkcText,700,160, 'text'=>'236', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,675,135,635,135,635,145,628,145,628,185,675,185,
+ i = TkcPolygon.new(w,675,135,635,135,635,145,628,145,628,185,675,185,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '235'
$floorItems2['235'] = i
- w.create(TkcText,651.5,160, 'text'=>'235', 'fill'=>color,
+ w.create(TkcText,651.5,160, 'text'=>'235', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,606,160, 'text'=>'234', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,552.5,158, 'text'=>'233', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,476,249,557,249,557,205,476,205,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '230'
$floorItems2['230'] = i
- w.create(TkcText,516.5,227, 'text'=>'230', 'fill'=>color,
+ w.create(TkcText,516.5,227, 'text'=>'230', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,476,164,486,164,486,131,525,131,525,185,476,185,
+ i = TkcPolygon.new(w,476,164,486,164,486,131,525,131,525,185,476,185,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '232'
$floorItems2['232'] = i
- w.create(TkcText,500.5,158, 'text'=>'232', 'fill'=>color,
+ w.create(TkcText,500.5,158, 'text'=>'232', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,476,186,495,186,495,204,476,204,
+ i = TkcPolygon.new(w,476,186,495,186,495,204,476,204,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '229'
$floorItems2['229'] = i
- w.create(TkcText,485.5,195, 'text'=>'229', 'fill'=>color,
+ w.create(TkcText,485.5,195, 'text'=>'229', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,474,207,409,207,409,187,399,187,399,164,474,164,
+ i = TkcPolygon.new(w,474,207,409,207,409,187,399,187,399,164,474,164,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '227'
$floorItems2['227'] = i
- w.create(TkcText,436.5,185.5, 'text'=>'227', 'fill'=>color,
+ w.create(TkcText,436.5,185.5, 'text'=>'227', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,399,228,399,253,474,253,474,209,409,209,409,228,
+ i = TkcPolygon.new(w,399,228,399,253,474,253,474,209,409,209,409,228,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '228'
$floorItems2['228'] = i
- w.create(TkcText,436.5,231, 'text'=>'228', 'fill'=>color,
+ w.create(TkcText,436.5,231, 'text'=>'228', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,397,246,397,226,407,226,407,189,377,189,377,246,
+ i = TkcPolygon.new(w,397,246,397,226,407,226,407,189,377,189,377,246,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '226'
$floorItems2['226'] = i
- w.create(TkcText,392,217.5, 'text'=>'226', 'fill'=>color,
+ w.create(TkcText,392,217.5, 'text'=>'226', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,377,169,316,169,316,131,397,131,397,188,377,188,
+ i = TkcPolygon.new(w,377,169,316,169,316,131,397,131,397,188,377,188,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '225'
$floorItems2['225'] = i
- w.create(TkcText,356.5,150, 'text'=>'225', 'fill'=>color,
+ w.create(TkcText,356.5,150, 'text'=>'225', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,234,198,306,198,306,249,234,249,
+ i = TkcPolygon.new(w,234,198,306,198,306,249,234,249,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '224'
$floorItems2['224'] = i
- w.create(TkcText,270,223.5, 'text'=>'224', 'fill'=>color,
+ w.create(TkcText,270,223.5, 'text'=>'224', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,270,179,306,179,306,170,314,170,314,135,270,135,
+ i = TkcPolygon.new(w,270,179,306,179,306,170,314,170,314,135,270,135,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '223'
$floorItems2['223'] = i
- w.create(TkcText,292,157, 'text'=>'223', 'fill'=>color,
+ w.create(TkcText,292,157, 'text'=>'223', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,268,179,221,179,221,135,268,135,
+ i = TkcPolygon.new(w,268,179,221,179,221,135,268,135,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '222'
$floorItems2['222'] = i
- w.create(TkcText,244.5,157, 'text'=>'222', 'fill'=>color,
+ w.create(TkcText,244.5,157, 'text'=>'222', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,177,179,219,179,219,135,177,135,
+ i = TkcPolygon.new(w,177,179,219,179,219,135,177,135,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '221'
$floorItems2['221'] = i
- w.create(TkcText,198,157, 'text'=>'221', 'fill'=>color,
+ w.create(TkcText,198,157, 'text'=>'221', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,299,327,349,327,349,284,341,284,341,276,299,276,
+ i = TkcPolygon.new(w,299,327,349,327,349,284,341,284,341,276,299,276,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '204'
$floorItems2['204'] = i
- w.create(TkcText,324,301.5, 'text'=>'204', 'fill'=>color,
+ w.create(TkcText,324,301.5, 'text'=>'204', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,234,276,297,276,297,327,257,327,257,338,234,338,
+ i = TkcPolygon.new(w,234,276,297,276,297,327,257,327,257,338,234,338,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '205'
$floorItems2['205'] = i
- w.create(TkcText,265.5,307, 'text'=>'205', 'fill'=>color,
+ w.create(TkcText,265.5,307, 'text'=>'205', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
i = TkcPolygon.new(w,256,385,256,340,212,340,212,385,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '207'
$floorItems2['207'] = i
- w.create(TkcText,234,362.5, 'text'=>'207', 'fill'=>color,
+ w.create(TkcText,234,362.5, 'text'=>'207', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,210,340,164,340,164,385,210,385,
+ i = TkcPolygon.new(w,210,340,164,340,164,385,210,385,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '208'
$floorItems2['208'] = i
- w.create(TkcText,187,362.5, 'text'=>'208', 'fill'=>color,
+ w.create(TkcText,187,362.5, 'text'=>'208', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,115,340,162,340,162,385,115,385,
+ i = TkcPolygon.new(w,115,340,162,340,162,385,115,385,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '209'
$floorItems2['209'] = i
- w.create(TkcText,138.5,362.5, 'text'=>'209', 'fill'=>color,
+ w.create(TkcText,138.5,362.5, 'text'=>'209', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,89,228,89,156,53,156,53,228,
+ i = TkcPolygon.new(w,89,228,89,156,53,156,53,228,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '217'
$floorItems2['217'] = i
- w.create(TkcText,71,192, 'text'=>'217', 'fill'=>color,
+ w.create(TkcText,71,192, 'text'=>'217', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,89,169,97,169,97,190,89,190,
+ i = TkcPolygon.new(w,89,169,97,169,97,190,89,190,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '217A'
$floorItems2['217A'] = i
- w.create(TkcText,93,179.5, 'text'=>'217A', 'fill'=>color,
+ w.create(TkcText,93,179.5, 'text'=>'217A', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,89,156,89,168,95,168,95,135,53,135,53,156,
+ i = TkcPolygon.new(w,89,156,89,168,95,168,95,135,53,135,53,156,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '216'
$floorItems2['216'] = i
- w.create(TkcText,71,145.5, 'text'=>'216', 'fill'=>color,
+ w.create(TkcText,71,145.5, 'text'=>'216', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,179,51,135,6,135,6,179,
+ i = TkcPolygon.new(w,51,179,51,135,6,135,6,179,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '215'
$floorItems2['215'] = i
- w.create(TkcText,28.5,157, 'text'=>'215', 'fill'=>color,
+ w.create(TkcText,28.5,157, 'text'=>'215', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,227,6,227,6,180,51,180,
+ i = TkcPolygon.new(w,51,227,6,227,6,180,51,180,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '214'
$floorItems2['214'] = i
- w.create(TkcText,28.5,203.5, 'text'=>'214', 'fill'=>color,
+ w.create(TkcText,28.5,203.5, 'text'=>'214', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,51,275,6,275,6,229,51,229,
+ i = TkcPolygon.new(w,51,275,6,275,6,229,51,229,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '213'
$floorItems2['213'] = i
- w.create(TkcText,28.5,252, 'text'=>'213', 'fill'=>color,
+ w.create(TkcText,28.5,252, 'text'=>'213', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,114,340,67,340,67,385,114,385,
+ i = TkcPolygon.new(w,114,340,67,340,67,385,114,385,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '210'
$floorItems2['210'] = i
- w.create(TkcText,90.5,362.5, 'text'=>'210', 'fill'=>color,
+ w.create(TkcText,90.5,362.5, 'text'=>'210', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,59,389,59,385,65,385,65,340,1,340,1,389,
+ i = TkcPolygon.new(w,59,389,59,385,65,385,65,340,1,340,1,389,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '211'
$floorItems2['211'] = i
- w.create(TkcText,33,364.5, 'text'=>'211', 'fill'=>color,
+ w.create(TkcText,33,364.5, 'text'=>'211', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,393,309,350,309,350,282,342,282,342,276,393,276,
+ i = TkcPolygon.new(w,393,309,350,309,350,282,342,282,342,276,393,276,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '203'
$floorItems2['203'] = i
- w.create(TkcText,367.5,292.5, 'text'=>'203', 'fill'=>color,
+ w.create(TkcText,367.5,292.5, 'text'=>'203', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,132.5,208.5, 'text'=>'220', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
+ i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = 'Priv Lift2'
$floorItems2['Priv Lift2'] = i
- w.create(TkcText,323,188, 'text'=>'Priv Lift2', 'fill'=>color,
+ w.create(TkcText,323,188, 'text'=>'Priv Lift2', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
+ i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
'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,
+ w.create(TkcText,323,223, 'text'=>'Pub Lift 2', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
+ i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '218'
$floorItems2['218'] = i
- w.create(TkcText,136,149.5, 'text'=>'218', 'fill'=>color,
+ w.create(TkcText,136,149.5, 'text'=>'218', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
+ i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '219'
$floorItems2['219'] = i
- w.create(TkcText,132.5,180, 'text'=>'219', 'fill'=>color,
+ w.create(TkcText,132.5,180, 'text'=>'219', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor2','label'])
- i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
+ i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
'fill'=>'', 'tags'=>['floor2','room'])
$floorLabels2[i.id] = '201'
$floorItems2['201'] = i
- w.create(TkcText,358,209, 'text'=>'201', 'fill'=>color,
+ w.create(TkcText,358,209, 'text'=>'201', 'fill'=>color,
'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'])
@@ -1280,206 +1280,206 @@ def floor2_fg3(w,color)
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '316'
$floorItems2['316'] = i
- w.create(TkcText,79.5,204, 'text'=>'316', 'fill'=>color,
+ w.create(TkcText,79.5,204, 'text'=>'316', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,115,368,162,368,162,323,115,323,
+ i = TkcPolygon.new(w,115,368,162,368,162,323,115,323,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '309'
$floorItems2['309'] = i
- w.create(TkcText,138.5,345.5, 'text'=>'309', 'fill'=>color,
+ w.create(TkcText,138.5,345.5, 'text'=>'309', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,164,323,164,368,211,368,211,323,
+ i = TkcPolygon.new(w,164,323,164,368,211,368,211,323,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '308'
$floorItems2['308'] = i
- w.create(TkcText,187.5,345.5, 'text'=>'308', 'fill'=>color,
+ w.create(TkcText,187.5,345.5, 'text'=>'308', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,256,368,212,368,212,323,256,323,
+ i = TkcPolygon.new(w,256,368,212,368,212,323,256,323,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '307'
$floorItems2['307'] = i
- w.create(TkcText,234,345.5, 'text'=>'307', 'fill'=>color,
+ w.create(TkcText,234,345.5, 'text'=>'307', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,244,276,297,276,297,327,260,327,260,321,244,321,
+ i = TkcPolygon.new(w,244,276,297,276,297,327,260,327,260,321,244,321,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '305'
$floorItems2['305'] = i
- w.create(TkcText,270.5,301.5, 'text'=>'305', 'fill'=>color,
+ w.create(TkcText,270.5,301.5, 'text'=>'305', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,251,219,251,203,244,203,244,219,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '324B'
$floorItems2['324B'] = i
- w.create(TkcText,247.5,211, 'text'=>'324B', 'fill'=>color,
+ w.create(TkcText,247.5,211, 'text'=>'324B', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,251,249,244,249,244,232,251,232,
+ i = TkcPolygon.new(w,251,249,244,249,244,232,251,232,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '324A'
$floorItems2['324A'] = i
- w.create(TkcText,247.5,240.5, 'text'=>'324A', 'fill'=>color,
+ w.create(TkcText,247.5,240.5, 'text'=>'324A', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,223,135,223,179,177,179,177,135,
+ i = TkcPolygon.new(w,223,135,223,179,177,179,177,135,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '320'
$floorItems2['320'] = i
- w.create(TkcText,200,157, 'text'=>'320', 'fill'=>color,
+ w.create(TkcText,200,157, 'text'=>'320', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,114,368,114,323,67,323,67,368,
+ i = TkcPolygon.new(w,114,368,114,323,67,323,67,368,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '310'
$floorItems2['310'] = i
- w.create(TkcText,90.5,345.5, 'text'=>'310', 'fill'=>color,
+ w.create(TkcText,90.5,345.5, 'text'=>'310', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,23,277,23,321,68,321,68,277,
+ i = TkcPolygon.new(w,23,277,23,321,68,321,68,277,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '312'
$floorItems2['312'] = i
- w.create(TkcText,45.5,299, 'text'=>'312', 'fill'=>color,
+ w.create(TkcText,45.5,299, 'text'=>'312', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,23,229,68,229,68,275,23,275,
+ i = TkcPolygon.new(w,23,229,68,229,68,275,23,275,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '313'
$floorItems2['313'] = i
- w.create(TkcText,45.5,252, 'text'=>'313', 'fill'=>color,
+ w.create(TkcText,45.5,252, 'text'=>'313', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,68,227,23,227,23,180,68,180,
+ i = TkcPolygon.new(w,68,227,23,227,23,180,68,180,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '314'
$floorItems2['314'] = i
- w.create(TkcText,40.5,203.5, 'text'=>'314', 'fill'=>color,
+ w.create(TkcText,40.5,203.5, 'text'=>'314', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,95,179,95,135,23,135,23,179,
+ i = TkcPolygon.new(w,95,179,95,135,23,135,23,179,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '315'
$floorItems2['315'] = i
- w.create(TkcText,59,157, 'text'=>'315', 'fill'=>color,
+ w.create(TkcText,59,157, 'text'=>'315', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,99,226,99,204,91,204,91,226,
+ i = TkcPolygon.new(w,99,226,99,204,91,204,91,226,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '316B'
$floorItems2['316B'] = i
- w.create(TkcText,95,215, 'text'=>'316B', 'fill'=>color,
+ w.create(TkcText,95,215, 'text'=>'316B', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,91,202,99,202,99,180,91,180,
+ i = TkcPolygon.new(w,91,202,99,202,99,180,91,180,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '316A'
$floorItems2['316A'] = i
- w.create(TkcText,95,191, 'text'=>'316A', 'fill'=>color,
+ w.create(TkcText,95,191, 'text'=>'316A', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,141.5,209, 'text'=>'319', 'fill'=>color,
'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,
+ i = TkcPolygon.new(w,65,368,58,368,58,389,1,389,1,333,23,333,23,323,65,323,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '311'
$floorItems2['311'] = i
- w.create(TkcText,29.5,361, 'text'=>'311', 'fill'=>color,
+ w.create(TkcText,29.5,361, 'text'=>'311', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
+ i = TkcPolygon.new(w,154,191,111,191,111,169,154,169,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '318'
$floorItems2['318'] = i
- w.create(TkcText,132.5,180, 'text'=>'318', 'fill'=>color,
+ w.create(TkcText,132.5,180, 'text'=>'318', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
+ i = TkcPolygon.new(w,175,168,97,168,97,131,175,131,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '317'
$floorItems2['317'] = i
- w.create(TkcText,136,149.5, 'text'=>'317', 'fill'=>color,
+ w.create(TkcText,136,149.5, 'text'=>'317', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,274,194,274,221,306,221,306,194,
+ i = TkcPolygon.new(w,274,194,274,221,306,221,306,194,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '323'
$floorItems2['323'] = i
- w.create(TkcText,290,207.5, 'text'=>'323', 'fill'=>color,
+ w.create(TkcText,290,207.5, 'text'=>'323', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,306,222,274,222,274,249,306,249,
+ i = TkcPolygon.new(w,306,222,274,222,274,249,306,249,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '325'
$floorItems2['325'] = i
- w.create(TkcText,290,235.5, 'text'=>'325', 'fill'=>color,
+ w.create(TkcText,290,235.5, 'text'=>'325', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,263,179,224,179,224,135,263,135,
+ i = TkcPolygon.new(w,263,179,224,179,224,135,263,135,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '321'
$floorItems2['321'] = i
- w.create(TkcText,243.5,157, 'text'=>'321', 'fill'=>color,
+ w.create(TkcText,243.5,157, 'text'=>'321', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
i = TkcPolygon.new(w,314,169,306,169,306,192,273,192,
- 264,181,264,135,314,135,
+ 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,
+ w.create(TkcText,293.5,163.5, 'text'=>'322', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
+ i = TkcPolygon.new(w,307,240,339,240,339,206,307,206,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = 'Pub Lift3'
$floorItems2['Pub Lift3'] = i
- w.create(TkcText,323,223, 'text'=>'Pub Lift3', 'fill'=>color,
+ w.create(TkcText,323,223, 'text'=>'Pub Lift3', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
+ i = TkcPolygon.new(w,339,205,307,205,307,171,339,171,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = 'Priv Lift3'
$floorItems2['Priv Lift3'] = i
- w.create(TkcText,323,188, 'text'=>'Priv Lift3', 'fill'=>color,
+ w.create(TkcText,323,188, 'text'=>'Priv Lift3', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,350,284,376,284,376,276,397,276,397,309,350,309,
+ i = TkcPolygon.new(w,350,284,376,284,376,276,397,276,397,309,350,309,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '303'
$floorItems2['303'] = i
- w.create(TkcText,373.5,292.5, 'text'=>'303', 'fill'=>color,
+ w.create(TkcText,373.5,292.5, 'text'=>'303', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,262,226, 'text'=>'324', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,299,276,299,327,349,327,349,284,341,284,341,276,
+ i = TkcPolygon.new(w,299,276,299,327,349,327,349,284,341,284,341,276,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '304'
$floorItems2['304'] = i
- w.create(TkcText,324,301.5, 'text'=>'304', 'fill'=>color,
+ w.create(TkcText,324,301.5, 'text'=>'304', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
+ i = TkcPolygon.new(w,375,246,375,172,341,172,341,246,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '301'
$floorItems2['301'] = i
- w.create(TkcText,358,209, 'text'=>'301', 'fill'=>color,
+ w.create(TkcText,358,209, 'text'=>'301', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,397,246,377,246,377,185,397,185,
+ i = TkcPolygon.new(w,397,246,377,246,377,185,397,185,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '327'
$floorItems2['327'] = i
- w.create(TkcText,387,215.5, 'text'=>'327', 'fill'=>color,
+ w.create(TkcText,387,215.5, 'text'=>'327', 'fill'=>color,
'anchor'=>'c', 'tags'=>['floor3','label'])
- i = TkcPolygon.new(w,316,131,316,169,377,169,377,185,397,185,397,131,
+ i = TkcPolygon.new(w,316,131,316,169,377,169,377,185,397,185,397,131,
'fill'=>'', 'tags'=>['floor3','room'])
$floorLabels2[i.id] = '326'
$floorItems2['326'] = i
- w.create(TkcText,365.5,150, 'text'=>'326', 'fill'=>color,
+ w.create(TkcText,365.5,150, 'text'=>'326', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,319.5,261, 'text'=>'302', 'fill'=>color,
'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,
+ 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,
+ w.create(TkcText,200.5,284.5, 'text'=>'306', 'fill'=>color,
'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'])
@@ -1574,7 +1574,7 @@ end
# toplevel widget が存在すれば削除する
if defined?($floor2_demo) && $floor2_demo
- $floor2_demo.destroy
+ $floor2_demo.destroy
$floor2_demo = nil
end
@@ -1590,7 +1590,7 @@ $floor2_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($floor2_demo).pack(:fill=>:both, :expand=>true)
# label 生成
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'8i', 'justify'=>'left',
+TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'8i', 'justify'=>'left',
'text'=>"このウィンドウにはディジタルエクイップメント社のウェスタンリサーチラボラトリ (DECWRL) の間取りが書かれたキャンバス widget が入っています。これは 3階建てで、常にそのうちの1階分が選択、つまりその間取りが表示されるようになっています。ある階を選択するには、その上でマウスの左ボタンをクリックしてください。マウスが選択されている階の上を動くと、その下にある部屋の色が変わり、部屋番号が「部屋番号:」エントリに表示されます。また、エントリに部屋番号を書くとその部屋の色が変わります。"){
pack('side'=>'top')
}
@@ -1622,10 +1622,10 @@ $floorItems2 = {}
if $tk_version =~ /^4\.[01]/
$floor2_canvas_frame = TkFrame.new(base_frame,'bd'=>2,'relief'=>'sunken',
'highlightthickness'=>2)
- $floor2_canvas = TkCanvas.new($floor2_canvas_frame,
- 'width'=>900, 'height'=>500, 'borderwidth'=>0,
+ $floor2_canvas = TkCanvas.new($floor2_canvas_frame,
+ 'width'=>900, 'height'=>500, 'borderwidth'=>0,
'highlightthickness'=>0) {|c|
- TkScrollbar.new(base_frame, 'orient'=>'horiz',
+ TkScrollbar.new(base_frame, 'orient'=>'horiz',
'command'=>proc{|*args| c.xview(*args)}){|hs|
c.xscrollcommand(proc{|first,last| hs.set first,last})
pack('side'=>'bottom', 'fill'=>'x')
@@ -1646,20 +1646,20 @@ else
v = TkScrollbar.new(f, 'highlightthickness'=>0, 'orient'=>'vertical')
TkFrame.new(f, 'bd'=>2, 'relief'=>'sunken') {|f1|
- $floor2_canvas = TkCanvas.new(f1, 'width'=>900, 'height'=>500,
- 'borderwidth'=>0,
+ $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')
}
- grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
+ grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>0,
'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
}
- v.grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
+ v.grid('padx'=>1, 'pady'=>1, 'row'=>0, 'column'=>1,
'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- h.grid('padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
+ h.grid('padx'=>1, 'pady'=>1, 'row'=>1, 'column'=>0,
'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
TkGrid.rowconfigure(f, 0, 'weight'=>1, 'minsize'=>0)
@@ -1675,7 +1675,7 @@ end
# Create an entry for displaying and typing in current room.
$currentRoom2 = TkVariable.new
-$floor2_entry = TkEntry.new($floor2_canvas, 'width'=>10, 'relief'=>'sunken',
+$floor2_entry = TkEntry.new($floor2_canvas, 'width'=>10, 'relief'=>'sunken',
'bd'=>2, 'textvariable'=>$currentRoom2)
# Choose colors, then fill in the floorplan.
@@ -1712,7 +1712,7 @@ $floor2_canvas.itembind('floor3', '1', proc{floorDisplay2 $floor2_canvas,3})
$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',
+$floor2_canvas.bind('B2-Motion',
proc{|x,y| $floor2_canvas.scan_dragto x,y}, '%x %y')
$floor2_canvas.bind('Destroy', proc{$currentRoom2.unset})
$currentRoom2.value = ''
diff --git a/ext/tk/sample/demos-jp/form.rb b/ext/tk/sample/demos-jp/form.rb
index 4de7056764..84ed94de88 100644
--- a/ext/tk/sample/demos-jp/form.rb
+++ b/ext/tk/sample/demos-jp/form.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($form_demo) && $form_demo
- $form_demo.destroy
+ $form_demo.destroy
$form_demo = nil
end
diff --git a/ext/tk/sample/demos-jp/goldberg.rb b/ext/tk/sample/demos-jp/goldberg.rb
index a81c7ec70c..ea521b82ec 100644
--- a/ext/tk/sample/demos-jp/goldberg.rb
+++ b/ext/tk/sample/demos-jp/goldberg.rb
@@ -44,7 +44,7 @@
#>># lots of canvas create and move calls.
if defined?($goldberg_demo) && $goldberg_demo
- $goldberg_demo.destroy
+ $goldberg_demo.destroy
$goldberg_demo = nil
end
@@ -103,7 +103,7 @@ class TkGoldberg_Demo
@S['pause'] = TkVariable.new
@S['details'] = TkVariable.new(true)
- @S['mode'] = TkVariable.new(:MSTART, :symbol)
+ @S['mode'] = TkVariable.new(:MSTART, :symbol)
# :MSTART, :MGO, :MPAUSE, :MSSTEP, :MBSTEP, :MDONE, :MDEBUG
# 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
@@ -134,19 +134,19 @@ class TkGoldberg_Demo
@XY = {}
@XY6 = {
- '-1'=>[366, 207], '-2'=>[349, 204], '-3'=>[359, 193], '-4'=>[375, 192],
+ '-1'=>[366, 207], '-2'=>[349, 204], '-3'=>[359, 193], '-4'=>[375, 192],
'-5'=>[340, 190], '-6'=>[349, 177], '-7'=>[366, 177], '-8'=>[380, 176],
- '-9'=>[332, 172], '-10'=>[342, 161], '-11'=>[357, 164],
- '-12'=>[372, 163], '-13'=>[381, 149], '-14'=>[364, 151],
- '-15'=>[349, 146], '-16'=>[333, 148], '0'=>[357, 219],
- '1'=>[359, 261], '2'=>[359, 291], '3'=>[359, 318], '4'=>[361, 324],
- '5'=>[365, 329], '6'=>[367, 334], '7'=>[367, 340], '8'=>[366, 346],
- '9'=>[364, 350], '10'=>[361, 355], '11'=>[359, 370], '12'=>[359, 391],
- '13,0'=>[360, 456], '13,1'=>[376, 456], '13,2'=>[346, 456],
- '13,3'=>[330, 456], '13,4'=>[353, 444], '13,5'=>[368, 443],
- '13,6'=>[339, 442], '13,7'=>[359, 431], '13,8'=>[380, 437],
- '13,9'=>[345, 428], '13,10'=>[328, 434], '13,11'=>[373, 424],
- '13,12'=>[331, 420], '13,13'=>[360, 417], '13,14'=>[345, 412],
+ '-9'=>[332, 172], '-10'=>[342, 161], '-11'=>[357, 164],
+ '-12'=>[372, 163], '-13'=>[381, 149], '-14'=>[364, 151],
+ '-15'=>[349, 146], '-16'=>[333, 148], '0'=>[357, 219],
+ '1'=>[359, 261], '2'=>[359, 291], '3'=>[359, 318], '4'=>[361, 324],
+ '5'=>[365, 329], '6'=>[367, 334], '7'=>[367, 340], '8'=>[366, 346],
+ '9'=>[364, 350], '10'=>[361, 355], '11'=>[359, 370], '12'=>[359, 391],
+ '13,0'=>[360, 456], '13,1'=>[376, 456], '13,2'=>[346, 456],
+ '13,3'=>[330, 456], '13,4'=>[353, 444], '13,5'=>[368, 443],
+ '13,6'=>[339, 442], '13,7'=>[359, 431], '13,8'=>[380, 437],
+ '13,9'=>[345, 428], '13,10'=>[328, 434], '13,11'=>[373, 424],
+ '13,12'=>[331, 420], '13,13'=>[360, 417], '13,14'=>[345, 412],
'13,15'=>[376, 410], '13,16'=>[360, 403]
}
@@ -163,11 +163,11 @@ class TkGoldberg_Demo
def do_display()
@ctrl = TkFrame.new(@parent, :relief=>:ridge, :bd=>2, :padx=>5, :pady=>5)
- @screen = TkFrame.new(@parent, :bd=>2,
- :relief=>:raised).pack(:side=>:left, :fill=>:both,
+ @screen = TkFrame.new(@parent, :bd=>2,
+ :relief=>:raised).pack(:side=>:left, :fill=>:both,
:expand=>true)
- @canvas = TkCanvas.new(@parent, :width=>850, :height=>700,
+ @canvas = TkCanvas.new(@parent, :width=>850, :height=>700,
:bg=>@C['bg'], :highlightthickness=>0){
scrollregion([0, 0, 1000, 1000]) # Kludge to move everything up
yview_moveto(0.05)
@@ -206,8 +206,8 @@ class TkGoldberg_Demo
command proc{showCode 'goldberg'}
}.pack('side'=>'left', 'padx'=>5)
- # @show = TkButton.new(frame, :text=>'>>', :command=>proc{show_ctrl},
- @show = Tk::Button.new(frame, :text=>'>>', :command=>proc{show_ctrl},
+ # @show = TkButton.new(frame, :text=>'>>', :command=>proc{show_ctrl},
+ @show = Tk::Button.new(frame, :text=>'>>', :command=>proc{show_ctrl},
:bg=>@C['bg'], :activebackground=>@C['bg'])
@show.pack('side'=>'left')
frame.place(:in=>@canvas, :relx=>1, :rely=>0, :anchor=>:ne)
@@ -216,34 +216,34 @@ class TkGoldberg_Demo
end
def do_ctrl_frame
- @start = Tk::Button.new(@parent, :text=>'Start', :bd=>6,
+ @start = Tk::Button.new(@parent, :text=>'Start', :bd=>6,
:command=>proc{do_button(0)})
if font = @start['font']
@start.font(font.weight('bold'))
end
- @pause = TkCheckbutton.new(@parent, :text=>'Pause', :font=>font,
- :command=>proc{do_button(1)}, :relief=>:raised,
+ @pause = TkCheckbutton.new(@parent, :text=>'Pause', :font=>font,
+ :command=>proc{do_button(1)}, :relief=>:raised,
:variable=>@S['pause'])
- @step = TkButton.new(@parent, :text=>'Single Step', :font=>font,
+ @step = TkButton.new(@parent, :text=>'Single Step', :font=>font,
:command=>proc{do_button(2)})
- @bstep = TkButton.new(@parent, :text=>'Big Step', :font=>font,
+ @bstep = TkButton.new(@parent, :text=>'Big Step', :font=>font,
:command=>proc{do_button(4)})
- @reset = TkButton.new(@parent, :text=>'Reset', :font=>font,
+ @reset = TkButton.new(@parent, :text=>'Reset', :font=>font,
:command=>proc{do_button(3)})
@details = TkFrame.new(@parent, :bd=>2, :relief=>:ridge)
- @detail = TkCheckbutton.new(@parent, :text=>'Details', :font=>font,
+ @detail = TkCheckbutton.new(@parent, :text=>'Details', :font=>font,
:relief=>:raised, :variable=>@S['details'])
- @msg_entry = TkEntry.new(@parent, :textvariable=>@S['message'],
+ @msg_entry = TkEntry.new(@parent, :textvariable=>@S['message'],
:justify=>:center)
- @speed_scale = TkScale.new(@parent, :orient=>:horizontal,
- :from=>1, :to=>10, :font=>font,
- :variable=>@S['speed'], :bd=>2,
+ @speed_scale = TkScale.new(@parent, :orient=>:horizontal,
+ :from=>1, :to=>10, :font=>font,
+ :variable=>@S['speed'], :bd=>2,
:relief=>:ridge, :showvalue=>false)
- @about = TkButton.new(@parent, :text=>'About',
+ @about = TkButton.new(@parent, :text=>'About',
:command=>proc{about}, :font=>font)
Tk.grid(@start, :in=>@ctrl, :row=>0, :sticky=>:ew)
@@ -271,17 +271,17 @@ class TkGoldberg_Demo
def do_detail_frame
@f_details = TkFrame.new(@details)
- @label = TkLabel.new(@f_details, :textvariable=>@S['cnt'],
+ @label = TkLabel.new(@f_details, :textvariable=>@S['cnt'],
:bd=>1, :relief=>:solid, :bg=>'white')
Tk.grid(@label, '-', '-', '-', :sticky=>:ew, :row=>0)
idx = 1
loop {
break unless respond_to?("move#{idx}")
- l = TkLabel.new(@f_details, :text=>idx, :anchor=>:e,
+ l = TkLabel.new(@f_details, :text=>idx, :anchor=>:e,
:width=>2, :bd=>1, :relief=>:solid, :bg=>'white')
@STEP[idx] = 0
- ll = TkLabel.new(@f_details, :textvariable=>@STEP.ref(idx),
+ ll = TkLabel.new(@f_details, :textvariable=>@STEP.ref(idx),
:width=>5, :bd=>1, :relief=>:solid, :bg=>'white')
row = (idx + 1)/2
col = ((idx + 1) & 1) * 2
@@ -385,7 +385,7 @@ class TkGoldberg_Demo
who = who.to_i
n = send("move#{who}")
if (n & 1).nonzero? # This guy still alive
- alive << who
+ alive << who
end
if (n & 2).nonzero? # Next guy is active
alive << (who + 1)
@@ -418,12 +418,12 @@ class TkGoldberg_Demo
# START HERE! banner
def draw0
color = @C['0']
- TkcText.new(@canvas,
- # [579, 119], :text=>'START HERE!',
- [558, 119], :text=>'ここからスタート!',
- :fill=>color, :anchor=>:w,
+ TkcText.new(@canvas,
+ # [579, 119], :text=>'START HERE!',
+ [558, 119], :text=>'ここからスタート!',
+ :fill=>color, :anchor=>:w,
:tag=>'I0', :font=>['Times Roman', 12, :italic, :bold])
- TkcLine.new(@canvas, [719, 119, 763, 119], :tag=>'I0', :fill=>color,
+ TkcLine.new(@canvas, [719, 119, 763, 119], :tag=>'I0', :fill=>color,
:width=>5, :arrow=>:last, :arrowshape=>[18, 18, 5])
@canvas.itembind('I0', '1'){ start }
end
@@ -437,7 +437,7 @@ class TkGoldberg_Demo
end
pos = [
- [673, 119], [678, 119], [683, 119], [688, 119],
+ [673, 119], [678, 119], [683, 119], [688, 119],
[693, 119], [688, 119], [683, 119], [678, 119]
]
step = step % pos.length
@@ -449,15 +449,15 @@ class TkGoldberg_Demo
def draw1
color = @C['1a']
color2 = @C['1b']
- TkcPolygon.new(@canvas,
- [ 844, 133, 800, 133, 800, 346, 820, 346,
- 820, 168, 844, 168, 844, 133 ],
+ TkcPolygon.new(@canvas,
+ [ 844, 133, 800, 133, 800, 346, 820, 346,
+ 820, 168, 844, 168, 844, 133 ],
:width=>3, :fill=>color, :outline=>'')
- TkcPolygon.new(@canvas,
- [ 771, 133, 685, 133, 685, 168, 751, 168,
- 751, 346, 771, 346, 771, 133 ],
+ TkcPolygon.new(@canvas,
+ [ 771, 133, 685, 133, 685, 168, 751, 168,
+ 751, 346, 771, 346, 771, 133 ],
:width=>3, :fill=>color, :outline=>'')
- TkcOval.new(@canvas, box(812, 122, 9),
+ TkcOval.new(@canvas, box(812, 122, 9),
:tag=>'I1', :fill=>color2, :outline=>'')
@canvas.itembind('I1', '1'){ start }
@@ -466,9 +466,9 @@ class TkGoldberg_Demo
def move1(step = nil)
step = get_step(1, step)
pos = [
- [807, 122], [802, 122], [797, 123], [793, 124], [789, 129], [785, 153],
- [785, 203], [785, 278, :x], [785, 367], [810, 392], [816, 438],
- [821, 503], [824, 585, :y], [838, 587], [848, 593], [857, 601],
+ [807, 122], [802, 122], [797, 123], [793, 124], [789, 129], [785, 153],
+ [785, 203], [785, 278, :x], [785, 367], [810, 392], [816, 438],
+ [821, 503], [824, 585, :y], [838, 587], [848, 593], [857, 601],
[-100, -100]
]
return 0 if step >= pos.length
@@ -484,40 +484,40 @@ class TkGoldberg_Demo
color = @C['2']
# Fulcrum
- TkcPolygon.new(@canvas, [750, 369, 740, 392, 760, 392],
+ TkcPolygon.new(@canvas, [750, 369, 740, 392, 760, 392],
:fill=>@C['fg'], :outline=>@C['fg'])
# Strike box
- TkcRectangle.new(@canvas, [628, 335, 660, 383],
+ TkcRectangle.new(@canvas, [628, 335, 660, 383],
:fill=>'', :outline=>@C['fg'])
(0..2).each{|y|
yy = 335 + y*16
- TkcBitmap.new(@canvas, [628, yy], :bitmap=>'gray25',
+ TkcBitmap.new(@canvas, [628, yy], :bitmap=>'gray25',
:anchor=>:nw, :foreground=>@C['fg'])
- TkcBitmap.new(@canvas, [644, yy], :bitmap=>'gray25',
+ TkcBitmap.new(@canvas, [644, yy], :bitmap=>'gray25',
:anchor=>:nw, :foreground=>@C['fg'])
}
# Lever
- TkcLine.new(@canvas, [702, 366, 798, 366],
+ TkcLine.new(@canvas, [702, 366, 798, 366],
:fill=>@C['fg'], :width=>6, :tag=>'I2_0')
# R strap
- TkcLine.new(@canvas, [712, 363, 712, 355],
+ TkcLine.new(@canvas, [712, 363, 712, 355],
:fill=>@C['fg'], :width=>3, :tag=>'I2_1')
# L strap
- TkcLine.new(@canvas, [705, 363, 705, 355],
+ TkcLine.new(@canvas, [705, 363, 705, 355],
:fill=>@C['fg'], :width=>3, :tag=>'I2_2')
# Match stick
- TkcLine.new(@canvas, [679, 356, 679, 360, 717, 360, 717, 356, 679, 356],
+ TkcLine.new(@canvas, [679, 356, 679, 360, 717, 360, 717, 356, 679, 356],
:fill=>@C['fg'], :width=>3, :tag=>'I2_3')
# Match head
- TkcPolygon.new(@canvas,
- [ 671, 352, 677.4, 353.9, 680, 358.5, 677.4, 363.1,
- 671, 365, 664.6, 363.1, 662, 358.5, 664.6, 353.9 ],
+ TkcPolygon.new(@canvas,
+ [ 671, 352, 677.4, 353.9, 680, 358.5, 677.4, 363.1,
+ 671, 365, 664.6, 363.1, 662, 358.5, 664.6, 353.9 ],
:fill=>color, :outline=>color, :tag=>'I2_4')
end
@@ -527,15 +527,15 @@ class TkGoldberg_Demo
stages = [0, 0, 1, 2, 0, 2, 1, 0, 1, 2, 0, 2, 1]
xy = []
xy[0] = [
- 686, 333, 692, 323, 682, 316, 674, 309, 671, 295, 668, 307,
+ 686, 333, 692, 323, 682, 316, 674, 309, 671, 295, 668, 307,
662, 318, 662, 328, 671, 336
]
xy[1] = [
- 687, 331, 698, 322, 703, 295, 680, 320, 668, 297, 663, 311,
+ 687, 331, 698, 322, 703, 295, 680, 320, 668, 297, 663, 311,
661, 327, 671, 335
]
xy[2] = [
- 686, 331, 704, 322, 688, 300, 678, 283, 678, 283, 674, 298,
+ 686, 331, 704, 322, 688, 300, 678, 283, 678, 283, 674, 298,
666, 309, 660, 324, 672, 336
]
@@ -546,7 +546,7 @@ class TkGoldberg_Demo
if step == 0 # Rotate the match
beta = 20
-
+
ox, oy = anchor('I2_0', :s) # Where to pivot
i = 0
@@ -571,23 +571,23 @@ class TkGoldberg_Demo
xy = [ [602, 296], [577, 174], [518, 174] ]
xy.each{|x, y| # 3 Pulleys
- TkcOval.new(@canvas, box(x, y, 13),
+ TkcOval.new(@canvas, box(x, y, 13),
:fill=>color, :outline=>@C['fg'], :width=>3)
TkcOval.new(@canvas, box(x, y, 2), :fill=>@C['fg'], :outline=>@C['fg'])
}
# Wall to flame
- TkcLine.new(@canvas, [750, 309, 670, 309], :tag=>'I3_s',
+ TkcLine.new(@canvas, [750, 309, 670, 309], :tag=>'I3_s',
:width=>3, :fill=>@C['fg'], :smooth=>true)
# Flame to pulley 1
- TkcLine.new(@canvas, [670, 309, 650, 309], :tag=>'I3_0',
+ TkcLine.new(@canvas, [670, 309, 650, 309], :tag=>'I3_0',
:width=>3, :fill=>@C['fg'], :smooth=>true)
- TkcLine.new(@canvas, [650, 309, 600, 309], :tag=>'I3_1',
+ TkcLine.new(@canvas, [650, 309, 600, 309], :tag=>'I3_1',
:width=>3, :fill=>@C['fg'], :smooth=>true)
# Pulley 1 half way to 2
- TkcLine.new(@canvas, [589, 296, 589, 235], :tag=>'I3_2',
+ TkcLine.new(@canvas, [589, 296, 589, 235], :tag=>'I3_2',
:width=>3, :fill=>@C['fg'])
# Pulley 1 other half to 2
@@ -597,26 +597,26 @@ class TkGoldberg_Demo
TkcLine.new(@canvas, [577, 161, 518, 161], :width=>3, :fill=>@C['fg'])
# Down to weight
- TkcLine.new(@canvas, [505, 174, 505, 205], :tag=>'I3_w',
+ TkcLine.new(@canvas, [505, 174, 505, 205], :tag=>'I3_w',
:width=>3, :fill=>@C['fg'])
# Draw the weight as 2 circles, two rectangles and 1 rounded rectangle
x1, y1, x2, y2 = [515, 207, 495, 207]
- TkcOval.new(@canvas, box(x1, y1, 6),
+ TkcOval.new(@canvas, box(x1, y1, 6),
:tag=>'I3_', :fill=>color2, :outline=>color2)
- TkcOval.new(@canvas, box(x2, y2, 6),
+ TkcOval.new(@canvas, box(x2, y2, 6),
:tag=>'I3_', :fill=>color2, :outline=>color2)
- TkcRectangle.new(@canvas, x1, y1 - 6, x2, y2 + 6,
+ TkcRectangle.new(@canvas, x1, y1 - 6, x2, y2 + 6,
:tag=>'I3_', :fill=>color2, :outline=>color2)
-
- TkcPolygon.new(@canvas, round_rect([492, 220, 518, 263], 15),
+
+ TkcPolygon.new(@canvas, round_rect([492, 220, 518, 263], 15),
:smooth=>true, :tag=>'I3_', :fill=>color2, :outline=>color2)
- TkcLine.new(@canvas, [500, 217, 511, 217],
+ TkcLine.new(@canvas, [500, 217, 511, 217],
:tag=>'I3_', :fill=>color2, :width=>10)
# Bottom weight target
- TkcLine.new(@canvas, [502, 393, 522, 393, 522, 465],
+ TkcLine.new(@canvas, [502, 393, 522, 393, 522, 465],
:tag=>'I3__', :fill=>@C['fg'], :joinstyle=>:miter, :width=>10)
end
@@ -659,7 +659,7 @@ class TkGoldberg_Demo
}
# Swing gate
- TkcLine.new(@canvas, [518, 464, 518, 428],
+ TkcLine.new(@canvas, [518, 464, 518, 428],
:tag=>'I4', :fill=>color, :width=>1)
end
@@ -686,7 +686,7 @@ class TkGoldberg_Demo
TkcPolygon.new(@canvas, xy, :fill=>color2, :outline=>@C['fg'], :width=>3)
xy = [
- 534.5, 445.5, 541, 440, 552, 436, 560, 436, 569, 440, 574, 446,
+ 534.5, 445.5, 541, 440, 552, 436, 560, 436, 569, 440, 574, 446,
575, 452, 574, 454, 566, 456, 554, 456, 545, 456, 537, 454, 530, 452
]
TkcPolygon.new(@canvas, xy, :tag=>['I5', 'I5_0'], :fill=>color)
@@ -696,7 +696,7 @@ class TkGoldberg_Demo
xy = box(540, 446, 2) # Eye
xy = [540, 444, 541, 445, 541, 447, 540, 448, 538, 447, 538, 445]
- TkcPolygon.new(@canvas, xy, :tag=>['I5', 'I5_2'], :fill=>@C['bg'],
+ TkcPolygon.new(@canvas, xy, :tag=>['I5', 'I5_2'], :fill=>@C['bg'],
:outline=>'', :smooth=>true)
xy = [538, 454, 535, 461] # Front leg
@@ -716,9 +716,9 @@ class TkGoldberg_Demo
step = get_step(5, step)
pos = [
- [553, 452], [533, 452], [513, 452], [493, 452], [473, 452],
- [463, 442, 30], [445.5, 441.5, 30], [425.5, 434.5, 30], [422, 414],
- [422, 394], [422, 374], [422, 354], [422, 334], [422, 314], [422, 294],
+ [553, 452], [533, 452], [513, 452], [493, 452], [473, 452],
+ [463, 442, 30], [445.5, 441.5, 30], [425.5, 434.5, 30], [422, 414],
+ [422, 394], [422, 374], [422, 354], [422, 334], [422, 314], [422, 294],
[422, 274, -30], [422, 260.5, -30, :x], [422.5, 248.5, -28], [425, 237]
]
@@ -739,16 +739,16 @@ class TkGoldberg_Demo
color = @C['6']
xy = [324, 130, 391, 204] # Ball holder
xy = round_rect(xy, 10)
- TkcPolygon.new(@canvas, xy, :smooth=>true,
+ TkcPolygon.new(@canvas, xy, :smooth=>true,
:outline=>@C['fg'], :width=>3, :fill=>color)
xy = [339, 204, 376, 253] # Below the ball holder
- TkcRectangle.new(@canvas, xy, :outline=>@C['fg'], :width=>3,
+ TkcRectangle.new(@canvas, xy, :outline=>@C['fg'], :width=>3,
:fill=>color, :tag=>'I6c')
xy = box(346, 339, 28)
TkcOval.new(@canvas, xy, :fill=>color, :outline=>'') # Roter
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>2, :style=>:arc,
+ TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>2, :style=>:arc,
:start=>80, :extent=>205)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>2, :style=>:arc,
+ TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>2, :style=>:arc,
:start=>-41, :extent=>85)
xy = box(346, 339, 15) # Center of rotor
@@ -763,10 +763,10 @@ class TkGoldberg_Demo
TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>'')
xy = [
- 368, 356, 368, 403, 389, 403, 389, 464, 320, 464, 320, 403,
+ 368, 356, 368, 403, 389, 403, 389, 464, 320, 464, 320, 403,
352, 403, 352, 366
]
- TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>'',
+ TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>'',
:width=>2) # Below rotor
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2)
xy = box(275, 342, 7) # On/off rotor
@@ -791,7 +791,7 @@ class TkGoldberg_Demo
loc = -i
color = colors[i]
x, y = @XY6["#{loc}"]
- TkcOval.new(@canvas, box(x, y, 5),
+ TkcOval.new(@canvas, box(x, y, 5),
:fill=>color, :outline=>color, :tag=>"I6_b#{i}")
}
draw6a(12) # The wheel
@@ -817,7 +817,7 @@ class TkGoldberg_Demo
@canvas.move('I6_', -7, 0)
if step == 1 # Poke a hole
xy = [348, 226, 365, 240]
- TkcRectangle.new(@canvas, xy, :fill=>@canvas.itemcget('I6c', :fill),
+ TkcRectangle.new(@canvas, xy, :fill=>@canvas.itemcget('I6c', :fill),
:outline=>'')
end
return 1
@@ -857,24 +857,24 @@ class TkGoldberg_Demo
def draw7
color = @C['7']
xy = [198, 306, 277, 374] # Box
- TkcRectangle.new(@canvas, xy, :outline=>@C['fg'], :width=>2,
+ TkcRectangle.new(@canvas, xy, :outline=>@C['fg'], :width=>2,
:fill=>color, :tag=>'I7z')
@canvas.lower('I7z')
xy = [275, 343, 230, 349]
- TkcLine.new(@canvas, xy, :tag=>'I7', :fill=>@C['fg'], :arrow=>:last,
+ TkcLine.new(@canvas, xy, :tag=>'I7', :fill=>@C['fg'], :arrow=>:last,
:arrowshape=>[23, 23, 8], :width=>6)
xy = [225, 324] # On button
x, y = xy
TkcOval.new(@canvas, box(x, y, 3), :fill=>@C['fg'], :outline=>@C['fg'])
xy = [218, 323] # On text
font = ['Times Roman', 8]
- TkcText.new(@canvas, xy, :text=>'on', :anchor=>:e,
+ TkcText.new(@canvas, xy, :text=>'on', :anchor=>:e,
:fill=>@C['fg'], :font=>font)
xy = [225, 350] # Off button
x, y = xy
TkcOval.new(@canvas, box(x, y, 3), :fill=>@C['fg'], :outline=>@C['fg'])
xy = [218, 349] # Off text
- TkcText.new(@canvas, xy, :text=>'off', :anchor=>:e,
+ TkcText.new(@canvas, xy, :text=>'off', :anchor=>:e,
:fill=>@C['fg'], :font=>font)
end
@@ -919,7 +919,7 @@ class TkGoldberg_Demo
xy = [280, 209, 296, 248]
TkcOval.new(@canvas, xy, :outline=>color, :fill=>color)
xy = [
- 288, 249, 252, 249, 260, 240, 280, 234,
+ 288, 249, 252, 249, 260, 240, 280, 234,
296, 234, 316, 240, 324, 249, 288, 249
]
TkcPolygon.new(@canvas, xy, :fill=>color, :smooth=>true)
@@ -928,16 +928,16 @@ class TkGoldberg_Demo
TkcPolygon.new(@canvas, xy, :fill=>color)
xy = [255, 206, 265, 234] # Fan blades
- TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
+ TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
:width=>3, :tag=>'I9_0')
xy = [255, 176, 265, 204]
- TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
+ TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
:width=>3, :tag=>'I9_0')
xy = [255, 206, 265, 220]
- TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
+ TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
:width=>1, :tag=>'I9_1')
xy = [255, 190, 265, 204]
- TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
+ TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'],
:width=>1, :tag=>'I9_1')
end
@@ -962,17 +962,17 @@ class TkGoldberg_Demo
color = @C['10a']
color2 = @C['10b']
xy = [191, 230, 233, 230, 233, 178, 191, 178] # Sail
- TkcPolygon.new(@canvas, xy, :fill=>color, :width=>3, :outline=>@C['fg'],
+ TkcPolygon.new(@canvas, xy, :fill=>color, :width=>3, :outline=>@C['fg'],
:tag=>'I10')
xy = box(209, 204, 31) # Front
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :style=>:pie,
+ TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :style=>:pie,
:start=>120, :extent=>120, :tag=>'I10')
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
+ TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
:start=>120, :extent=>120, :tag=>'I10')
xy = box(249, 204, 31) # Back
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>3,
+ TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>3,
:style=>:pie, :start=>120, :extent=>120, :tag=>'I10')
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
+ TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
:start=>120, :extent=>120, :tag=>'I10')
xy = [200, 171, 200, 249] # Mast
@@ -992,10 +992,10 @@ class TkGoldberg_Demo
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
xy = box(239, 262, 17)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
+ TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
:start=>95, :extent=>103)
xy = box(76, 266, 21)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
+ TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
:extent=>190)
end
@@ -1003,9 +1003,9 @@ class TkGoldberg_Demo
step = get_step(10, step)
pos = [
- [195, 212], [193, 212], [190, 212], [186, 212], [181, 212], [176, 212],
- [171, 212], [166, 212], [161, 212], [156, 212], [151, 212], [147, 212],
- [142, 212], [137, 212], [132, 212, :x], [127, 212], [121, 212],
+ [195, 212], [193, 212], [190, 212], [186, 212], [181, 212], [176, 212],
+ [171, 212], [166, 212], [161, 212], [156, 212], [151, 212], [147, 212],
+ [142, 212], [137, 212], [132, 212, :x], [127, 212], [121, 212],
[116, 212], [111, 212]
]
@@ -1032,21 +1032,21 @@ class TkGoldberg_Demo
xy = [55, 504, 55, 591] # Bottom right side
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
xy = box(71, 460, 48) # Outer loop
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
+ TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
:start=>110, :extent=>-290, :tag=>'I11i')
xy = box(71, 460, 16) # Inner loop
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>'',
+ TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>'',
:width=>3, :tag=>'I11i')
TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>@C['bg'], :width=>3)
xy = [23, 264, 23, 591] # Left side
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
xy = box(1, 266, 23) # Top left curve
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3,
+ TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3,
:style=>:arc, :extent=>90)
xy = box(75, 235, 9) # The ball
- TkcOval.new(@canvas, xy, :fill=>color2, :outline=>'',
+ TkcOval.new(@canvas, xy, :fill=>color2, :outline=>'',
:width=>3, :tag=>'I11')
end
@@ -1054,8 +1054,8 @@ class TkGoldberg_Demo
step = get_step(11, step)
pos = [
- [75, 235], [70, 235], [65, 237], [56, 240], [46, 247], [38, 266],
- [38, 296], [38, 333], [38, 399], [38, 475], [74, 496], [105, 472],
+ [75, 235], [70, 235], [65, 237], [56, 240], [46, 247], [38, 266],
+ [38, 296], [38, 333], [38, 399], [38, 475], [74, 496], [105, 472],
[100, 437], [65, 423], [-100, -100], [38, 505], [38, 527, :x], [38, 591]
]
@@ -1069,11 +1069,11 @@ class TkGoldberg_Demo
# Hand
def draw12
xy = [
- 20, 637, 20, 617, 20, 610, 20, 590, 40, 590, 40, 590,
+ 20, 637, 20, 617, 20, 610, 20, 590, 40, 590, 40, 590,
60, 590, 60, 610, 60, 610
]
xy.concat([60, 610, 65, 620, 60, 631]) # Thumb
- xy.concat([60, 631, 60, 637, 60, 662, 60, 669, 52, 669,
+ xy.concat([60, 631, 60, 637, 60, 662, 60, 669, 52, 669,
56, 669, 50, 669, 50, 662, 50, 637])
y0 = 637 # Bumps for fingers
@@ -1083,7 +1083,7 @@ class TkGoldberg_Demo
x2 = x - 10
xy << x << y0 << x1 << y1 << x2 << y0
}
- TkcPolygon.new(@canvas, xy, :fill=>@C['12'], :outline=>@C['fg'],
+ TkcPolygon.new(@canvas, xy, :fill=>@C['12'], :outline=>@C['fg'],
:smooth=>true, :tag=>'I12', :width=>3)
end
@@ -1107,25 +1107,25 @@ class TkGoldberg_Demo
]
radii = [2, 9, 9, 8, 5, 5, 2]
- round_poly(@canvas, xy, radii, :width=>3,
+ round_poly(@canvas, xy, radii, :width=>3,
:outline=>@C['fg'], :fill=>color)
- round_poly(@canvas, xy2, radii, :width=>3,
+ round_poly(@canvas, xy2, radii, :width=>3,
:outline=>@C['fg'], :fill=>color)
xy = [56, 677]
x, y = xy
- TkcRectangle.new(@canvas, box(x, y, 4), :fill=>'', :outline=>@C['fg'],
+ TkcRectangle.new(@canvas, box(x, y, 4), :fill=>'', :outline=>@C['fg'],
:width=>3, :tag=>'I13')
xy = [809, 677]
x, y = xy
- TkcRectangle.new(@canvas, box(x, y, 4), :fill=>'', :outline=>@C['fg'],
+ TkcRectangle.new(@canvas, box(x, y, 4), :fill=>'', :outline=>@C['fg'],
:width=>3, :tag=>'I13R')
xy = [112, 687] # Label
- TkcText.new(@canvas, xy, :text=>'FAX', :fill=>@C['fg'],
+ TkcText.new(@canvas, xy, :text=>'FAX', :fill=>@C['fg'],
:font=>['Times Roman', 12, :bold])
xy = [762, 687]
- TkcText.new(@canvas, xy, :text=>'FAX', :fill=>@C['fg'],
+ TkcText.new(@canvas, xy, :text=>'FAX', :fill=>@C['fg'],
:font=>['Times Roman', 12, :bold])
xy = [138, 663, 148, 636, 178, 636] # Paper guide
@@ -1133,7 +1133,7 @@ class TkGoldberg_Demo
xy = [732, 663, 722, 636, 692, 636]
TkcLine.new(@canvas, xy, :smooth=>true, :fill=>@C['fg'], :width=>3)
- sine([149, 688, 720, 688], 5, 15,
+ sine([149, 688, 720, 688], 5, 15,
:tag=>'I13_s', :fill=>@C['fg'], :width=>3)
end
@@ -1163,17 +1163,17 @@ class TkGoldberg_Demo
def draw14
color = @C['14']
xy = [102, 661, 113, 632, 130, 618] # Left paper edge
- TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
+ TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
:width=>3, :tag=>'I14L_0')
xy = [148, 629, 125, 640, 124, 662] # Right paper edge
- TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
+ TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
:width=>3, :tag=>'I14L_1')
draw14a('L')
xy = [
768.0, 662.5, 767.991316225, 662.433786215, 767.926187912, 662.396880171
]
- TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
+ TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
:width=>3, :tag=>'I14R_0')
@canvas.lower('I14R_0')
# NB. these numbers are VERY sensitive, you must start with final size
@@ -1181,7 +1181,7 @@ class TkGoldberg_Demo
xy = [
745.947897349, 662.428358855, 745.997829056, 662.452239237, 746.0, 662.5
]
- TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
+ TkcLine.new(@canvas, xy, :smooth=>true, :fill=>color,
:width=>3, :tag=>'I14R_1')
@canvas.lower('I14R_1')
end
@@ -1194,11 +1194,11 @@ class TkGoldberg_Demo
x3, y3, x4, y4, x5, y5 = xy2
zz = [
- x0, y0, x0, y0, xy, x2, y2, x2, y2,
+ x0, y0, x0, y0, xy, x2, y2, x2, y2,
x3, y3, x3, y3, xy2, x5, y5, x5, y5
].flatten
@canvas.delete("I14#{side}")
- TkcPolygon.new(@canvas, zz, :tag=>"I14#{side}", :smooth=>true,
+ TkcPolygon.new(@canvas, zz, :tag=>"I14#{side}", :smooth=>true,
:fill=>color, :outline=>color, :width=>3)
@canvas.lower("I14#{side}")
end
@@ -1251,7 +1251,7 @@ class TkGoldberg_Demo
xy = [765, 557, 784, 583]
TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>2)
- sine([658, 580, 765, 580], 3, 15,
+ sine([658, 580, 765, 580], 3, 15,
:tag=>'I15_s', :fill=>@C['fg'], :width=>3)
end
@@ -1290,7 +1290,7 @@ class TkGoldberg_Demo
xy = [722, 485, 791, 556]
TkcRectangle.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], :width=>3)
xy = box(752, 515, 25) # Bell
- TkcOval.new(@canvas, xy, :fill=>color, :outline=>'black',
+ TkcOval.new(@canvas, xy, :fill=>color, :outline=>'black',
:tag=>'I16b', :width=>2)
xy = box(752, 515, 5) # Bell button
TkcOval.new(@canvas, xy, :fill=>'black', :outline=>'black', :tag=>'I16b')
@@ -1329,24 +1329,24 @@ class TkGoldberg_Demo
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3)
xy = [664, 523, 717, 549] # Body
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :fill=>color, :width=>3,
+ TkcArc.new(@canvas, xy, :outline=>@C['fg'], :fill=>color, :width=>3,
:style=>:chord, :start=>128, :extent=>260, :tag=>'I17')
xy = [709, 554, 690, 543] # Paw
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>color,
+ TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>color,
:width=>3, :tag=>'I17')
xy = [657, 544, 676, 555]
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>color,
+ TkcOval.new(@canvas, xy, :outline=>@C['fg'], :fill=>color,
:width=>3, :tag=>'I17')
xy = box(660, 535, 15) # Lower face
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
+ TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :style=>:arc,
:start=>150, :extent=>240, :tag=>'I17_')
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
+ TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
:style=>:chord, :start=>150, :extent=>240, :tag=>'I17_')
xy = [674, 529, 670, 513, 662, 521, 658, 521, 650, 513, 647, 529] # Ears
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
- TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>'', :width=>1,
+ TkcPolygon.new(@canvas, xy, :fill=>color, :outline=>'', :width=>1,
:tag=>['I17_', 'I17_c'])
xy = [652, 542, 628, 539] # Whiskers
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
@@ -1356,23 +1356,23 @@ class TkGoldberg_Demo
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
xy = [668, 543, 687, 538]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
+ TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
:tag=>['I17_', 'I17_w'])
xy = [668, 544, 688, 546]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
+ TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
:tag=>['I17_', 'I17_w'])
xy = [668, 547, 688, 553]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
+ TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
:tag=>['I17_', 'I17_w'])
xy = [649, 530, 654, 538, 659, 530] # Left eye
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2,
+ TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2,
:smooth=>true, :tag=>'I17')
xy = [671, 530, 666, 538, 661, 530] # Right eye
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2,
+ TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2,
:smooth=>true, :tag=>'I17')
xy = [655, 543, 660, 551, 665, 543] # Mouth
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2,
+ TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2,
:smooth=>true, :tag=>'I17')
end
@@ -1385,10 +1385,10 @@ class TkGoldberg_Demo
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
:smooth=>true, :tag=>'I17_')
xy = box(654, 530, 4) # Left eye
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :fill=>'',
+ TkcOval.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :fill=>'',
:tag=>'I17_')
xy = box(666, 530, 4) # Right eye
- TkcOval.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :fill=>'',
+ TkcOval.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :fill=>'',
:tag=>'I17_')
@canvas.move('I17_', 0, -20) # Move face up
@@ -1398,19 +1398,19 @@ class TkGoldberg_Demo
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
xy = [ # Body
- 675, 506, 694, 489, 715, 513, 715, 513, 715, 513, 716, 525,
- 716, 525, 716, 525, 706, 530, 695, 530, 679, 535, 668, 527,
+ 675, 506, 694, 489, 715, 513, 715, 513, 715, 513, 716, 525,
+ 716, 525, 716, 525, 706, 530, 695, 530, 679, 535, 668, 527,
668, 527, 668, 527, 675, 522, 676, 517, 677, 512
]
- TkcPolygon.new(@canvas, xy, :fill=>@canvas.itemcget('I17_c', :fill),
- :outline=>@C['fg'], :width=>3, :smooth=>true,
+ TkcPolygon.new(@canvas, xy, :fill=>@canvas.itemcget('I17_c', :fill),
+ :outline=>@C['fg'], :width=>3, :smooth=>true,
:tag=>'I17_')
xy = [716, 514, 716, 554] # Back leg
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
xy = [694, 532, 694, 554] # 2nd back leg
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I17_')
xy = [715, 514, 718, 506, 719, 495, 716, 488] # Tail
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
+ TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3,
:smooth=>true, :tag=>'I17_')
@canvas.raise('I17w') # Make whiskers visible
@@ -1439,14 +1439,14 @@ class TkGoldberg_Demo
step = get_step(18, step)
pos = [
- [587, 506], [537, 506], [466, 506], [376, 506], [266, 506, :x],
+ [587, 506], [537, 506], [466, 506], [376, 506], [266, 506, :x],
[136, 506], [16, 506], [-100, -100]
]
b = []
b[0] = [490, 502, 719, 507, 524, 512] # Band collapsing
b[1] = [
- 491, 503, 524, 557, 563, 505, 559, 496, 546, 506, 551, 525,
+ 491, 503, 524, 557, 563, 505, 559, 496, 546, 506, 551, 525,
553, 536, 538, 534, 532, 519, 529, 499
]
b[2] = [
@@ -1477,54 +1477,54 @@ class TkGoldberg_Demo
color = @C['19']
xx = [[249, 181], [155, 118], [86, 55], [22, 0]]
xx.each{|x1, x2|
- TkcRectangle.new(@canvas, x1, 453, x2, 467,
+ TkcRectangle.new(@canvas, x1, 453, x2, 467,
:fill=>color, :outline=>'', :tag=>'I19')
- TkcLine.new(@canvas, x1, 453, x2, 453,
+ TkcLine.new(@canvas, x1, 453, x2, 453,
:fill=>@C['fg'], :width=>1) # Pipe top
- TkcLine.new(@canvas, x1, 467, x2, 467,
+ TkcLine.new(@canvas, x1, 467, x2, 467,
:fill=>@C['fg'], :width=>1) # Pipe bottom
}
@canvas.raise('I11i')
xy = box(168, 460, 16) # Bulge by the joint
TkcOval.new(@canvas, xy, :fill=>color, :outline=>'')
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, :style=>:arc,
+ TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, :style=>:arc,
:start=>21, :extent=>136)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, :style=>:arc,
+ TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1, :style=>:arc,
:start=>-21, :extent=>-130)
xy = [249, 447, 255, 473] # First joint 26x6
TkcRectangle.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>1)
xy = box(257, 433, 34) # Bend up
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
+ TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
:style=>:pie, :start=>0, :extent=>-91)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
+ TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
:style=>:arc, :start=>0, :extent=>-90)
xy = box(257, 433, 20)
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1,
+ TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1,
:style=>:pie, :start=>0, :extent=>-92)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
+ TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
:style=>:arc, :start=>0, :extent=>-90)
xy = box(257, 421, 34) # Bend left
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
+ TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
:style=>:pie, :start=>0, :extent=>91)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
+ TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
:style=>:arc, :start=>0, :extent=>90)
xy = box(257, 421, 20)
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1,
+ TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1,
:style=>:pie, :start=>0, :extent=>90)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
+ TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
:style=>:arc, :start=>0, :extent=>90)
xy = box(243, 421, 34) # Bend down
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
+ TkcArc.new(@canvas, xy, :outline=>'', :fill=>color, :width=>1,
:style=>:pie, :start=>90, :extent=>90)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
+ TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
:style=>:arc, :start=>90, :extent=>90)
xy = box(243, 421, 20)
- TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1,
+ TkcArc.new(@canvas, xy, :outline=>'', :fill=>@C['bg'], :width=>1,
:style=>:pie, :start=>90, :extent=>90)
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
+ TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>1,
:style=>:arc, :start=>90, :extent=>90)
xy = [270, 427, 296, 433] # 2nd joint bottom
@@ -1566,7 +1566,7 @@ class TkGoldberg_Demo
pos = [451, 462, 473, 484, 496, 504, 513, 523, 532]
freq = [20, 40, 40, 40, 40, 40, 40, 40, 40]
pos = [
- [451, 20], [462, 40], [473, 40], [484, 40], [496, 40],
+ [451, 20], [462, 40], [473, 40], [484, 40], [496, 40],
[504, 40], [513, 40], [523, 40], [532, 40, :x]
]
return 0 if step >= pos.length
@@ -1583,11 +1583,11 @@ class TkGoldberg_Demo
color = @C['20']
@canvas.delete('I20')
- sine([208, 428, 208, y], 4, f, :tag=>['I20', 'I20s'],
+ sine([208, 428, 208, y], 4, f, :tag=>['I20', 'I20s'],
:width=>3, :fill=>color, :smooth=>true)
- TkcLine.new(@canvas, @canvas.coords('I20s'), :width=>3,
+ TkcLine.new(@canvas, @canvas.coords('I20s'), :width=>3,
:fill=>color, :smooth=>1, :tag=>['I20', 'I20a'])
- TkcLine.new(@canvas, @canvas.coords('I20s'), :width=>3,
+ TkcLine.new(@canvas, @canvas.coords('I20s'), :width=>3,
:fill=>color, :smooth=>1, :tag=>['I20', 'I20b'])
@canvas.move('I20a', 8, 0)
@canvas.move('I20b', 16, 0)
@@ -1603,18 +1603,18 @@ class TkGoldberg_Demo
xy = [245, 490, 237, 535] # Right side
xy2 = [189, 535, 181, 490] # Left side
- TkcPolygon.new(@canvas, xy + xy2, :fill=>color, :outline=>'',
+ TkcPolygon.new(@canvas, xy + xy2, :fill=>color, :outline=>'',
:tag=>['I21', 'I21f'])
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>2, :tag=>'I21')
TkcLine.new(@canvas, xy2, :fill=>@C['fg'], :width=>2, :tag=>'I21')
xy = [182, 486, 244, 498] # Top
- TkcOval.new(@canvas, xy, :fill=>color, :outline=>'', :width=>2,
+ TkcOval.new(@canvas, xy, :fill=>color, :outline=>'', :width=>2,
:tag=>['I21', 'I21f'])
- TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], :width=>2,
+ TkcOval.new(@canvas, xy, :fill=>'', :outline=>@C['fg'], :width=>2,
:tag=>['I21', 'I21t'])
xy = [189, 532, 237, 540] # Bottom
- TkcOval.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>2,
+ TkcOval.new(@canvas, xy, :fill=>color, :outline=>@C['fg'], :width=>2,
:tag=>['I21', 'I21b'])
end
@@ -1637,7 +1637,7 @@ class TkGoldberg_Demo
@canvas.itemconfigure('I21b', :fill=>@C['20'])
@canvas.delete('I21w')
- TkcPolygon.new(@canvas, x2, y2, x1, y1, xx1, yy1, xx2, yy1,
+ TkcPolygon.new(@canvas, x2, y2, x1, y1, xx1, yy1, xx2, yy1,
:tag=>['I21', 'I21w'], :outline=>'', :fill=>@C['20'])
@canvas.lower('I21w', 'I21')
@canvas.raise('I21b')
@@ -1673,21 +1673,21 @@ class TkGoldberg_Demo
color3 = @C['23c']
xy = [185, 623, 253, 650] # Block
- TkcRectangle.new(@canvas, xy, :fill=>'black', :outline=>@C['fg'],
+ TkcRectangle.new(@canvas, xy, :fill=>'black', :outline=>@C['fg'],
:width=>2, :tag=>'I23a')
xy = [187, 592, 241, 623] # Balloon
TkcOval.new(@canvas, xy, :outline=>'', :fill=>color, :tag=>'I23b')
- TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :tag=>'I23b',
+ TkcArc.new(@canvas, xy, :outline=>@C['fg'], :width=>3, :tag=>'I23b',
:style=>:arc, :start=>12, :extent=>336)
xy = [239, 604, 258, 589, 258, 625, 239, 610] # Balloon nozzle
TkcPolygon.new(@canvas, xy, :outline=>'', :fill=>color, :tag=>'I23b')
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I23b')
xy = [285, 611, 250, 603] # Dart body
- TkcOval.new(@canvas, xy, :fill=>color2, :outline=>@C['fg'],
+ TkcOval.new(@canvas, xy, :fill=>color2, :outline=>@C['fg'],
:width=>3, :tag=>'I23d')
xy = [249, 596, 249, 618, 264, 607, 249, 596] # Dart tail
- TkcPolygon.new(@canvas, xy, :fill=>color3, :outline=>@C['fg'],
+ TkcPolygon.new(@canvas, xy, :fill=>color3, :outline=>@C['fg'],
:width=>3, :tag=>'I23d')
xy = [249, 607, 268, 607] # Dart detail
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I23d')
@@ -1699,7 +1699,7 @@ class TkGoldberg_Demo
step = get_step(23, step)
pos = [
- [277, 607], [287, 607], [307, 607, :x], [347, 607], [407, 607],
+ [277, 607], [287, 607], [307, 607, :x], [347, 607], [407, 607],
[487, 607], [587, 607], [687, 607], [787, 607], [-100, -100]
]
@@ -1719,7 +1719,7 @@ class TkGoldberg_Demo
def draw24
color = @C['24a']
xy = [366, 518, 462, 665] # Balloon
- TkcOval.new(@canvas, xy, :fill=>color, :outline=>@C['fg'],
+ TkcOval.new(@canvas, xy, :fill=>color, :outline=>@C['fg'],
:width=>3, :tag=>'I24')
xy = [414, 666, 414, 729] # String
TkcLine.new(@canvas, xy, :fill=>@C['fg'], :width=>3, :tag=>'I24')
@@ -1728,16 +1728,16 @@ class TkGoldberg_Demo
:width=>3, :tag=>'I24')
xy = [387, 567, 390, 549, 404, 542] # Reflections
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
+ TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
:width=>2, :tag=>'I24')
xy = [395, 568, 399, 554, 413, 547]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
+ TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
:width=>2, :tag=>'I24')
xy = [403, 570, 396, 555, 381, 553]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
+ TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
:width=>2, :tag=>'I24')
xy = [408, 564, 402, 547, 386, 545]
- TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
+ TkcLine.new(@canvas, xy, :fill=>@C['fg'], :smooth=>true,
:width=>2, :tag=>'I24')
end
@@ -1750,16 +1750,16 @@ class TkGoldberg_Demo
if step == 0
@canvas.delete('I24') # Exploding balloon
xy = [
- 347, 465, 361, 557, 271, 503, 272, 503, 342, 574, 259, 594,
- 259, 593, 362, 626, 320, 737, 320, 740, 398, 691, 436, 738,
- 436, 739, 476, 679, 528, 701, 527, 702, 494, 627, 548, 613,
- 548, 613, 480, 574, 577, 473, 577, 473, 474, 538, 445, 508,
+ 347, 465, 361, 557, 271, 503, 272, 503, 342, 574, 259, 594,
+ 259, 593, 362, 626, 320, 737, 320, 740, 398, 691, 436, 738,
+ 436, 739, 476, 679, 528, 701, 527, 702, 494, 627, 548, 613,
+ 548, 613, 480, 574, 577, 473, 577, 473, 474, 538, 445, 508,
431, 441, 431, 440, 400, 502, 347, 465, 347, 465
]
- TkcPolygon.new(@canvas, xy, :tag=>'I24', :fill=>@C['24b'],
+ TkcPolygon.new(@canvas, xy, :tag=>'I24', :fill=>@C['24b'],
:outline=>@C['24a'], :width=>10, :smooth=>true)
msg = Tk.subst(@S['message'].value)
- TkcText.new(@canvas, centroid('I24'), :text=>msg, :tag=>['I24', 'I24t'],
+ TkcText.new(@canvas, centroid('I24'), :text=>msg, :tag=>['I24', 'I24t'],
:justify=>:center, :font=>['Times Roman', 18, :bold])
return 1
end
@@ -1790,9 +1790,9 @@ class TkGoldberg_Demo
if step >= 3
@canvas.delete('I24', 'I26')
- TkcText.new(@canvas, 430, 735, :anchor=>:s, :tag=>'I26',
- #:text=>'click to continue',
- :text=>'クリックでリセットします',
+ TkcText.new(@canvas, 430, 735, :anchor=>:s, :tag=>'I26',
+ #:text=>'click to continue',
+ :text=>'クリックでリセットします',
:font=>['Times Roman', 20, :bold])
@canvas.bind('1', proc{reset})
return 4
@@ -1972,11 +1972,11 @@ class TkGoldberg_Demo
def sparkle(oxy, tag)
xy = [
- [299, 283], [298, 302], [295, 314], [271, 331],
+ [299, 283], [298, 302], [295, 314], [271, 331],
[239, 310], [242, 292], [256, 274], [281, 273]
]
xy.each{|x, y|
- TkcLine.new(@canvas, 271, 304, x, y,
+ TkcLine.new(@canvas, 271, 304, x, y,
:fill=>'white', :width=>3, :tag=>tag)
}
move_abs(tag, oxy)
diff --git a/ext/tk/sample/demos-jp/icon.rb b/ext/tk/sample/demos-jp/icon.rb
index a2ca6651dc..935519435b 100644
--- a/ext/tk/sample/demos-jp/icon.rb
+++ b/ext/tk/sample/demos-jp/icon.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($icon_demo) && $icon_demo
- $icon_demo.destroy
+ $icon_demo.destroy
$icon_demo = nil
end
diff --git a/ext/tk/sample/demos-jp/image1.rb b/ext/tk/sample/demos-jp/image1.rb
index d9435cc1a2..10078c6c22 100644
--- a/ext/tk/sample/demos-jp/image1.rb
+++ b/ext/tk/sample/demos-jp/image1.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($image1_demo) && $image1_demo
- $image1_demo.destroy
+ $image1_demo.destroy
$image1_demo = nil
end
diff --git a/ext/tk/sample/demos-jp/image2.rb b/ext/tk/sample/demos-jp/image2.rb
index 1bb2c9e9c3..3e8b87461f 100644
--- a/ext/tk/sample/demos-jp/image2.rb
+++ b/ext/tk/sample/demos-jp/image2.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($image2_demo) && $image2_demo
- $image2_demo.destroy
+ $image2_demo.destroy
$image2_demo = nil
end
diff --git a/ext/tk/sample/demos-jp/image3.rb b/ext/tk/sample/demos-jp/image3.rb
index 12b8aafd8e..625e69a21d 100644
--- a/ext/tk/sample/demos-jp/image3.rb
+++ b/ext/tk/sample/demos-jp/image3.rb
@@ -9,7 +9,7 @@
# toplevel widget
if defined?($image3_demo) && $image3_demo
- $image3_demo.destroy
+ $image3_demo.destroy
$image3_demo = nil
end
@@ -22,7 +22,7 @@ $image3_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($image3_demo).pack(:fill=>:both, :expand=>true)
-#
+#
def loadDir3(w)
w.delete(0,'end')
Dir.glob([$dirName,'*'].join(File::Separator)).sort.each{|f|
@@ -38,10 +38,10 @@ end
# Arguments:
# w - Name of the toplevel window of the demo.
def selectAndLoadDir3(w, lbox)
- dir = Tk.chooseDirectory(:initialdir=>$dirName.value,
+ dir = Tk.chooseDirectory(:initialdir=>$dirName.value,
:parent=>w, :mustexist=>true)
if dir.length > 0
- $dirName.value = dir
+ $dirName.value = dir
loadDir3(lbox)
end
end
@@ -94,11 +94,11 @@ image3_f = TkFrame.new(base_frame).pack(:fill=>:both, :expand=>true)
image3_df = TkLabelFrame.new(base_frame, :text=>'ディレクトリ:')
-image3_ff = TkLabelFrame.new(base_frame, :text=>'ファイル:',
+image3_ff = TkLabelFrame.new(base_frame, :text=>'ファイル:',
: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,
+ yscrollbar(TkScrollbar.new(image3_ff).pack(:side=>:left, :fill=>:y,
:expand=>true))
insert(0, *(%w(earth.gif earthris.gif teapot.ppm)))
bind('Double-1', proc{|x,y| loadImage3(self, x, y)}, '%x %y')
@@ -109,7 +109,7 @@ image3_ent = TkEntry.new(image3_df, :width=>30, :textvariable=>$dirName){
bind('Return', proc{loadDir3(image3_lbx)})
}
-TkButton.new(image3_df, :pady=>0, :padx=>'2m', :text=>"ディレクトリ選択",
+TkButton.new(image3_df, :pady=>0, :padx=>'2m', :text=>"ディレクトリ選択",
:command=>proc{selectAndLoadDir3(image3_ent, image3_lbx)}) {
pack(:side=>:left, :fill=>:y, :padx=>[0, '2m'], :pady=>'2m')
}
@@ -121,7 +121,7 @@ image3_if = TkLabelFrame.new(base_frame, :text=>'イメージ:') {|f|
Tk.grid(image3_df, '-',
:sticky=>:ew, :padx=>'1m', :pady=>'1m', :in=>image3_f)
-Tk.grid(image3_ff, image3_if,
+Tk.grid(image3_ff, image3_if,
: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 64ceeff3ec..4440905db8 100644
--- a/ext/tk/sample/demos-jp/items.rb
+++ b/ext/tk/sample/demos-jp/items.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($items_demo) && $items_demo
- $items_demo.destroy
+ $items_demo.destroy
$items_demo = nil
end
@@ -73,11 +73,11 @@ TkFrame.new(base_frame) {|cf|
c.pack('in'=>cf, 'expand'=>'yes', 'fill'=>'both')
else
- c.grid('in'=>cf, 'row'=>0, 'column'=>0,
+ c.grid('in'=>cf, 'row'=>0, 'column'=>0,
'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- vs.grid('row'=>0, 'column'=>1,
+ vs.grid('row'=>0, 'column'=>1,
'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- hs.grid('row'=>1, 'column'=>0,
+ hs.grid('row'=>1, 'column'=>0,
'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
TkGrid.rowconfigure(cf, 0, 'weight'=>1, 'minsize'=>0)
TkGrid.columnconfigure(cf, 0, 'weight'=>1, 'minsize'=>0)
@@ -118,8 +118,8 @@ $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',
+TkcLine.new(cvs, '1c', '1c', '3c', '1c', '1c', '4c', '3c', '4c',
+ '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)
@@ -127,38 +127,38 @@ 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 )
-TkcLine.new(cvs, '1c','5c','7c','5c','7c','7c','9c','7c', 'width'=>'.5c',
+TkcLine.new(cvs, '1c','5c','7c','5c','7c','7c','9c','7c', 'width'=>'.5c',
'stipple'=>'@'+[$demo_dir,'..',
- 'images','gray25.xbm'].join(File::Separator),
+ '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',
+ 'width'=>'.5c', 'capstyle'=>'round', 'join'=>'round',
'tags'=>$tag_item )
-TkcText.new(cvs, '15c', '.2c',
+TkcText.new(cvs, '15c', '.2c',
'text'=>'曲線 (滑らかにつないだ直線)', 'anchor'=>'n')
-TkcLine.new(cvs, '11c','4c','11.5c','1c','13.5c','1c','14c','4c',
+TkcLine.new(cvs, '11c','4c','11.5c','1c','13.5c','1c','14c','4c',
'smooth'=>'on', 'fill'=>blue, 'tags'=>$tag_item )
-TkcLine.new(cvs, '15.5c','1c','19.5c','1.5c','15.5c','4.5c','19.5c','4c',
+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 )
-TkcLine.new(cvs, '12c','6c','13.5c','4.5c','16.5c','7.5c','18c','6c',
+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',
+ 'smooth'=>'on', 'width'=>'3m', 'capstyle'=>'round',
'stipple'=>'@'+[$demo_dir, '..',
- 'images', 'gray25.xbm'].join(File::Separator),
+ '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,
+ '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)
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',
+ '7.5c','22c','7.5c',
'stipple'=>'@' + [$demo_dir, '..',
'images', 'gray25.xbm'].join(File::Separator),
'outline'=>'black', 'tags'=>$tag_item )
@@ -166,7 +166,7 @@ TkcPolygon.new(cvs, '22c','4.5c','25c','4.5c','25c','6.75c','28c','6.75c',
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)
-TkcRectangle.new(cvs, '0.5c','13.5c','4.5c','15.5c',
+TkcRectangle.new(cvs, '0.5c','13.5c','4.5c','15.5c',
'fill'=>green, 'tags'=>$tag_item )
TkcRectangle.new(cvs, '6c','10c','9c','15c', 'outline'=>'',
'stipple'=>'@'+[$demo_dir,'..',
@@ -176,7 +176,7 @@ TkcRectangle.new(cvs, '6c','10c','9c','15c', 'outline'=>'',
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)
-TkcOval.new(cvs, '10.5c','13.5c','14.5c','15.5c',
+TkcOval.new(cvs, '10.5c','13.5c','14.5c','15.5c',
'fill'=>green, 'tags'=>$tag_item )
TkcOval.new(cvs, '16c','10c','19c','15c', 'outline'=>'',
'stipple'=>'@'+[$demo_dir,'..',
@@ -185,40 +185,40 @@ TkcOval.new(cvs, '16c','10c','19c','15c', 'outline'=>'',
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',
+TkcText.new(cvs, '22.5c', '9c', 'anchor'=>'n', 'font'=>font1, 'width'=>'4c',
'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,
+TkcText.new(cvs, '25.5c', '11c', 'anchor'=>'w', 'font'=>font1, 'fill'=>blue,
'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,
+ TkcText.new(cvs, '25c', '14c', 'anchor'=>'c', 'font'=>font2, 'fill'=>red,
'stipple'=>'@' + [$demo_dir, '..',
'images', 'grey.5'].join(File::Separator),
'text'=>'Stippled characters', 'tags'=>$tag_item )
else
- TkcText.new(cvs, '25c', '14c', 'anchor'=>'c', 'font'=>font2, 'fill'=>red,
- 'stipple'=>'gray50', 'text'=>'Stippled characters',
+ TkcText.new(cvs, '25c', '14c', 'anchor'=>'c', 'font'=>font2, 'fill'=>red,
+ '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',
+TkcArc.new(cvs, '0.5c','17c','7c','20c', 'fill'=>green, 'outline'=>'black',
'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,
+#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)
-TkcArc.new(cvs, '6.5c','17c','9.5c','20c', 'width'=>'4m', 'style'=>'arc',
- 'outline'=>blue, 'start'=>135, 'extent'=>270,
+TkcArc.new(cvs, '6.5c','17c','9.5c','20c', 'width'=>'4m', 'style'=>'arc',
+ 'outline'=>blue, 'start'=>135, 'extent'=>270,
'outlinestipple'=>'@'+[$demo_dir, '..',
'images','gray25.xbm'].join(File::Separator),
'tags'=>$tag_item)
-TkcArc.new(cvs, '0.5c','20c','9.5c','24c', 'width'=>'4m', 'style'=>'pieslice',
- 'fill'=>'', 'outline'=>red, 'start'=>225, 'extent'=>90,
+TkcArc.new(cvs, '0.5c','20c','9.5c','24c', 'width'=>'4m', 'style'=>'pieslice',
+ '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,
+ 'fill'=>blue, 'outline'=>'', 'start'=>45, 'extent'=>270,
'tags'=>$tag_item)
TkcText.new(cvs, '15c', '16.2c', 'text'=>'ビットマップ', 'anchor'=>'n')
@@ -253,17 +253,17 @@ TkcText.new(cvs, '25c', '16.2c', 'text'=>'ウィンドウ', 'anchor'=>'n')
TkButton.new(cvs) {|b|
text '押してね'
command proc{butPress cvs, red}
- TkcWindow.new(cvs, '21c','18c',
+ TkcWindow.new(cvs, '21c','18c',
'window'=>b, 'anchor'=>'nw', 'tags'=>$tag_item)
}
TkEntry.new(cvs, 'width'=>20, 'relief'=>'sunken') {|e|
insert 'end', '編集してね'
- TkcWindow.new(cvs, '21c','21c',
+ TkcWindow.new(cvs, '21c','21c',
'window'=>e, 'anchor'=>'nw', 'tags'=>$tag_item)
}
-TkScale.new(cvs, 'from'=>0, 'to'=>100, 'length'=>'6c', 'sliderlength'=>'.4c',
+TkScale.new(cvs, 'from'=>0, 'to'=>100, 'length'=>'6c', 'sliderlength'=>'.4c',
'width'=>'.5c', 'tickinterval'=>0 ) {|scl|
- TkcWindow.new(cvs, '28.5c','17.5c',
+ TkcWindow.new(cvs, '28.5c','17.5c',
'window'=>scl, 'anchor'=>'n', 'tags'=>$tag_item)
}
TkcText.new(cvs, '21c', '17.9c', 'text'=>'ボタン:', 'anchor'=>'sw')
@@ -314,7 +314,7 @@ def itemLeave(c)
$restoreCmd.call if $restoreCmd
end
-# Utility methods for stroking out a rectangle and printing what's
+# Utility methods for stroking out a rectangle and printing what's
# underneath the rectangle's area.
def itemMark(c,x,y)
@@ -328,7 +328,7 @@ def itemStroke(c,x,y)
y = c.canvasy(y)
if $areaX1 != x && $areaY1 != y
c.delete 'area'
- c.addtag_withtag 'area', TkcRectangle.new(c, $areaX1, $areaY1, x, y,
+ c.addtag_withtag 'area', TkcRectangle.new(c, $areaX1, $areaY1, x, y,
'-outline', 'black')
$areaX2 = x
$areaY2 = y
@@ -369,11 +369,11 @@ def itemDrag(c,x,y)
$lastY = y
end
-# Method that's invoked when the button embedded in the canvas
+# Method that's invoked when the button embedded in the canvas
# is invoked.
def butPress(w,color)
- i = TkcText.new(w, '25c', '18.1c',
+ i = TkcText.new(w, '25c', '18.1c',
'text'=>'いてて!!', 'fill'=>color, 'anchor'=>'n')
Tk.after(500, proc{w.delete i})
end
diff --git a/ext/tk/sample/demos-jp/knightstour.rb b/ext/tk/sample/demos-jp/knightstour.rb
index d4595ea441..ae0f13076e 100644
--- a/ext/tk/sample/demos-jp/knightstour.rb
+++ b/ext/tk/sample/demos-jp/knightstour.rb
@@ -157,16 +157,16 @@ class Knights_Tour
frame = Ttk::Frame.new($knightstour)
sep = Ttk::Separator.new(frame)
Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'コード参照',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'knightstour'}),
- Ttk::Button.new(frame, :text=>'閉じる',
- :image=>$image['delete'], :compound=>:left,
+ TkGrid('x',
+ Ttk::Button.new(frame, :text=>'コード参照',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{showCode 'knightstour'}),
+ Ttk::Button.new(frame, :text=>'閉じる',
+ :image=>$image['delete'], :compound=>:left,
:command=>proc{
$knightstour.destroy
$knightstour = nil
- }),
+ }),
:padx=>4, :pady=>4)
frame.grid_columnconfigure(0, :weight=>1)
frame
@@ -178,7 +178,7 @@ class Knights_Tour
$knightstour.withdraw
base_f = Ttk::Frame.new($knightstour)
@board = Tk::Canvas.new(base_f, :width=>240, :height=>240)
- @log = Tk::Text.new(base_f, :width=>12, :height=>1,
+ @log = Tk::Text.new(base_f, :width=>12, :height=>1,
:font=>'Arial 8', :background=>'white')
scr = @log.yscrollbar(Ttk::Scrollbar.new(base_f))
@@ -188,13 +188,13 @@ class Knights_Tour
tool_f = Ttk::Frame.new($knightstour)
label = Ttk::Label.new(tool_f, :text=>'実行速度')
- scale = Ttk::Scale.new(tool_f, :from=>8, :to=>2000, :variable=>@delay,
+ scale = Ttk::Scale.new(tool_f, :from=>8, :to=>2000, :variable=>@delay,
:command=>proc{|n| set_delay(n)})
- check = Ttk::Checkbutton.new(tool_f, :text=>'反復',
+ check = Ttk::Checkbutton.new(tool_f, :text=>'反復',
:variable=>@continuous)
- @start_btn = Ttk::Button.new(tool_f, :text=>'開始',
+ @start_btn = Ttk::Button.new(tool_f, :text=>'開始',
:command=>proc{tour()})
- @exit_btn = Ttk::Button.new(tool_f, :text=>'終了',
+ @exit_btn = Ttk::Button.new(tool_f, :text=>'終了',
:command=>proc{_exit()})
7.downto(0){|row|
@@ -207,16 +207,16 @@ class Knights_Tour
dfill = 'tan4'
end
coords = [col * 30 + 4, row * 30 + 4, col * 30 + 30, row * 30 + 30]
- @board.create(TkcRectangle, coords,
+ @board.create(TkcRectangle, coords,
:fill=>fill, :disabledfill=>dfill,
:width=>2, :state=>:disabled)
}
}
@knight_font = TkFont.new(:size=>-24)
- @knight = TkcText.new(@board, 0, 0, :font=>@knight_font,
- :text=>Tk::UTF8_String.new('\u265e'),
- :anchor=>'nw', # :tags=>'knight',
+ @knight = TkcText.new(@board, 0, 0, :font=>@knight_font,
+ :text=>Tk::UTF8_String.new('\u265e'),
+ :anchor=>'nw', # :tags=>'knight',
:fill=>'black', :activefill=>'#600000')
@knight.coords(@board.coords(rand(64)+1)[0..1])
@knight.bind('ButtonPress-1', '%W %x %y'){|w,x,y| drag_start(w,x,y)}
diff --git a/ext/tk/sample/demos-jp/label.rb b/ext/tk/sample/demos-jp/label.rb
index 2e6b3e7e57..19105e6f71 100644
--- a/ext/tk/sample/demos-jp/label.rb
+++ b/ext/tk/sample/demos-jp/label.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($label_demo) && $label_demo
- $label_demo.destroy
+ $label_demo.destroy
$label_demo = nil
end
@@ -49,12 +49,12 @@ TkFrame.new(base_frame) {|frame|
# label demo 用フレーム生成
f_left = TkFrame.new(base_frame)
f_right = TkFrame.new(base_frame)
-[f_left, f_right].each{|w| w.pack('side'=>'left', 'expand'=>'yes',
+[f_left, f_right].each{|w| w.pack('side'=>'left', 'expand'=>'yes',
'padx'=>10, 'pady'=>10, 'fill'=>'both')}
# label 生成
[ TkLabel.new(f_left, 'text'=>'最初のラベル'),
- TkLabel.new(f_left, 'text'=>'2 番目。ちょっと浮き上がらせてみました',
+ TkLabel.new(f_left, 'text'=>'2 番目。ちょっと浮き上がらせてみました',
'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 11b0d27308..cee504f4b6 100644
--- a/ext/tk/sample/demos-jp/labelframe.rb
+++ b/ext/tk/sample/demos-jp/labelframe.rb
@@ -9,7 +9,7 @@
if defined?($labelframe_demo) && $labelframe_demo
- $labelframe_demo.destroy
+ $labelframe_demo.destroy
$labelframe_demo = nil
end
@@ -22,18 +22,18 @@ $labelframe_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($labelframe_demo).pack(:fill=>:both, :expand=>true)
# Some information
-TkLabel.new(base_frame,
- :font=>$font, :wraplength=>'4i', :justify=>:left,
+TkLabel.new(base_frame,
+ :font=>$font, :wraplength=>'4i', :justify=>:left,
:text=><<EOL).pack(:side=>:top)
-TkLabelFrame ウィジェットは関連する widget
+TkLabelFrame ウィジェットは関連する widget
群をまとめて取り扱うために用いられます。ラ
ベルは通常の文字列でも何らかのウィジェット
-でもかまいません。もしあなたが使っている
-Ruby にリンクされている Tk ライブラリが
+でもかまいません。もしあなたが使っている
+Ruby にリンクされている Tk ライブラリが
labelframe ウィジェットを実装していない
場合、このデモはうまく動かないはずです。
その場合には labelframe ウィジェットが実装
-されているようなより新しいバージョンの Tk
+されているようなより新しいバージョンの Tk
を組み合わせて試すようにしてください。
EOL
@@ -52,17 +52,17 @@ TkFrame.new(base_frame){|f|
}
# Demo area
-w = TkFrame.new(base_frame).pack(:side=>:bottom, :fill=>:both,
+w = TkFrame.new(base_frame).pack(:side=>:bottom, :fill=>:both,
:expand=>true)
# A group of radiobuttons in a labelframe
-TkLabelFrame.new(w, :text=>'選択値',
+TkLabelFrame.new(w, :text=>'選択値',
: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}",
+ TkRadiobutton.new(f, :text=>"This is value #{i}",
:variable=>v, :value=>i) {
pack(:side=>:top, :fill=>:x, :pady=>2)
}
@@ -85,7 +85,7 @@ def lfEnableButtons(w)
end
TkLabelFrame.new(w, :pady=>2, :padx=>2){|f|
- TkCheckButton.new(f, :widgetname=>'cb', :variable=>$lfdummy,
+ TkCheckButton.new(f, :widgetname=>'cb', :variable=>$lfdummy,
:text=>"オプションを使用", :padx=>0) {|cb|
command proc{lfEnableButtons(f)}
f.labelwidget(cb)
diff --git a/ext/tk/sample/demos-jp/mclist.rb b/ext/tk/sample/demos-jp/mclist.rb
index a7834d2668..37f5dfa8eb 100644
--- a/ext/tk/sample/demos-jp/mclist.rb
+++ b/ext/tk/sample/demos-jp/mclist.rb
@@ -8,7 +8,7 @@
# based on "Id: mclist.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp"
if defined?($mclist_demo) && $mclist_demo
- $mclist_demo.destroy
+ $mclist_demo.destroy
$mclist_demo = nil
end
@@ -21,8 +21,8 @@ $mclist_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($mclist_demo).pack(:fill=>:both, :expand=>true)
## Explanatory text
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i',
- :justify=>:left, :anchor=>'n', :padding=>[10, 2, 10, 6],
+Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i',
+ :justify=>:left, :anchor=>'n', :padding=>[10, 2, 10, 6],
:text=><<EOL).pack(:fill=>:x)
Ttkとは,テーマ指定可能な新しいウィジェット集合です.\
Ttk::Treeviewウィジェットは\
@@ -40,23 +40,23 @@ EOL
Ttk::Frame.new(base_frame) {|frame|
sep = Ttk::Separator.new(frame)
Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'コード参照',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'mclist'}),
- Ttk::Button.new(frame, :text=>'閉じる',
- :image=>$image['delete'], :compound=>:left,
+ TkGrid('x',
+ Ttk::Button.new(frame, :text=>'コード参照',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{showCode 'mclist'}),
+ Ttk::Button.new(frame, :text=>'閉じる',
+ :image=>$image['delete'], :compound=>:left,
:command=>proc{
$mclist_demo.destroy
$mclist_demo = nil
- }),
+ }),
:padx=>4, :pady=>4)
grid_columnconfigure(0, :weight=>1)
pack(:side=>:bottom, :fill=>:x)
}
container = Ttk::Frame.new(base_frame)
-tree = Ttk::Treeview.new(base_frame, :columns=>%w(country capital currency),
+tree = Ttk::Treeview.new(base_frame, :columns=>%w(country capital currency),
:show=>:headings)
if Tk.windowingsystem != 'aquq'
vsb = tree.yscrollbar(Ttk::Scrollbar.new(base_frame))
@@ -74,20 +74,20 @@ container.grid_rowconfigure(0, :weight=>1)
## The data we're going to insert
data = [
- ['アルゼンチン', 'ブエノスアイレス', 'ARS'],
- ['オーストラリア', 'キャンベラ', 'AUD'],
- ['ブラジル', 'ブラジリア', 'BRL'],
- ['カナダ', 'オタワ', 'CAD'],
- ['中国', '北京', 'CNY'],
- ['フランス', 'パリ', 'EUR'],
- ['ドイツ', 'ベルリン', 'EUR'],
- ['インド', 'ニューデリー', 'INR'],
- ['イタリア', 'ローマ', 'EUR'],
- ['日本', '東京', 'JPY'],
- ['メキシコ', 'メキシコシティ', 'MXN'],
- ['ロシア', 'モスクワ', 'RUB'],
- ['南アフリカ', 'プレトリア', 'ZAR'],
- ['英国', 'ロンドン', 'GBP'],
+ ['アルゼンチン', 'ブエノスアイレス', 'ARS'],
+ ['オーストラリア', 'キャンベラ', 'AUD'],
+ ['ブラジル', 'ブラジリア', 'BRL'],
+ ['カナダ', 'オタワ', 'CAD'],
+ ['中国', '北京', 'CNY'],
+ ['フランス', 'パリ', 'EUR'],
+ ['ドイツ', 'ベルリン', 'EUR'],
+ ['インド', 'ニューデリー', 'INR'],
+ ['イタリア', 'ローマ', 'EUR'],
+ ['日本', '東京', 'JPY'],
+ ['メキシコ', 'メキシコシティ', 'MXN'],
+ ['ロシア', 'モスクワ', 'RUB'],
+ ['南アフリカ', 'プレトリア', 'ZAR'],
+ ['英国', 'ロンドン', 'GBP'],
['アメリカ', 'ワシントン D.C.', 'USD'],
]
@@ -95,7 +95,7 @@ data = [
font = Ttk::Style.lookup(tree[:style], :font)
cols = %w(country capital currency)
cols.zip(%w(国名 首都 通貨)).each{|col, name|
- tree.heading_configure(col, :text=>name,
+ tree.heading_configure(col, :text=>name,
:command=>proc{sort_by(tree, col, false)})
tree.column_configure(col, :width=>TkFont.measure(font, name))
}
@@ -113,8 +113,8 @@ data.each{|country, capital, currency|
## Code to do the sorting of the tree contents when clicked on
def sort_by(tree, col, direction)
- tree.children(nil).map!{|row| [tree.get(row, col), row.id]} .
- sort(&((direction)? proc{|x, y| y <=> x}: proc{|x, y| x <=> y})) .
+ tree.children(nil).map!{|row| [tree.get(row, col), row.id]} .
+ sort(&((direction)? proc{|x, y| y <=> x}: proc{|x, y| x <=> y})) .
each_with_index{|info, idx| tree.move(info[1], nil, idx)}
tree.heading_configure(col, :command=>proc{sort_by(tree, col, ! direction)})
diff --git a/ext/tk/sample/demos-jp/menu.rb b/ext/tk/sample/demos-jp/menu.rb
index c3d95176b4..e38a467000 100644
--- a/ext/tk/sample/demos-jp/menu.rb
+++ b/ext/tk/sample/demos-jp/menu.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($menu_demo) && $menu_demo
- $menu_demo.destroy
+ $menu_demo.destroy
$menu_demo = nil
end
@@ -88,9 +88,9 @@ TkMenubutton.new($menu_frame, 'text'=>'Basic', 'underline'=>0) {|m|
m.configure('menu'=>basic_menu)
add('command', 'label'=>'何もしない長いエントリ')
['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}",
+ # 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}")
$menu_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"})
}
@@ -101,18 +101,18 @@ TkMenubutton.new($menu_frame, 'text'=>'Cascades', 'underline'=>0) {|m|
pack('side'=>'left')
TkMenu.new(m, 'tearoff'=>false) {|cascade_menu|
m.configure('menu'=>cascade_menu)
- add('command', 'label'=>'Print hello(こんにちは)',
- 'command'=>proc{print "Hello(こんにちは)\n"},
+ add('command', 'label'=>'Print hello(こんにちは)',
+ '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"},
+ add('command', 'label'=>'Print goodbye(さようなら)',
+ '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|
TkMenu.new(cascade_menu, 'tearoff'=>false) {|cascade_check|
- cascade_menu.add('cascade', 'label'=>'Check buttons(チェックボタン)',
+ cascade_menu.add('cascade', 'label'=>'Check buttons(チェックボタン)',
'menu'=>cascade_check, 'underline'=>0)
oil = TkVariable.new(0)
add('check', 'label'=>'オイル点検', 'variable'=>oil)
@@ -123,11 +123,11 @@ TkMenubutton.new($menu_frame, 'text'=>'Cascades', 'underline'=>0) {|m|
lights = TkVariable.new(0)
add('check', 'label'=>'ライト点検', 'variable'=>lights)
add('separator')
- add('command', 'label'=>'現在の値を表示',
- 'command'=>proc{showVars($menu_demo,
- ['オイル点検', oil],
- ['トランスミッション点検', trans],
- ['ブレーキ点検', brakes],
+ add('command', 'label'=>'現在の値を表示',
+ 'command'=>proc{showVars($menu_demo,
+ ['オイル点検', oil],
+ ['トランスミッション点検', trans],
+ ['ブレーキ点検', brakes],
['ライト点検', lights])} )
invoke 1
invoke 3
@@ -135,7 +135,7 @@ TkMenubutton.new($menu_frame, 'text'=>'Cascades', 'underline'=>0) {|m|
#TkMenu.new(m, 'tearoff'=>false) {|cascade_radio|
TkMenu.new(cascade_menu, 'tearoff'=>false) {|cascade_radio|
- cascade_menu.add('cascade', 'label'=>'Radio buttons(ラジオボタン)',
+ cascade_menu.add('cascade', 'label'=>'Radio buttons(ラジオボタン)',
'menu'=>cascade_radio, 'underline'=>0)
pointSize = TkVariable.new
add('radio', 'label'=>'10 ポイント', 'variable'=>pointSize, 'value'=>10)
@@ -149,9 +149,9 @@ TkMenubutton.new($menu_frame, 'text'=>'Cascades', 'underline'=>0) {|m|
add('radio', 'label'=>'ボールド', 'variable'=>style, 'value'=>'bold')
add('radio', 'label'=>'イタリック', 'variable'=>style, 'value'=>'italic')
add('separator')
- add('command', 'label'=>'現在の値を表示',
- 'command'=>proc{showVars($menu_demo,
- ['ポイントサイズ', pointSize],
+ add('command', 'label'=>'現在の値を表示',
+ 'command'=>proc{showVars($menu_demo,
+ ['ポイントサイズ', pointSize],
['スタイル', style])} )
invoke 1
invoke 7
@@ -163,15 +163,15 @@ TkMenubutton.new($menu_frame, 'text'=>'Icons', 'underline'=>0) {|m|
pack('side'=>'left')
TkMenu.new(m, 'tearoff'=>false) {|icon_menu|
m.configure('menu'=>icon_menu)
- add('command',
+ add('command',
'bitmap'=>'@'+[$demo_dir,'..',
'images','pattern.xbm'].join(File::Separator),
- 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry',
+ 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry',
'text'=>'今あなたが選択したメニューの項目はテキストではなくビットマップを表示していました。それ以外の点では他のメニュー項目と変わりません。',
- 'bitmap'=>'', 'default'=>0,
+ 'bitmap'=>'', 'default'=>0,
'buttons'=>'了解')} )
['info', 'questhead', 'error'].each{|icon|
- add('command', 'bitmap'=>icon,
+ add('command', 'bitmap'=>icon,
'command'=>proc{print "You invoked the #{icon} bitmap\n"})
}
}
@@ -183,7 +183,7 @@ TkMenubutton.new($menu_frame, 'text'=>'More', 'underline'=>0) {|m|
m.configure('menu'=>more_menu)
[ 'エントリ','別のエントリ','何もしない','ほとんど何もしない',
'人生を意義あるものに' ].each{|i|
- add('command', 'label'=>i,
+ add('command', 'label'=>i,
'command'=>proc{print "You invoked \"#{i}\"\n"})
}
}
@@ -194,7 +194,7 @@ TkMenubutton.new($menu_frame, 'text'=>'Colors', 'underline'=>0) {|m|
TkMenu.new(m) {|colors_menu|
m.configure('menu'=>colors_menu)
['red', 'orange', 'yellow', 'green', 'blue'].each{|c|
- add('command', 'label'=>c, 'background'=>c,
+ add('command', 'label'=>c, 'background'=>c,
'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 a631bacd43..094853a728 100644
--- a/ext/tk/sample/demos-jp/menu84.rb
+++ b/ext/tk/sample/demos-jp/menu84.rb
@@ -5,7 +5,7 @@
# toplevel widget
if defined?($menu84_demo) && $menu84_demo
- $menu84_demo.destroy
+ $menu84_demo.destroy
$menu84_demo = nil
end
@@ -37,9 +37,9 @@ TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left') {
menustatus = TkVariable.new(" ")
TkFrame.new(base_frame) {|frame|
- TkLabel.new(frame, 'textvariable'=>menustatus, 'relief'=>'sunken',
- 'bd'=>1, 'font'=>['Helvetica', '10'],
- 'anchor'=>'w').pack('side'=>'left', 'padx'=>2,
+ TkLabel.new(frame, 'textvariable'=>menustatus, 'relief'=>'sunken',
+ 'bd'=>1, 'font'=>['Helvetica', '10'],
+ 'anchor'=>'w').pack('side'=>'left', 'padx'=>2,
'expand'=>true, 'fill'=>'both')
pack('side'=>'bottom', 'fill'=>'x', 'pady'=>2)
}
@@ -94,8 +94,8 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
$menu84_frame.add('cascade', 'label'=>'Basic', 'menu'=>m, 'underline'=>0)
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}",
+ add('command', 'label'=>"Print letter \"#{c}\"",
+ 'underline'=>14, 'accelerator'=>"Meta+#{c}",
'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
$menu84_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"})
}
@@ -103,17 +103,17 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
$menu84_frame.add('cascade', 'label'=>'Cascades', 'menu'=>m, 'underline'=>0)
- add('command', 'label'=>'Print hello',
- 'command'=>proc{print "Hello\n"},
+ add('command', 'label'=>'Print hello',
+ 'command'=>proc{print "Hello\n"},
'accelerator'=>"#{modifier}+H", 'underline'=>6)
$menu84_demo.bind("#{modifier}-h", proc{print "Hello\n"})
- add('command', 'label'=>'Print goodbye',
- 'command'=>proc{print "Goodbye\n"},
+ add('command', 'label'=>'Print goodbye',
+ 'command'=>proc{print "Goodbye\n"},
'accelerator'=>"#{modifier}+G", 'underline'=>6)
$menu84_demo.bind("#{modifier}-g", proc{print "Goodbye\n"})
TkMenu.new(m, 'tearoff'=>false) {|cascade_check|
- m.add('cascade', 'label'=>'Check button',
+ m.add('cascade', 'label'=>'Check button',
'menu'=>cascade_check, 'underline'=>0)
oil = TkVariable.new(0)
add('check', 'label'=>'オイル検査', 'variable'=>oil)
@@ -124,18 +124,18 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
lights = TkVariable.new(0)
add('check', 'label'=>'ライト検査', 'variable'=>lights)
add('separator')
- add('command', 'label'=>'Show current values',
- 'command'=>proc{showVars($menu84_demo,
- ['オイル', oil],
- ['トランスミッション', trans],
- ['ブレーキ', brakes],
+ add('command', 'label'=>'Show current values',
+ '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',
+ m.add('cascade', 'label'=>'Radio buttons',
'menu'=>cascade_radio, 'underline'=>0)
pointSize = TkVariable.new
add('radio', 'label'=>'10 point', 'variable'=>pointSize, 'value'=>10)
@@ -149,9 +149,9 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
add('radio', 'label'=>'Bold', 'variable'=>style, 'value'=>'bold')
add('radio', 'label'=>'Italic', 'variable'=>style, 'value'=>'italic')
add('separator')
- add('command', 'label'=>'現在値の表示',
- 'command'=>proc{showVars($menu84_demo,
- ['pointSize', pointSize],
+ add('command', 'label'=>'現在値の表示',
+ 'command'=>proc{showVars($menu84_demo,
+ ['pointSize', pointSize],
['style', style])} )
invoke 1
invoke 7
@@ -160,15 +160,15 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
$menu84_frame.add('cascade', 'label'=>'Icons', 'menu'=>m, 'underline'=>0)
- add('command', 'hidemargin'=>1,
+ add('command', 'hidemargin'=>1,
'bitmap'=>'@'+[$demo_dir,'..',
'images','pattern.xbm'].join(File::Separator),
- 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry',
+ 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry',
'text'=>'あなたが選択したメニュー項目は、文字列の代わりにビットマップイメージで項目を表示したものです。それ以外の点では、ほかのメニュー項目との間で特に違いがあるわけではありません。',
- 'bitmap'=>'', 'default'=>0,
+ 'bitmap'=>'', 'default'=>0,
'buttons'=>'閉じる')} )
['info', 'questhead', 'error'].each{|icon|
- add('command', 'bitmap'=>icon, 'hidemargin'=>1,
+ add('command', 'bitmap'=>icon, 'hidemargin'=>1,
'command'=>proc{print "You invoked the #{icon} bitmap\n"})
}
@@ -179,14 +179,14 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
$menu84_frame.add('cascade', 'label'=>'More', 'menu'=>m, 'underline'=>0)
[ 'An entry','Another entry','Does nothing','Does almost nothing',
'Make life meaningful' ].each{|i|
- add('command', 'label'=>i,
+ add('command', 'label'=>i,
'command'=>proc{print "You invoked \"#{i}\"\n"})
}
- m.entryconfigure('Does almost nothing',
- 'bitmap'=>'questhead', 'compound'=>'left',
+ m.entryconfigure('Does almost nothing',
+ 'bitmap'=>'questhead', 'compound'=>'left',
'command'=>proc{
- TkDialog.new('title'=>'Compound Menu Entry',
+ TkDialog.new('title'=>'Compound Menu Entry',
'message'=>'あなたが選択したメニュー項目は、ビットマップイメージと文字列とを同時に一つの項目に表示するようにしたものです。それ以外の点では、ほかのメニュー項目との間で特に違いがあるわけではありません。',
'buttons'=>['了解'], 'bitmap'=>'')
})
@@ -195,7 +195,7 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
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,
+ add('command', 'label'=>c, 'background'=>c,
'command'=>proc{print "You invoked \"#{c}\"\n"})
}
}
diff --git a/ext/tk/sample/demos-jp/menu8x.rb b/ext/tk/sample/demos-jp/menu8x.rb
index 9249f2491a..49aca6786d 100644
--- a/ext/tk/sample/demos-jp/menu8x.rb
+++ b/ext/tk/sample/demos-jp/menu8x.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($menu8x_demo) && $menu8x_demo
- $menu8x_demo.destroy
+ $menu8x_demo.destroy
$menu8x_demo = nil
end
@@ -65,7 +65,7 @@ TkLabel.new(base_frame,'font'=>$font,'wraplength'=>'4i','justify'=>'left') {
# 状態表示の生成
$menu8xstatus = TkVariable.new(" ")
TkFrame.new(base_frame) {|frame|
- TkLabel.new(frame, 'textvariable'=>$menu8xstatus, 'relief'=>'sunken',
+ TkLabel.new(frame, 'textvariable'=>$menu8xstatus, 'relief'=>'sunken',
'bd'=>1, 'font'=>['Helvetica', '10'], 'anchor'=>'w')\
.pack('side'=>'left', 'padx'=>2, 'expand'=>'yes', 'fill'=>'both')
}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>2)
@@ -116,9 +116,9 @@ TkMenu.new($menu8x_demo, 'tearoff'=>false) {|m|
m.add('cascade', 'label'=>'Basic', 'menu'=>basic_menu, 'underline'=>0)
add('command', 'label'=>'何もしない長いエントリ')
['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}",
+ # 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}")
$menu8x_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"})
}
@@ -126,17 +126,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"},
+ add('command', 'label'=>'Print hello(こんにちは)',
+ '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"},
+ add('command', 'label'=>'Print goodbye(さようなら)',
+ '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(チェックボタン)',
+ cascade_menu.add('cascade', 'label'=>'Check buttons(チェックボタン)',
'menu'=>cascade_check, 'underline'=>0)
oil = TkVariable.new(0)
add('check', 'label'=>'オイル点検', 'variable'=>oil)
@@ -147,18 +147,18 @@ TkMenu.new($menu8x_demo, 'tearoff'=>false) {|m|
lights = TkVariable.new(0)
add('check', 'label'=>'ライト点検', 'variable'=>lights)
add('separator')
- add('command', 'label'=>'現在の値を表示',
- 'command'=>proc{showVars($menu8x_demo,
- ['オイル点検', oil],
- ['トランスミッション点検', trans],
- ['ブレーキ点検', brakes],
+ add('command', 'label'=>'現在の値を表示',
+ '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(ラジオボタン)',
+ cascade_menu.add('cascade', 'label'=>'Radio buttons(ラジオボタン)',
'menu'=>cascade_radio, 'underline'=>0)
pointSize = TkVariable.new
add('radio', 'label'=>'10 ポイント', 'variable'=>pointSize, 'value'=>10)
@@ -172,9 +172,9 @@ TkMenu.new($menu8x_demo, 'tearoff'=>false) {|m|
add('radio', 'label'=>'ボールド', 'variable'=>style, 'value'=>'bold')
add('radio', 'label'=>'イタリック', 'variable'=>style, 'value'=>'italic')
add('separator')
- add('command', 'label'=>'現在の値を表示',
- 'command'=>proc{showVars($menu8x_demo,
- ['ポイントサイズ', pointSize],
+ add('command', 'label'=>'現在の値を表示',
+ 'command'=>proc{showVars($menu8x_demo,
+ ['ポイントサイズ', pointSize],
['スタイル', style])} )
invoke 1
invoke 7
@@ -183,16 +183,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',
+ add('command',
'bitmap'=>'@'+[$demo_dir,'..',
'images','pattern.xbm'].join(File::Separator),
- 'hidemargin'=>1,
- 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry',
+ 'hidemargin'=>1,
+ 'command'=>proc{TkDialog.new('title'=>'Bitmap Menu Entry',
'text'=>'今あなたが選択したメニューの項目はテキストではなくビットマップを表示していました。それ以外の点では他のメニュー項目と変わりません。',
- 'bitmap'=>'', 'default'=>0,
+ 'bitmap'=>'', 'default'=>0,
'buttons'=>'了解')} )
['info', 'questhead', 'error'].each{|icon|
- add('command', 'bitmap'=>icon, 'hidemargin'=>1,
+ add('command', 'bitmap'=>icon, 'hidemargin'=>1,
'command'=>proc{print "You invoked the #{icon} bitmap\n"})
}
@@ -203,7 +203,7 @@ TkMenu.new($menu8x_demo, 'tearoff'=>false) {|m|
m.add('cascade', 'label'=>'More', 'menu'=>more_menu, 'underline'=>0)
[ 'エントリ','別のエントリ','何もしない','ほとんど何もしない',
'人生を意義あるものに' ].each{|i|
- add('command', 'label'=>i,
+ add('command', 'label'=>i,
'command'=>proc{print "You invoked \"#{i}\"\n"})
}
}
@@ -211,7 +211,7 @@ TkMenu.new($menu8x_demo, 'tearoff'=>false) {|m|
TkMenu.new(m) {|colors_menu|
m.add('cascade', 'label'=>'Colors', 'menu'=>colors_menu, 'underline'=>1)
['red', 'orange', 'yellow', 'green', 'blue'].each{|c|
- add('command', 'label'=>c, 'background'=>c,
+ add('command', 'label'=>c, 'background'=>c,
'command'=>proc{print "You invoked \"#{c}\"\n"})
}
}
@@ -219,8 +219,8 @@ TkMenu.new($menu8x_demo, 'tearoff'=>false) {|m|
$menu8x_demo.configure('menu'=>m)
}
-TkMenu.bind('<MenuSelect>',
- proc{|w|
+TkMenu.bind('<MenuSelect>',
+ proc{|w|
begin
label = w.entrycget('active', 'label')
rescue
diff --git a/ext/tk/sample/demos-jp/menubu.rb b/ext/tk/sample/demos-jp/menubu.rb
index 90dc367305..78418ce3ea 100644
--- a/ext/tk/sample/demos-jp/menubu.rb
+++ b/ext/tk/sample/demos-jp/menubu.rb
@@ -17,7 +17,7 @@ def optionMenu(menubutton, varName, firstValue, *rest)
for i in rest
menu.add 'radio', 'label'=>i, 'variable'=>varName
end
-
+
return menu
end
@@ -189,7 +189,7 @@ msg.pack('side'=>'top', 'padx'=>25, 'pady'=>25)
TkFrame.new(center) {|f|
menubuttonoptions = TkVariable.new
mbutton = TkMenubutton.new(f)
- options = optionMenu(mbutton, menubuttonoptions,
+ options = optionMenu(mbutton, menubuttonoptions,
'one', 'two', 'three')
mbutton.pack('side'=>'left', 'padx'=>25, 'pady'=>25)
paletteColor = TkVariable.new
diff --git a/ext/tk/sample/demos-jp/msgbox.rb b/ext/tk/sample/demos-jp/msgbox.rb
index 88380e08bd..ed5d01252e 100644
--- a/ext/tk/sample/demos-jp/msgbox.rb
+++ b/ext/tk/sample/demos-jp/msgbox.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($msgbox_demo) && $msgbox_demo
- $msgbox_demo.destroy
+ $msgbox_demo.destroy
$msgbox_demo = nil
end
@@ -48,9 +48,9 @@ TkFrame.new(base_frame) {|frame|
# frame 生成
$msgbox_leftframe = TkFrame.new(base_frame)
$msgbox_rightframe = TkFrame.new(base_frame)
-$msgbox_leftframe .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
+$msgbox_leftframe .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
'pady'=>'.5c', 'padx'=>'.5c')
-$msgbox_rightframe.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
+$msgbox_rightframe.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
'pady'=>'.5c', 'padx'=>'.5c')
TkLabel.new($msgbox_leftframe, 'text'=>'アイコン').pack('side'=>'top')
@@ -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,
+ 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')
}
@@ -70,20 +70,20 @@ TkFrame.new($msgbox_rightframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\
.pack('side'=>'top', 'fill'=>'x', 'expand'=>'no')
$msgboxType = TkVariable.new('ok')
-['abortretryignore', 'ok', 'okcancel',
+['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,
+ 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')
}
def showMessageBox(w)
- button = Tk.messageBox('icon'=>$msgboxIcon.value, 'type'=>$msgboxType.value,
+ button = Tk.messageBox('icon'=>$msgboxIcon.value, 'type'=>$msgboxType.value,
'title'=>'Message', 'parent'=>w,
'message'=>"これは\"#{$msgboxType.value}\"という種類のメッセージボックスで、\"#{$msgboxIcon.value}\"のアイコンが表示されています。")
- Tk.messageBox('icon'=>'info', 'type'=>'ok', 'parent'=>w,
+ Tk.messageBox('icon'=>'info', 'type'=>'ok', 'parent'=>w,
'message'=>"あなたは \"#{button}\" を押しましたね。")
end
diff --git a/ext/tk/sample/demos-jp/msgbox2.rb b/ext/tk/sample/demos-jp/msgbox2.rb
index e2944c59ed..8c80e08d70 100644
--- a/ext/tk/sample/demos-jp/msgbox2.rb
+++ b/ext/tk/sample/demos-jp/msgbox2.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($msgbox2_demo) && $msgbox2_demo
- $msgbox2_demo.destroy
+ $msgbox2_demo.destroy
$msgbox2_demo = nil
end
@@ -48,9 +48,9 @@ TkFrame.new(base_frame) {|frame|
# frame 生成
$msgbox_leftframe = TkFrame.new(base_frame)
$msgbox_rightframe = TkFrame.new(base_frame)
-$msgbox_leftframe .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
+$msgbox_leftframe .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
'pady'=>'.5c', 'padx'=>'.5c')
-$msgbox_rightframe.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
+$msgbox_rightframe.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
'pady'=>'.5c', 'padx'=>'.5c')
TkLabel.new($msgbox_leftframe, 'text'=>'アイコン').pack('side'=>'top')
@@ -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,
+ 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')
}
@@ -70,21 +70,21 @@ TkFrame.new($msgbox_rightframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\
.pack('side'=>'top', 'fill'=>'x', 'expand'=>'no')
$msgboxType = TkVariable.new('ok')
-['abortretryignore', 'ok', 'okcancel',
+['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,
+ 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')
}
def showMessageBox2(w)
- button = Tk.messageBox('icon'=>$msgboxIcon.value, 'type'=>$msgboxType.value,
+ button = Tk.messageBox('icon'=>$msgboxIcon.value, 'type'=>$msgboxType.value,
'title'=>'Message', 'parent'=>w,
- 'message'=>"\"#{$msgboxType.value}\"タイプのメッセージボックス",
+ 'message'=>"\"#{$msgboxType.value}\"タイプのメッセージボックス",
'detail'=>"これは\"#{$msgboxType.value}\"という種類のメッセージボックスで、\"#{$msgboxIcon.value}\"のアイコンが表示されています。下のボタンのいずれかを選択してクリックしてください。")
- Tk.messageBox('icon'=>'info', 'type'=>'ok', 'parent'=>w,
+ Tk.messageBox('icon'=>'info', 'type'=>'ok', 'parent'=>w,
'message'=>"あなたは \"#{button}\" を押しましたね。")
end
diff --git a/ext/tk/sample/demos-jp/paned1.rb b/ext/tk/sample/demos-jp/paned1.rb
index f994e83ff1..987a073086 100644
--- a/ext/tk/sample/demos-jp/paned1.rb
+++ b/ext/tk/sample/demos-jp/paned1.rb
@@ -8,7 +8,7 @@
# based on "Id: paned1.tcl,v 1.1 2002/02/22 14:07:01 dkf Exp"
if defined?($paned1_demo) && $paned1_demo
- $paned1_demo.destroy
+ $paned1_demo.destroy
$paned1_demo = nil
end
@@ -20,8 +20,8 @@ $paned1_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($paned1_demo).pack(:fill=>:both, :expand=>true)
-TkLabel.new(base_frame,
- :font=>$font, :wraplength=>'4i', :justify=>:left,
+TkLabel.new(base_frame,
+ :font=>$font, :wraplength=>'4i', :justify=>:left,
:text=><<EOL).pack(:side=>:top)
下の色付けされた二つのウィンドウの間の仕切り枠は、一つの領域をそれぞれのウィンドウのために分割するためのものです。左ボタンで仕切りを操作すると、分割サイズ変更の操作途中では再表示はなされず、確定させたときに表示が更新されます。マウスによる仕切りの操作に追随してサイズを変更した表示がなわれるようにしたい場合は、マウスの中央ボタンを使ってください。
もしあなたが使っている Ruby にリンクされている Tk ライブラリが panedwindow を実装していない
@@ -45,7 +45,7 @@ TkFrame.new(base_frame){|f|
}
TkPanedwindow.new(base_frame, :orient=>:horizontal){|f|
- add(Tk::Label.new(f, :text=>"This is the\nleft side", :bg=>'yellow'),
+ add(Tk::Label.new(f, :text=>"This is the\nleft side", :bg=>'yellow'),
Tk::Label.new(f, :text=>"This is the\nright side", :bg=>'cyan'))
pack(:side=>:top, :expand=>true, :fill=>:both, :pady=>2, :padx=>'2m')
diff --git a/ext/tk/sample/demos-jp/paned2.rb b/ext/tk/sample/demos-jp/paned2.rb
index cdc8253402..a1aee81690 100644
--- a/ext/tk/sample/demos-jp/paned2.rb
+++ b/ext/tk/sample/demos-jp/paned2.rb
@@ -8,7 +8,7 @@
# based on "Id: paned2.tcl,v 1.1 2002/02/22 14:07:01 dkf Exp"
if defined?($paned2_demo) && $paned2_demo
- $paned2_demo.destroy
+ $paned2_demo.destroy
$paned2_demo = nil
end
@@ -20,8 +20,8 @@ $paned2_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($paned2_demo).pack(:fill=>:both, :expand=>true)
-TkLabel.new(base_frame,
- :font=>$font, :wraplength=>'4i', :justify=>:left,
+TkLabel.new(base_frame,
+ :font=>$font, :wraplength=>'4i', :justify=>:left,
:text=><<EOL).pack(:side=>:top)
下のスクロールバー付きのウィジェットが置かれた二つのウィンドウの間の仕切り枠は、一つの領域をそれぞれのウィンドウのために分割するためのものです。左ボタンで仕切りを操作すると、分割サイズ変更の操作途中では再表示はなされず、確定させたときに表示が更新されます。マウスによる仕切りの操作に追随してサイズを変更した表示がなわれるようにしたい場合は、マウスの中央ボタンを使ってください。
もしあなたが使っている Ruby にリンクされている Tk ライブラリが panedwindow を実装していない
@@ -47,23 +47,23 @@ TkFrame.new(base_frame){|f|
paneList = TkVariable.new # define as normal variable (not array)
paneList.value = [ # ruby's array --> tcl's list
'Ruby/Tk のウィジェット一覧',
- 'TkButton',
- 'TkCanvas',
- 'TkCheckbutton',
- 'TkEntry',
- 'TkFrame',
- 'TkLabel',
- 'TkLabelframe',
- 'TkListbox',
- 'TkMenu',
- 'TkMenubutton',
- 'TkMessage',
- 'TkPanedwindow',
- 'TkRadiobutton',
- 'TkScale',
- 'TkScrollbar',
- 'TkSpinbox',
- 'TkText',
+ 'TkButton',
+ 'TkCanvas',
+ 'TkCheckbutton',
+ 'TkEntry',
+ 'TkFrame',
+ 'TkLabel',
+ 'TkLabelframe',
+ 'TkListbox',
+ 'TkMenu',
+ 'TkMenubutton',
+ 'TkMessage',
+ 'TkPanedwindow',
+ 'TkRadiobutton',
+ 'TkScale',
+ 'TkScrollbar',
+ 'TkSpinbox',
+ 'TkText',
'TkToplevel'
]
@@ -74,20 +74,20 @@ TkPanedwindow.new(base_frame, :orient=>:vertical){|f|
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),
+ itemconfigure(0, :background=>self.cget(:foreground),
:foreground=>self.cget(:background) )
- yscrollbar(TkScrollbar.new(paned2_top).pack(:side=>:right,
+ 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', 'ここに配置されているのは、' +
+ insert('1.0', 'ここに配置されているのは、' +
'ごく普通のテキストウィジェットです。')
xscrollbar(paned2_xscr)
yscrollbar(paned2_yscr)
diff --git a/ext/tk/sample/demos-jp/pendulum.rb b/ext/tk/sample/demos-jp/pendulum.rb
index b115f5be2c..48839aa58a 100644
--- a/ext/tk/sample/demos-jp/pendulum.rb
+++ b/ext/tk/sample/demos-jp/pendulum.rb
@@ -8,7 +8,7 @@
# destroy toplevel widget for this demo script
if defined?($pendulum_demo) && $pendulum_demo
- $pendulum_demo.destroy
+ $pendulum_demo.destroy
$pendulum_demo = nil
end
@@ -61,14 +61,14 @@ class PendulumAnimationDemo
# Create the canvas containing the graphical representation of the
# simulated system.
- @c = TkCanvas.new(@lf1, :width=>320, :height=>200, :background=>'white',
+ @c = TkCanvas.new(@lf1, :width=>320, :height=>200, :background=>'white',
:borderwidth=>2, :relief=>:sunken)
- TkcText.new(@c, 5, 5, :anchor=>:nw,
+ TkcText.new(@c, 5, 5, :anchor=>:nw,
:text=>'Click to Adjust Bob Start Position')
# Coordinates of these items don't matter; they will be set properly below
@plate = TkcLine.new(@c, 0, 25, 320, 25, :width=>2, :fill=>'grey50')
@rod = TkcLine.new(@c, 1, 1, 1, 1, :width=>3, :fill=>'black')
- @bob = TkcOval.new(@c, 1, 1, 2, 2,
+ @bob = TkcOval.new(@c, 1, 1, 2, 2,
:width=>3, :fill=>'yellow', :outline=>'black')
TkcOval.new(@c, 155, 20, 165, 30, :fill=>'grey50', :outline=>'')
@@ -78,22 +78,22 @@ class PendulumAnimationDemo
# Create the canvas containing the phase space graph; this consists of
# a line that gets gradually paler as it ages, which is an extremely
# effective visual trick.
- @k = TkCanvas.new(@lf2, :width=>320, :height=>200, :background=>'white',
+ @k = TkCanvas.new(@lf2, :width=>320, :height=>200, :background=>'white',
:borderwidth=>2, :relief=>:sunken)
@y_axis = TkcLine.new(@k, 160, 200, 160, 0, :fill=>'grey75', :arrow=>:last)
@x_axis = TkcLine.new(@k, 0, 100, 320, 100, :fill=>'grey75', :arrow=>:last)
@graph = {}
90.step(0, -10){|i|
- # Coordinates of these items don't matter;
+ # Coordinates of these items don't matter;
# they will be set properly below
@graph[i] = TkcLine.new(@k, 0, 0, 1, 1, :smooth=>true, :fill=>"grey#{i}")
}
# labels
- @label_theta = TkcText.new(@k, 0, 0, :anchor=>:ne,
+ @label_theta = TkcText.new(@k, 0, 0, :anchor=>:ne,
:text=>'q', :font=>'Symbol 8')
- @label_dtheta = TkcText.new(@k, 0, 0, :anchor=>:ne,
+ @label_dtheta = TkcText.new(@k, 0, 0, :anchor=>:ne,
:text=>'dq', :font=>'Symbol 8')
# pack
@@ -111,19 +111,19 @@ class PendulumAnimationDemo
# binding
@c.bindtags_unshift(btag = TkBindTag.new)
btag.bind('Destroy'){ @timer.stop }
- btag.bind('1', proc{|x, y| @timer.stop; showPendulum(x.to_i, y.to_i)},
+ btag.bind('1', proc{|x, y| @timer.stop; showPendulum(x.to_i, y.to_i)},
'%x %y')
btag.bind('B1-Motion', proc{|x, y| showPendulum(x.to_i, y.to_i)}, '%x %y')
- btag.bind('ButtonRelease-1',
- proc{|x, y| showPendulum(x.to_i, y.to_i); @timer.start },
+ btag.bind('ButtonRelease-1',
+ proc{|x, y| showPendulum(x.to_i, y.to_i); @timer.start },
'%x %y')
btag.bind('Configure', proc{|w| @plate.coords(0, 25, w.to_i, 25)}, '%w')
- @k.bind('Configure', proc{|h, w|
+ @k.bind('Configure', proc{|h, w|
h = h.to_i
w = w.to_i
- @psh = h/2;
+ @psh = h/2;
@psw = w/2
@x_axis.coords(2, @psh, w-2, @psh)
@y_axis.coords(@psw, h-2, @psw, 2)
@@ -144,9 +144,9 @@ class PendulumAnimationDemo
end
# This procedure makes the pendulum appear at the correct place on the
- # canvas. If the additional arguments x, y are passed instead of computing
- # the position of the pendulum from the length of the pendulum rod and its
- # angle, the length and angle are computed in reverse from the given
+ # canvas. If the additional arguments x, y are passed instead of computing
+ # the position of the pendulum from the length of the pendulum rod and its
+ # angle, the length and angle are computed in reverse from the given
# location (which is taken to be the centre of the pendulum bob.)
def showPendulum(x=nil, y=nil)
if x && y && (x != 160 || y != 25)
diff --git a/ext/tk/sample/demos-jp/plot.rb b/ext/tk/sample/demos-jp/plot.rb
index 9ff71904cd..a49ed00df8 100644
--- a/ext/tk/sample/demos-jp/plot.rb
+++ b/ext/tk/sample/demos-jp/plot.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($plot_demo) && $plot_demo
- $plot_demo.destroy
+ $plot_demo.destroy
$plot_demo = nil
end
@@ -19,7 +19,7 @@ $plot_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($plot_demo).pack(:fill=>:both, :expand=>true)
# label 生成
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i', 'justify'=>'left',
+TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i', 'justify'=>'left',
'text'=>"このウィンドウは簡単な2次元のプロットを含んだキャンバス widgetです。表示された点をマウスボタン1でドラッグしてデータをいじることができます。"){
pack('side'=>'top')
}
@@ -57,45 +57,45 @@ $plot_canvas.pack('side'=>'top', 'fill'=>'x')
# plot 生成
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,
+TkcText.new($plot_canvas, 225, 20,
'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,
+ TkcText.new($plot_canvas, x, 254,
'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,
+ TkcText.new($plot_canvas, 96, y,
'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,
+ item = TkcOval.new($plot_canvas, x-6, y-6, x+6, y+6,
'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
item.addtag 'point'
end
-$plot_canvas.itembind('point', 'Any-Enter',
+$plot_canvas.itembind('point', 'Any-Enter',
proc{$plot_canvas.itemconfigure 'current','fill','red'})
-$plot_canvas.itembind('point', 'Any-Leave',
+$plot_canvas.itembind('point', 'Any-Leave',
proc{$plot_canvas.itemconfigure 'current','fill','SkyBlue2'})
-$plot_canvas.itembind('point', '1',
+$plot_canvas.itembind('point', '1',
proc{|x,y| plotDown $plot_canvas,x,y}, "%x %y")
-$plot_canvas.itembind('point', 'ButtonRelease-1',
+$plot_canvas.itembind('point', 'ButtonRelease-1',
proc{$plot_canvas.dtag 'selected'})
-$plot_canvas.bind('B1-Motion',
+$plot_canvas.bind('B1-Motion',
proc{|x,y| plotMove $plot_canvas,x,y}, "%x %y")
$plot = {'lastX'=>0, 'lastY'=>0}
# plotDown --
-# This method is invoked when the mouse is pressed over one of the
+# This method is invoked when the mouse is pressed over one of the
# data points. It sets up state to allow the point to be dragged.
#
# Arguments:
diff --git a/ext/tk/sample/demos-jp/puzzle.rb b/ext/tk/sample/demos-jp/puzzle.rb
index 2febc2c55a..16d7ce497c 100644
--- a/ext/tk/sample/demos-jp/puzzle.rb
+++ b/ext/tk/sample/demos-jp/puzzle.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($puzzle_demo) && $puzzle_demo
- $puzzle_demo.destroy
+ $puzzle_demo.destroy
$puzzle_demo = nil
end
@@ -49,7 +49,7 @@ TkFrame.new(base_frame) {|frame|
# frame 生成
#
# Special trick: scrollbar widget を生成してその trough color を用いることで
-# 空白部分のための暗色を選択し,設定する
+# 空白部分のための暗色を選択し,設定する
#
begin
if Tk.windowingsystem() == 'aqua'
@@ -69,7 +69,7 @@ end
# depend_on_button_width = true
depend_on_button_width = false
-
+
s = TkScrollbar.new(base_frame)
base = TkFrame.new(base_frame) {
width frameWidth
@@ -103,7 +103,7 @@ order = [3,1,6,2,5,7,15,13,4,11,8,9,14,10,12]
if depend_on_button_width && (w.winfo_reqwidth * 4 > base.width)
base.width = w.winfo_reqwidth * 4
end
- }.place('relx'=>$xpos[num], 'rely'=>$ypos[num],
+ }.place('relx'=>$xpos[num], 'rely'=>$ypos[num],
'relwidth'=>0.25, 'relheight'=>0.25)
}
$xpos['space'] = 0.75
diff --git a/ext/tk/sample/demos-jp/radio.rb b/ext/tk/sample/demos-jp/radio.rb
index a61ad46d9b..3355f25116 100644
--- a/ext/tk/sample/demos-jp/radio.rb
+++ b/ext/tk/sample/demos-jp/radio.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($radio_demo) && $radio_demo
- $radio_demo.destroy
+ $radio_demo.destroy
$radio_demo = nil
end
diff --git a/ext/tk/sample/demos-jp/radio2.rb b/ext/tk/sample/demos-jp/radio2.rb
index cf53e3e485..91496beb6d 100644
--- a/ext/tk/sample/demos-jp/radio2.rb
+++ b/ext/tk/sample/demos-jp/radio2.rb
@@ -10,7 +10,7 @@
# toplevel widget
if defined?($radio2_demo) && $radio2_demo
- $radio2_demo.destroy
+ $radio2_demo.destroy
$radio2_demo = nil
end
@@ -23,7 +23,7 @@ $radio2_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($radio2_demo).pack(:fill=>:both, :expand=>true)
-# label
+# label
msg = TkLabel.new(base_frame) {
font $font
wraplength '5i'
@@ -32,12 +32,12 @@ msg = TkLabel.new(base_frame) {
}
msg.pack('side'=>'top')
-#
+#
size = TkVariable.new
color = TkVariable.new
align = TkVariable.new
-# frame
+# frame
TkFrame.new(base_frame) {|frame|
TkButton.new(frame) {
#text '了解'
@@ -58,24 +58,24 @@ TkFrame.new(base_frame) {|frame|
TkButton.new(frame) {
text '変数参照'
command proc{
- showVars(base_frame,
+ showVars(base_frame,
['size', size], ['color', color], ['compound', align])
}
}.pack('side'=>'left', 'expand'=>'yes')
}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-# frame
-f_left = TkLabelFrame.new(base_frame, 'text'=>'文字サイズ',
+# frame
+f_left = TkLabelFrame.new(base_frame, 'text'=>'文字サイズ',
'pady'=>2, 'padx'=>2)
-f_mid = TkLabelFrame.new(base_frame, 'text'=>'色',
+f_mid = TkLabelFrame.new(base_frame, 'text'=>'色',
'pady'=>2, 'padx'=>2)
-f_right = TkLabelFrame.new(base_frame, 'text'=>'ビットマップ配置',
+f_right = TkLabelFrame.new(base_frame, 'text'=>'ビットマップ配置',
'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')
-# radiobutton
+# radiobutton
[10, 12, 18, 24].each {|sz|
TkRadioButton.new(f_left) {
text "ポイントサイズ #{sz}"
@@ -95,15 +95,15 @@ f_right.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
}.pack('side'=>'top', 'pady'=>2, 'fill'=>'x')
}
-# label = TkLabel.new(f_right, 'text'=>'ラベル', 'bitmap'=>'questhead',
-label = Tk::Label.new(f_right, 'text'=>'ラベル', 'bitmap'=>'questhead',
+# label = TkLabel.new(f_right, 'text'=>'ラベル', 'bitmap'=>'questhead',
+label = Tk::Label.new(f_right, 'text'=>'ラベル', 'bitmap'=>'questhead',
'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,
+ TkRadioButton.new(f_right, 'text'=>a, 'variable'=>align, 'relief'=>'flat',
+ 'value'=>lower, 'indicatoron'=>0, 'width'=>7,
'command'=>proc{label.compound(align.value)})
}
diff --git a/ext/tk/sample/demos-jp/radio3.rb b/ext/tk/sample/demos-jp/radio3.rb
index 4bbc1b31f5..763c522448 100644
--- a/ext/tk/sample/demos-jp/radio3.rb
+++ b/ext/tk/sample/demos-jp/radio3.rb
@@ -10,7 +10,7 @@
# toplevel widget
if defined?($radio3_demo) && $radio3_demo
- $radio3_demo.destroy
+ $radio3_demo.destroy
$radio3_demo = nil
end
@@ -23,7 +23,7 @@ $radio3_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($radio3_demo).pack(:fill=>:both, :expand=>true)
-# label
+# label
msg = TkLabel.new(base_frame) {
font $font
wraplength '5i'
@@ -37,50 +37,50 @@ size = TkVariable.new
color = TkVariable.new
align = TkVariable.new
-# frame
+# frame
TkFrame.new(base_frame) {|frame|
- TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2),
+ TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2),
:columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- TkButton.new(frame, :text=>'変数参照',
- :image=>$image['view'], :compound=>:left,
+ TkGrid('x',
+ TkButton.new(frame, :text=>'変数参照',
+ :image=>$image['view'], :compound=>:left,
:command=>proc{
- showVars(base_frame, ['size', size],
+ showVars(base_frame, ['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,
+ }),
+ 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(base_frame, 'text'=>'文字サイズ',
+# frame
+f_left = TkLabelFrame.new(base_frame, 'text'=>'文字サイズ',
'pady'=>2, 'padx'=>2)
-f_mid = TkLabelFrame.new(base_frame, 'text'=>'色',
+f_mid = TkLabelFrame.new(base_frame, 'text'=>'色',
'pady'=>2, 'padx'=>2)
-f_right = TkLabelFrame.new(base_frame, 'text'=>'ビットマップ配置',
+f_right = TkLabelFrame.new(base_frame, 'text'=>'ビットマップ配置',
'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(base_frame, 'text'=>'トライステート',
+TkButton.new(base_frame, 'text'=>'トライステート',
'command'=>proc{size.value = 'multi'; color.value = 'multi'}){
grid('column'=>2, 'row'=>2, 'pady'=>'.5c', 'padx'=>'.5c')
}
-# radiobutton
+# radiobutton
[10, 12, 14, 18, 24].each {|sz|
TkRadioButton.new(f_left) {
text "ポイントサイズ #{sz}"
@@ -103,14 +103,14 @@ TkButton.new(base_frame, 'text'=>'トライステート',
}.pack('side'=>'top', 'pady'=>2, 'fill'=>'x')
}
-# label = TkLabel.new(f_right, 'text'=>'ラベル', 'bitmap'=>'questhead',
-label = Tk::Label.new(f_right, 'text'=>'ラベル', 'bitmap'=>'questhead',
+# label = TkLabel.new(f_right, 'text'=>'ラベル', 'bitmap'=>'questhead',
+label = Tk::Label.new(f_right, 'text'=>'ラベル', 'bitmap'=>'questhead',
'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,
+ TkRadioButton.new(f_right, 'text'=>a, 'variable'=>align, 'relief'=>'flat',
+ 'value'=>a.downcase, 'indicatoron'=>0, 'width'=>7,
'command'=>proc{label.compound(align.value)})
}
diff --git a/ext/tk/sample/demos-jp/ruler.rb b/ext/tk/sample/demos-jp/ruler.rb
index d6bc9e76d1..a721b95a6a 100644
--- a/ext/tk/sample/demos-jp/ruler.rb
+++ b/ext/tk/sample/demos-jp/ruler.rb
@@ -18,7 +18,7 @@ end
# toplevel widget が存在すれば削除する
if defined?($ruler_demo) && $ruler_demo
- $ruler_demo.destroy
+ $ruler_demo.destroy
$ruler_demo = nil
end
@@ -32,7 +32,7 @@ $ruler_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($ruler_demo).pack(:fill=>:both, :expand=>true)
# label 生成
-TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left',
+TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'5i', 'justify'=>'left',
'text'=>"このキャンバスwidgetはルーラーの模型です。ルーラーの右にあるのはタブストップの井戸で、ここから引っ張ってくることによってタブストップを作ることができます。また、すでにあるタブストップを動かすこともできます。タブストップを上方または下方にかすれて表示されるまでドラッグすると、マウスボタンを離した時にそのタブストップは消えます。"){
pack('side'=>'top')
}
@@ -62,8 +62,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,
+ $demo_rulerInfo = Struct.new("RulerInfo", :grid, :left, :right, :x, :y,
+ :top, :bottom, :size, :normalStyle,
:activeStyle, :deleteStyle).new
end
$demo_rulerInfo.grid = '.25c'
@@ -75,17 +75,17 @@ $demo_rulerInfo.size = TkWinfo.fpixels($ruler_canvas, '.2c')
$demo_rulerInfo.normalStyle = {'fill'=>'black'}
if TkWinfo.depth($ruler_canvas) > 1
$demo_rulerInfo.activeStyle = {'fill'=>'red', 'stipple'=>''}
- $demo_rulerInfo.deleteStyle = {'fill'=>'red',
- 'stipple'=>'@'+[$demo_dir, '..',
+ $demo_rulerInfo.deleteStyle = {'fill'=>'red',
+ 'stipple'=>'@'+[$demo_dir, '..',
'images', 'gray25.xbm'].join(File::Separator)}
else
$demo_rulerInfo.activeStyle = {'fill'=>'black', 'stipple'=>''}
- $demo_rulerInfo.deleteStyle = {'fill'=>'black',
- 'stipple'=>'@'+[$demo_dir, '..',
+ $demo_rulerInfo.deleteStyle = {'fill'=>'black',
+ 'stipple'=>'@'+[$demo_dir, '..',
'images', 'gray25.xbm'].join(File::Separator)}
end
-TkcLine.new($ruler_canvas,
+TkcLine.new($ruler_canvas,
'1c', '0.5c', '1c', '1c', '13c', '1c', '13c', '0.5c', 'width'=>1)
(0..11).each{|i|
x = i+1
@@ -99,21 +99,21 @@ 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',
+ 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'),
+ 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',
+$ruler_canvas.itembind('tab', '1',
proc{|x,y| rulerSelectTab($ruler_canvas,x,y)}, '%x %y')
-$ruler_canvas.bind('B1-Motion',
+$ruler_canvas.bind('B1-Motion',
proc{|x,y| rulerMoveTab($ruler_canvas,x,y)}, '%x %y')
$ruler_canvas.bind('Any-ButtonRelease-1', proc{rulerReleaseTab($ruler_canvas)})
diff --git a/ext/tk/sample/demos-jp/sayings.rb b/ext/tk/sample/demos-jp/sayings.rb
index aa24b3a2ad..b3bdbe0bc5 100644
--- a/ext/tk/sample/demos-jp/sayings.rb
+++ b/ext/tk/sample/demos-jp/sayings.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($sayings_demo) && $sayings_demo
- $sayings_demo.destroy
+ $sayings_demo.destroy
$sayings_demo = nil
end
@@ -67,11 +67,11 @@ TkFrame.new(base_frame, 'borderwidth'=>10) {|w|
sayings_lbox.pack('expand'=>'yes', 'fill'=>'y')
else
- sayings_lbox.grid('row'=>0, 'column'=>0,
+ sayings_lbox.grid('row'=>0, 'column'=>0,
'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- sv.grid('row'=>0, 'column'=>1,
+ sv.grid('row'=>0, 'column'=>1,
'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
- sh.grid('row'=>1, 'column'=>0,
+ sh.grid('row'=>1, 'column'=>0,
'rowspan'=>1, 'columnspan'=>1, 'sticky'=>'news')
TkGrid.rowconfigure(w, 0, 'weight'=>1, 'minsize'=>0)
TkGrid.columnconfigure(w, 0, 'weight'=>1, 'minsize'=>0)
diff --git a/ext/tk/sample/demos-jp/search.rb b/ext/tk/sample/demos-jp/search.rb
index 9838ff5d19..293ae83910 100644
--- a/ext/tk/sample/demos-jp/search.rb
+++ b/ext/tk/sample/demos-jp/search.rb
@@ -58,13 +58,13 @@ end
def textToggle(cmd1,sleep1,cmd2,sleep2)
sleep_list = [sleep2, sleep1]
- TkAfter.new(proc{sleep = sleep_list.shift; sleep_list.push(sleep); sleep},
+ TkAfter.new(proc{sleep = sleep_list.shift; sleep_list.push(sleep); sleep},
-1, cmd1, cmd2).start(sleep1)
end
# toplevel widget が存在すれば削除する
if defined?($search_demo) && $search_demo
- $search_demo.destroy
+ $search_demo.destroy
$search_demo = nil
end
@@ -98,35 +98,35 @@ $search_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
# frame 生成
TkFrame.new(base_frame) {|f|
- TkLabel.new(f, 'text'=>'ファイル名:',
+ TkLabel.new(f, 'text'=>'ファイル名:',
'width'=>13, 'anchor'=>'w').pack('side'=>'left')
$search_fileName = TkVariable.new
- TkEntry.new(f, 'width'=>40,
+ TkEntry.new(f, 'width'=>40,
'textvariable'=>$search_fileName) {
pack('side'=>'left')
bind('Return', proc{textLoadFile($search_text, $search_fileName.value)
$search_string_entry.focus})
focus
}
- TkButton.new(f, 'text'=>'読み込み',
- 'command'=>proc{textLoadFile($search_text,
+ TkButton.new(f, 'text'=>'読み込み',
+ 'command'=>proc{textLoadFile($search_text,
$search_fileName.value)})\
.pack('side'=>'left', 'pady'=>5, 'padx'=>10)
}.pack('side'=>'top', 'fill'=>'x')
TkFrame.new(base_frame) {|f|
- TkLabel.new(f, 'text'=>'検索文字列:',
+ TkLabel.new(f, 'text'=>'検索文字列:',
'width'=>13, 'anchor'=>'w').pack('side'=>'left')
$search_searchString = TkVariable.new
- $search_string_entry = TkEntry.new(f, 'width'=>40,
+ $search_string_entry = TkEntry.new(f, 'width'=>40,
'textvariable'=>$search_searchString) {
pack('side'=>'left')
- bind('Return', proc{textSearch($search_text, $search_searchString.value,
+ bind('Return', proc{textSearch($search_text, $search_searchString.value,
$search_Tag)})
}
- TkButton.new(f, 'text'=>'反転',
- 'command'=>proc{textSearch($search_text,
- $search_searchString.value,
+ TkButton.new(f, 'text'=>'反転',
+ 'command'=>proc{textSearch($search_text,
+ $search_searchString.value,
$search_Tag)}) {
pack('side'=>'left', 'pady'=>5, 'padx'=>10)
}
@@ -139,26 +139,26 @@ $search_text = TkText.new(base_frame, 'setgrid'=>true) {|t|
pack('side'=>'right', 'fill'=>'y')
}
pack('expand'=>'yes', 'fill'=>'both')
-}
+}
# Set up display styles for text highlighting.
if TkWinfo.depth($search_demo) > 1
textToggle(proc{
- $search_Tag.configure('background'=>'#ce5555',
+ $search_Tag.configure('background'=>'#ce5555',
'foreground'=>'white')
},
- 800,
+ 800,
proc{
$search_Tag.configure('background'=>'', 'foreground'=>'')
},
200 )
else
textToggle(proc{
- $search_Tag.configure('background'=>'black',
+ $search_Tag.configure('background'=>'black',
'foreground'=>'white')
},
- 800,
+ 800,
proc{
$search_Tag.configure('background'=>'', 'foreground'=>'')
},
diff --git a/ext/tk/sample/demos-jp/spin.rb b/ext/tk/sample/demos-jp/spin.rb
index 8d4e33cda0..2bcc3217e6 100644
--- a/ext/tk/sample/demos-jp/spin.rb
+++ b/ext/tk/sample/demos-jp/spin.rb
@@ -7,7 +7,7 @@
# based on Tcl/Tk8.4.4 widget demos
if defined?($spin_demo) && $spin_demo
- $spin_demo.destroy
+ $spin_demo.destroy
$spin_demo = nil
end
@@ -19,8 +19,8 @@ $spin_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($spin_demo).pack(:fill=>:both, :expand=>true)
-TkLabel.new(base_frame,
- :font=>$font, :wraplength=>'5i', :justify=>:left,
+TkLabel.new(base_frame,
+ :font=>$font, :wraplength=>'5i', :justify=>:left,
:text=><<EOL).pack(:side=>:top)
下には3種類のスピンボックスが表示されています。
それぞれ、マウスで選択して文字を入力することができます。
@@ -38,7 +38,7 @@ Backspace と Control-h とは入力カーソルの左側の文字を
もしあなたが使っている Ruby にリンクされている Tk ライ
ブラリが spinbox ウィジェットを実装していない場合、この
デモはうまく動かないはずです。その場合には spinbox ウィ
-ジェットが実装されているようなより新しいバージョンの Tk
+ジェットが実装されているようなより新しいバージョンの Tk
を組み合わせて試すようにしてください。
EOL
@@ -56,16 +56,16 @@ TkFrame.new(base_frame){|f|
}
australianCities = [
- 'Canberra', 'Sydney', 'Melbourne', 'Perth', 'Adelaide',
+ 'Canberra', 'Sydney', 'Melbourne', 'Perth', 'Adelaide',
'Brisbane', 'Hobart', 'Darwin', 'Alice Springs'
]
[
- TkSpinbox.new(base_frame, :from=>1, :to=>10, :width=>10, :validate=>:key,
+ TkSpinbox.new(base_frame, :from=>1, :to=>10, :width=>10, :validate=>:key,
:validatecommand=>[
proc{|s| s == '' || /^[+-]?\d+$/ =~ s }, '%P'
- ]),
- TkSpinbox.new(base_frame, :from=>0, :to=>3, :increment=>0.5,
- :format=>'%05.2f', :width=>10),
+ ]),
+ TkSpinbox.new(base_frame, :from=>0, :to=>3, :increment=>0.5,
+ :format=>'%05.2f', :width=>10),
TkSpinbox.new(base_frame, :values=>australianCities, :width=>10)
].each{|sbox| sbox.pack(:side=>:top, :pady=>5, :padx=>10)}
diff --git a/ext/tk/sample/demos-jp/states.rb b/ext/tk/sample/demos-jp/states.rb
index 5e242b7c38..f354d28d84 100644
--- a/ext/tk/sample/demos-jp/states.rb
+++ b/ext/tk/sample/demos-jp/states.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($states_demo) && $states_demo
- $states_demo.destroy
+ $states_demo.destroy
$states_demo = nil
end
diff --git a/ext/tk/sample/demos-jp/style.rb b/ext/tk/sample/demos-jp/style.rb
index 66b6de0251..3189e1f6d8 100644
--- a/ext/tk/sample/demos-jp/style.rb
+++ b/ext/tk/sample/demos-jp/style.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($style_demo) && $style_demo
- $style_demo.destroy
+ $style_demo.destroy
$style_demo = nil
end
@@ -76,13 +76,13 @@ txt = TkText.new(base_frame){|t|
# when /^8.*/
# unless $style_demo_do_first
# $style_demo_do_first = true
-# Tk.tk_call('font', 'create', '@bigascii',
+# Tk.tk_call('font', 'create', '@bigascii',
# '-copy', '-*-Courier-Bold-R-Normal--*-140-*-*-*-*-*-*')
-# Tk.tk_call('font', 'create', '@smallascii',
+# Tk.tk_call('font', 'create', '@smallascii',
# '-copy', '-Adobe-Helvetica-Bold-R-Normal-*-100-*')
-# Tk.tk_call('font', 'create', '@cBigFont',
+# Tk.tk_call('font', 'create', '@cBigFont',
# '-compound', '@bigascii @msg_knj')
-# Tk.tk_call('font', 'create', '@cSmallFont',
+# Tk.tk_call('font', 'create', '@cSmallFont',
# '-compound', '@smallascii @kanji')
# end
# style_tag_big = TkTextTag.new(t, 'font'=>'@cBigFont')
@@ -96,24 +96,24 @@ txt = TkText.new(base_frame){|t|
style_tag_raised = TkTextTag.new(t, 'relief'=>'raised', 'borderwidth'=>1)
style_tag_sunken = TkTextTag.new(t, 'relief'=>'sunken', 'borderwidth'=>1)
else
- style_tag_color1 = TkTextTag.new(t, 'background'=>'black',
+ style_tag_color1 = TkTextTag.new(t, 'background'=>'black',
'foreground'=>'white')
- style_tag_color2 = TkTextTag.new(t, 'background'=>'black',
+ style_tag_color2 = TkTextTag.new(t, 'background'=>'black',
'foreground'=>'white')
- style_tag_raised = TkTextTag.new(t, 'background'=>'white',
+ style_tag_raised = TkTextTag.new(t, 'background'=>'white',
'relief'=>'raised', 'borderwidth'=>1)
- style_tag_sunken = TkTextTag.new(t, 'background'=>'white',
+ style_tag_sunken = TkTextTag.new(t, 'background'=>'white',
'relief'=>'sunken', 'borderwidth'=>1)
end
# テキストタグ設定 (その他)
if $tk_version =~ /^4\.[01]/
- style_tag_bgstipple = TkTextTag.new(t, 'background'=>'black',
- 'borderwidth'=>0,
+ style_tag_bgstipple = TkTextTag.new(t, 'background'=>'black',
+ 'borderwidth'=>0,
'bgstipple'=>'gray25')
else
- style_tag_bgstipple = TkTextTag.new(t, 'background'=>'black',
- 'borderwidth'=>0,
+ style_tag_bgstipple = TkTextTag.new(t, 'background'=>'black',
+ 'borderwidth'=>0,
'bgstipple'=>'gray12')
end
style_tag_fgstipple = TkTextTag.new(t, 'fgstipple'=>'gray50')
@@ -217,9 +217,9 @@ X')
9. マージン', style_tag_big)
insert('end', 'テキストの左側に余分な空白を置くことができます:
')
- insert('end', 'この段落はマージンの使用例です。スクリーン',
+ insert('end', 'この段落はマージンの使用例です。スクリーン',
style_tag_margins)
- insert('end', '上で折り返されて表示されている1行のテキストです。',
+ insert('end', '上で折り返されて表示されている1行のテキストです。',
style_tag_margins)
insert('end', '左側には2種類のマージンを持ちます。', style_tag_margins)
insert('end', '1行目に対するものと、', style_tag_margins)
@@ -241,9 +241,9 @@ spacing3')
insert('end', 'の空間を置
くかを示します。
')
- insert('end', 'これらのインデントされた段落はどのように',
+ insert('end', 'これらのインデントされた段落はどのように',
style_tag_spacing)
- insert('end', 'スペーシングがが行われるのかを示します。',
+ insert('end', 'スペーシングがが行われるのかを示します。',
style_tag_spacing)
insert('end', '各段落は実際はテキストwidget', style_tag_spacing)
insert('end', 'の1行で、widgetによって折り畳まれています。
@@ -253,11 +253,11 @@ spacing3')
insert('end', 'これにより、段落の間に大きな間隔が', style_tag_spacing)
insert('end', '存在しています。', style_tag_spacing)
insert('end', 'Spacing2は2pointに設定されています。', style_tag_spacing)
- insert('end', 'これで段落の中にほんの少し間隔が存在しています。',
+ insert('end', 'これで段落の中にほんの少し間隔が存在しています。',
style_tag_spacing)
insert('end', 'Spacing3はこの例では使用されていません。
', style_tag_spacing)
- insert('end', '間隔がどこにあるかを見たければ、これらの段落の',
+ insert('end', '間隔がどこにあるかを見たければ、これらの段落の',
style_tag_spacing)
insert('end', 'なかでテキストを選択してください。選択の', style_tag_spacing)
insert('end', '反転した部分には余分にとられた間隔が', style_tag_spacing)
diff --git a/ext/tk/sample/demos-jp/text.rb b/ext/tk/sample/demos-jp/text.rb
index 0ae480eb00..ea15064830 100644
--- a/ext/tk/sample/demos-jp/text.rb
+++ b/ext/tk/sample/demos-jp/text.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($text_demo) && $text_demo
- $text_demo.destroy
+ $text_demo.destroy
$text_demo = nil
end
diff --git a/ext/tk/sample/demos-jp/textpeer.rb b/ext/tk/sample/demos-jp/textpeer.rb
index 4967a99c92..de604f1940 100644
--- a/ext/tk/sample/demos-jp/textpeer.rb
+++ b/ext/tk/sample/demos-jp/textpeer.rb
@@ -5,7 +5,7 @@
# based on Tcl/Tk8.5.0 widget demos
if defined?($textpeer_demo) && $textpeer_demo
- $textpeer_demo.destroy
+ $textpeer_demo.destroy
$textpeer_demo = nil
end
@@ -43,11 +43,11 @@ def makeClone(count, win, txt)
peer = TkText::Peer.new(txt, win, :widgetname=>"text#{cnt}")
sbar = TkScrollbar.new(win, :widgetname=>"sb#{cnt}")
peer.yscrollbar sbar
- b1 = TkButton.new(win, :widgetname=>"clone#{cnt}",
- :text=>'ピア(peer)の作成',
+ b1 = TkButton.new(win, :widgetname=>"clone#{cnt}",
+ :text=>'ピア(peer)の作成',
:command=>proc{makeClone(count, win, peer)})
- b2 = TkButton.new(win, :widgetname=>"kill#{cnt}",
- :text=>'ピア(peer)の消去',
+ b2 = TkButton.new(win, :widgetname=>"kill#{cnt}",
+ :text=>'ピア(peer)の消去',
:command=>proc{killClone(win, cnt)})
row = cnt * 2
TkGrid.configure(peer, sbar, b1, :sticky=>'nsew', :row=>row)
@@ -57,7 +57,7 @@ def makeClone(count, win, txt)
end
def killClone(win, cnt)
- Tk.destroy("#{win.path}.text#{cnt}", "#{win.path}.sb#{cnt}",
+ Tk.destroy("#{win.path}.text#{cnt}", "#{win.path}.sb#{cnt}",
"#{win.path}.clone#{cnt}", "#{win.path}.kill#{cnt}")
end
diff --git a/ext/tk/sample/demos-jp/toolbar.rb b/ext/tk/sample/demos-jp/toolbar.rb
index 1bb265d1f8..570d52704f 100644
--- a/ext/tk/sample/demos-jp/toolbar.rb
+++ b/ext/tk/sample/demos-jp/toolbar.rb
@@ -7,7 +7,7 @@
# based on "Id: toolbar.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp"
if defined?($toolbar_demo) && $toolbar_demo
- $toolbar_demo.destroy
+ $toolbar_demo.destroy
$toolbar_demo = nil
end
@@ -86,28 +86,28 @@ end
text = TkText.new(base_frame, :width=>40, :height=>10)
## Toolbar contents
-tb_btn = Ttk::Button.new(tbar_base, :text=>'ボタン', :style=>'Toolbutton',
+tb_btn = Ttk::Button.new(tbar_base, :text=>'ボタン', :style=>'Toolbutton',
:command=>proc{
text.insert(:end, "ボタンが押されました.\n")
})
-tb_chk = Ttk::Checkbutton.new(tbar_base, :text=>'チェックボタン',
- :style=>'Toolbutton',
- :variable=>(check = TkVariable.new),
+tb_chk = Ttk::Checkbutton.new(tbar_base, :text=>'チェックボタン',
+ :style=>'Toolbutton',
+ :variable=>(check = TkVariable.new),
:command=>proc{
text.insert(:end, "チェックボタンの値は#{check.value}です.\n")
})
tb_mbtn = Ttk::Menubutton.new(tbar_base, :text=>'メニュー')
-tb_combo = Ttk::Combobox.new(tbar_base, :value=>TkFont.families,
+tb_combo = Ttk::Combobox.new(tbar_base, :value=>TkFont.families,
:state=>:readonly)
tb_mbtn.menu(menu = Tk::Menu.new(tb_mbtn))
menu.add(:command, :label=>'Just', :command=>proc{text.insert(:end, "Just\n")})
menu.add(:command, :label=>'An', :command=>proc{text.insert(:end, "An\n")})
-menu.add(:command, :label=>'Example',
+menu.add(:command, :label=>'Example',
:command=>proc{text.insert(:end, "Example\n")})
tb_combo.bind('<ComboboxSelected>'){ text.font.family = tb_combo.get }
## Arrange contents
-Tk.grid(tb_btn, tb_chk, tb_mbtn, tb_combo,
+Tk.grid(tb_btn, tb_chk, tb_mbtn, tb_combo,
:in=>contents, :padx=>2, :sticky=>'ns')
Tk.grid(tbar_base, :sticky=>'ew')
Tk.grid(sep, :sticky=>'ew')
@@ -120,16 +120,16 @@ base_frame.grid_columnconfigure(text, :weight=>1)
Ttk::Frame.new(base_frame) {|frame|
sep = Ttk::Separator.new(frame)
Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'コード参照',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'toolbar'}),
- Ttk::Button.new(frame, :text=>'閉じる',
- :image=>$image['delete'], :compound=>:left,
+ TkGrid('x',
+ Ttk::Button.new(frame, :text=>'コード参照',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{showCode 'toolbar'}),
+ Ttk::Button.new(frame, :text=>'閉じる',
+ :image=>$image['delete'], :compound=>:left,
:command=>proc{
$toolbar_demo.destroy
$toolbar_demo = nil
- }),
+ }),
:padx=>4, :pady=>4)
grid_columnconfigure(0, :weight=>1)
Tk.grid(frame, :sticky=>'ew')
diff --git a/ext/tk/sample/demos-jp/tree.rb b/ext/tk/sample/demos-jp/tree.rb
index c3b4191144..00d715282b 100644
--- a/ext/tk/sample/demos-jp/tree.rb
+++ b/ext/tk/sample/demos-jp/tree.rb
@@ -8,7 +8,7 @@
# based on "Id: tree.tcl,v 1.4 2007/12/13 15:27:07 dgp Exp"
if defined?($tree_demo) && $tree_demo
- $tree_demo.destroy
+ $tree_demo.destroy
$tree_demo = nil
end
@@ -21,8 +21,8 @@ $tree_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($tree_demo).pack(:fill=>:both, :expand=>true)
## Explanatory text
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i',
- :justify=>:left, :anchor=>'n', :padding=>[10, 2, 10, 6],
+Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i',
+ :justify=>:left, :anchor=>'n', :padding=>[10, 2, 10, 6],
:text=><<EOL).pack(:fill=>:x)
Ttkとは,テーマ指定可能な新しいウィジェット集合です.\
このサンプルは,ファイルシステムのような階層的なデータ集合を\
@@ -38,16 +38,16 @@ EOL
Ttk::Frame.new(base_frame) {|frame|
sep = Ttk::Separator.new(frame)
Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'コード参照',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'tree'}),
- Ttk::Button.new(frame, :text=>'閉じる',
- :image=>$image['delete'], :compound=>:left,
+ TkGrid('x',
+ Ttk::Button.new(frame, :text=>'コード参照',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{showCode 'tree'}),
+ Ttk::Button.new(frame, :text=>'閉じる',
+ :image=>$image['delete'], :compound=>:left,
:command=>proc{
$tree_demo.destroy
$tree_demo = nil
- }),
+ }),
:padx=>4, :pady=>4)
grid_columnconfigure(0, :weight=>1)
pack(:side=>:bottom, :fill=>:x)
@@ -56,7 +56,7 @@ Ttk::Frame.new(base_frame) {|frame|
## Code to populate the roots of the tree (can be more than one on Windows)
def populate_roots(tree)
TkComm.simplelist(Tk.tk_call('file', 'volumes')).sort.each{|dir|
- populate_tree(tree, tree.insert(nil, :end, :text=>dir,
+ populate_tree(tree, tree.insert(nil, :end, :text=>dir,
:values=>[dir, 'directory']))
}
end
@@ -69,7 +69,7 @@ def populate_tree(tree, node)
tree.delete(tree.children(node))
Dir.glob("#{path}/*").sort.each{|f|
type = File.ftype(f)
- id = tree.insert(node, :end,
+ id = tree.insert(node, :end,
:text=>File.basename(f), :values=>[f, type]).id
if type == 'directory'
## Make it so that this node is openable
@@ -95,7 +95,7 @@ def populate_tree(tree, node)
end
## Create the tree and set it up
-tree = Ttk::Treeview.new(base_frame, :columns=>%w(fullpath type size),
+tree = Ttk::Treeview.new(base_frame, :columns=>%w(fullpath type size),
:displaycolumns=>['size'])
if Tk.windowingsystem != 'aqua'
vsb = tree.yscrollbar(Ttk::Scrollbar.new(base_frame))
diff --git a/ext/tk/sample/demos-jp/ttkbut.rb b/ext/tk/sample/demos-jp/ttkbut.rb
index 4d577120bb..90ec3fce5b 100644
--- a/ext/tk/sample/demos-jp/ttkbut.rb
+++ b/ext/tk/sample/demos-jp/ttkbut.rb
@@ -9,7 +9,7 @@
# based on "Id: ttkbut.tcl,v 1.4 2007/12/13 15:27:07 dgp Exp"
if defined?($ttkbut_demo) && $ttkbut_demo
- $ttkbut_demo.destroy
+ $ttkbut_demo.destroy
$ttkbut_demo = nil
end
@@ -21,7 +21,7 @@ $ttkbut_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($ttkbut_demo).pack(:fill=>:both, :expand=>true)
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left,
+Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left,
:text=><<EOL).pack(:side=>:top, :fill=>:x)
Ttkとは,テーマ指定可能な新しいウィジェット集合です.\
今,あなたが目にしているのはTtkのテーマ化ラベルで,\
@@ -40,11 +40,11 @@ EOL
## Add buttons for setting the theme
buttons = Ttk::Labelframe.new(base_frame, :text=>'ボタン')
# Ttk::Style.theme_names.each{|theme|
-# Ttk::Button.new(buttons, :text=>theme,
+# Ttk::Button.new(buttons, :text=>theme,
# :command=>proc{Ttk::Style.theme_use theme}).pack(:pady=>2)
# }
Ttk.themes.each{|theme|
- Ttk::Button.new(buttons, :text=>theme,
+ Ttk::Button.new(buttons, :text=>theme,
:command=>proc{Ttk.set_theme theme}).pack(:pady=>2)
}
@@ -68,9 +68,9 @@ end
## Set up the checkbutton group
checks = Ttk::Labelframe.new(base_frame, :text=>'チェックボタン')
enabled = TkVariable.new(true)
-e = Ttk::Checkbutton.new(checks, :text=>'有効化', :variable=>enabled,
+e = Ttk::Checkbutton.new(checks, :text=>'有効化', :variable=>enabled,
:command=>proc{
- setState($ttkbut_demo,
+ setState($ttkbut_demo,
((enabled.bool)? "!disabled" : "disabled"),
e)
})
@@ -96,15 +96,15 @@ radios = Ttk::Labelframe.new(base_frame, :text=>'ラジオボタン')
happyness = TkVariable.new
-r1 = Ttk::Radiobutton.new(radios, :variable=>happyness,
+r1 = Ttk::Radiobutton.new(radios, :variable=>happyness,
:text=>'Great', :value=>'great')
-r2 = Ttk::Radiobutton.new(radios, :variable=>happyness,
+r2 = Ttk::Radiobutton.new(radios, :variable=>happyness,
:text=>'Good', :value=>'good')
-r3 = Ttk::Radiobutton.new(radios, :variable=>happyness,
+r3 = Ttk::Radiobutton.new(radios, :variable=>happyness,
:text=>'Ok', :value=>'ok')
-r4 = Ttk::Radiobutton.new(radios, :variable=>happyness,
+r4 = Ttk::Radiobutton.new(radios, :variable=>happyness,
:text=>'Poor', :value=>'poor')
-r5 = Ttk::Radiobutton.new(radios, :variable=>happyness,
+r5 = Ttk::Radiobutton.new(radios, :variable=>happyness,
:text=>'Awful', :value=>'awful')
Tk.pack(r1, r2, r3, r4, r5, :fill=>:x, :padx=>3, :pady=>2)
@@ -113,26 +113,26 @@ Tk.pack(r1, r2, r3, r4, r5, :fill=>:x, :padx=>3, :pady=>2)
Ttk::Frame.new(base_frame) {|frame|
sep = Ttk::Separator.new(frame)
Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'変数参照',
- :image=>$image['view'], :compound=>:left,
+ TkGrid('x',
+ Ttk::Button.new(frame, :text=>'変数参照',
+ :image=>$image['view'], :compound=>:left,
:command=>proc{
- showVars(base_frame, ['有効化', enabled],
- ['チーズ', cheese], ['トマト', tomato],
- ['バジル', basil], ['オレガノ', oregano],
+ showVars(base_frame, ['有効化', enabled],
+ ['チーズ', cheese], ['トマト', tomato],
+ ['バジル', basil], ['オレガノ', oregano],
['幸福度', happyness])
- }),
- Ttk::Button.new(frame, :text=>'コード参照',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'ttkbut'}),
- Ttk::Button.new(frame, :text=>'閉じる',
- :image=>$image['delete'], :compound=>:left,
+ }),
+ Ttk::Button.new(frame, :text=>'コード参照',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{showCode 'ttkbut'}),
+ Ttk::Button.new(frame, :text=>'閉じる',
+ :image=>$image['delete'], :compound=>:left,
:command=>proc{
tmppath = $ttkbut_demo
$ttkbut_demo = nil
$showVarsWin[tmppath.path] = nil
tmppath.destroy
- }),
+ }),
:padx=>4, :pady=>4)
grid_columnconfigure(0, :weight=>1)
pack(:side=>:bottom, :fill=>:x, :expand=>true)
diff --git a/ext/tk/sample/demos-jp/ttkmenu.rb b/ext/tk/sample/demos-jp/ttkmenu.rb
index d349b42d11..9e78678c8e 100644
--- a/ext/tk/sample/demos-jp/ttkmenu.rb
+++ b/ext/tk/sample/demos-jp/ttkmenu.rb
@@ -8,7 +8,7 @@
# based on "Id: ttkmenu.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp"
if defined?($ttkmenu_demo) && $ttkmenu_demo
- $ttkmenu_demo.destroy
+ $ttkmenu_demo.destroy
$ttkmenu_demo = nil
end
@@ -20,7 +20,7 @@ $ttkmenu_demo = TkToplevel.new {|w|
base_frame = Ttk::Frame.new($ttkmenu_demo).pack(:fill=>:both, :expand=>true)
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left,
+Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left,
:text=><<EOL).pack(:side=>:top, :fill=>:x)
Ttkとは,テーマ指定可能な新しいウィジェット集合です.\
これによりテーマに対応することができるようになったウィジェットのひとつに\
@@ -45,16 +45,16 @@ Ttk::Separator.new(base_frame).pack(:side=>:top, :fill=>:x)
Ttk::Frame.new($ttkmenu_demo) {|frame|
sep = Ttk::Separator.new(frame)
Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'コード参照',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'ttkmenu'}),
- Ttk::Button.new(frame, :text=>'閉じる',
- :image=>$image['delete'], :compound=>:left,
+ TkGrid('x',
+ Ttk::Button.new(frame, :text=>'コード参照',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{showCode 'ttkmenu'}),
+ Ttk::Button.new(frame, :text=>'閉じる',
+ :image=>$image['delete'], :compound=>:left,
:command=>proc{
$ttkmenu_demo.destroy
$ttkmenu_demo = nil
- }),
+ }),
:padx=>4, :pady=>4)
grid_columnconfigure(0, :weight=>1)
pack(:side=>:bottom, :fill=>:x)
diff --git a/ext/tk/sample/demos-jp/ttknote.rb b/ext/tk/sample/demos-jp/ttknote.rb
index 09cc7960a3..f0cd258893 100644
--- a/ext/tk/sample/demos-jp/ttknote.rb
+++ b/ext/tk/sample/demos-jp/ttknote.rb
@@ -8,7 +8,7 @@
# based on "Id: ttknote.tcl,v 1.5 2007/12/13 15:27:07 dgp Exp"
if defined?($ttknote_demo) && $ttknote_demo
- $ttknote_demo.destroy
+ $ttknote_demo.destroy
$ttknote_demo = nil
end
@@ -22,16 +22,16 @@ $ttknote_demo = TkToplevel.new {|w|
Ttk::Frame.new($ttknote_demo) {|frame|
sep = Ttk::Separator.new(frame)
Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'コード参照',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'ttknote'}),
- Ttk::Button.new(frame, :text=>'閉じる',
- :image=>$image['delete'], :compound=>:left,
+ TkGrid('x',
+ Ttk::Button.new(frame, :text=>'コード参照',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{showCode 'ttknote'}),
+ Ttk::Button.new(frame, :text=>'閉じる',
+ :image=>$image['delete'], :compound=>:left,
:command=>proc{
$ttknote_demo.destroy
$ttknote_demo = nil
- }),
+ }),
:padx=>4, :pady=>4)
grid_columnconfigure(0, :weight=>1)
pack(:side=>:bottom, :fill=>:x)
@@ -40,13 +40,13 @@ Ttk::Frame.new($ttknote_demo) {|frame|
base_frame = Ttk::Frame.new($ttknote_demo).pack(:fill=>:both, :expand=>true)
## Make the notebook and set up Ctrl+Tab traversal
-notebook = Ttk::Notebook.new(base_frame).pack(:fill=>:both, :expand=>true,
+notebook = Ttk::Notebook.new(base_frame).pack(:fill=>:both, :expand=>true,
:padx=>2, :pady=>3)
notebook.enable_traversal
## Popuplate the first pane
f_msg = Ttk::Frame.new(notebook)
-msg_m = Ttk::Label.new(f_msg, :font=>$font, :wraplength=>'5i',
+msg_m = Ttk::Label.new(f_msg, :font=>$font, :wraplength=>'5i',
:justify=>:left, :anchor=>'n', :text=><<EOL)
Ttkとは,テーマ指定可能な新しいウィジェット集合です.\
その中に含まれるウィジェットのひとつにノートブックウィジェットがあります.\
@@ -64,7 +64,7 @@ Ctrl+Tabキーの入力によっても行うことができます.\
EOL
neat = TkVariable.new
after_id = nil
-msg_b = Ttk::Button.new(f_msg, :text=>'すてきだ!(Neat!)', :underline=>6,
+msg_b = Ttk::Button.new(f_msg, :text=>'すてきだ!(Neat!)', :underline=>6,
:command=>proc{
neat.value = 'あぁ,そのとおりさ...'
Tk.after_cancel(after_id) if after_id
diff --git a/ext/tk/sample/demos-jp/ttkpane.rb b/ext/tk/sample/demos-jp/ttkpane.rb
index 96670c0e5c..a7b458a683 100644
--- a/ext/tk/sample/demos-jp/ttkpane.rb
+++ b/ext/tk/sample/demos-jp/ttkpane.rb
@@ -7,7 +7,7 @@
# based on "Id: ttkpane.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp"
if defined?($ttkpane_demo) && $ttkpane_demo
- $ttkpane_demo.destroy
+ $ttkpane_demo.destroy
$ttkpane_demo = nil
end
@@ -19,7 +19,7 @@ $ttkpane_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($ttkpane_demo).pack(:fill=>:both, :expand=>true)
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left,
+Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left,
:text=><<EOL).pack(:side=>:top, :fill=>:x)
このデモは,埋め込み関係にあるテーマ付きペインドウィンドウを示しています.\
それぞれの大きさは,含まれているペインの間にあるエリアをつかんで\
@@ -32,16 +32,16 @@ Ttk::Separator.new(base_frame).pack(:side=>:top, :fill=>:x)
Ttk::Frame.new(base_frame) {|frame|
sep = Ttk::Separator.new(frame)
Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'コード参照',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'ttkpane'}),
- Ttk::Button.new(frame, :text=>'閉じる',
- :image=>$image['delete'], :compound=>:left,
+ TkGrid('x',
+ Ttk::Button.new(frame, :text=>'コード参照',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{showCode 'ttkpane'}),
+ Ttk::Button.new(frame, :text=>'閉じる',
+ :image=>$image['delete'], :compound=>:left,
:command=>proc{
$ttkpane_demo.destroy
$ttkpane_demo = nil
- }),
+ }),
:padx=>4, :pady=>4)
grid_columnconfigure(0, :weight=>1)
pack(:side=>:bottom, :fill=>:x)
@@ -61,26 +61,26 @@ if Tk.windowingsystem == 'aqua'
end
# Fill the button pane
-Ttk::Button.new(left_top, :text=>'押してね',
+Ttk::Button.new(left_top, :text=>'押してね',
:command=>proc{
- Tk.messageBox(:type=>'ok', :icon=>'info',
- :message=>'いてて!',
- :detail=>'That hurt...', :parent=>base_frame,
+ Tk.messageBox(:type=>'ok', :icon=>'info',
+ :message=>'いてて!',
+ :detail=>'That hurt...', :parent=>base_frame,
:title=>'Button Pressed')
}).pack(:padx=>2, :pady=>5)
zones_list = [
- [':Europe/Berlin'],
- [':America/Argentina/Buenos_Aires', ':America/Buenos_Aires'],
- [':Africa/Johannesburg'],
- [':Europe/London'],
- [':America/Los_Angeles'],
+ [':Europe/Berlin'],
+ [':America/Argentina/Buenos_Aires', ':America/Buenos_Aires'],
+ [':Africa/Johannesburg'],
+ [':Europe/London'],
+ [':America/Los_Angeles'],
[':Europe/Moscow'],
- [':America/New_York'],
- [':Asia/Singapore'],
- [':Australia/Sydney'],
- [':Asia/Tokyo'],
+ [':America/New_York'],
+ [':Asia/Singapore'],
+ [':Australia/Sydney'],
+ [':Asia/Tokyo'],
]
zones = []
@@ -158,7 +158,7 @@ time = TkVariable.new_hash
case tzinfo
when :tcl
update_proc = proc{|now, tz, label|
- time[label] = Tk.tk_call('clock', 'format', now.tv_sec,
+ time[label] = Tk.tk_call('clock', 'format', now.tv_sec,
'-timezone', tz, '-format', '%T')
}
when :tzinfo
@@ -179,7 +179,7 @@ end
zones.each_with_index{|(zone, label), idx|
Ttk::Separator.new(left_bot).pack(:fill=>:x) if idx > 0
Ttk::Label.new(left_bot, :text=>label, :anchor=>'w').pack(:fill=>:x)
- Ttk::Label.new(left_bot, :textvariable=>time.ref(label),
+ Ttk::Label.new(left_bot, :textvariable=>time.ref(label),
:anchor=>'w').pack(:fill=>:x)
}
diff --git a/ext/tk/sample/demos-jp/ttkprogress.rb b/ext/tk/sample/demos-jp/ttkprogress.rb
index 43a9cbcd7e..82898bf50e 100644
--- a/ext/tk/sample/demos-jp/ttkprogress.rb
+++ b/ext/tk/sample/demos-jp/ttkprogress.rb
@@ -7,7 +7,7 @@
# based on "Id: ttkprogress.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp"
if defined?($ttkprogress_demo) && $ttkprogress_demo
- $ttkprogress_demo.destroy
+ $ttkprogress_demo.destroy
$ttkprogress_demo = nil
end
@@ -19,7 +19,7 @@ $ttkprogress_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($ttkprogress_demo).pack(:fill=>:both, :expand=>true)
-Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left,
+Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left,
:text=><<EOL).pack(:side=>:top, :fill=>:x)
下にあるのは二つのプログレスバーです.\
上のものは"determinate"タイプのプログレスバーで,\
@@ -37,16 +37,16 @@ EOL
Ttk::Frame.new(base_frame) {|frame|
sep = Ttk::Separator.new(frame)
Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'コード参照',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'ttkprogress'}),
- Ttk::Button.new(frame, :text=>'閉じる',
- :image=>$image['delete'], :compound=>:left,
+ TkGrid('x',
+ Ttk::Button.new(frame, :text=>'コード参照',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{showCode 'ttkprogress'}),
+ Ttk::Button.new(frame, :text=>'閉じる',
+ :image=>$image['delete'], :compound=>:left,
:command=>proc{
$ttkprogress_demo.destroy
$ttkprogress_demo = nil
- }),
+ }),
:padx=>4, :pady=>4)
grid_columnconfigure(0, :weight=>1)
pack(:side=>:bottom, :fill=>:x)
@@ -57,9 +57,9 @@ frame = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true)
p1 = Ttk::Progressbar.new(frame, :mode=>:determinate)
p2 = Ttk::Progressbar.new(frame, :mode=>:indeterminate)
-start = Ttk::Button.new(frame, :text=>'Start Progress',
+start = Ttk::Button.new(frame, :text=>'Start Progress',
:command=>proc{ p1.start; p2.start })
-stop = Ttk::Button.new(frame, :text=>'Stop Progress',
+stop = Ttk::Button.new(frame, :text=>'Stop Progress',
:command=>proc{ p1.stop; p2.stop })
Tk.grid(p1, '-', :pady=>5, :padx=>10)
diff --git a/ext/tk/sample/demos-jp/twind.rb b/ext/tk/sample/demos-jp/twind.rb
index faefaefd6e..bd0b060754 100644
--- a/ext/tk/sample/demos-jp/twind.rb
+++ b/ext/tk/sample/demos-jp/twind.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($twind_demo) && $twind_demo
- $twind_demo.destroy
+ $twind_demo.destroy
$twind_demo = nil
end
@@ -39,10 +39,10 @@ $twind_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
# frame 生成
$twind_text = nil
-TkFrame.new(base_frame, 'highlightthickness'=>2, 'borderwidth'=>2,
+TkFrame.new(base_frame, 'highlightthickness'=>2, 'borderwidth'=>2,
'relief'=>'sunken') {|f|
- $twind_text = TkText.new(f, 'setgrid'=>'true', 'font'=>$font,
- 'width'=>'70', 'height'=>35, 'wrap'=>'word',
+ $twind_text = TkText.new(f, 'setgrid'=>'true', 'font'=>$font,
+ 'width'=>'70', 'height'=>35, 'wrap'=>'word',
'highlightthickness'=>0, 'borderwidth'=>0 ){|t|
TkScrollbar.new(f) {|s|
command proc{|*args| t.yview(*args)}
@@ -52,11 +52,11 @@ TkFrame.new(base_frame, 'highlightthickness'=>2, 'borderwidth'=>2,
}.pack('expand'=>'yes', 'fill'=>'both')
# タグ生成
-$tag_center = TkTextTag.new($twind_text,
+$tag_center = TkTextTag.new($twind_text,
'justify' =>'center',
'spacing1'=>'5m',
'spacing3'=>'5m' )
-$tag_buttons = TkTextTag.new($twind_text,
+$tag_buttons = TkTextTag.new($twind_text,
'lmargin1'=>'1c',
'lmargin2'=>'1c',
'rmargin' =>'1c',
@@ -65,14 +65,14 @@ $tag_buttons = TkTextTag.new($twind_text,
'spacing3'=>0 )
# テキストの生成
-$twind_text.insert('end',
+$twind_text.insert('end',
'テキストwidget上に他のwidgetを組み込むことができます。')
$twind_text.insert('end',
'組み込みウィンドウと呼ばれ、任意のwidgetが可能です。')
$twind_text.insert('end',
'例えば、ここに2つのボタンwidgetが組み込まれています。')
$twind_text.insert('end', '最初のボタンをクリックすと水平方向のスクロールを')
-TkTextWindow.new($twind_text, 'end',
+TkTextWindow.new($twind_text, 'end',
'window'=>TkButton.new($twind_text) {
#text 'ON'
text 'オン'
@@ -81,7 +81,7 @@ TkTextWindow.new($twind_text, 'end',
})
$twind_text.insert('end', "にします。また2つめのボタンをクリックすると\n")
$twind_text.insert('end', '水平方向のスクロールを')
-TkTextWindow.new($twind_text, 'end',
+TkTextWindow.new($twind_text, 'end',
'window'=>TkButton.new($twind_text) {
#text 'OFF'
text 'オフ'
@@ -91,7 +91,7 @@ TkTextWindow.new($twind_text, 'end',
$twind_text.insert('end', 'にします。')
$twind_text.insert('end', 'もうひとつの例です。')
-TkTextWindow.new($twind_text, 'end',
+TkTextWindow.new($twind_text, 'end',
'window'=>TkButton.new($twind_text) {
text 'ここをクリック'
command proc{textWindPlot $twind_text}
@@ -101,7 +101,7 @@ $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',
+TkTextWindow.new($twind_text, 'end',
'window'=>TkButton.new($twind_text) {
text '消去'
command proc{textWindDel $twind_text}
@@ -125,7 +125,7 @@ $twind_text.insert('end', 'もう一度同じボタンを押すと元に戻ります。
')
-TkTextWindow.new($twind_text, 'end',
+TkTextWindow.new($twind_text, 'end',
'window'=>TkButton.new($twind_text) {|b|
text 'デフォルト'
command proc{embDefBg $twind_text}
@@ -134,7 +134,7 @@ TkTextWindow.new($twind_text, 'end',
},
'padx'=>3 )
embToggle = TkVariable.new('Short')
-TkTextWindow.new($twind_text, 'end',
+TkTextWindow.new($twind_text, 'end',
'window'=>TkCheckButton.new($twind_text) {
textvariable embToggle
indicatoron 0
@@ -145,21 +145,21 @@ TkTextWindow.new($twind_text, 'end',
pady 5
padx 2
},
- 'padx'=>3,
+ 'padx'=>3,
'pady'=>2 )
-[ 'AntiqueWhite3', 'Bisque1', 'Bisque2', 'Bisque3', 'Bisque4',
- 'SlateBlue3', 'RoyalBlue1', 'SteelBlue2', 'DeepSkyBlue3', 'LightBlue1',
- 'DarkSlateGray1', 'Aquamarine2', 'DarkSeaGreen2', 'SeaGreen1',
- 'Yellow1', 'IndianRed1', 'IndianRed2', 'Tan1', 'Tan4'
+[ 'AntiqueWhite3', 'Bisque1', 'Bisque2', 'Bisque3', 'Bisque4',
+ 'SlateBlue3', 'RoyalBlue1', 'SteelBlue2', 'DeepSkyBlue3', 'LightBlue1',
+ 'DarkSlateGray1', 'Aquamarine2', 'DarkSeaGreen2', 'SeaGreen1',
+ 'Yellow1', 'IndianRed1', 'IndianRed2', 'Tan1', 'Tan4'
].each{|twind_color|
- TkTextWindow.new($twind_text, 'end',
+ 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,
+ 'padx'=>3,
'pady'=>2 )
}
@@ -217,39 +217,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,
+ TkcText.new($twind_plot, 225, 20,
'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,
+ TkcText.new($twind_plot, x, 254,
'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,
+ TkcText.new($twind_plot, 96, y,
'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,
+ item = TkcOval.new($twind_plot, x-6, y-6, x+6, y+6,
'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
item.addtag 'point'
end
- $twind_plot.itembind('point', 'Any-Enter',
+ $twind_plot.itembind('point', 'Any-Enter',
proc{$twind_plot.itemconfigure 'current', 'fill', 'red'})
- $twind_plot.itembind('point', 'Any-Leave',
+ $twind_plot.itembind('point', 'Any-Leave',
proc{$twind_plot.itemconfigure 'current', 'fill', 'SkyBlue2'})
- $twind_plot.itembind('point', '1',
+ $twind_plot.itembind('point', '1',
proc{|x,y| embPlotDown $twind_plot,x,y}, "%x %y")
- $twind_plot.itembind('point', 'ButtonRelease-1',
+ $twind_plot.itembind('point', 'ButtonRelease-1',
proc{$twind_plot.dtag 'selected'})
- $twind_plot.bind('B1-Motion',
+ $twind_plot.bind('B1-Motion',
proc{|x,y| embPlotMove $twind_plot,x,y}, "%x %y")
while ($twind_text.get($mark_plot) =~ /[ \t\n]/)
$twind_text.delete $mark_plot
diff --git a/ext/tk/sample/demos-jp/twind2.rb b/ext/tk/sample/demos-jp/twind2.rb
index 2a26b28ef6..96000b0e14 100644
--- a/ext/tk/sample/demos-jp/twind2.rb
+++ b/ext/tk/sample/demos-jp/twind2.rb
@@ -5,7 +5,7 @@
# toplevel widget が存在すれば削除する
if defined?($twind2_demo) && $twind2_demo
- $twind2_demo.destroy
+ $twind2_demo.destroy
$twind2_demo = nil
end
@@ -20,20 +20,20 @@ base_frame = TkFrame.new($twind2_demo).pack(:fill=>:both, :expand=>true)
# frame 生成
$twind2_buttons = TkFrame.new(base_frame) {|frame|
- TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2),
+ TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>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,
+ 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)
frame.grid_columnconfigure(0, :weight=>1)
}
@@ -41,11 +41,11 @@ $twind2_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
# frame 生成
$twind2_text = nil
-TkFrame.new(base_frame, 'highlightthickness'=>2, 'borderwidth'=>2,
+TkFrame.new(base_frame, 'highlightthickness'=>2, 'borderwidth'=>2,
'relief'=>'sunken') {|f|
$twind2_text = TkText.new(f, 'setgrid'=>true, 'font'=>$font,
- # 'width'=>'70', 'height'=>35, 'wrap'=>'word',
- 'width'=>'70', 'height'=>35, 'wrap'=>'char',
+ # '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)}
@@ -55,11 +55,11 @@ TkFrame.new(base_frame, 'highlightthickness'=>2, 'borderwidth'=>2,
}.pack('expand'=>'yes', 'fill'=>'both')
# タグ生成
-$tag2_center = TkTextTag.new($twind2_text,
+$tag2_center = TkTextTag.new($twind2_text,
'justify' =>'center',
'spacing1'=>'5m',
'spacing3'=>'5m' )
-$tag2_buttons = TkTextTag.new($twind2_text,
+$tag2_buttons = TkTextTag.new($twind2_text,
'lmargin1'=>'1c',
'lmargin2'=>'1c',
'rmargin' =>'1c',
@@ -86,7 +86,7 @@ $twind2_text.insert('end', '例えば,ここには2つの')
$twind2_text.insert('end', 'ボタンウィジェットが埋め込まれています。')
$twind2_text.insert('end', '最初のボタンをクリックすると、')
$twind2_text.insert('end', '水平方向のスクロールを ')
-TkTextWindow.new($twind2_text, 'end',
+TkTextWindow.new($twind2_text, 'end',
'window'=>TkButton.new($twind2_text) {
#text 'ON'
text 'オン'
@@ -95,7 +95,7 @@ TkTextWindow.new($twind2_text, 'end',
})
$twind2_text.insert('end', "にします。また、2つめのボタンをクリックすると\n")
$twind2_text.insert('end', '水平方向のスクロールを')
-TkTextWindow.new($twind2_text, 'end',
+TkTextWindow.new($twind2_text, 'end',
'window'=>TkButton.new($twind2_text) {
#text 'OFF'
text 'オフ'
@@ -105,7 +105,7 @@ TkTextWindow.new($twind2_text, 'end',
$twind2_text.insert('end', "にします。\n\n")
$twind2_text.insert('end', '次はもうひとつの例です。')
-TkTextWindow.new($twind2_text, 'end',
+TkTextWindow.new($twind2_text, 'end',
'window'=>TkButton.new($twind2_text) {
text 'ここをクリック'
command proc{textWindPlot2 $twind2_text}
@@ -116,7 +116,7 @@ $mark2_plot = TkTextMark.new($twind2_text, 'insert')
$mark2_plot.gravity='left'
$twind2_text.insert('end', 'マウスでドラッグすることで、')
$twind2_text.insert('end', 'プロット上のデータ点を移動することができます。')
-TkTextWindow.new($twind2_text, 'end',
+TkTextWindow.new($twind2_text, 'end',
'window'=>TkButton.new($twind2_text) {
text '消去'
command proc{textWindDel2 $twind2_text}
@@ -148,7 +148,7 @@ 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',
+TkTextWindow.new($twind2_text, 'end',
'window'=>TkCheckButton.new($twind2_text) {
textvariable embToggle
indicatoron 0
@@ -159,21 +159,21 @@ TkTextWindow.new($twind2_text, 'end',
pady 5
padx 2
},
- 'padx'=>3,
+ 'padx'=>3,
'pady'=>2 )
-[ 'AntiqueWhite3', 'Bisque1', 'Bisque2', 'Bisque3', 'Bisque4',
- 'SlateBlue3', 'RoyalBlue1', 'SteelBlue2', 'DeepSkyBlue3', 'LightBlue1',
- 'DarkSlateGray1', 'Aquamarine2', 'DarkSeaGreen2', 'SeaGreen1',
- 'Yellow1', 'IndianRed1', 'IndianRed2', 'Tan1', 'Tan4'
+[ 'AntiqueWhite3', 'Bisque1', 'Bisque2', 'Bisque3', 'Bisque4',
+ 'SlateBlue3', 'RoyalBlue1', 'SteelBlue2', 'DeepSkyBlue3', 'LightBlue1',
+ 'DarkSlateGray1', 'Aquamarine2', 'DarkSeaGreen2', 'SeaGreen1',
+ 'Yellow1', 'IndianRed1', 'IndianRed2', 'Tan1', 'Tan4'
].each{|twind_color|
- TkTextWindow.new($twind2_text, 'end',
+ 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,
+ 'padx'=>3,
'pady'=>2 )
}
@@ -187,44 +187,44 @@ $text_normal2['pad'] = $twind2_text.cget('padx')
$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',
+TkTextWindow.new($twind2_text, 'end',
+ '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',
+TkTextWindow.new($twind2_text, 'end',
+ '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',
+TkTextWindow.new($twind2_text, 'end',
+ 'window'=>TkButton.new($twind2_text, :text=>"Big highlight",
+ :cursor=>'top_left_arrow',
'command'=>proc{
textWinBigH2 $twind2_text
}))
-TkTextWindow.new($twind2_text, 'end',
+TkTextWindow.new($twind2_text, 'end',
'window'=>TkButton.new($twind2_text, :text=>"Small highlight",
- :cursor=>'top_left_arrow',
+ :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',
+TkTextWindow.new($twind2_text, 'end',
+ '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',
+TkTextWindow.new($twind2_text, 'end',
+ 'window'=>TkButton.new($twind2_text, :text=>"Small pad",
+ :cursor=>'top_left_arrow',
'command'=>proc{
textWinSmallP2 $twind2_text
}))
@@ -232,9 +232,9 @@ TkTextWindow.new($twind2_text, 'end',
$twind2_text.insert('end', "\n\n更にイメージもテキストウィジェットに")
$twind2_text.insert('end', "うまく配置できます:")
-TkTextImage.new($twind2_text, 'end',
+TkTextImage.new($twind2_text, 'end',
'image'=>TkBitmapImage.new(:file=>[
- $demo_dir, '..',
+ $demo_dir, '..',
'images', 'face.xbm'
].join(File::Separator)))
@@ -309,39 +309,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,
+ TkcText.new($twind2_plot, 225, 20,
'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,
+ TkcText.new($twind2_plot, x, 254,
'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,
+ TkcText.new($twind2_plot, 96, y,
'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,
+ item = TkcOval.new($twind2_plot, x-6, y-6, x+6, y+6,
'width'=>1, 'outline'=>'black', 'fill'=>'SkyBlue2')
item.addtag 'point'
end
- $twind2_plot.itembind('point', 'Any-Enter',
+ $twind2_plot.itembind('point', 'Any-Enter',
proc{$twind2_plot.itemconfigure 'current', 'fill', 'red'})
- $twind2_plot.itembind('point', 'Any-Leave',
+ $twind2_plot.itembind('point', 'Any-Leave',
proc{$twind2_plot.itemconfigure 'current', 'fill', 'SkyBlue2'})
- $twind2_plot.itembind('point', '1',
+ $twind2_plot.itembind('point', '1',
proc{|x,y| embPlotDown2 $twind2_plot,x,y}, "%x %y")
- $twind2_plot.itembind('point', 'ButtonRelease-1',
+ $twind2_plot.itembind('point', 'ButtonRelease-1',
proc{$twind2_plot.dtag 'selected'})
- $twind2_plot.bind('B1-Motion',
+ $twind2_plot.bind('B1-Motion',
proc{|x,y| embPlotMove2 $twind2_plot,x,y}, "%x %y")
while ($twind2_text.get($mark2_plot) =~ /[ \t\n]/)
$twind2_text.delete $mark2_plot
diff --git a/ext/tk/sample/demos-jp/unicodeout.rb b/ext/tk/sample/demos-jp/unicodeout.rb
index 178077ec08..4857cd131d 100644
--- a/ext/tk/sample/demos-jp/unicodeout.rb
+++ b/ext/tk/sample/demos-jp/unicodeout.rb
@@ -8,7 +8,7 @@
# based on Tcl/Tk8.4.4 widget demos
if defined?($unicodeout_demo) && $unicodeout_demo
- $unicodeout_demo.destroy
+ $unicodeout_demo.destroy
$unicodeout_demo = nil
end
@@ -20,8 +20,8 @@ $unicodeout_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($unicodeout_demo).pack(:fill=>:both, :expand=>true)
-TkLabel.new(base_frame,
- :font=>$font, :wraplength=>'5.4i', :justify=>:left,
+TkLabel.new(base_frame,
+ :font=>$font, :wraplength=>'5.4i', :justify=>:left,
:text=><<EOL).pack(:side=>:top)
これは,Tkにおける非欧米文字集合を用いる言語に対するサポートについての\
サンプルです.ただし,下の表示においてあなたが実際にどのような表示を\
@@ -55,9 +55,9 @@ TkFrame.new(base_frame){|f|
}).pack(:side=>:left, :expand=>true)
}
-wait_msg = TkLabel.new(base_frame,
- :text=>"フォント読み込みの完了まで" +
- "しばらくお待ち下さい...",
+wait_msg = TkLabel.new(base_frame,
+ :text=>"フォント読み込みの完了まで" +
+ "しばらくお待ち下さい...",
:font=>"Helvetica 12 italic").pack
class Unicodeout_SampleFrame < TkFrame
@@ -77,10 +77,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+':',
+ l = TkLabel.new(self, :font=>@@font, :text=>lang+':',
:anchor=>:nw, :pady=>0)
- #s = TkLabel.new(self, :font=>@@font, :text=>sample_txt,
- s = TkLabel.new(self, :font=>TkFont.new(@@font), :text=>sample_txt,
+ #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)
Tk.grid(l, s, :sticky=>:ew, :pady=>0)
l.grid_config(:padx, '1m')
@@ -96,23 +96,23 @@ oldCursor = $unicodeout_demo.cursor
$unicodeout_demo.cursor('watch')
Tk.update
-f.add_sample('Arabic',
- '\uFE94\uFEF4\uFE91\uFEAE\uFECC\uFEDF\uFE8D\uFE94',
+f.add_sample('Arabic',
+ '\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 ',
+f.add_sample('Greek',
+ '\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 ',
+f.add_sample('Hebrew',
+ '\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, ',
+f.add_sample('Japanese',
+ '\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 ',
+f.add_sample('Russian',
+ '\u0420\u0443\u0441\u0441\u043A\u0438\u0439 ',
'\u044F\u0437\u044B\u043A')
wait_msg.destroy