From 2fecb27eb47333fda1e0049584d6b56dd336197f Mon Sep 17 00:00:00 2001 From: ayumin Date: Wed, 14 Sep 2011 17:25:37 +0000 Subject: Merge branch 'tk_utf8' into trunk git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/sample/demos-jp/twind2.rb | 116 +++++++++++++++++++-------------------- 1 file changed, 58 insertions(+), 58 deletions(-) (limited to 'ext/tk/sample/demos-jp/twind2.rb') diff --git a/ext/tk/sample/demos-jp/twind2.rb b/ext/tk/sample/demos-jp/twind2.rb index 96000b0e14..a783ba4738 100644 --- a/ext/tk/sample/demos-jp/twind2.rb +++ b/ext/tk/sample/demos-jp/twind2.rb @@ -1,15 +1,15 @@ -# -*- coding: euc-jp -*- +# -*- coding: utf-8 -*- # # text (embedded windows) widget demo 2 (called by 'widget') # -# toplevel widget が存在すれば削除する +# toplevel widget 絖医ゃ if defined?($twind2_demo) && $twind2_demo $twind2_demo.destroy $twind2_demo = nil end -# demo 用の toplevel widget を生成 +# demo toplevel widget $twind2_demo = TkToplevel.new {|w| title("Text Demonstration - Embedded Windows 2") iconname("Embedded Windows") @@ -18,15 +18,15 @@ $twind2_demo = TkToplevel.new {|w| base_frame = TkFrame.new($twind2_demo).pack(:fill=>:both, :expand=>true) -# frame 生成 +# frame $twind2_buttons = TkFrame.new(base_frame) {|frame| TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2), :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) TkGrid('x', - TkButton.new(frame, :text=>'コード参照', + TkButton.new(frame, :text=>'潟若', :image=>$image['view'], :compound=>:left, :command=>proc{showCode 'twind2'}), - TkButton.new(frame, :text=>'閉じる', + TkButton.new(frame, :text=>'', :image=>$image['delete'], :compound=>:left, :command=>proc{ tmppath = $twind2_demo @@ -39,7 +39,7 @@ $twind2_buttons = TkFrame.new(base_frame) {|frame| } $twind2_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m') -# frame 生成 +# frame $twind2_text = nil TkFrame.new(base_frame, 'highlightthickness'=>2, 'borderwidth'=>2, 'relief'=>'sunken') {|f| @@ -54,7 +54,7 @@ TkFrame.new(base_frame, 'highlightthickness'=>2, 'borderwidth'=>2, }.pack('expand'=>'yes', 'fill'=>'both') }.pack('expand'=>'yes', 'fill'=>'both') -# タグ生成 +# 帥亥 $tag2_center = TkTextTag.new($twind2_text, 'justify' =>'center', 'spacing1'=>'5m', @@ -67,82 +67,82 @@ $tag2_buttons = TkTextTag.new($twind2_text, 'spacing2'=>0, 'spacing3'=>0 ) -# テキストの生成 -$twind2_text.insert('end', 'テキストウィジェットには色々な種類のアイテム') -$twind2_text.insert('end', '(動的なものや静的なものの両方があります)を') -$twind2_text.insert('end', '数多く含めることができます。そうしたアイテムは') -$twind2_text.insert('end', '行替え、タブ、中央揃えなどの様々な方法で') -$twind2_text.insert('end', '配置することができます。') -$twind2_text.insert('end', '加えて、テキストウィジェットの内容物が') -$twind2_text.insert('end', 'ウィンドウサイズに比べて大きすぎる場合でも') -$twind2_text.insert('end', 'すべての方向にスムーズにスクロールさせて') -$twind2_text.insert('end', '確認することが可能です。') +# 鴻 +$twind2_text.insert('end', '鴻c吾с蚊腮蕁≪ゃ') +$twind2_text.insert('end', '鐚筝≧鴻障鐚') +$twind2_text.insert('end', '医с障≪ゃ') +$twind2_text.insert('end', '茵帥帥筝紊罕号') +$twind2_text.insert('end', '臀с障') +$twind2_text.insert('end', '鴻c吾с絎合') +$twind2_text.insert('end', 'c潟泣ゃ冴罸鴻紊с翫с') +$twind2_text.insert('end', '鴻劫鴻若冴鴻若') +$twind2_text.insert('end', '腆肴純с') $twind2_text.insert('end', "\n\n") -$twind2_text.insert('end', 'テキストウィジェット上には他のウィジェットを') -$twind2_text.insert('end', '含めることもできます。こうしたものは') -$twind2_text.insert('end', '「埋め込みウィンドウ」と呼ばれ、その中に') -$twind2_text.insert('end', 'いかなるウィジェットでも詰め込むことができます。') -$twind2_text.insert('end', '例えば,ここには2つの') -$twind2_text.insert('end', 'ボタンウィジェットが埋め込まれています。') -$twind2_text.insert('end', '最初のボタンをクリックすると、') -$twind2_text.insert('end', '水平方向のスクロールを ') +$twind2_text.insert('end', '鴻c吾с筝篁c吾с') +$twind2_text.insert('end', 'с障') +$twind2_text.insert('end', '莨若帥c潟若違筝') +$twind2_text.insert('end', 'c吾сс荅違莨若с障') +$twind2_text.insert('end', '箴逸鐚ゃ') +$twind2_text.insert('end', '帥潟c吾с莨若障障') +$twind2_text.insert('end', '帥潟') +$twind2_text.insert('end', '羂翫抗劫鴻若 ') TkTextWindow.new($twind2_text, 'end', 'window'=>TkButton.new($twind2_text) { #text 'ON' - text 'オン' + text '' command proc{textWindOn2 $twind2_text,$twind2_buttons} cursor 'top_left_arrow' }) -$twind2_text.insert('end', "にします。また、2つめのボタンをクリックすると\n") -$twind2_text.insert('end', '水平方向のスクロールを') +$twind2_text.insert('end', "障障鐚ゃ帥潟\n") +$twind2_text.insert('end', '羂翫抗劫鴻若') TkTextWindow.new($twind2_text, 'end', 'window'=>TkButton.new($twind2_text) { #text 'OFF' - text 'オフ' + text '' command proc{textWindOff2 $twind2_text} cursor 'top_left_arrow' }) -$twind2_text.insert('end', "にします。\n\n") +$twind2_text.insert('end', "障\n\n") -$twind2_text.insert('end', '次はもうひとつの例です。') +$twind2_text.insert('end', '罨<蚊ゃ箴с') TkTextWindow.new($twind2_text, 'end', 'window'=>TkButton.new($twind2_text) { - text 'ここをクリック' + text '' command proc{textWindPlot2 $twind2_text} cursor 'top_left_arrow' }) -$twind2_text.insert('end', 'すると、x-yプロットがここに現れます。') +$twind2_text.insert('end', 'x-y憗障') $mark2_plot = TkTextMark.new($twind2_text, 'insert') $mark2_plot.gravity='left' -$twind2_text.insert('end', 'マウスでドラッグすることで、') -$twind2_text.insert('end', 'プロット上のデータ点を移動することができます。') +$twind2_text.insert('end', '鴻с違с') +$twind2_text.insert('end', '筝若睡鴻腱糸с障') TkTextWindow.new($twind2_text, 'end', 'window'=>TkButton.new($twind2_text) { - text '消去' + text '羔サ' command proc{textWindDel2 $twind2_text} cursor 'top_left_arrow' }) -$twind2_text.insert('end', 'をクリックすると元に戻ります。') +$twind2_text.insert('end', '祉障') $twind2_text.insert('end', "\n\n") -$twind2_text.insert('end', '表示するテキストなしに埋め込みウィンドウだけを') -$twind2_text.insert('end', 'テキストウィジェットに含めることも有用でしょう。') -$twind2_text.insert('end', 'この場合、テキストウィジェットは') -$twind2_text.insert('end', 'ジオメトリマネージャのように働きます。') -$twind2_text.insert('end', '例えば、ここにはテキストウィジェットに') -$twind2_text.insert('end', 'よってボタンがきれいに整列して配置されています。') -$twind2_text.insert('end', 'これらのボタンをクリックすることで、') -$twind2_text.insert('end', 'このテキストウィジェットの背景色を') -$twind2_text.insert('end', '変えることができます("デフォルト"ボタンで') -$twind2_text.insert('end', '元の色に戻すことができます)。') -$twind2_text.insert('end', '"Short"というボタンをクリックすると文字列の長さが') -$twind2_text.insert('end', '変わり、テキストウィジェットが自動的に') -$twind2_text.insert('end', 'レイアウトを整える様子を見ることができます。') -$twind2_text.insert('end', 'もう一度同じボタンを押すと元に戻ります。') +$twind2_text.insert('end', '茵腓冴鴻莨若帥c潟') +$twind2_text.insert('end', '鴻c吾сс') +$twind2_text.insert('end', '翫鴻c吾с') +$twind2_text.insert('end', '吾<若吾c障') +$twind2_text.insert('end', '箴違鴻c吾с') +$twind2_text.insert('end', 'c帥潟翫臀障') +$twind2_text.insert('end', '帥潟с') +$twind2_text.insert('end', '鴻c吾с蚊') +$twind2_text.insert('end', '紊с障(""帥潟') +$twind2_text.insert('end', '蚊祉с障)') +$twind2_text.insert('end', '"Short"帥潟絖激') +$twind2_text.insert('end', '紊鴻c吾с') +$twind2_text.insert('end', 'ゃ≪眼罕絖荀с障') +$twind2_text.insert('end', '筝綺帥潟若祉障') $twind2_text.insert('end', "\n") btn_default = TkButton.new($twind2_text) {|b| - text 'デフォルト' + text '' command proc{embDefBg2 $twind2_text} cursor 'top_left_arrow' } @@ -184,8 +184,8 @@ $text_normal2['border'] = $twind2_text.cget('borderwidth') $text_normal2['highlight'] = $twind2_text.cget('highlightthickness') $text_normal2['pad'] = $twind2_text.cget('padx') -$twind2_text.insert('end', "\nborder width や highlightthickness, ") -$twind2_text.insert('end', "padding を通常の値から変更することも可能です。\n") +$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", @@ -229,8 +229,8 @@ TkTextWindow.new($twind2_text, 'end', textWinSmallP2 $twind2_text })) -$twind2_text.insert('end', "\n\n更にイメージもテキストウィジェットに") -$twind2_text.insert('end', "うまく配置できます:") +$twind2_text.insert('end', "\n\n眼ゃ<若吾鴻c吾с") +$twind2_text.insert('end', "障臀с障鐚") TkTextImage.new($twind2_text, 'end', 'image'=>TkBitmapImage.new(:file=>[ @@ -238,7 +238,7 @@ TkTextImage.new($twind2_text, 'end', 'images', 'face.xbm' ].join(File::Separator))) -# メソッド定義 +# <純絎臂 def textWinBigB2(w) w.borderwidth 15 end -- cgit v1.2.3