mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/tk/lib/tk.rb,ext/tk/lib/tk/grid.rb: Bug fix on grid_slaves().
Extend usage pattern of grid_column()/grid_row(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
436b2f887a
commit
556232734e
3 changed files with 41 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sat Jul 18 07:06:31 2009 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
|
* ext/tk/lib/tk.rb,ext/tk/lib/tk/grid.rb: Bug fix on grid_slaves().
|
||||||
|
Extend usage pattern of grid_column()/grid_row().
|
||||||
|
|
||||||
Sat Jul 18 06:30:35 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
Sat Jul 18 06:30:35 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* include/ruby/win32.h: include winsock headers in extern "C++" for
|
* include/ruby/win32.h: include winsock headers in extern "C++" for
|
||||||
|
|
|
@ -5265,14 +5265,12 @@ class TkWindow<TkObject
|
||||||
TkGrid.columnconfigure(self, index, keys)
|
TkGrid.columnconfigure(self, index, keys)
|
||||||
end
|
end
|
||||||
alias grid_columnconfigure grid_columnconfig
|
alias grid_columnconfigure grid_columnconfig
|
||||||
alias grid_column grid_columnconfig
|
|
||||||
|
|
||||||
def grid_rowconfig(index, keys)
|
def grid_rowconfig(index, keys)
|
||||||
#tk_call('grid', 'rowconfigure', epath, index, *hash_kv(keys))
|
#tk_call('grid', 'rowconfigure', epath, index, *hash_kv(keys))
|
||||||
TkGrid.rowconfigure(self, index, keys)
|
TkGrid.rowconfigure(self, index, keys)
|
||||||
end
|
end
|
||||||
alias grid_rowconfigure grid_rowconfig
|
alias grid_rowconfigure grid_rowconfig
|
||||||
alias grid_row grid_rowconfig
|
|
||||||
|
|
||||||
def grid_columnconfiginfo(index, slot=nil)
|
def grid_columnconfiginfo(index, slot=nil)
|
||||||
#if slot
|
#if slot
|
||||||
|
@ -5302,6 +5300,22 @@ class TkWindow<TkObject
|
||||||
TkGrid.rowconfiginfo(self, index, slot)
|
TkGrid.rowconfiginfo(self, index, slot)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def grid_column(index, keys=nil)
|
||||||
|
if keys.kind_of?(Hash)
|
||||||
|
grid_columnconfigure(index, keys)
|
||||||
|
else
|
||||||
|
grid_columnconfiginfo(index, keys)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def grid_row(index, keys=nil)
|
||||||
|
if keys.kind_of?(Hash)
|
||||||
|
grid_rowconfigure(index, keys)
|
||||||
|
else
|
||||||
|
grid_rowconfiginfo(index, keys)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def grid_info()
|
def grid_info()
|
||||||
#list(tk_call('grid', 'info', epath))
|
#list(tk_call('grid', 'info', epath))
|
||||||
TkGrid.info(self)
|
TkGrid.info(self)
|
||||||
|
@ -5338,9 +5352,9 @@ class TkWindow<TkObject
|
||||||
TkGrid.size(self)
|
TkGrid.size(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
def grid_slaves(args)
|
def grid_slaves(keys = nil)
|
||||||
#list(tk_call('grid', 'slaves', epath, *hash_kv(args)))
|
#list(tk_call('grid', 'slaves', epath, *hash_kv(args)))
|
||||||
TkGrid.slaves(self, args)
|
TkGrid.slaves(self, keys)
|
||||||
end
|
end
|
||||||
|
|
||||||
def place(keys)
|
def place(keys)
|
||||||
|
@ -5639,7 +5653,7 @@ TkWidget = TkWindow
|
||||||
#Tk.freeze
|
#Tk.freeze
|
||||||
|
|
||||||
module Tk
|
module Tk
|
||||||
RELEASE_DATE = '2009-07-16'.freeze
|
RELEASE_DATE = '2009-07-18'.freeze
|
||||||
|
|
||||||
autoload :AUTO_PATH, 'tk/variable'
|
autoload :AUTO_PATH, 'tk/variable'
|
||||||
autoload :TCL_PACKAGE_PATH, 'tk/variable'
|
autoload :TCL_PACKAGE_PATH, 'tk/variable'
|
||||||
|
|
|
@ -104,14 +104,12 @@ module TkGrid
|
||||||
tk_call_without_enc("grid", 'columnconfigure',
|
tk_call_without_enc("grid", 'columnconfigure',
|
||||||
master, index, *hash_kv(args))
|
master, index, *hash_kv(args))
|
||||||
end
|
end
|
||||||
alias column columnconfigure
|
|
||||||
|
|
||||||
def rowconfigure(master, index, args)
|
def rowconfigure(master, index, args)
|
||||||
# master = master.epath if master.kind_of?(TkObject)
|
# master = master.epath if master.kind_of?(TkObject)
|
||||||
master = _epath(master)
|
master = _epath(master)
|
||||||
tk_call_without_enc("grid", 'rowconfigure', master, index, *hash_kv(args))
|
tk_call_without_enc("grid", 'rowconfigure', master, index, *hash_kv(args))
|
||||||
end
|
end
|
||||||
alias row rowconfigure
|
|
||||||
|
|
||||||
def columnconfiginfo(master, index, slot=nil)
|
def columnconfiginfo(master, index, slot=nil)
|
||||||
# master = master.epath if master.kind_of?(TkObject)
|
# master = master.epath if master.kind_of?(TkObject)
|
||||||
|
@ -171,6 +169,22 @@ module TkGrid
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def column(master, index, keys=nil)
|
||||||
|
if keys.kind_of?(Hash)
|
||||||
|
columnconfigure(master, index, keys)
|
||||||
|
else
|
||||||
|
columnconfiginfo(master, index, keys)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def row(master, index, keys=nil)
|
||||||
|
if keys.kind_of?(Hash)
|
||||||
|
rowconfigure(master, index, keys)
|
||||||
|
else
|
||||||
|
rowconfiginfo(master, index, keys)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def add(widget, *args)
|
def add(widget, *args)
|
||||||
configure(widget, *args)
|
configure(widget, *args)
|
||||||
end
|
end
|
||||||
|
@ -228,7 +242,7 @@ module TkGrid
|
||||||
list(tk_call_without_enc('grid', 'size', master))
|
list(tk_call_without_enc('grid', 'size', master))
|
||||||
end
|
end
|
||||||
|
|
||||||
def slaves(master, args)
|
def slaves(master, keys=nil)
|
||||||
# master = master.epath if master.kind_of?(TkObject)
|
# master = master.epath if master.kind_of?(TkObject)
|
||||||
master = _epath(master)
|
master = _epath(master)
|
||||||
list(tk_call_without_enc('grid', 'slaves', master, *hash_kv(args)))
|
list(tk_call_without_enc('grid', 'slaves', master, *hash_kv(args)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue