module

Tryst::UI::AppContract

The exact subset of Tryst::App's surface Realizer (and, later, Handle) actually calls - a real interface type, not just documentation: Realizer holds its app as @app : AppContract, dispatched dynamically to whatever concrete class is actually given, so a plain recorder (FakeApp, spec/support/fake_app.cr) can stand in for a real Tryst::App with zero Tk interpreter involved. Included by both the real Tryst::App (reopened below) and FakeApp.

Crystal statically enforces that every class including a module implements each abstract def with a compatible parameter/splat/ keyword shape - a missing *subs, a renamed required keyword arg, or a dropped method all fail to compile. If Tryst::App's real methods ever drift from what FakeApp implements, THIS FILE stops compiling - on every build, not just when a dedicated test file happens to run.

Return types are deliberately left off every abstract def here, matching ruby's own check (which only ever compares keyword_names/ positional_shape, never return values) - Fake classes legitimately return Fake-shaped objects (FakeWindow) instead of the real Tk-backed ones, and Crystal's return-type conformance requires an exact/subtype match, which would make that impossible.

Instance methods

after_idle
Source
bind(widget, event : EventArg, *, subs : SubsArg, owner : String | Nil = nil, &block : Array(String), CallbackSignal -> Nil)
Source
command(cmd, args : Array(TclArgValue), kwargs : Hash(String, TclArgValue))
Source
command(cmd, *args : TclArgValue, **kwargs : TclArgValue)
Source
destroy(widget)
Source
on_close(window, &block : Array(String), CallbackSignal -> Nil)
Source
popup_menu(menu, x : Int32, y : Int32, entry = nil)
Source
split_list(str : String | Nil)
Source
window(path)
Source