Methods
A
C
D
F
G
I
M
O
P
R
S
T
W
Constants
TkCommandNames = ['wm'.freeze].freeze
 
TOPLEVEL_METHODCALL_OPTKEYS = {}
 
Class Public methods
aspect(win, *args)
# File ext/tk/lib/tk/wm.rb, line 15
def Wm.aspect(win, *args)
  if args.length == 0
    list(tk_call_without_enc('wm', 'aspect', win.epath))
  else
    args = args[0] if args.length == 1 && args[0].kind_of?(Array)
    tk_call('wm', 'aspect', win.epath, *args)
    win
  end
end
attributes(win, slot=nil,value=TkComm::None)
# File ext/tk/lib/tk/wm.rb, line 30
def Wm.attributes(win, slot=nil,value=TkComm::None)
  if slot == nil
    lst = tk_split_list(tk_call('wm', 'attributes', win.epath))
    info = {}
    while key = lst.shift
      info[key[1..-1]] = lst.shift
    end
    info
  elsif slot.kind_of? Hash
    tk_call('wm', 'attributes', win.epath, *hash_kv(slot))
    win
  elsif value == TkComm::None
    tk_call('wm', 'attributes', win.epath, "-#{slot}")
  else
    tk_call('wm', 'attributes', win.epath, "-#{slot}", value)
    win
  end
end
client(win, name=TkComm::None)
# File ext/tk/lib/tk/wm.rb, line 54
def Wm.client(win, name=TkComm::None)
  if name == TkComm::None
    tk_call('wm', 'client', win.epath)
  else
    name = '' if name == nil
    tk_call('wm', 'client', win.epath, name)
    win
  end
end
colormapwindows(win, *args)
# File ext/tk/lib/tk/wm.rb, line 69
def Wm.colormapwindows(win, *args)
  if args.size == 0
    list(tk_call_without_enc('wm', 'colormapwindows', win.epath))
  else
    args = args[0] if args.length == 1 && args[0].kind_of?(Array)
    tk_call_without_enc('wm', 'colormapwindows', win.epath, *args)
    win
  end
end
command(win, value=nil)
# File ext/tk/lib/tk/wm.rb, line 84
def Wm.command(win, value=nil)
  if value
    tk_call('wm', 'command', win.epath, value)
    win
  else
    #procedure(tk_call('wm', 'command', win.epath))
    tk_call('wm', 'command', win.epath)
  end
end
deiconify(win, ex = true)
# File ext/tk/lib/tk/wm.rb, line 98
def Wm.deiconify(win, ex = true)
  if ex
    tk_call_without_enc('wm', 'deiconify', win.epath)
  else
    Wm.iconify(win)
  end
  win
end
focusmodel(win, mode = nil)
# File ext/tk/lib/tk/wm.rb, line 111
def Wm.focusmodel(win, mode = nil)
  if mode
    tk_call_without_enc('wm', 'focusmodel', win.epath, mode)
    win
  else
    tk_call_without_enc('wm', 'focusmodel', win.epath)
  end
end
forget(win)
# File ext/tk/lib/tk/wm.rb, line 125
def Wm.forget(win)
  # Tcl/Tk 8.5+
  # work with dockable frames
  tk_call_without_enc('wm', 'forget', win.epath)
  win
end
frame(win)
# File ext/tk/lib/tk/wm.rb, line 135
def Wm.frame(win)
  tk_call_without_enc('wm', 'frame', win.epath)
end
geometry(win, geom=nil)
# File ext/tk/lib/tk/wm.rb, line 143
def Wm.geometry(win, geom=nil)
  if geom
    tk_call_without_enc('wm', 'geometry', win.epath, geom)
    win
  else
    tk_call_without_enc('wm', 'geometry', win.epath)
  end
end
grid(win, *args)
# File ext/tk/lib/tk/wm.rb, line 157
def Wm.grid(win, *args)
  if args.size == 0
    list(tk_call_without_enc('wm', 'grid', win.epath))
  else
    args = args[0] if args.length == 1 && args[0].kind_of?(Array)
    tk_call_without_enc('wm', 'grid', win.epath, *args)
    win
  end
end
group(win, leader = nil)
# File ext/tk/lib/tk/wm.rb, line 171
def Wm.group(win, leader = nil)
  if leader
    tk_call('wm', 'group', win.epath, leader)
    win
  else
    window(tk_call('wm', 'group', win.epath))
  end
end
iconbitmap(win, bmp=nil)
# File ext/tk/lib/tk/wm.rb, line 185
def Wm.iconbitmap(win, bmp=nil)
  if bmp
    tk_call_without_enc('wm', 'iconbitmap', win.epath, bmp)
    win
  else
    image_obj(tk_call_without_enc('wm', 'iconbitmap', win.epath))
  end
end
iconify(win, ex = true)
# File ext/tk/lib/tk/wm.rb, line 228
def Wm.iconify(win, ex = true)
  if ex
    tk_call_without_enc('wm', 'iconify', win.epath)
  else
    Wm.deiconify(win)
  end
  win
end
iconmask(win, bmp=nil)
# File ext/tk/lib/tk/wm.rb, line 241
def Wm.iconmask(win, bmp=nil)
  if bmp
    tk_call_without_enc('wm', 'iconmask', win.epath, bmp)
    win
  else
    image_obj(tk_call_without_enc('wm', 'iconmask', win.epath))
  end
end
iconname(win, name=nil)
# File ext/tk/lib/tk/wm.rb, line 255
def Wm.iconname(win, name=nil)
  if name
    tk_call('wm', 'iconname', win.epath, name)
    win
  else
    tk_call('wm', 'iconname', win.epath)
  end
end
iconphoto(win, *imgs)
# File ext/tk/lib/tk/wm.rb, line 199
def Wm.iconphoto(win, *imgs)
  if imgs.empty?
    win.instance_eval{
      @wm_iconphoto = nil unless defined? @wm_iconphoto
      return @wm_iconphoto
    }
  end

  imgs = imgs[0] if imgs.length == 1 && imgs[0].kind_of?(Array)
  tk_call_without_enc('wm', 'iconphoto', win.epath, *imgs)
  win.instance_eval{ @wm_iconphoto = imgs  }
  win
end
iconphoto_default(win, *imgs)
# File ext/tk/lib/tk/wm.rb, line 218
def Wm.iconphoto_default(win, *imgs)
  imgs = imgs[0] if imgs.length == 1 && imgs[0].kind_of?(Array)
  tk_call_without_enc('wm', 'iconphoto', win.epath, '-default', *imgs)
  win
end
iconposition(win, *args)
# File ext/tk/lib/tk/wm.rb, line 269
def Wm.iconposition(win, *args)
  if args.size == 0
    list(tk_call_without_enc('wm', 'iconposition', win.epath))
  else
    args = args[0] if args.length == 1 && args[0].kind_of?(Array)
    tk_call_without_enc('wm', 'iconposition', win.epath, *args)
    win
  end
end
iconwindow(win, iconwin = nil)
# File ext/tk/lib/tk/wm.rb, line 284
def Wm.iconwindow(win, iconwin = nil)
  if iconwin
    tk_call_without_enc('wm', 'iconwindow', win.epath, iconwin)
    win
  else
    w = tk_call_without_enc('wm', 'iconwindow', win.epath)
    (w == '')? nil: window(w)
  end
end
manage(win)
# File ext/tk/lib/tk/wm.rb, line 299
def Wm.manage(win)
  # Tcl/Tk 8.5+ feature
  tk_call_without_enc('wm', 'manage', win.epath)
  win
end
maxsize(win, *args)

def ::manage(win, use_id = nil)

# Tcl/Tk 8.5+ feature
# --------------------------------------------------------------
# In the future release, I want to support to embed the 'win'
# into the container which has window-id 'use-id'.
# It may give users frexibility on controlling their GUI.
# However, it may be difficult for current Tcl/Tk (Tcl/Tk8.5.1),
# because it seems to require to modify Tcl/Tk's source code.
# --------------------------------------------------------------
if use_id
  tk_call_without_enc('wm', 'manage', win.epath, '-use', use_id)
else
  tk_call_without_enc('wm', 'manage', win.epath)
end
win

end

# File ext/tk/lib/tk/wm.rb, line 326
def Wm.maxsize(win, *args)
  if args.size == 0
    list(tk_call_without_enc('wm', 'maxsize', win.epath))
  else
    args = args[0] if args.length == 1 && args[0].kind_of?(Array)
    tk_call_without_enc('wm', 'maxsize', win.epath, *args)
    win
  end
end
minsize(win, *args)
# File ext/tk/lib/tk/wm.rb, line 341
def Wm.minsize(win, *args)
  if args.size == 0
    list(tk_call_without_enc('wm', 'minsize', win.epath))
  else
    args = args[0] if args.length == 1 && args[0].kind_of?(Array)
    tk_call_without_enc('wm', 'minsize', win.path, *args)
    win
  end
end
overrideredirect(win, mode=TkComm::None)
# File ext/tk/lib/tk/wm.rb, line 356
def Wm.overrideredirect(win, mode=TkComm::None)
  if mode == TkComm::None
    bool(tk_call_without_enc('wm', 'overrideredirect', win.epath))
  else
    tk_call_without_enc('wm', 'overrideredirect', win.epath, mode)
    win
  end
end
positionfrom(win, who=TkComm::None)
# File ext/tk/lib/tk/wm.rb, line 370
def Wm.positionfrom(win, who=TkComm::None)
  if who == TkComm::None
    r = tk_call_without_enc('wm', 'positionfrom', win.epath)
    (r == "")? nil: r
  else
    tk_call_without_enc('wm', 'positionfrom', win.epath, who)
    win
  end
end
protocol(win, name=nil, cmd=nil, &b)
# File ext/tk/lib/tk/wm.rb, line 385
def Wm.protocol(win, name=nil, cmd=nil, &b)
  if cmd
    tk_call_without_enc('wm', 'protocol', win.epath, name, cmd)
    win
  elsif b
    tk_call_without_enc('wm', 'protocol', win.epath, name, proc(&b))
    win
  elsif name
    result = tk_call_without_enc('wm', 'protocol', win.epath, name)
    (result == "")? nil : tk_tcl2ruby(result)
  else
    tk_split_simplelist(tk_call_without_enc('wm', 'protocol', win.epath))
  end
end
protocols(win, kv=nil)
# File ext/tk/lib/tk/wm.rb, line 404
def Wm.protocols(win, kv=nil)
  unless kv
    ret = {}
    Wm.protocol(win).each{|name|
      ret[name] = Wm.protocol(win, name)
    }
    return ret
  end

  unless kv.kind_of?(Hash)
    fail ArgumentError, 'expect a hash of protocol=>command'
  end
  kv.each{|k, v| Wm.protocol(win, k, v)}
  win
end
resizable(win, *args)
# File ext/tk/lib/tk/wm.rb, line 425
def Wm.resizable(win, *args)
  if args.length == 0
    list(tk_call_without_enc('wm', 'resizable', win.epath)).map!{|e| bool(e)}
  else
    args = args[0] if args.length == 1 && args[0].kind_of?(Array)
    tk_call_without_enc('wm', 'resizable', win.epath, *args)
    win
  end
end
sizefrom(win, who=TkComm::None)
# File ext/tk/lib/tk/wm.rb, line 440
def Wm.sizefrom(win, who=TkComm::None)
  if who == TkComm::None
    r = tk_call_without_enc('wm', 'sizefrom', win.epath)
    (r == "")? nil: r
  else
    tk_call_without_enc('wm', 'sizefrom', win.epath, who)
    win
  end
end
stackorder(win)
# File ext/tk/lib/tk/wm.rb, line 455
def Wm.stackorder(win)
  list(tk_call('wm', 'stackorder', win.epath))
end
stackorder_is_above(win, target)
# File ext/tk/lib/tk/wm.rb, line 466
def Wm.stackorder_is_above(win, target)
  Wm.stackorder_isabove(win, target)
end
stackorder_is_below(win, target)
# File ext/tk/lib/tk/wm.rb, line 479
def Wm.stackorder_is_below(win, target)
  Wm.stackorder_isbelow(win, target)
end
stackorder_isabove(win, target)
# File ext/tk/lib/tk/wm.rb, line 463
def Wm.stackorder_isabove(win, target)
  bool(tk_call('wm', 'stackorder', win.epath, 'isabove', target))
end
stackorder_isbelow(win, target)
# File ext/tk/lib/tk/wm.rb, line 476
def Wm.stackorder_isbelow(win, target)
  bool(tk_call('wm', 'stackorder', win.epath, 'isbelow', target))
end
state(win, st=nil)
# File ext/tk/lib/tk/wm.rb, line 489
def Wm.state(win, st=nil)
  if st
    tk_call_without_enc('wm', 'state', win.epath, st)
    win
  else
    tk_call_without_enc('wm', 'state', win.epath)
  end
end
title(win, str=nil)
# File ext/tk/lib/tk/wm.rb, line 503
def Wm.title(win, str=nil)
  if str
    tk_call('wm', 'title', win.epath, str)
    win
  else
    tk_call('wm', 'title', win.epath)
  end
end
transient(win, master=nil)
# File ext/tk/lib/tk/wm.rb, line 517
def Wm.transient(win, master=nil)
  if master
    tk_call_without_enc('wm', 'transient', win.epath, master)
    win
  else
    window(tk_call_without_enc('wm', 'transient', win.epath))
  end
end
withdraw(win, ex = true)
# File ext/tk/lib/tk/wm.rb, line 531
def Wm.withdraw(win, ex = true)
  if ex
    tk_call_without_enc('wm', 'withdraw', win.epath)
  else
    Wm.deiconify(win)
  end
  win
end
Instance Public methods
aspect(*args)
Also aliased as: wm_aspect
# File ext/tk/lib/tk/wm.rb, line 24
def aspect(*args)
  Wm.aspect(self, *args)
end
attributes(slot=nil,value=TkComm::None)
Also aliased as: wm_attributes
# File ext/tk/lib/tk/wm.rb, line 48
def attributes(slot=nil,value=TkComm::None)
  Wm.attributes(self, slot, value)
end
client(name=TkComm::None)
Also aliased as: wm_client
# File ext/tk/lib/tk/wm.rb, line 63
def client(name=TkComm::None)
  Wm.client(self, name)
end
colormapwindows(*args)
Also aliased as: wm_colormapwindows
# File ext/tk/lib/tk/wm.rb, line 78
def colormapwindows(*args)
  Wm.colormapwindows(self, *args)
end
deiconify(ex = true)
Also aliased as: wm_deiconify
# File ext/tk/lib/tk/wm.rb, line 106
def deiconify(ex = true)
  Wm.deiconify(self, ex)
end
focusmodel(mode = nil)
Also aliased as: wm_focusmodel
# File ext/tk/lib/tk/wm.rb, line 119
def focusmodel(mode = nil)
  Wm.focusmodel(self, mode)
end
frame()
Also aliased as: wm_frame
# File ext/tk/lib/tk/wm.rb, line 138
def frame
  Wm.frame(self)
end
geometry(geom=nil)
Also aliased as: wm_geometry
# File ext/tk/lib/tk/wm.rb, line 151
def geometry(geom=nil)
  Wm.geometry(self, geom)
end
group(leader = nil)
Also aliased as: wm_group
# File ext/tk/lib/tk/wm.rb, line 179
def group(leader = nil)
  Wm.group(self, leader)
end
iconbitmap(bmp=nil)
Also aliased as: wm_iconbitmap
# File ext/tk/lib/tk/wm.rb, line 193
def iconbitmap(bmp=nil)
  Wm.iconbitmap(self, bmp)
end
iconify(ex = true)
Also aliased as: wm_iconify
# File ext/tk/lib/tk/wm.rb, line 236
def iconify(ex = true)
  Wm.iconify(self, ex)
end
iconmask(bmp=nil)
Also aliased as: wm_iconmask
# File ext/tk/lib/tk/wm.rb, line 249
def iconmask(bmp=nil)
  Wm.iconmask(self, bmp)
end
iconname(name=nil)
Also aliased as: wm_iconname
# File ext/tk/lib/tk/wm.rb, line 263
def iconname(name=nil)
  Wm.iconname(self, name)
end
iconphoto(*imgs)
Also aliased as: wm_iconphoto
# File ext/tk/lib/tk/wm.rb, line 212
def iconphoto(*imgs)
  Wm.iconphoto(self, *imgs)
end
iconphoto_default(*imgs)
Also aliased as: wm_iconphoto_default
# File ext/tk/lib/tk/wm.rb, line 223
def iconphoto_default(*imgs)
  Wm.iconphoto_default(self, *imgs)
end
iconposition(*args)
Also aliased as: wm_iconposition
# File ext/tk/lib/tk/wm.rb, line 278
def iconposition(*args)
  Wm.iconposition(self, *args)
end
iconwindow(iconwin = nil)
Also aliased as: wm_iconwindow
# File ext/tk/lib/tk/wm.rb, line 293
def iconwindow(iconwin = nil)
  Wm.iconwindow(self, iconwin)
end
maxsize(*args)
Also aliased as: wm_maxsize
# File ext/tk/lib/tk/wm.rb, line 335
def maxsize(*args)
  Wm.maxsize(self, *args)
end
minsize(*args)
Also aliased as: wm_minsize
# File ext/tk/lib/tk/wm.rb, line 350
def minsize(*args)
  Wm.minsize(self, *args)
end
overrideredirect(mode=TkComm::None)
Also aliased as: wm_overrideredirect
# File ext/tk/lib/tk/wm.rb, line 364
def overrideredirect(mode=TkComm::None)
  Wm.overrideredirect(self, mode)
end
positionfrom(who=TkComm::None)
Also aliased as: wm_positionfrom
# File ext/tk/lib/tk/wm.rb, line 379
def positionfrom(who=TkComm::None)
  Wm.positionfrom(self, who)
end
protocol(name=nil, cmd=nil, &b)
Also aliased as: wm_protocol
# File ext/tk/lib/tk/wm.rb, line 399
def protocol(name=nil, cmd=nil, &b)
  Wm.protocol(self, name, cmd, &b)
end
protocols(kv=nil)
Also aliased as: wm_protocols
# File ext/tk/lib/tk/wm.rb, line 419
def protocols(kv=nil)
  Wm.protocols(self, kv)
end
resizable(*args)
Also aliased as: wm_resizable
# File ext/tk/lib/tk/wm.rb, line 434
def resizable(*args)
  Wm.resizable(self, *args)
end
sizefrom(who=TkComm::None)
Also aliased as: wm_sizefrom
# File ext/tk/lib/tk/wm.rb, line 449
def sizefrom(who=TkComm::None)
  Wm.sizefrom(self, who)
end
stackorder()
Also aliased as: wm_stackorder
# File ext/tk/lib/tk/wm.rb, line 458
def stackorder
  Wm.stackorder(self)
end
stackorder_is_above(target)
Alias for: stackorder_isabove
stackorder_is_below(target)
Alias for: stackorder_isbelow
stackorder_isabove(target)
# File ext/tk/lib/tk/wm.rb, line 469
def stackorder_isabove(target)
  Wm.stackorder_isabove(self, target)
end
stackorder_isbelow(target)
# File ext/tk/lib/tk/wm.rb, line 482
def stackorder_isbelow(target)
  Wm.stackorder_isbelow(self, target)
end
state(st=nil)
Also aliased as: wm_state
# File ext/tk/lib/tk/wm.rb, line 497
def state(st=nil)
  Wm.state(self, st)
end
title(str=nil)
Also aliased as: wm_title
# File ext/tk/lib/tk/wm.rb, line 511
def title(str=nil)
  Wm.title(self, str)
end
transient(master=nil)
Also aliased as: wm_transient
# File ext/tk/lib/tk/wm.rb, line 525
def transient(master=nil)
  Wm.transient(self, master)
end
withdraw(ex = true)
Also aliased as: wm_withdraw
# File ext/tk/lib/tk/wm.rb, line 539
def withdraw(ex = true)
  Wm.withdraw(self, ex)
end
wm_aspect(*args)
Alias for: aspect
wm_attributes(slot=nil,value=TkComm::None)
Alias for: attributes
wm_client(name=TkComm::None)
Alias for: client
wm_colormapwindows(*args)
Alias for: colormapwindows
wm_command(value=nil)
# File ext/tk/lib/tk/wm.rb, line 93
def wm_command(value=nil)
  Wm.command(self, value)
end
wm_deiconify(ex = true)
Alias for: deiconify
wm_focusmodel(mode = nil)
Alias for: focusmodel
wm_forget()
# File ext/tk/lib/tk/wm.rb, line 131
def wm_forget
  Wm.forget(self)
end
wm_frame()
Alias for: frame
wm_geometry(geom=nil)
Alias for: geometry
wm_grid(*args)
# File ext/tk/lib/tk/wm.rb, line 166
def wm_grid(*args)
  Wm.grid(self, *args)
end
wm_group(leader = nil)
Alias for: group
wm_iconbitmap(bmp=nil)
Alias for: iconbitmap
wm_iconify(ex = true)
Alias for: iconify
wm_iconmask(bmp=nil)
Alias for: iconmask
wm_iconname(name=nil)
Alias for: iconname
wm_iconphoto(*imgs)
Alias for: iconphoto
wm_iconphoto_default(*imgs)
Alias for: iconphoto_default
wm_iconposition(*args)
Alias for: iconposition
wm_iconwindow(iconwin = nil)
Alias for: iconwindow
wm_manage()
# File ext/tk/lib/tk/wm.rb, line 304
def wm_manage
  Wm.manage(self)
end
wm_maxsize(*args)
Alias for: maxsize
wm_minsize(*args)
Alias for: minsize
wm_overrideredirect(mode=TkComm::None)
Alias for: overrideredirect
wm_positionfrom(who=TkComm::None)
Alias for: positionfrom
wm_protocol(name=nil, cmd=nil, &b)
Alias for: protocol
wm_protocols(kv=nil)
Alias for: protocols
wm_resizable(*args)
Alias for: resizable
wm_sizefrom(who=TkComm::None)
Alias for: sizefrom
wm_stackorder()
Alias for: stackorder
wm_stackorder_is_above(target)
Alias for: stackorder_isabove
wm_stackorder_is_below(target)
Alias for: stackorder_isbelow
wm_stackorder_isabove(target)
Alias for: stackorder_isabove
wm_stackorder_isbelow(target)
Alias for: stackorder_isbelow
wm_state(st=nil)
Alias for: state
wm_title(str=nil)
Alias for: title
wm_transient(master=nil)
Alias for: transient
wm_withdraw(ex = true)
Alias for: withdraw