MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / AddContextHook

Method AddContextHook

imgui_tiny_app/imgui/imgui.cpp:4634–4641  ·  view source on GitHub ↗

No specific ordering/dependency support, will see as needed

Source from the content-addressed store, hash-verified

4632
4633// No specific ordering/dependency support, will see as needed
4634ImGuiID ImGui::AddContextHook(ImGuiContext* ctx, const ImGuiContextHook* hook)
4635{
4636 ImGuiContext& g = *ctx;
4637 IM_ASSERT(hook->Callback != NULL && hook->HookId == 0 && hook->Type != ImGuiContextHookType_PendingRemoval_);
4638 g.Hooks.push_back(*hook);
4639 g.Hooks.back().HookId = ++g.HookIdNext;
4640 return g.HookIdNext;
4641}
4642
4643// Deferred removal, avoiding issue with changing vector while iterating it
4644void ImGui::RemoveContextHook(ImGuiContext* ctx, ImGuiID hook_id)

Callers

nothing calls this directly

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected