struct

Tryst::UI::FlowConfig

Inherits Struct < Value < Object

Flow-packing config for a column/row-style container - side/ main_pad/cross_pad/main_fill/cross_fill/anchor. A convenience over overriding #arrange for exactly this shape: giving flow: to WidgetType.new is enough for #arrange's own default body to delegate to Realizer#arrange_flow with this data, so most flow containers never need to touch #arrange directly. A dedicated record rather than a Hash(Symbol, TclArgValue) (unlike opts/layout elsewhere) - ruby's own flow: hash nests another hash for anchor:, which doesn't fit TclArgValue's closed union, and this is realize-internal metadata that was never going to reach App#command as a real Tk option anyway.

Constants

STACK = new(side: "top", main_pad: :pady, cross_pad: :padx, main_fill: "y", cross_fill: "x", anchor: {FlowAlign::Start => "w", FlowAlign::Center => "center", FlowAlign::End => "e"})

Top-to-bottom stacking: what ui.column is, and what every container that "just stacks its children" (panel, group, tab, pane, window) shares with it, so gap:/pad:/align: and a child's grow: mean the same thing on all of them.

Constructors

new(side : String, main_pad : Symbol, cross_pad : Symbol, main_fill : String, cross_fill : String, anchor : Hash(FlowAlign, String))
Source

Instance methods

anchor

The Tk anchor letter for each align: this container understands. FlowAlign::Stretch is absent on purpose - it fills the cross axis instead of anchoring, so it never reaches a lookup here.

clone
Source
copy_with(side _side = @side, main_pad _main_pad = @main_pad, cross_pad _cross_pad = @cross_pad, main_fill _main_fill = @main_fill, cross_fill _cross_fill = @cross_fill, anchor _anchor = @anchor)
Source
cross_fill
cross_pad
main_fill
main_pad
side