ImReflect

Sven van Huessen | Oct 31, 2025

⏳ Duration: 8 weeks

💻 Language: C++


ImReflect

ImReflect is a reflection-based ImGui wrapper that automatically generates ImGui UI. It helps programmers easily debug their objects without having to manually write ImGui UI code.

I made ImReflect as part of my self-study project for University and was completed in 8 weeks. It was my first serious attempt at an open-source GitHub repository. Today:

“This is an awesome tool, please keep up the good job!!”

~ Michał Galiński / Junior Engineer @ CD Projekt Red

“Amazing! This has to be one of the most useful things for imgui”

~ Sankhayan Bhattacharjee / User on LinkedIn

Features

  • Single Entry Point - one function call generates complete UIs
  • Primitives, Enums, STL - all supported by default
  • Extensible - add your own types without modifying the library
  • Single Header - no build, no linking, simply include
  • Reflection - define a macro and ImReflect does the rest
  • Fluent Builder Pattern - easily customize widgets

Documentation

Since I made this project with the intention of it being used by others, it had to be well documented.

  • Read Me - explanation of what it is, how it works, how to use it, code samples, etc.
  • Wiki - Documenting everything that is implemented and what it does.
  • Comments - explaining public functions the user interacts with.

Technical Overview

Check out my other blog posts for the technical C++ topics I used to create ImReflect.

Related Topics

Tag Invoke

How I designed ImReflect using the tag_invoke design pattern

Reflection

What C++ reflection library I picked for ImReflect until we wait for C++ 26.

Fluent Builder Pattern

A scope-based fluent builder pattern for creating hierarchical configurations. Used for input configurations.

SFINAE

How I used SFINAE ("Substitution Failure Is Not An Error") in ImReflect for compile time if checks

Type Traits

How I used type traits in ImReflect to make generic functions.

Mixins

Using the mixin design pattern to make reuseable, explicit and consistent API calls for ImReflect.

Diamond Problem

How I used virtual inheritance in ImReflect to make mixins a lot cleaner.calls for ImReflect.