summaryrefslogtreecommitdiff
path: root/ext/tk/sample/demos-jp/items.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/sample/demos-jp/items.rb')
-rw-r--r--ext/tk/sample/demos-jp/items.rb60
1 files changed, 30 insertions, 30 deletions
diff --git a/ext/tk/sample/demos-jp/items.rb b/ext/tk/sample/demos-jp/items.rb
index 4440905db8..b1d66f367b 100644
--- a/ext/tk/sample/demos-jp/items.rb
+++ b/ext/tk/sample/demos-jp/items.rb
@@ -1,15 +1,15 @@
-# -*- coding: euc-jp -*-
+# -*- coding: utf-8 -*-
#
# canvas item types widget demo (called by 'widget')
#
-# toplevel widget が存在すれば削除する
+# toplevel widget 絖医ゃ
if defined?($items_demo) && $items_demo
$items_demo.destroy
$items_demo = nil
end
-# demo 用の toplevel widget を生成
+# demo toplevel widget
$items_demo = TkToplevel.new {|w|
title("Canvas Item Demonstration")
iconname("Items")
@@ -18,19 +18,19 @@ $items_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($items_demo).pack(:fill=>:both, :expand=>true)
-# label 生成
+# label
TkLabel.new(base_frame) {
font $font
wraplength '5i'
justify 'left'
- text "このウィンドウにはキャンバス widget が入っており、その中にはキャンバス widget がサポートする様々なタイプのアイテムの例が入っています。次のような操作ができます。\n ボタン-1 ドラッグ:\tアイテムを動かす。\n ボタン-2 ドラッグ:\t見えている部分をずらす。\n ボタン-3 ドラッグ:\t領域を囲う。\n コントロール-F:\t領域の下のアイテムを表示する。"
+ text "c潟c潟 widget ャc筝c潟 widget 泣若罕帥ゃ≪ゃ箴ャc障罨<篏с障\n 帥-1 :\t≪ゃ\n 帥-2 :\t荀\n 帥-3 :\t蚊\n 潟潟若-F:\t筝≪ゃ茵腓冴"
}.pack('side'=>'top')
-# frame 生成
+# frame
TkFrame.new(base_frame) {|frame|
TkButton.new(frame) {
- #text '了解'
- text '閉じる'
+ #text '篋茹'
+ text ''
command proc{
tmppath = $items_demo
$items_demo = nil
@@ -39,15 +39,15 @@ TkFrame.new(base_frame) {|frame|
}.pack('side'=>'left', 'expand'=>'yes')
TkButton.new(frame) {
- text 'コード参照'
+ text '潟若'
command proc{showCode 'items'}
}.pack('side'=>'left', 'expand'=>'yes')
}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-# frame 生成
+# frame
cvs = nil
TkFrame.new(base_frame) {|cf|
- # canvas 生成
+ # canvas
cvs = TkCanvas.new(cf) {|c|
focus
scrollregion '0c 0c 30c 24c'
@@ -113,11 +113,11 @@ else
green = 'black'
end
-# tag オブジェクトを生成
+# tag 吾с
$tag_item = TkcGroup.new(cvs)
# Set up demos within each of the areas of the grid.
-TkcText.new(cvs, '5c', '.2c', 'text'=>'ライン', 'anchor'=>'n')
+TkcText.new(cvs, '5c', '.2c', 'text'=>'ゃ', 'anchor'=>'n')
TkcLine.new(cvs, '1c', '1c', '3c', '1c', '1c', '4c', '3c', '4c',
'width'=>2, 'fill'=>blue, 'capstyle'=>'butt',
'join'=>'miter', 'tags'=>$tag_item )
@@ -136,7 +136,7 @@ TkcLine.new(cvs, '1c','7c','1.75c','5.8c','2.5c','7c','3.25c','5.8c','4c','7c',
'tags'=>$tag_item )
TkcText.new(cvs, '15c', '.2c',
- 'text'=>'曲線 (滑らかにつないだ直線)', 'anchor'=>'n')
+ 'text'=>'牙 (羯ゃ雁)', 'anchor'=>'n')
TkcLine.new(cvs, '11c','4c','11.5c','1c','13.5c','1c','14c','4c',
'smooth'=>'on', 'fill'=>blue, 'tags'=>$tag_item )
TkcLine.new(cvs, '15.5c','1c','19.5c','1.5c','15.5c','4.5c','19.5c','4c',
@@ -148,7 +148,7 @@ TkcLine.new(cvs, '12c','6c','13.5c','4.5c','16.5c','7.5c','18c','6c',
'images', 'gray25.xbm'].join(File::Separator),
'fill'=>red, 'tags'=>$tag_item )
-TkcText.new(cvs, '25c', '.2c', 'text'=>'多角形', 'anchor'=>'n')
+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,
@@ -163,7 +163,7 @@ TkcPolygon.new(cvs, '22c','4.5c','25c','4.5c','25c','6.75c','28c','6.75c',
'images', 'gray25.xbm'].join(File::Separator),
'outline'=>'black', 'tags'=>$tag_item )
-TkcText.new(cvs, '5c', '8.2c', 'text'=>'矩形', 'anchor'=>'n')
+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',
@@ -173,7 +173,7 @@ TkcRectangle.new(cvs, '6c','10c','9c','15c', 'outline'=>'',
'images','gray25.xbm'].join(File::Separator),
'fill'=>blue, 'tags'=>$tag_item )
-TkcText.new(cvs, '15c', '8.2c', 'text'=>'楕円', 'anchor'=>'n')
+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',
@@ -183,13 +183,13 @@ TkcOval.new(cvs, '16c','10c','19c','15c', 'outline'=>'',
'images','gray25.xbm'].join(File::Separator),
'fill'=>blue, 'tags'=>$tag_item )
-TkcText.new(cvs, '25c', '8.2c', 'text'=>'テキスト', 'anchor'=>'n')
+TkcText.new(cvs, '25c', '8.2c', 'text'=>'鴻', 'anchor'=>'n')
TkcRectangle.new(cvs, '22.4c','8.9c','22.6c','9.1c')
TkcText.new(cvs, '22.5c', '9c', 'anchor'=>'n', 'font'=>font1, 'width'=>'4c',
- 'text'=>'短いテキスト。ワードラップ、左揃え、アンカーは北(上)。□は各テキストのアンカーポイントを示す。', 'tags'=>$tag_item )
+ 'text'=>'鴻若綏≪潟若(筝)<鴻≪潟若ゃ潟腓冴', 'tags'=>$tag_item )
TkcRectangle.new(cvs, '25.4c','10.9c','25.6c','11.1c')
TkcText.new(cvs, '25.5c', '11c', 'anchor'=>'w', 'font'=>font1, 'fill'=>blue,
- 'text'=>"いくつかの行。\nそれぞれ独立に\n行揃え。\n全て左端がアンカーされている。", 'justify'=>'center', 'tags'=>$tag_item )
+ 'text'=>"ゃ茵\n腴\n茵\n綏腴≪潟若", 'justify'=>'center', 'tags'=>$tag_item )
TkcRectangle.new(cvs, '24.9c','13.9c','25.1c','14.1c')
if $tk_version =~ /^4\.[01]/
TkcText.new(cvs, '25c', '14c', 'anchor'=>'c', 'font'=>font2, 'fill'=>red,
@@ -202,7 +202,7 @@ else
'tags'=>$tag_item )
end
-TkcText.new(cvs, '5c', '16.2c', 'text'=>'弧', 'anchor'=>'n')
+TkcText.new(cvs, '5c', '16.2c', 'text'=>'綣', 'anchor'=>'n')
TkcArc.new(cvs, '0.5c','17c','7c','20c', 'fill'=>green, 'outline'=>'black',
'start'=>45, 'extent'=>270, 'style'=>'pieslice', 'tags'=>$tag_item)
#TkcArc.new(cvs, '6.5c','17c','9.5c','20c', 'width'=>'4m', 'style'=>'arc',
@@ -221,7 +221,7 @@ TkcArc.new(cvs, '5.5c','20.5c','9.5c','23.5c', 'width'=>'4m', 'style'=>'chord',
'fill'=>blue, 'outline'=>'', 'start'=>45, 'extent'=>270,
'tags'=>$tag_item)
-TkcText.new(cvs, '15c', '16.2c', 'text'=>'ビットマップ', 'anchor'=>'n')
+TkcText.new(cvs, '15c', '16.2c', 'text'=>'', 'anchor'=>'n')
#TkcBitmap.new(cvs, '13c','20c',
# 'bitmap'=>'@' + ['images', 'face'].join(File::Separator),
# 'tags'=>$tag_item)
@@ -239,7 +239,7 @@ TkcBitmap.new(cvs, '17c','18.5c',
#TkcBitmap.new(cvs, '17c','21.5c',
# 'bitmap'=>'@' + ['images', 'letters'].join(File::Separator),
# 'tags'=>$tag_item)
-# ↓の形式でも可能
+# 綵√с
TkcBitmap.new(cvs, '17c','21.5c') {
bitmap '@' + [$demo_dir, '..', 'images', 'letters.xbm'].join(File::Separator)
tags $tag_item
@@ -249,15 +249,15 @@ TkcBitmap.new(cvs, '17c','21.5c') {
# tags $tag_item
#}
-TkcText.new(cvs, '25c', '16.2c', 'text'=>'ウィンドウ', 'anchor'=>'n')
+TkcText.new(cvs, '25c', '16.2c', 'text'=>'c潟', 'anchor'=>'n')
TkButton.new(cvs) {|b|
- text '押してね'
+ text '若'
command proc{butPress cvs, red}
TkcWindow.new(cvs, '21c','18c',
'window'=>b, 'anchor'=>'nw', 'tags'=>$tag_item)
}
TkEntry.new(cvs, 'width'=>20, 'relief'=>'sunken') {|e|
- insert 'end', '編集してね'
+ insert 'end', '膩'
TkcWindow.new(cvs, '21c','21c',
'window'=>e, 'anchor'=>'nw', 'tags'=>$tag_item)
}
@@ -266,9 +266,9 @@ TkScale.new(cvs, 'from'=>0, 'to'=>100, 'length'=>'6c', 'sliderlength'=>'.4c',
TkcWindow.new(cvs, '28.5c','17.5c',
'window'=>scl, 'anchor'=>'n', 'tags'=>$tag_item)
}
-TkcText.new(cvs, '21c', '17.9c', 'text'=>'ボタン:', 'anchor'=>'sw')
-TkcText.new(cvs, '21c', '20.9c', 'text'=>'エントリ:', 'anchor'=>'sw')
-TkcText.new(cvs, '28.5c', '17.4c', 'text'=>'スケール:', 'anchor'=>'s')
+TkcText.new(cvs, '21c', '17.9c', 'text'=>'帥:', 'anchor'=>'sw')
+TkcText.new(cvs, '21c', '20.9c', 'text'=>'潟:', 'anchor'=>'sw')
+TkcText.new(cvs, '28.5c', '17.4c', 'text'=>'鴻宴若:', 'anchor'=>'s')
# Set up event bindings for canvas:
cvs.itembind($tag_item, 'Any-Enter', proc{itemEnter cvs})
@@ -374,6 +374,6 @@ end
def butPress(w,color)
i = TkcText.new(w, '25c', '18.1c',
- 'text'=>'いてて!!', 'fill'=>color, 'anchor'=>'n')
+ 'text'=>'!!', 'fill'=>color, 'anchor'=>'n')
Tk.after(500, proc{w.delete i})
end