Widgets¶
Widget reference pages describe behavior and public shapes as implemented in the FlashBang library. Each page names the src/widgets/<name>.odin file that is the source of truth.
Conventions¶
- Call widgets with
^ImmediateContextfromflashbang.get_imm_ctx()afterset_immediate_contexteach frame (see Immediate mode). flashbang.odinre-exports stable names (Button,Label, …). Prefer importingflashbangfrom application code.- Config structs hold layout (
x,y,w,h), optionalidfor dimension lookup and layout-backend overrides, and optionalMaybe(style.Color)overrides where supported. - State structs (when present) are outputs for this frame; any round-trip fields (e.g.
was_active, text buffers) are documented on the widget page.
Pages¶
Fully written reference (from source):
- common — shared helpers:
emit_surface,emit_separator, layout override, dimension getters. - button —
Button/ButtonConfig/ButtonState; also whereImmediateContextlives. - label —
Label/LabelConfig.
Other files below are stubs until expanded; use the linked .odin file and flashbang.odin exports in the meantime.
All widgets¶
- button
- checkbox
- color_wheel
- common
- dialog
- docking_container
- dropdown
- file_browser
- focus_shelf
- geometry
- group_box
- icon
- id
- image
- label
- layout_backend
- layout_cache
- layout_contract
- list_view
- measure
- menu
- numeric_input
- overlay
- panel
- password_box
- popup
- progress_bar
- property_editor
- radio_button
- scroll_bar
- scroll_view
- separator
- slider
- spinner
- split_pane
- stack
- status_bar
- table
- tabs
- text_area
- text_box
- toast
- toggle_button
- tooltip
- tree_view
- widget_events
- widget_ids
- widget_state
- window