RepoPilot

ocornut / imgui

Search ocornut/imgui

GitHub

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

  1. Suggested starting pointAI
  2. Suggested starting pointAI
  3. Suggested starting pointAI
  4. Suggested starting pointAI
  5. Suggested starting pointAI
  6. Suggested starting pointAI
  7. Suggested starting pointAI

Find files for a task

AI

Add 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.

Code quality and hotspots

Largest source files

  • Branch points877 per file on average
  • Code issues0 errors, 1093 warnings
  • Largest file18,777 lines
  • Hotspot load7 high-risk files

Static checks on the 15 largest source files.

Tests, CI and tooling

  • CIGitHub Actions4 workflows
  • TestsNot detected0.00 test files per source file (file count, not coverage)
  • Dependency updatesNo config detected

Hotspots

Files that change often and branch heavily, highest first. Branch points count if, loop, case, catch, ternary, && and || in the file.