Tryst::UI
A DSL for building tryst (Tk) apps - sugar over tryst, not a wall around it. Everything here compiles down to plain tryst calls, and every handle keeps an escape hatch back to the underlying Tryst::App.
Class methods
Build an app. Constructs a Session (Tk-free - no Tryst::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).
track_widgets is Session's own stand-in for ruby's **app_opts (forwarded verbatim to Tryst::App.new there) - Crystal needs a fixed parameter list, and track_widgets is App.new's only other real keyword arg. resizable: false fixes the root window at its content's size (or {width: false, height: true} for per-axis control); geometry:/ min_size:/max_size: are the same options a ui.window takes, applied to the root window instead.
ditto with no block, for a class that builds its own tree: Crystal
never counts an instance variable assigned inside a block as
initialized, so @session = Tryst::UI.app(...) followed by plain
@session.button(...) statements is what lets a class hold its
widgets in non-nilable fields. The Session IS the builder either way.
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 Tryst::UI.app's own scroll:, then this global default.
Named to match ruby-tryst's own Tryst::UI.auto_scroll exactly (a
plain attr_accessor there, not a predicate) rather than gaining a
? no ported caller expects.
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 Tryst::UI.app's own scroll:, then this global default.
Named to match ruby-tryst's own Tryst::UI.auto_scroll exactly (a
plain attr_accessor there, not a predicate) rather than gaining a
? no ported caller expects.
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.
Nested types
- Tryst::UI::AddressingHook
- Tryst::UI::AddressingStrategy
- Tryst::UI::AppContract
- Tryst::UI::CanvasItem
- Tryst::UI::CellPosition
- Tryst::UI::CloseHandler
- Tryst::UI::ClosedBuilderError
- Tryst::UI::Document
- Tryst::UI::EventBinding
- Tryst::UI::EventBus(T)
- Tryst::UI::FlowAlign
- Tryst::UI::FlowConfig
- Tryst::UI::Font
- Tryst::UI::GridAxisConfig
- Tryst::UI::GridType
- Tryst::UI::GridValidator
- Tryst::UI::Handle
- Tryst::UI::Image
- Tryst::UI::Keysyms
- Tryst::UI::LayoutIntentValidator
- Tryst::UI::MenuBuilder
- Tryst::UI::MenuEntryAddressing
- Tryst::UI::MenuHostType
- Tryst::UI::MouseEvents
- Tryst::UI::NamedFonts
- Tryst::UI::Node
- Tryst::UI::NotRealizedError
- Tryst::UI::OptionDumpParsing
- Tryst::UI::OptionError
- Tryst::UI::OptionErrorTranslation
- Tryst::UI::OverlayAnchors
- Tryst::UI::OverlayPosition
- Tryst::UI::OverlayValidator
- Tryst::UI::PaneType
- Tryst::UI::PaneValidator
- Tryst::UI::RealizedNode
- Tryst::UI::Realizer
- Tryst::UI::Scope
- Tryst::UI::ScrollDefault
- Tryst::UI::ScrollableType
- Tryst::UI::Session
- Tryst::UI::Signal(*T)
- Tryst::UI::SplitOrientation
- Tryst::UI::StructuralTypes
- Tryst::UI::StyleRef
- Tryst::UI::TabType
- Tryst::UI::TabValidator
- Tryst::UI::TextContent
- Tryst::UI::TimerHandle
- Tryst::UI::TtkStyleNames
- Tryst::UI::ValidationError
- Tryst::UI::Validator
- Tryst::UI::ValidatorProc
- Tryst::UI::Var
- Tryst::UI::VarValue
- Tryst::UI::WidgetAddressing
- Tryst::UI::WidgetDSL
- Tryst::UI::WidgetType
- Tryst::UI::WidgetTypes
- Tryst::UI::WidgetValidators
- Tryst::UI::WindowContract
- Tryst::UI::WindowType