summaryrefslogtreecommitdiff
path: root/ext/tk/sample/demos-jp/twind.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/sample/demos-jp/twind.rb')
-rw-r--r--ext/tk/sample/demos-jp/twind.rb76
1 files changed, 38 insertions, 38 deletions
diff --git a/ext/tk/sample/demos-jp/twind.rb b/ext/tk/sample/demos-jp/twind.rb
index bd0b060754..f13a137cc3 100644
--- a/ext/tk/sample/demos-jp/twind.rb
+++ b/ext/tk/sample/demos-jp/twind.rb
@@ -1,15 +1,15 @@
-# -*- coding: euc-jp -*-
+# -*- coding: utf-8 -*-
#
# text (embedded windows) widget demo (called by 'widget')
#
-# toplevel widget が存在すれば削除する
+# toplevel widget 絖医ゃ
if defined?($twind_demo) && $twind_demo
$twind_demo.destroy
$twind_demo = nil
end
-# demo 用の toplevel widget を生成
+# demo toplevel widget
$twind_demo = TkToplevel.new {|w|
title("Text Demonstration - Embedded Windows")
iconname("Embedded Windows")
@@ -18,11 +18,11 @@ $twind_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($twind_demo).pack(:fill=>:both, :expand=>true)
-# frame 生成
+# frame
$twind_buttons = TkFrame.new(base_frame) {|frame|
TkButton.new(frame) {
- #text '了解'
- text '閉じる'
+ #text '篋茹'
+ text ''
command proc{
tmppath = $twind_demo
$twind_demo = nil
@@ -31,13 +31,13 @@ $twind_buttons = TkFrame.new(base_frame) {|frame|
}.pack('side'=>'left', 'expand'=>'yes')
TkButton.new(frame) {
- text 'コード参照'
+ text '潟若'
command proc{showCode 'twind'}
}.pack('side'=>'left', 'expand'=>'yes')
}
$twind_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
-# frame 生成
+# frame
$twind_text = nil
TkFrame.new(base_frame, 'highlightthickness'=>2, 'borderwidth'=>2,
'relief'=>'sunken') {|f|
@@ -51,7 +51,7 @@ TkFrame.new(base_frame, 'highlightthickness'=>2, 'borderwidth'=>2,
}.pack('expand'=>'yes', 'fill'=>'both')
}.pack('expand'=>'yes', 'fill'=>'both')
-# タグ生成
+# 帥亥
$tag_center = TkTextTag.new($twind_text,
'justify' =>'center',
'spacing1'=>'5m',
@@ -64,70 +64,70 @@ $tag_buttons = TkTextTag.new($twind_text,
'spacing2'=>0,
'spacing3'=>0 )
-# テキストの生成
+# 鴻
$twind_text.insert('end',
- 'テキストwidget上に他のwidgetを組み込むことができます。')
+ '鴻widget筝篁widget腟粋昭с障')
$twind_text.insert('end',
- '組み込みウィンドウと呼ばれ、任意のwidgetが可能です。')
+ '腟粋昭帥c潟若違篁紙widget純с')
$twind_text.insert('end',
- '例えば、ここに2つのボタンwidgetが組み込まれています。')
-$twind_text.insert('end', '最初のボタンをクリックすと水平方向のスクロールを')
+ '箴違2ゃ帥widget腟粋昭障障')
+$twind_text.insert('end', '帥潟羂翫抗劫鴻若')
TkTextWindow.new($twind_text, 'end',
'window'=>TkButton.new($twind_text) {
#text 'ON'
- text 'オン'
+ text ''
command proc{textWindOn $twind_text,$twind_buttons}
cursor 'top_left_arrow'
})
-$twind_text.insert('end', "にします。また2つめのボタンをクリックすると\n")
-$twind_text.insert('end', '水平方向のスクロールを')
+$twind_text.insert('end', "障障2ゃ帥潟\n")
+$twind_text.insert('end', '羂翫抗劫鴻若')
TkTextWindow.new($twind_text, 'end',
'window'=>TkButton.new($twind_text) {
#text 'OFF'
- text 'オフ'
+ text ''
command proc{textWindOff $twind_text}
cursor 'top_left_arrow'
})
-$twind_text.insert('end', 'にします。')
+$twind_text.insert('end', '障')
-$twind_text.insert('end', 'もうひとつの例です。')
+$twind_text.insert('end', '蚊ゃ箴с')
TkTextWindow.new($twind_text, 'end',
'window'=>TkButton.new($twind_text) {
- text 'ここをクリック'
+ text ''
command proc{textWindPlot $twind_text}
cursor 'top_left_arrow'
})
-$twind_text.insert('end', 'すると、x-yプロットがここに現れます。')
+$twind_text.insert('end', 'x-y憗障')
$mark_plot = TkTextMark.new($twind_text, 'insert')
$mark_plot.gravity='left'
-$twind_text.insert('end', 'マウスでデータを描画することができます。')
+$twind_text.insert('end', '鴻с若帥祉с障')
TkTextWindow.new($twind_text, 'end',
'window'=>TkButton.new($twind_text) {
- text '消去'
+ text '羔サ'
command proc{textWindDel $twind_text}
cursor 'top_left_arrow'
})
-$twind_text.insert('end', 'をクリックすると元に戻ります。
+$twind_text.insert('end', '祉障
')
-$twind_text.insert('end', '組み込みウィンドウだけをテキストwidget上に、実際の')
-$twind_text.insert('end', 'テキストはなしで組み込むことは便利です。')
-$twind_text.insert('end', 'この場合は、テキストwidgetはウィンドウマネージャの')
-$twind_text.insert('end', 'ように動作します。例えば、ここにはテキストwidgetに')
-$twind_text.insert('end', 'よってボタンがきれいに並べられています。')
-$twind_text.insert('end', 'これらのボタンで背景色を変えることができます')
-$twind_text.insert('end', '("Default"で元の色に戻すことができます)。')
-$twind_text.insert('end', '"Short"というボタンをクリックすると文字列の長さが')
-$twind_text.insert('end', '変わります。すると自動的にテキストwidgetが')
-$twind_text.insert('end', 'レイアウトを整えてくれます。')
-$twind_text.insert('end', 'もう一度同じボタンを押すと元に戻ります。
+$twind_text.insert('end', '腟粋昭帥c潟鴻widget筝絎')
+$twind_text.insert('end', '鴻х粋昭箴水с')
+$twind_text.insert('end', '翫鴻widgetc潟若吾c')
+$twind_text.insert('end', '篏障箴違鴻widget')
+$twind_text.insert('end', 'c帥潟筝鴻障')
+$twind_text.insert('end', '帥潟ц蚊紊с障')
+$twind_text.insert('end', '("Default"у蚊祉с障)')
+$twind_text.insert('end', '"Short"帥潟絖激')
+$twind_text.insert('end', '紊障鴻widget')
+$twind_text.insert('end', 'ゃ≪眼障')
+$twind_text.insert('end', '筝綺帥潟若祉障
')
TkTextWindow.new($twind_text, 'end',
'window'=>TkButton.new($twind_text) {|b|
- text 'デフォルト'
+ text ''
command proc{embDefBg $twind_text}
cursor 'top_left_arrow'
$tag_buttons.add('end')
@@ -163,7 +163,7 @@ TkTextWindow.new($twind_text, 'end',
'pady'=>2 )
}
-# メソッド定義
+# <純絎臂
def textWindOn (w,f)
if defined? $twind_scroll
begin