2
# tk/pack.rb : control pack geometry manager
10
TkCommandNames = ['pack'.freeze].freeze
12
def configure(win, *args)
13
if args[-1].kind_of?(Hash)
19
# params.push((win.kind_of?(TkObject))? win.epath: win)
20
params.push(_epath(win))
22
# params.push((win.kind_of?(TkObject))? win.epath: win)
23
params.push(_epath(win))
27
# params.push((v.kind_of?(TkObject))? v.epath: v)
28
params.push(_epath(v))
30
tk_call_without_enc("pack", 'configure', *params)
35
return '' if args.size == 0
36
wins = args.collect{|win|
37
# (win.kind_of?(TkObject))? win.epath: win
40
tk_call_without_enc('pack', 'forget', *wins)
44
# slave = slave.epath if slave.kind_of?(TkObject)
46
ilist = list(tk_call_without_enc('pack', 'info', slave))
48
while key = ilist.shift
49
info[key[1..-1]] = ilist.shift
54
def propagate(master, mode=None)
55
# master = master.epath if master.kind_of?(TkObject)
56
master = _epath(master)
58
bool(tk_call_without_enc('pack', 'propagate', master))
60
tk_call_without_enc('pack', 'propagate', master, mode)
65
# master = master.epath if master.kind_of?(TkObject)
66
master = _epath(master)
67
list(tk_call_without_enc('pack', 'slaves', master))
70
module_function :pack, :configure, :forget, :info, :propagate, :slaves
73
def TkPack(win, *args)
74
if args[-1].kind_of?(Hash)
80
params.push((win.kind_of?(TkObject))? win.epath: win)
82
params.push((win.kind_of?(TkObject))? win.epath: win)
86
params.push((v.kind_of?(TkObject))? v.epath: v)
88
tk_call_without_enc("pack", *params)