Skip to content

VBox

[Source]

Vertical box container. Packs children top-to-bottom using GTK2-style expand/fill/padding semantics.

actor tag VBox is
  CompositeWidget tag

Implements


Constructors

create

[Source]

new tag create(
  p: WidgetParent tag,
  align: (AlignStart val | AlignCenter val | AlignEnd val) = reference)
: VBox tag^

Parameters

Returns


Public Behaviours

resize

[Source]

Update container size, repack children, and re-render.

be resize(
  w: USize val,
  h: USize val)

Parameters


set_align

[Source]

Set the container alignment and re-render.

be set_align(
  align: (AlignStart val | AlignCenter val | AlignEnd val))

Parameters


pack_start

[Source]

Pack a child from the start (top). Repacks if already sized.

be pack_start(
  widget: Widget tag,
  w: USize val,
  h: USize val,
  option: PackOption val = reference)

Parameters


pack_end

[Source]

Pack a child from the end (bottom). Repacks if already sized.

be pack_end(
  widget: Widget tag,
  w: USize val,
  h: USize val,
  option: PackOption val = reference)

Parameters


receive_grid

[Source]

be receive_grid(
  widget: Any tag,
  grid: Grid val)

Parameters


trigger_render

[Source]

be trigger_render()

receive_key

[Source]

be receive_key(
  key: KeyEvent val)

Parameters


receive_focus

[Source]

be receive_focus()

receive_blur

[Source]

be receive_blur()

set_debug_bg

[Source]

be set_debug_bg(
  color: (Default val | Black val | Red val | 
    Green val | Yellow val | Blue val | 
    Magenta val | Cyan val | White val | 
    BrightBlack val | BrightRed val | BrightGreen val | 
    BrightYellow val | BrightBlue val | BrightMagenta val | 
    BrightCyan val | BrightWhite val | Rainbow val))

Parameters


Public Functions

state

[Source]

fun ref state()
: WidgetState ref

Returns


render

[Source]

Compose all child grids into a single grid using packer allocations. When debug_bg is Rainbow, each allocation region gets a distinct background color from a cycling palette, making expand vs fill visible.

fun ref render()
: Grid val

Returns


render_background

[Source]

fun ref render_background()
: Grid val

Returns


register_child

[Source]

fun ref register_child(
  widget: Widget tag)
: None val

Parameters

Returns


render_and_send

[Source]

fun ref render_and_send()
: None val

Returns