1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/tk/sample/demos-jp
nagai 3024ffdc3a * ext/tk/*: full update Ruby/Tk to support Ruby(1.9|1.8) and Tc/Tk8.5.
* ext/tk/lib/tkextlib/tile.rb: [incompatible] remove TileWidgets' 
  instate/state/identify method to avoid the conflict with standard
  widget options. Those methods are renamed to ttk_instate/ttk_state/
  ttk_identify (tile_instate/tile_state/tile_identify are available 
  too). Although I don't recommend, if you realy need old methods, 
  please define "Tk::USE_OBSOLETE_TILE_STATE_METHOD = true" before 
  "require 'tkextlib/tile'".

* ext/tk/lib/tkextlib/tile.rb: "Tk::Tile::__Import_Tile_Widgets__!"
  is obsolete. It outputs warning. To control default widget set, 
  use "Tk.default_widget_set = :Ttk".

* ext/tk/lib/tk.rb: __IGNORE_UNKNOWN_CONFIGURE_OPTION__ method and 
  __set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!(mode) method are defind 
  as module methods of TkConfigMethod. It may help users to wrap old 
  Ruby/Tk scripts (use standard widgets) to force to use Ttk widgets.
  Ttk widgets don't have some options of standard widgets which are 
  control the view of widgets. When set ignore-mode true, configure 
  method tries to ignoure such unknown options with no exception. 
  Of course, it may raise other troubles on the GUI design. 
  So, those are a little danger methods. 

* ext/tk/lib/tk/itemconfig.rb: __IGNORE_UNKNOWN_CONFIGURE_OPTION__ 
  method and __set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!(mode) method 
  are defind as module methods of TkItemConfigMethod as the same 
  purpose as TkConfigMethod's ones.

* ext/tk/sample/ttk_wrapper.rb: A new example. This is a tool for 
  wrapping old Ruby/Tk scripts (which use standard widgets) to use 
  Ttk (Tile) widgets as default.

* ext/tk/sample/tkextlib/tile/demo.rb: use ttk_instate/ttk_state 
  method instead of instate/state method.

* ext/tk/lib/tk/root, ext/tk/lib/tk/namespace.rb,
  ext/tk/lib/tk/text.rb, ext/tk/lib/tkextlib/*: some 'instance_eval's  
  are replaced to "instance_exec(self)".

* ext/tk/lib/tk/event.rb: bug fix on KEY_TBL and PROC_TBL (?x is not 
  a character code on Ruby1.9).

* ext/tk/lib/tk/variable.rb: support new style of operation argument 
  on Tcl/Tk's 'trace' command for variables. 

* ext/tk/sample/demos-jp/widget, ext/tk/sample/demos-en/widget: bug fix

* ext/tk/sammple/demos-jp/textpeer.rb, 
  ext/tk/sammple/demos-en/textpeer.rb: new widget demo.

* ext/tk/tcltklib.c: decrase SEGV troubles (probably)

* ext/tk/lib/tk.rb: remove Thread.critical access if Ruby1.9

* ext/tk/lib/tk/multi-tk.rb: support Ruby1.9 (probably)

* ext/tk/lib/tkextlib/tile.rb: add method to define Tcl/Tk command 
  to make Tcl/Tk theme sources (based on different version of Tile 
  extension) available. 
  (Tk::Tile::__define_LoadImages_proc_for_comaptibility__)

* ext/tk/lib/tk.rb, ext/tk/lib/tk/wm.rb: support dockable frames
  (Tcl/Tk8.5 feature). 'wm' command can treat many kinds of widgets 
  as toplevel widgets.

* ext/tk/lib/tkextlib/tile/style.rb: ditto.
  (Tk::Tile::Style.__define_wrapper_proc_for_compatibility__)

* ext/tk/lib/tk/font.rb: add actual_hash and metrics_hash to get 
  properties as a hash. metrics_hash method returns a boolean value 
  for 'fixed' option. But metrics method returns numeric value 
  (0 or 1) for 'fixed' option, because of backward compatibility. 

* ext/tk/lib/tk/timer.rb: somtimes fail to set callback procedure.

* ext/tk/lib/tk.rb: add Tk.sleep and Tk.wakeup method. Tk.sleep 
  doesn't block the eventloop. It will be better to use the method 
  in event callbacks.

* ext/tk/sample/tksleep_sample.rb: sample script about Tk.sleep.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-29 05:25:12 +00:00
..
doc.org
anilabel.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
aniwave.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
arrow.rb * ext/tk/*: full update Ruby/Tk to support Ruby(1.9|1.8) and Tc/Tk8.5. 2008-03-29 05:25:12 +00:00
bind.rb * ext/tk/*: full update Ruby/Tk to support Ruby(1.9|1.8) and Tc/Tk8.5. 2008-03-29 05:25:12 +00:00
bitmap.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
browse1
browse2
button.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
check.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
check2.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
clrpick.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
colors.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
cscroll.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
ctext.rb * ext/tk/*: full update Ruby/Tk to support Ruby(1.9|1.8) and Tc/Tk8.5. 2008-03-29 05:25:12 +00:00
dialog1.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
dialog2.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
entry1.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
entry2.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
entry3.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
filebox.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
floor.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
floor2.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
form.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
goldberg.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
hello * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
hscale.rb * ext/tk/*: full update Ruby/Tk to support Ruby(1.9|1.8) and Tc/Tk8.5. 2008-03-29 05:25:12 +00:00
icon.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
image1.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
image2.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
image3.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
items.rb * ext/tk/*: full update Ruby/Tk to support Ruby(1.9|1.8) and Tc/Tk8.5. 2008-03-29 05:25:12 +00:00
ixset
ixset2 * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
label.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
labelframe.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
menu.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
menu8x.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
menu84.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
menubu.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
msgbox.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
paned1.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
paned2.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
pendulum.rb Ruby/Tk :: provisional support on Ruby-VM and Tcl/Tk8.5. 2007-12-21 08:57:35 +00:00
plot.rb * ext/tk/*: full update Ruby/Tk to support Ruby(1.9|1.8) and Tc/Tk8.5. 2008-03-29 05:25:12 +00:00
puzzle.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
radio.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
radio2.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
radio3.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
README
README.1st
rmt
rolodex
rolodex-j * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
ruler.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
sayings.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
search.rb * ext/tk/*: full update Ruby/Tk to support Ruby(1.9|1.8) and Tc/Tk8.5. 2008-03-29 05:25:12 +00:00
spin.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
square
states.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
style.rb * ext/tk/*: full update Ruby/Tk to support Ruby(1.9|1.8) and Tc/Tk8.5. 2008-03-29 05:25:12 +00:00
tcolor * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
text.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
textpeer.rb * ext/tk/*: full update Ruby/Tk to support Ruby(1.9|1.8) and Tc/Tk8.5. 2008-03-29 05:25:12 +00:00
timer
twind.rb * ext/tk/*: full update Ruby/Tk to support Ruby(1.9|1.8) and Tc/Tk8.5. 2008-03-29 05:25:12 +00:00
twind2.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
unicodeout.rb * encoding.c: provide basic features for M17N. 2007-08-25 03:29:39 +00:00
vscale.rb * ext/tk/*: full update Ruby/Tk to support Ruby(1.9|1.8) and Tc/Tk8.5. 2008-03-29 05:25:12 +00:00
widget * ext/tk/*: full update Ruby/Tk to support Ruby(1.9|1.8) and Tc/Tk8.5. 2008-03-29 05:25:12 +00:00

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

  Ruby/Tk widget-demo 
                              version 1.2 ( 2000/04/08 )
                              永井@知能.九工大 (nagai@ai.kyutech.ac.jp)

標準配布の Tcl/Tk 拡張パッケージを取り込んだ Ruby (以下 Ruby/Tk と呼びます) 
ではTk widget を用いた GUI の作成を行うことができます.実際に GUI を作成
していく場合には様々な実例がサンプルとして存在すると便利なのですがRuby/Tk 
にはそのような適当なサンプルスクリプト集合は存在しませんでした.それに対し,
拡張パッケージの元である Tcl/Tk にはTk widget を用いてどのようなことがで
きるかを示すものとして widget-demo が存在しおりTcl/Tk を用いた GUI の作成
を習得する際の代表的サンプルとなっています本アーカイブはRuby/Tk の習得の
ための代表的なサンプルスクリプトとすべくTcl/Tk の widget-demo を移植したも
のです.

今回のバージョンは ruby-1.4.x に対応としておきますが,旧バージョンに比べて,
ほとんど変更はありませんruby-1.1c2 以上なら動くと思いますruby-1.5.x につ
いてはテストしていません.そのため,非互換の影響が出ることがあるかもしれませ
んが,その場合でも少しの修正で動かせると思います.組み込む Tk のバージョンは,
4.2 でも 8.0 でも修正なく動かせるはずです.ただし,日本語版での移植となって
いるため,日本語化された Tk をご利用ください.スクリプトのテストは,旧バージョ
ンの際に Tk4.2jp と Tk8.0jp の上で行っています (完璧にではないですが).今回
のバージョンでは ruby-1.4.x + Tk8.0jp 上での簡単なテストしか行っていませんが,
修正というほどの修正はしていませんので問題はないと考えています.

本アーカイブに含まれるスクリプトの多くは,元となっている Tcl/Tk 版に比較的近
いスクリプト記述となるようにしていますそのためRuby/Tk のサンプルと言うに
は,あまり Ruby らしくないとも言えるでしょう.にもかかわらず,そのような記述
を取っている理由はRuby/Tk のドキュメント不足にあります.

Tcl/Tk には適当な参考書が何冊か存在していますからRuby/Tk スクリプトを作成
する際は,そのような Tcl/Tk の参考書で情報を補いながら作成することになると思
います.各 widget の使用例としてTcl/Tk の widget-demo を参照することもある
でしょうRuby/Tk 版の記述を widget-demo を Tcl/Tk 版の記述に近いものにして
おけばその対比によってRuby/Tk の理解を早めることができると考えられます.
一旦 Ruby/Tk での 各 widget の使用方法を習得してしまえばRuby らしいスクリ
プトを作成することは難しくないでしょう本アーカイブのスクリプトはRuby/Tk 
を最初に習得するまでの踏台として利用していただければ幸いです.

widget-demo の移植にあたっては,次の方にも移植したスクリプトを提供していただ
きました.ここに感謝の意を表します.

    立石JAIST (ttate@jaist.ac.jp) さん 
    平松祥史 (hiramatu@cdrom.co.jp) さん

平松さんによる Ruby/Tk 入門の Web page (http://www.cdrom.co.jp/~hiramatu/) 
も Ruby/Tk の習得に有用と思えますので,ぜひご参照ください.

また,前橋 (maebashi@iij.ad.jp) さんをはじめとしてwidget-demo の移植に際し
て必要となった Ruby の Tk 関連ライブラリ修正について,問題点,バグの指摘をし
ていただいた方々にも感謝致します.

そして最後に最大の感謝を Ruby 設計者の まつもと ゆきひろ (matz@netlab.co.jp) 
さんに捧げたいと思います.