2.2. Built-in containers — windows, child regions, tabs, menus, popups

Built-in containers — block-arg wrappers around ImGui’s Begin/End family. Annotated with [container] so the body is wrapped with container_path_push(widget_ident) / container_path_pop() automatically, giving leaf widgets nested registry keys (e.g. MAIN_WIN/SETTINGS_TAB/RPS). Covers windows (window, child, group), tab bars + items (tab_bar, tab_item), trees (tree_node, collapsing_header), menus (menu_bar, menu, menu_item), and popups (popup, modal, tooltip).

The Begin/End pairing rules differ per kind — Begin/End and BeginChild/EndChild always pair; everything else is End-only-on-true — so each container def authors its own pairing inline rather than the macro guessing.

2.2.1. Call macros

tooltip

Function annotation tooltip

group

Function annotation group

menu

Function annotation menu

child

Function annotation child

popup_modal

Function annotation popup_modal

popup

Function annotation popup

item_tooltip

Function annotation item_tooltip

collapsing_header

Function annotation collapsing_header

combo_select

Function annotation combo_select

menu_bar

Function annotation menu_bar

main_menu_bar

Function annotation main_menu_bar

drag_drop_target

Function annotation drag_drop_target

tab_bar

Function annotation tab_bar

window

Function annotation window

popup_context_item

Function annotation popup_context_item

list_box

Function annotation list_box

tab_item

Function annotation tab_item

tree_node

Function annotation tree_node

drag_drop_source

Function annotation drag_drop_source

popup_context_window

Function annotation popup_context_window

2.2.2. Uncategorized

open_popup(state: PopupState )

Queue OpenPopup(state.text) for the next visit of the paired popup / popup_modal container — the container reads pending_open before BeginPopup, so the linkage button-click → popup is observable as a state mutation (visible to live/mouse-cards).

Arguments:
open_popup(str_id: string; flags: ImGuiPopupFlags = imgui::ImGuiPopupFlags.None )

String-id form for stateless popups (paired with popup_context_item). No telemetry — open-state lives in ImGui internals.

Arguments:
open_popup_on_item_click(str_id: string; flags: ImGuiPopupFlags = imgui::ImGuiPopupFlags.MouseButtonRight )

Right-click on the previously-submitted item opens str_id popup. Stateless trigger paired with popup_context_item.

Arguments:
close_current_popup(state: PopupState )

Close the active popup. Sets pending_close for state-transition telemetry AND calls CloseCurrentPopup() directly so the close takes effect on the current frame (matches raw-call semantics).

Arguments:
close_current_popup()

No-state form for body-internal use where a PopupState ident isn’t in scope (e.g., inside popup_context_item, which is stateless).

is_popup_open(state: PopupState ): bool

True while the paired popup container is open this frame.

Arguments: