aboutsummaryrefslogtreecommitdiffstats
path: root/ext/tk/sample/demos-jp/bind.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/sample/demos-jp/bind.rb')
-rw-r--r--ext/tk/sample/demos-jp/bind.rb38
1 files changed, 19 insertions, 19 deletions
diff --git a/ext/tk/sample/demos-jp/bind.rb b/ext/tk/sample/demos-jp/bind.rb
index 99e5c1718c..efba6e6c01 100644
--- a/ext/tk/sample/demos-jp/bind.rb
+++ b/ext/tk/sample/demos-jp/bind.rb
@@ -1,15 +1,15 @@
-# -*- coding: euc-jp -*-
+# -*- coding: utf-8 -*-
#
# text (tag bindings) widget demo (called by 'widget')
#
-# toplevel widget が存在すれば削除する
+# toplevel widget 絖医ゃ
if defined?($bind_demo) && $bind_demo
$bind_demo.destroy
$bind_demo = nil
end
-# demo 用の toplevel widget を生成
+# demo toplevel widget
$bind_demo = TkToplevel.new {|w|
title("Text Demonstration - Tag Bindings")
iconname("bind")
@@ -18,11 +18,11 @@ $bind_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($bind_demo).pack(:fill=>:both, :expand=>true)
-# frame 生成
+# frame
TkFrame.new(base_frame) {|frame|
TkButton.new(frame) {
- #text '了解'
- text '閉じる'
+ #text '篋茹'
+ text ''
command proc{
tmppath = $bind_demo
$bind_demo = nil
@@ -31,20 +31,20 @@ TkFrame.new(base_frame) {|frame|
}.pack('side'=>'left', 'expand'=>'yes')
TkButton.new(frame) {
- text 'コード参照'
+ text '潟若'
command proc{showCode 'bind'}
}.pack('side'=>'left', 'expand'=>'yes')
}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-# bind 用メソッド
+# bind <純
def tag_binding_for_bind_demo(tag, enter_style, leave_style)
tag.bind('Any-Enter', proc{tag.configure enter_style})
tag.bind('Any-Leave', proc{tag.configure leave_style})
end
-# text 生成
+# text
txt = TkText.new(base_frame){|t|
- # 生成
+ #
setgrid 'true'
#width 60
#height 24
@@ -57,7 +57,7 @@ txt = TkText.new(base_frame){|t|
}
pack('expand'=>'yes', 'fill'=>'both')
- # スタイル設定
+ # 鴻帥ゃ荐絎
if TkWinfo.depth($root).to_i > 1
tagstyle_bold = {'background'=>'#43ce80', 'relief'=>'raised',
'borderwidth'=>1}
@@ -67,25 +67,25 @@ txt = TkText.new(base_frame){|t|
tagstyle_normal = {'foreground'=>'', 'background'=>''}
end
- # テキスト挿入
- insert 'insert', "テキストwidgetの表示スタイルを制御するのと同じタグのメカニズムを使って、テキストにTclのコマンドを割り当てることができます。これにより、マウスやキーボードのアクションで特定のTclのコマンドが実行されるようになります。例えば、下のキャンバスのデモプログラムについての説明文にはそのようなタグがついています。マウスを説明文の上に持っていくと説明文が光り、ボタン1を押すとその説明のデモが始まります。
+ # 鴻水
+ insert 'insert', "鴻widget茵腓冴鴻帥ゃ九勝帥違<冴篏帥c鴻Tcl潟潟蚊綵с障鴻若若≪激с潟х劫Tcl潟潟絎茵障箴違筝c潟鴻≪違ゃ茯帥違ゃ障鴻茯筝c茯帥1若茯≪紮障障
"
- insert('end', '1. キャンバス widget に作ることのできるアイテムの種類全てに関するサンプル。', (d1 = TkTextTag.new(t)) )
+ insert('end', '1. c潟 widget 篏с≪ゃ腮蕁≪泣潟', (d1 = TkTextTag.new(t)) )
insert('end', "\n\n")
- insert('end', '2. 簡単な 2次元のプロット。データを表す点を動かすことができる。', (d2 = TkTextTag.new(t)) )
+ 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. ゃ潟≪ゃ√違綵≪c帥',
(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. キャンバスがどうやってスクロールするのかを示すグリッド。',
+ '6. c潟鴻c鴻若腓冴違',
(d6 = TkTextTag.new(t)) )
# binding