* 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:
nagai 2009-07-12 23:09:52 +00:00
parent 4e94c36f3d
commit 41b74c6e20
535 changed files with 16499 additions and 10067 deletions

View file

@ -7,7 +7,7 @@
# based on "Id: ttkbut.tcl,v 1.4 2007/12/13 15:27:07 dgp Exp"
if defined?($ttkbut_demo) && $ttkbut_demo
$ttkbut_demo.destroy
$ttkbut_demo.destroy
$ttkbut_demo = nil
end
@ -19,7 +19,7 @@ $ttkbut_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($ttkbut_demo).pack(:fill=>:both, :expand=>true)
Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left,
Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left,
:text=><<EOL).pack(:side=>:top, :fill=>:x)
Ttk is the new Tk themed widget set. This is a Ttk themed label, \
and below are three groups of Ttk widgets in Ttk labelframes. \
@ -34,11 +34,11 @@ EOL
## Add buttons for setting the theme
buttons = Ttk::Labelframe.new(base_frame, :text=>'Buttons')
# Ttk::Style.theme_names.each{|theme|
# Ttk::Button.new(buttons, :text=>theme,
# Ttk::Button.new(buttons, :text=>theme,
# :command=>proc{Ttk::Style.theme_use theme}).pack(:pady=>2)
# }
Ttk.themes.each{|theme|
Ttk::Button.new(buttons, :text=>theme,
Ttk::Button.new(buttons, :text=>theme,
:command=>proc{Ttk.set_theme theme}).pack(:pady=>2)
}
@ -62,9 +62,9 @@ end
## Set up the checkbutton group
checks = Ttk::Labelframe.new(base_frame, :text=>'Checkbuttons')
enabled = TkVariable.new(true)
e = Ttk::Checkbutton.new(checks, :text=>'Enabled', :variable=>enabled,
e = Ttk::Checkbutton.new(checks, :text=>'Enabled', :variable=>enabled,
:command=>proc{
setState($ttkbut_demo,
setState($ttkbut_demo,
((enabled.bool)? "!disabled" : "disabled"),
e)
})
@ -90,15 +90,15 @@ radios = Ttk::Labelframe.new(base_frame, :text=>'Radiobuttons')
happyness = TkVariable.new
r1 = Ttk::Radiobutton.new(radios, :variable=>happyness,
r1 = Ttk::Radiobutton.new(radios, :variable=>happyness,
:text=>'Great', :value=>'great')
r2 = Ttk::Radiobutton.new(radios, :variable=>happyness,
r2 = Ttk::Radiobutton.new(radios, :variable=>happyness,
:text=>'Good', :value=>'good')
r3 = Ttk::Radiobutton.new(radios, :variable=>happyness,
r3 = Ttk::Radiobutton.new(radios, :variable=>happyness,
:text=>'Ok', :value=>'ok')
r4 = Ttk::Radiobutton.new(radios, :variable=>happyness,
r4 = Ttk::Radiobutton.new(radios, :variable=>happyness,
:text=>'Poor', :value=>'poor')
r5 = Ttk::Radiobutton.new(radios, :variable=>happyness,
r5 = Ttk::Radiobutton.new(radios, :variable=>happyness,
:text=>'Awful', :value=>'awful')
Tk.pack(r1, r2, r3, r4, r5, :fill=>:x, :padx=>3, :pady=>2)
@ -107,26 +107,26 @@ Tk.pack(r1, r2, r3, r4, r5, :fill=>:x, :padx=>3, :pady=>2)
Ttk::Frame.new(base_frame) {|frame|
sep = Ttk::Separator.new(frame)
Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
TkGrid('x',
Ttk::Button.new(frame, :text=>'See Variables',
:image=>$image['view'], :compound=>:left,
TkGrid('x',
Ttk::Button.new(frame, :text=>'See Variables',
:image=>$image['view'], :compound=>:left,
:command=>proc{
showVars(base_frame, ['enabled', enabled],
['cheese', cheese], ['tomato', tomato],
['basil', basil], ['oregano', oregano],
showVars(base_frame, ['enabled', enabled],
['cheese', cheese], ['tomato', tomato],
['basil', basil], ['oregano', oregano],
['happyness', happyness])
}),
Ttk::Button.new(frame, :text=>'See Code',
:image=>$image['view'], :compound=>:left,
:command=>proc{showCode 'ttkbut'}),
Ttk::Button.new(frame, :text=>'Dismiss',
:image=>$image['delete'], :compound=>:left,
}),
Ttk::Button.new(frame, :text=>'See Code',
:image=>$image['view'], :compound=>:left,
:command=>proc{showCode 'ttkbut'}),
Ttk::Button.new(frame, :text=>'Dismiss',
:image=>$image['delete'], :compound=>:left,
:command=>proc{
tmppath = $ttkbut_demo
$ttkbut_demo = nil
$showVarsWin[tmppath.path] = nil
tmppath.destroy
}),
}),
:padx=>4, :pady=>4)
grid_columnconfigure(0, :weight=>1)
pack(:side=>:bottom, :fill=>:x, :expand=>true)