add(widget, *args)
click to toggle source
def add(widget, *args)
configure(widget, *args)
end
anchor(master, anchor=None)
click to toggle source
def anchor(master, anchor=None)
master = _epath(master)
tk_call_without_enc('grid', 'anchor', master, anchor)
end
bbox(master, *args)
click to toggle source
def bbox(master, *args)
master = _epath(master)
args.unshift(master)
list(tk_call_without_enc('grid', 'bbox', *args))
end
column(master, index, keys=nil)
click to toggle source
def column(master, index, keys=nil)
if keys.kind_of?(Hash)
columnconfigure(master, index, keys)
else
columnconfiginfo(master, index, keys)
end
end
columnconfiginfo(master, index, slot=nil)
click to toggle source
def columnconfiginfo(master, index, slot=nil)
master = _epath(master)
if slot
case slot
when 'uniform', :uniform
tk_call_without_enc('grid', 'columnconfigure',
master, index, "-#{slot}")
else
num_or_str(tk_call_without_enc('grid', 'columnconfigure',
master, index, "-#{slot}"))
end
else
ilist = simplelist(tk_call_without_enc('grid', 'columnconfigure',
master, index))
info = {}
while key = ilist.shift
case key
when 'uniform'
info[key[1..-1]] = ilist.shift
else
info[key[1..-1]] = tk_tcl2ruby(ilist.shift)
end
end
info
end
end
forget(*args)
click to toggle source
def forget(*args)
return '' if args.size == 0
wins = args.collect{|win|
_epath(win)
}
tk_call_without_enc('grid', 'forget', *wins)
end
grid(*args)
click to toggle source
info(slave)
click to toggle source
def info(slave)
slave = _epath(slave)
ilist = simplelist(tk_call_without_enc('grid', 'info', slave))
info = {}
while key = ilist.shift
info[key[1..-1]] = tk_tcl2ruby(ilist.shift)
end
return info
end
location(master, x, y)
click to toggle source
def location(master, x, y)
master = _epath(master)
list(tk_call_without_enc('grid', 'location', master, x, y))
end
propagate(master, mode=None)
click to toggle source
def propagate(master, mode=None)
master = _epath(master)
if mode == None
bool(tk_call_without_enc('grid', 'propagate', master))
else
tk_call_without_enc('grid', 'propagate', master, mode)
end
end
remove(*args)
click to toggle source
def remove(*args)
return '' if args.size == 0
wins = args.collect{|win|
_epath(win)
}
tk_call_without_enc('grid', 'remove', *wins)
end
row(master, index, keys=nil)
click to toggle source
def row(master, index, keys=nil)
if keys.kind_of?(Hash)
rowconfigure(master, index, keys)
else
rowconfiginfo(master, index, keys)
end
end
rowconfiginfo(master, index, slot=nil)
click to toggle source
def rowconfiginfo(master, index, slot=nil)
master = _epath(master)
if slot
case slot
when 'uniform', :uniform
tk_call_without_enc('grid', 'rowconfigure',
master, index, "-#{slot}")
else
num_or_str(tk_call_without_enc('grid', 'rowconfigure',
master, index, "-#{slot}"))
end
else
ilist = simplelist(tk_call_without_enc('grid', 'rowconfigure',
master, index))
info = {}
while key = ilist.shift
case key
when 'uniform'
info[key[1..-1]] = ilist.shift
else
info[key[1..-1]] = tk_tcl2ruby(ilist.shift)
end
end
info
end
end
size(master)
click to toggle source
def size(master)
master = _epath(master)
list(tk_call_without_enc('grid', 'size', master))
end
slaves(master, keys=nil)
click to toggle source
def slaves(master, keys=nil)
master = _epath(master)
list(tk_call_without_enc('grid', 'slaves', master, *hash_kv(args)))
end