Skip to main content

Dear ImGui Bundle: easily create ImGui applications in Python and C++. Batteries included!

Project description

Note: You can find a more complete version of this document in the official documentation site for Dear ImGui Bundle.

abc

Dear ImGui Bundle: easily create ImGui applications in Python and C++. Batteries included!

Click on the logo for a complete interactive demonstration!

sources doc manual

Introduction

About Dear ImGui Bundle

Dear ImGui Bundle is a bundle for Dear ImGui, including various powerful libraries from its ecosystem. It enables to easily create ImGui applications in C++ and Python, under Windows, macOS, and Linux. It is aimed at application developers, researchers, and beginner developers who want to quickly get started.

Interactive manual & demo in one click!

Click on the animated demonstration below to launch the fully interactive demonstration.

Demo
Dear ImGui Bundle interactive demo

This demonstration is also an interactive manual, similar to the online ImGui Manual

Batteries included

Dear ImGui Bundle includes the following libraries, which are available in C++ and in Python:

Dear ImGui : Bloat-free Graphical User interface for C++ with minimal dependencies

demo widgets imgui

ImGui Test Engine: Dear ImGui Tests & Automation Engine

demo testengine

Hello ImGui: cross-platform Gui apps with the simplicity of a "Hello World" app

demo docking demo custom background

ImPlot: Immediate Mode Plotting

battery implot

ImGuizmo: Immediate mode 3D gizmo for scene editing and other controls based on Dear ImGui

demo gizmo

ImGuiColorTextEdit: Colorizing text editor for ImGui

demo widgets editor

imgui-node-editor: Node Editor built using Dear ImGui

demo node editor

imgui_md: Markdown renderer for Dear ImGui using MD4C parser

demo widgets md

ImmVision: Immediate image debugger and insights

demo immvision process 1 demo immvision process 2

imgui_tex_inspect: A texture inspector tool for Dear ImGui

demo imgui tex inspector

ImFileDialog: A file dialog library for Dear ImGui

demo widgets imfiledialog

portable-file-dialogs OS native file dialogs library (C++11, single-header)

demo widgets portablefiledialogs

imgui-knobs: Knobs widgets for ImGui

demo widgets knobs

imspinner: Set of nice spinners for imgui

demo widgets spinners

imgui_toggle: A toggle switch widget for Dear ImGui

demo widgets toggle

ImCoolBar: A Cool bar for Dear ImGui

demo widgets coolbar

imgui-command-palette: A Sublime Text or VSCode style command palette in ImGui

demo widgets command palette

A big thank you to their authors for their awesome work!

Easily port your code between python and C++

The python bindings are autogenerated via an advanced generator (so that keeping them up to date is easy), and closely mirror the original C++ API, with fully typed bindings.

The original code documentation is meticulously kept inside the python stubs. See for example the documentation for imgui , implot, and hello imgui

Thanks to this, code completion in your favorite python IDE works like a charm, and porting code between Python and C++ becomes easy.

GPT can help you translate between C++ and Python: see this conversation where GPT4 was used to translate code and summarize the differences between the C++ and Python APIs.

Build and install instructions

Install for Python

Install from pypi

pip install imgui-bundle
pip install opencv-contrib-python
  • in order to run the immvision module, install opencv-python or opencv-contrib-python

Note: under windows, you might need to install msvc redist.

Install from source:

git clone https://github.com/pthom/imgui_bundle.git
cd imgui_bundle
git submodule update --init --recursive
pip install -v .
pip install opencv-contrib-python
  • Since there are lots of submodules, this might take a few minutes

  • The build process might take up to 5 minutes

Run the python demo

Simply run demo_imgui_bundle.

The source for the demos can be found inside bindings/imgui_bundle/demos_python.

Consider demo_imgui_bundle as an always available manual for Dear ImGui Bundle with lots of examples and related code source.

Install for C++

Integrate Dear ImGui Bundle in your own project in 5 minutes

The easiest way to use Dear ImGui Bundle in an external project is to use the template available at https://github.com/pthom/imgui_bundle_template.

This template includes everything you need to set up your own project.

Build from source

If you choose to clone this repo, follow these instructions:

git clone https://github.com/pthom/imgui_bundle.git
cd imgui_bundle
git submodule update --init --recursive
mkdir build
cd build
cmake .. -DIMMVISION_FETCH_OPENCV=ON
make -j
  • Since there are lots of submodules, this might take a few minutes

  • The flag -DIMMVISION_FETCH_OPENCV=ON is optional. If set, a minimal version of OpenCV will be downloaded a compiled at this stage (this might require a few minutes)

The immvision module will only be built if OpenCV can be found. Otherwise, it will be ignored, and no error will be emitted.

If you have an existing OpenCV install, set its path via:

cmake .. -DOpenCV_DIR=/.../path/to/OpenCVConfig.cmake

Run the C++ demo

If you built ImGuiBundle from source, Simply run build/bin/demo_imgui_bundle.

The source for the demos can be found inside bindings/imgui_bundle/demos_cpp.

Consider demo_imgui_bundle as a manual with lots of examples and related code source. It is always available online

Closing words

Who is this project for

As mentioned in the intro,

Dear ImGui Bundle is a bundle for Dear ImGui, including various powerful libraries from its ecosystem. It enables to easily create ImGui applications in C++ and Python, under Windows, macOS, and Linux. It is aimed at application developers, researchers, and beginner developers who want to quickly get started.

Dear ImGui Bundle aims to make applications prototyping fast and easy, in a multiplatform / multi-tooling context. The intent is to reduce the time between an idea and a first GUI prototype down to almost zero.

It is well adapted for

  • developers and researchers who want to switch easily between and research and development environment by facilitating the port of research artifacts

  • beginners and developers who want to quickly develop an application without learning a GUI framework

Who is this project not for

You should prefer a more complete framework (such as Qt for example) if your intent is to build a fully fledged application, with support for internationalization, advanced styling, etc.

Also, the library makes no guarantee of ABI stability, and its API is opened to slight adaptations and breaking changes if they are found to make the overall usage better and/or safer.

Acknowledgments

Dear ImGui Bundle would not be possible without the work of the authors of "Dear ImGui", and especially Omar Cornut.

It also includes a lot of other projects, and I’d like to thank their authors for their awesome work!

A particular mention for Evan Pezent (author of ImPlot), Cédric Guillemet (author of ImGuizmo), Balázs Jákó (author of ImGuiColorTextEdit), and Michał Cichoń (author of imgui-node-editor), and Dmitry Mekhontsev (author of imgui-md), Andy Borrel (author of imgui-tex-inspect, another image debugging tool, which I discovered long after having developed immvision).

This doc was built using Asciidoc.

Immvision was inspired by The Image Debugger, by Bill Baxter.

License

The MIT License (MIT)

Copyright (c) 2021-2024 Pascal Thomet

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Alternatives

pyimgui provides battle-tested comprehensive python bindings for ImGui. I worked with this project a lot, and contributed a bit to it. In the end, I had to develop a separate project, in order to be able to add auto-generated and auto-documented python modules.

Dear PyGui (repository) provides python bindings for ImGui with a lot of addons, and a more pythonesque API, which makes it perhaps more suited for Python only projects.

About the author

Dear ImGui Bundle is developed by Pascal Thomet. I am reachable on my Github page. I sometimes blog. There is a playlist related to ImGui Bundle on YouTube.

I have a past in computer vision, and a lot of experience in the trenches between development and research teams; and I found ImGui to be a nice way to reduce the delay between a research prototype and its use in production code.

I also have an inclination for self documenting code, and the doc you are reading was a way to explore new ways to document projects.

How is Dear ImGui Bundle developed

The development of the initial version of Dear ImGui Bundle took about one year at full time.

The bindings are auto-generated thanks to an advanced parser, so that they are easy to keep up to date.

Please be tolerant if you find issues! Dear ImGui Bundle is developed for free, under a very permissive license, by one main author (and most of its API comes from external libraries).

If you need consulting about this library or about the bindings generator in the context of a commercial project, please contact me by email.

Contributions are welcome!

History

Three of my past projects gave me the idea to develop this library.

  • ImGui Manual, an interactive manual for Dear ImGui, which I developed in June 2020

  • implot demo which I developed in 2020.

  • imgui_datascience, a python package I developed in 2018 for image analysis and debugging. Its successor is immvision.

Developments for Dear ImGui Bundle and its related automatic binding generator began in january 2022.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imgui-bundle-1.2.1.tar.gz (34.4 MB view details)

Uploaded Source

Built Distributions

imgui_bundle-1.2.1-cp312-cp312-win_amd64.whl (39.0 MB view details)

Uploaded CPython 3.12 Windows x86-64

imgui_bundle-1.2.1-cp312-cp312-musllinux_1_1_x86_64.whl (28.9 MB view details)

Uploaded CPython 3.12 musllinux: musl 1.1+ x86-64

imgui_bundle-1.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.3 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

imgui_bundle-1.2.1-cp312-cp312-macosx_11_0_x86_64.whl (28.4 MB view details)

Uploaded CPython 3.12 macOS 11.0+ x86-64

imgui_bundle-1.2.1-cp312-cp312-macosx_11_0_arm64.whl (20.0 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

imgui_bundle-1.2.1-cp311-cp311-win_amd64.whl (39.0 MB view details)

Uploaded CPython 3.11 Windows x86-64

imgui_bundle-1.2.1-cp311-cp311-musllinux_1_1_x86_64.whl (28.9 MB view details)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

imgui_bundle-1.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.3 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

imgui_bundle-1.2.1-cp311-cp311-macosx_11_0_x86_64.whl (28.3 MB view details)

Uploaded CPython 3.11 macOS 11.0+ x86-64

imgui_bundle-1.2.1-cp311-cp311-macosx_11_0_arm64.whl (19.9 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

imgui_bundle-1.2.1-cp310-cp310-win_amd64.whl (39.0 MB view details)

Uploaded CPython 3.10 Windows x86-64

imgui_bundle-1.2.1-cp310-cp310-musllinux_1_1_x86_64.whl (28.9 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

imgui_bundle-1.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.3 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

imgui_bundle-1.2.1-cp310-cp310-macosx_11_0_x86_64.whl (28.2 MB view details)

Uploaded CPython 3.10 macOS 11.0+ x86-64

imgui_bundle-1.2.1-cp310-cp310-macosx_11_0_arm64.whl (19.9 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

File details

Details for the file imgui-bundle-1.2.1.tar.gz.

File metadata

  • Download URL: imgui-bundle-1.2.1.tar.gz
  • Upload date:
  • Size: 34.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for imgui-bundle-1.2.1.tar.gz
Algorithm Hash digest
SHA256 59a7ca079aa18a894341007770681470c7222c5abdc0177350fa35fd0220fd8d
MD5 b797b1d2c630a20e89f075167c8528ac
BLAKE2b-256 83c768761050811864348712921f7b73b3df712b75f71d06d516b4ea8b295177

See more details on using hashes here.

File details

Details for the file imgui_bundle-1.2.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for imgui_bundle-1.2.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 53e2c01575469be46a706accaab4c2247ada493b7b2fed655f6d6e860d51efab
MD5 4bccb7c57bf36bd49fabfdd527e84ab8
BLAKE2b-256 02111015dbff26aaf79210105888131eb92e17c90ade7f427f759cef6e37c1c5

See more details on using hashes here.

File details

Details for the file imgui_bundle-1.2.1-cp312-cp312-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for imgui_bundle-1.2.1-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 ce81b69fe1124803470837c1e114913a16631cb0220366d03a52b9c7c525d3b4
MD5 348245cbac3add74e21b6a4dea580429
BLAKE2b-256 bcf27499fb19a413eab7ba5d4863cb8316084c3701679ac7a2939487989aa134

See more details on using hashes here.

File details

Details for the file imgui_bundle-1.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for imgui_bundle-1.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a70f26257b6d05ab87179f082de4792337cfefe3405c56898572e73fc2494a82
MD5 bba328ca17f0fd76a6a3c32c1a0ad997
BLAKE2b-256 be567db12f9b9f85056579438f34da500fe036cb5837428f59f4be7d7c19e6c2

See more details on using hashes here.

File details

Details for the file imgui_bundle-1.2.1-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for imgui_bundle-1.2.1-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 64996a481faebaacc5ac1eea03f64394eb75a025aa1ef1e2ac87f5b270828af9
MD5 e6704fa75f6039a842b83f98a66341c3
BLAKE2b-256 0d31479124e8fa6ccc2babf9d30a9e883f7807a2e766fad3becc4492d8933d98

See more details on using hashes here.

File details

Details for the file imgui_bundle-1.2.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for imgui_bundle-1.2.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3ffa74e102cd2db71a615d6f4adfb4d8fa5bbf488b490c68b49c1eb429080548
MD5 db617ed0e21b60e652960d0a4a87fe81
BLAKE2b-256 fa9fe5d75c3bbf9f61a29b77fdec25c65b6e26a37a21413ecf0f7b5f33e5b7bb

See more details on using hashes here.

File details

Details for the file imgui_bundle-1.2.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for imgui_bundle-1.2.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 09657c953a7358aa29e5f2ceba6809f0f488bd15ca0d1dbc5260f5a05498bc59
MD5 861d9a71d5e6e7e0fda28f2b02c56274
BLAKE2b-256 a7de510d9db7c061cf7ca6dc896a5089254af200c1efd34dbf680280a0a6443b

See more details on using hashes here.

File details

Details for the file imgui_bundle-1.2.1-cp311-cp311-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for imgui_bundle-1.2.1-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 d5a6c05967e2a92de099b4534009c429055ceb591f202806258163fc91d4f889
MD5 a9f612ecdbccee1d0f235ca3f2f8dd3e
BLAKE2b-256 86c94f6e8065141423ddd83dcb91d55733377e61aaf852d478890e0ae0098233

See more details on using hashes here.

File details

Details for the file imgui_bundle-1.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for imgui_bundle-1.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 03ecc32c6affec65f1f544245bcbe4619f2f9ee5db836d19c8a9d92dc0af3e80
MD5 19341c7c8e737d483a708becf6e90069
BLAKE2b-256 98d66b769c3088e3497f121a5bed625d76c7755802c3464cc6bbf99dfcf378fd

See more details on using hashes here.

File details

Details for the file imgui_bundle-1.2.1-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for imgui_bundle-1.2.1-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 1fca1f1712cac7cfcee8644aa721bc70e2da99e475ddac6ab7cb58def9558ced
MD5 3356665b367ad9a16a03f71608aaa777
BLAKE2b-256 f61e92d757e57a5443924b567499a0f7ee9d92162414c3bfb1d37f08a8554d40

See more details on using hashes here.

File details

Details for the file imgui_bundle-1.2.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for imgui_bundle-1.2.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bedab8b750507b69dccc4696eca4adcb820fa226cb997c1ac1cd46277ed6d946
MD5 b3be7a75323906dc8d91ed9f4a42ebce
BLAKE2b-256 a666336d6804aab6d7e131ddca0435e2a0d178d5c58c492a1cf671ea0653ecd4

See more details on using hashes here.

File details

Details for the file imgui_bundle-1.2.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for imgui_bundle-1.2.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e5899319e890886da2b2967bf9fadfc6f7e8bea7713a55c6fee23e3971b363df
MD5 9d1aeff7219fe5fad60e6316b86c508d
BLAKE2b-256 9d71c533ac5f7a8710c380644799d5a6c3b35db6254441403e3520f46979dbfa

See more details on using hashes here.

File details

Details for the file imgui_bundle-1.2.1-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for imgui_bundle-1.2.1-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 5731d74cf5bd5e89565edc36c5a7e7ee0a0a356b88e4b8432e5704f3bf8fd685
MD5 2ec3f3bdc0a11885faa19892520f6385
BLAKE2b-256 53e6875c52744bcc43c3215930eb57862937548ef60ab8eb07373e0286ebc47e

See more details on using hashes here.

File details

Details for the file imgui_bundle-1.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for imgui_bundle-1.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ec20ded4a526279dc2505dfa12d0ba6f8470721add98cfc4954a0c9ccc068471
MD5 42a3bf679001f648c88bc0e3596e8828
BLAKE2b-256 f89c8dd528ca13255b7c6cf6eeefb3a652b36811cf59dc4a1f50da22a521f103

See more details on using hashes here.

File details

Details for the file imgui_bundle-1.2.1-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for imgui_bundle-1.2.1-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 41fed0e2d1976ea3c24c3925e52fcaa12c171a888788a30bdf608f5ac042a1b2
MD5 b0317379ce2f4f7dd2121acae2d69bec
BLAKE2b-256 7925c83df283c1512b0b107289de6f544f5d0e88e0150ac3c449c2590906138a

See more details on using hashes here.

File details

Details for the file imgui_bundle-1.2.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for imgui_bundle-1.2.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 13a7a26184694d79787d3dd7d177f1a1006ff65c40c9d5858b34222120b46e9c
MD5 2481a3c7146cb841364fe35f3bcb2674
BLAKE2b-256 0bf874a180a7867765e301c4459175b473ef9299e15f27873c5f33c5eb9884c2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page