Teek::Winfo Class
Thin, typed wrapper around Tk’s winfo command family - one method
per subquery, coerced to the right Ruby type, reached via App#winfo.
Grouped behind a single accessor instead of a dozen-plus flat App
methods, since winfo is itself one big, well-known Tcl command
namespace - knowing Tcl’s winfo width gets you to #width directly.
Every method accepts a path String or anything that responds to
to_s with one (a Widget, for instance).
Inherits: Object
Instance Methods ↑
class_name(path)
Parameters
pathString, Widget
Returns String — the Tk widget class (e.g. "TButton", "Frame")
exists?(path)
Parameters
pathString, Widget
Returns Boolean — whether a window currently exists at path
ismapped?(path)
Parameters
pathString, Widget
Returns Boolean — whether the window is currently mapped (actually displayed)
pointerx(path '.')
Parameters
pathString, Widget— any window on the same screen (default: the root window)
Returns Integer — the mouse pointer's current x coordinate, in screen pixels
pointery(path '.')
Parameters
pathString, Widget— any window on the same screen (default: the root window)
Returns Integer — the mouse pointer's current y coordinate, in screen pixels
reqheight(path)
Parameters
pathString, Widget
Returns Integer — requested (natural) height in pixels
rootx(path)
Parameters
pathString, Widget
Returns Integer — x coordinate of the window's top-left corner, in screen pixels
rooty(path)
Parameters
pathString, Widget
Returns Integer — y coordinate of the window's top-left corner, in screen pixels