2.3. ID stack — push/pop, scoped, hashing

The ID-stack helper — with_id(s) { ... } — for the few cases where the indexed-widget form (IDENT[i] / IDENT[key], API_REWORK §4.4) can’t reach. Pushes s onto both ImGui’s internal ID stack and the boost container-path stack; both pop on block return. Use it for composed sub-panels rendered by a helper that doesn’t know its slot, or for data-driven structure the call_macro can’t trace lexically.

2.3.1. ID stack

with_id(s: string; blk: block<():void> )

Run blk with s pushed onto ImGui’s ID stack and the boost container-path; both pop on return. Reach for this only when the indexed-widget form (IDENT[i]) can’t — composed helpers, data-driven structure. API_REWORK §4.8.

Arguments:
  • s : string

  • blk : block<void>