mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 17:43:59 +02:00
* ext/tk/extconf.rb: New strategy for searching Tcl/Tk libraries.
* ext/tk/*: Support new features of Tcl/Tk8.6b1 and minor bug fixes. ( [KNOWN BUG] Ruby/Tk on Ruby 1.9 will not work on Cygwin. ) * ext/tk/*: Unify sources between Ruby 1.8 & 1.9. Improve default_widget_set handling. * ext/tk/*: Multi-TkInterpreter (multi-tk.rb) works on Ruby 1.8 & 1.9. ( [KNOWN BUG] On Ruby 1.8, join to a long term Thread on Tk callbacks may freeze. On Ruby 1.9, cannot create a second master interpreter (creating slaves are OK); supported master interpreter is the default master interpreter only. ) * ext/tk/lib/tkextlib/*: Update supported versions of Tk extensions. Tcllib 1.8/Tklib 0.4.1 ==> Tcllib 1.11.1/Tklib 0.5 BWidgets 1.7 ==> BWidgets 1.8 TkTable 2.9 ==> TkTable 2.10 TkTreeCtrl 2005-12-02 ==> TkTreeCtrl 2.2.9 Tile 0.8.0/8.5.1 ==> Tile 0.8.3/8.6b1 IncrTcl 2005-02-14 ==> IncrTcl 2008-12-15 TclX 2005-02-07 ==> TclX 2008-12-15 Trofs 0.4.3 ==> Trofs 0.4.4 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@24064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4e94c36f3d
commit
41b74c6e20
535 changed files with 16499 additions and 10067 deletions
|
@ -6,7 +6,7 @@
|
|||
# based on Tcl/Tk8.4.4 widget demos
|
||||
|
||||
if defined?($unicodeout_demo) && $unicodeout_demo
|
||||
$unicodeout_demo.destroy
|
||||
$unicodeout_demo.destroy
|
||||
$unicodeout_demo = nil
|
||||
end
|
||||
|
||||
|
@ -18,8 +18,8 @@ $unicodeout_demo = TkToplevel.new {|w|
|
|||
|
||||
base_frame = TkFrame.new($unicodeout_demo).pack(:fill=>:both, :expand=>true)
|
||||
|
||||
TkLabel.new(base_frame,
|
||||
:font=>$font, :wraplength=>'5.4i', :justify=>:left,
|
||||
TkLabel.new(base_frame,
|
||||
:font=>$font, :wraplength=>'5.4i', :justify=>:left,
|
||||
:text=><<EOL).pack(:side=>:top)
|
||||
This is a sample of Tk's support for languages that use non-Western \
|
||||
character sets. However, what you will actually see below depends \
|
||||
|
@ -32,10 +32,10 @@ the definition of @@font on the Unicodeout_SampleFrame class.
|
|||
The strings are written in Tcl using UNICODE characters \
|
||||
using the \\uXXXX escape so as to do so in a portable fashion.
|
||||
|
||||
ATTENTION:
|
||||
ATTENTION:
|
||||
The strings are converted to the encoded string objects \
|
||||
(completed to rewrite Tcl's escapes) by Tk::UTF8_String method. \
|
||||
And the Tk::UTF8_String objects are passed to the label widgets.
|
||||
And the Tk::UTF8_String objects are passed to the label widgets.
|
||||
EOL
|
||||
|
||||
TkFrame.new(base_frame){|f|
|
||||
|
@ -51,8 +51,8 @@ TkFrame.new(base_frame){|f|
|
|||
}).pack(:side=>:left, :expand=>true)
|
||||
}
|
||||
|
||||
wait_msg = TkLabel.new(base_frame,
|
||||
:text=>"Please wait while loading fonts...",
|
||||
wait_msg = TkLabel.new(base_frame,
|
||||
:text=>"Please wait while loading fonts...",
|
||||
:font=>"Helvetica 12 italic").pack
|
||||
|
||||
class Unicodeout_SampleFrame < TkFrame
|
||||
|
@ -72,10 +72,10 @@ class Unicodeout_SampleFrame < TkFrame
|
|||
|
||||
def add_sample(lang, *args)
|
||||
sample_txt = Tk::UTF8_String(args.join(''))
|
||||
l = TkLabel.new(self, :font=>@@font, :text=>lang+':',
|
||||
l = TkLabel.new(self, :font=>@@font, :text=>lang+':',
|
||||
:anchor=>:nw, :pady=>0)
|
||||
#s = TkLabel.new(self, :font=>@@font, :text=>sample_txt,
|
||||
s = TkLabel.new(self, :font=>TkFont.new(@@font), :text=>sample_txt,
|
||||
#s = TkLabel.new(self, :font=>@@font, :text=>sample_txt,
|
||||
s = TkLabel.new(self, :font=>TkFont.new(@@font), :text=>sample_txt,
|
||||
:anchor=>:nw, :width=>30, :pady=>0)
|
||||
Tk.grid(l, s, :sticky=>:ew, :pady=>0)
|
||||
l.grid_config(:padx, '1m')
|
||||
|
@ -91,23 +91,23 @@ oldCursor = $unicodeout_demo.cursor
|
|||
$unicodeout_demo.cursor('watch')
|
||||
Tk.update
|
||||
|
||||
f.add_sample('Arabic',
|
||||
'\uFE94\uFEF4\uFE91\uFEAE\uFECC\uFEDF\uFE8D\uFE94',
|
||||
f.add_sample('Arabic',
|
||||
'\uFE94\uFEF4\uFE91\uFEAE\uFECC\uFEDF\uFE8D\uFE94',
|
||||
'\uFEE4\uFEE0\uFEDC\uFEDF\uFE8D')
|
||||
f.add_sample('Trad. Chinese', '\u4E2D\u570B\u7684\u6F22\u5B57')
|
||||
f.add_sample('Simpl. Chinese', '\u6C49\u8BED')
|
||||
f.add_sample('Greek',
|
||||
'\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AE ',
|
||||
f.add_sample('Greek',
|
||||
'\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AE ',
|
||||
'\u03B3\u03BB\u03CE\u03C3\u03C3\u03B1')
|
||||
f.add_sample('Hebrew',
|
||||
'\u05DD\u05D9\u05DC\u05E9\u05D5\u05E8\u05D9 ',
|
||||
f.add_sample('Hebrew',
|
||||
'\u05DD\u05D9\u05DC\u05E9\u05D5\u05E8\u05D9 ',
|
||||
'\u05DC\u05D9\u05D0\u05E8\u05E9\u05D9')
|
||||
f.add_sample('Japanese',
|
||||
'\u65E5\u672C\u8A9E\u306E\u3072\u3089\u304C\u306A, ',
|
||||
f.add_sample('Japanese',
|
||||
'\u65E5\u672C\u8A9E\u306E\u3072\u3089\u304C\u306A, ',
|
||||
'\u6F22\u5B57\u3068\u30AB\u30BF\u30AB\u30CA')
|
||||
f.add_sample('Korean', '\uB300\uD55C\uBBFC\uAD6D\uC758 \uD55C\uAE00')
|
||||
f.add_sample('Russian',
|
||||
'\u0420\u0443\u0441\u0441\u043A\u0438\u0439 ',
|
||||
f.add_sample('Russian',
|
||||
'\u0420\u0443\u0441\u0441\u043A\u0438\u0439 ',
|
||||
'\u044F\u0437\u044B\u043A')
|
||||
|
||||
wait_msg.destroy
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue