Code
How ocornut/imgui is laid out, and where to start for common changes.
There is no import map for this report yet.
Where to start reading
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
Find files for a task
AIAdd a New Backend (Graphics API or Platform)
- Create backends/imgui_impl_MYAPI.h with device-specific state struct and NewFrame/RenderDrawData signatures
- Implement backends/imgui_impl_MYAPI.cpp with device initialization, frame setup, and draw command translation
- Add a pairing input backend (e.g., backends/imgui_impl_MYPLATFORM.cpp) for event handling if new OS target
- Create examples/example_MYAPI/Makefile and example .cpp showcasing initialization and main loop
Add a New Widget Type
- Declare public API function in imgui.h namespace; follow bool BeginXXX()/EndXXX() or return-value patterns
- Implement widget logic in imgui_widgets.cpp, using ImGuiContext::GetCurrentWindow() and ImGui internal APIs for input/state
- Add draw calls via ImDrawList API (obtained from ImGui::GetWindowDrawList()); keep command list platform-agnostic
- Add demo usage in imgui_demo.cpp under existing demo window sections for visibility testing
Customize ImGui Behavior and Features
- Edit imconfig.h to toggle features (e.g., IM_DISABLE_DEMO_WINDOWS, IM_DISABLE_OBSOLETE_FUNCTIONS) or override compile-time constants
- Override ImGuiIO fields (fonts, DPI scaling, input/output callbacks) during context initialization in your platform layer
- Link optional utilities like misc/cpp/imgui_stdlib.cpp for STL support or misc/freetype/imgui_freetype.cpp for font rasterization
Change build or automation
RepoPilot lists up to 500 files, so a file missing here may still exist.
- The file list has no top-level manifest or contributor guide, so setup is not covered here.
- No public API or start-up file could be picked out from the file names.