Teek::UI Module
A DSL for building teek (Tk) apps - sugar over teek, not a wall around it.
Everything here compiles down to plain teek calls, and every handle keeps
an escape hatch back to the underlying Teek::App.
Class Methods ↑
app(title: nil, scroll: nil, **app_opts, &block)
Build an app. Constructs a Session (Tk-free - no Teek::App exists
yet), yields it to the block, and returns that same session so
.run/.run_async can be chained directly off the call. The
underlying app is created lazily, at realize (see Session#realize).
Parameters
titleString, nil— window titlescrollBoolean, nil— app-wide override for whether native scrollable widgets auto-attach a scrollbar - between a widget's own `scroll:` (most specific) and.auto_scroll/.auto_scroll_canvas(global default). `nil` (the default) defers straight to the global.app_optsHash— forwarded toTeek::App.newat realize (e.g.debug:,track_widgets:)
Returns Session
@yieldparam ui Session
Example
Teek::UI.app(title: "Hello") do |ui|
# widget/layout DSL calls go here
end.run
Attributes ↑
auto_scroll [R]
Returns Boolean — whether a bare list/text_area/table/tree
auto-attaches a scrollbar with no `ui.scrollable` wrapper needed -
true by default. Three levels can override it, most specific
wins: a widget's own `scroll:` option, then `Teek::UI.app`'s own
`scroll:`, then this global default.
auto_scroll_canvas [R]
Returns Boolean — the same default, but for canvas specifically -
false by default, since a canvas is as often fixed drawing as
scrollable content, unlike the other native types.
Members: Modules (2) · Classes (22)
- C CanvasItem
- C ClosedBuilderError
- C ComponentHandle
- C Document
- C EventBinding
- C EventBus
- C Handle
- C Image
- C MenuBuilder
- C ModalStack
- C Node
- C NotRealizedError
- C RealizedNode
- C Realizer
- C Scope
- C Screens
- C Session
- C TextContent
- C TreeInspector
- C ValidationError
- C Validator
- C Var