From: Hidetoshi NAGAI Date: 2010-02-04T00:05:59+09:00 Subject: Re: TK: Get the "usable" screensize"? From: Axel Subject: Re: TK: Get the "usable" screensize"? Date: Wed, 3 Feb 2010 21:10:18 +0900 Message-ID: > At present, when I look for documentation of Ruby/Tk-methods, I look > into the TCL/TK documentation, e.g, for #winfo_geometry I look into: > > http://www.tcl.tk/man/tcl8.5/TkCmd/winfo.htm#M15 Yes. winfo_* methods and module methods of TkWinfo module are the methods to call Tcl/Tk's winfo command. > Where must I look up methods of TkRoot, for example TkRoot.geometry? > In TCL-WM? > > http://www.tcl.tk/man/tcl8.5/TkCmd/wm.htm#M28 ? Yes. Tk::Root and Tk::Toplevel class have the methods to call Tcl/Tk's wm command. Those methods are defined at Tk::Wm module. Ruby/Tk can treat some subcommands of Tcl's wm command as widget options. For example, Ruby/Tk's ----------------------------------------------------------------------- Tk::Toplevel.new(:geometry=>"300x150+200+100", :title=>"toplevel test") # When ruby 1.9, the following notation is acceptable. # Tk::Toplevel.new(geometry:"300x150+200+100", title:"toplevel test") ----------------------------------------------------------------------- means Tcl/Tk's ----------------------------------------------------------------------- toplevel .w0000 wm geometry .w0000 300x150+200+100 wm title .w0000 "toplevel test" ----------------------------------------------------------------------- -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)