class

Tryst::Winfo

Inherits Reference < Object

Thin, typed wrapper around Tk's winfo command family - one method per subquery, coerced to the right Crystal 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. Every method accepts a path String or anything that responds to #to_s with one (a future Widget, for instance).

@see https://www.tcl-lang.org/man/tcl9.0/TkCmd/winfo.htm winfo

Constructors

new(app : App)
Source

Instance methods

class_name(path) : String

The Tk widget class (e.g. "TButton", "Frame").

Source
exists?(path) : Bool

Whether a window currently exists at path.

Source
height(path) : Int32

Current height in pixels.

Source
ismapped?(path) : Bool

Whether the window is currently mapped (actually displayed).

Source
pointerx(path = ".") : Int32

The mouse pointer's current x coordinate, in screen pixels. path is any window on the same screen (default: the root window).

Source
pointery(path = ".") : Int32

The mouse pointer's current y coordinate, in screen pixels. path is any window on the same screen (default: the root window).

Source
reqheight(path) : Int32

Requested (natural) height in pixels.

Source
reqwidth(path) : Int32

Requested (natural) width in pixels.

Source
rootx(path) : Int32

X coordinate of the window's top-left corner, in screen pixels.

Source
rooty(path) : Int32

Y coordinate of the window's top-left corner, in screen pixels.

Source
width(path) : Int32

Current width in pixels.

Source
x(path) : Int32

X coordinate relative to the parent widget.

Source
y(path) : Int32

Y coordinate relative to the parent widget.

Source