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

Dear ImGui Bundle

Dear ImGui Bundle is a comprehensive bundle for Dear ImGui, featuring various powerful libraries from its ecosystem. Designed to facilitate the creation of applications in C++ and Python across Windows, macOS, Linux, iOS, Android, and emscripten (Web apps), it is ideal for application developers, and researchers eager to dive into GUI development with ease and efficiency. This bundle simplifies the process, allowing you to focus on the creative aspects of your projects.

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

NanoVG: Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations

nanovg full demo

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.

Support the project

Dear ImGui Bundle is a free and open-source project, and its development and maintenance require considerable efforts.

If you find it valuable for your work – especially in a commercial enterprise or a research setting – please consider supporting its development by making a donation. Your contributions are greatly appreciated!

For commercial users seeking tailored support or specific enhancements, please contact the author by email.

Contribute

Quality contributions are always welcome! If you’re interested in contributing to the project, whether through code, ideas, or feedback, please refer to the development documentation.

License

Dear ImGui Bundle is licensed under the MIT License

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 comprehensive bundle for Dear ImGui, featuring various powerful libraries from its ecosystem. Designed to facilitate the creation of applications in C++ and Python across Windows, macOS, Linux, iOS, Android, and emscripten (Web apps), it is ideal for application developers, and researchers eager to dive into GUI development with ease and efficiency. This bundle simplifies the process, allowing you to focus on the creative aspects of your projects.

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.3.0.tar.gz (36.8 MB view details)

Uploaded Source

Built Distributions

imgui_bundle-1.3.0-cp312-cp312-win_amd64.whl (39.4 MB view details)

Uploaded CPython 3.12 Windows x86-64

imgui_bundle-1.3.0-cp312-cp312-musllinux_1_1_x86_64.whl (29.2 MB view details)

Uploaded CPython 3.12 musllinux: musl 1.1+ x86-64

imgui_bundle-1.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.7 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

imgui_bundle-1.3.0-cp312-cp312-macosx_11_0_x86_64.whl (28.8 MB view details)

Uploaded CPython 3.12 macOS 11.0+ x86-64

imgui_bundle-1.3.0-cp312-cp312-macosx_11_0_arm64.whl (20.3 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

imgui_bundle-1.3.0-cp311-cp311-win_amd64.whl (39.4 MB view details)

Uploaded CPython 3.11 Windows x86-64

imgui_bundle-1.3.0-cp311-cp311-musllinux_1_1_x86_64.whl (29.2 MB view details)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

imgui_bundle-1.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.6 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

imgui_bundle-1.3.0-cp311-cp311-macosx_11_0_x86_64.whl (28.6 MB view details)

Uploaded CPython 3.11 macOS 11.0+ x86-64

imgui_bundle-1.3.0-cp311-cp311-macosx_11_0_arm64.whl (20.3 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

imgui_bundle-1.3.0-cp310-cp310-win_amd64.whl (39.4 MB view details)

Uploaded CPython 3.10 Windows x86-64

imgui_bundle-1.3.0-cp310-cp310-musllinux_1_1_x86_64.whl (29.2 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

imgui_bundle-1.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.6 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

imgui_bundle-1.3.0-cp310-cp310-macosx_11_0_x86_64.whl (28.6 MB view details)

Uploaded CPython 3.10 macOS 11.0+ x86-64

imgui_bundle-1.3.0-cp310-cp310-macosx_11_0_arm64.whl (20.3 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for imgui-bundle-1.3.0.tar.gz
Algorithm Hash digest
SHA256 35fbfc6903457d51ac2fda058961ee35a3548b0b0b02effa13e05099ca1809e2
MD5 00cc79564b5f751d0e34317aaf454273
BLAKE2b-256 3657de51564a39d4f92bc9eeee8fd24a55bf0257a97dd4fd3a3c8e7503d207de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for imgui_bundle-1.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ef5b81b95076f67abe37cf489b5f0fea4832d5c455bd4f3b38ee726dab435095
MD5 12e6ee72e095eb72d5cf31ff6a706480
BLAKE2b-256 2c754aaeafad02e203da6276170342b486e4a736f79de68b18b94c2f02a74515

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for imgui_bundle-1.3.0-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 113ff9ea90ef9cd8d6b4ea2049ece23fcfaade769fa518b15b122158a9f2864d
MD5 7b14c42e8f2f2f1d931d168298092831
BLAKE2b-256 032cbeb6b3407f4123512b007aa8727e5fc57e0413e1ddd87dfc33eb05862b95

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for imgui_bundle-1.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 21d861720ec336228ade3f578387bb3b6282a4d382121bd71e7aff0a8eb2db1f
MD5 e7cadd04aff1af1a847600bcbd4dcb35
BLAKE2b-256 545bd5b48a56165983ebcbdb58ada240bc2fda1d7356c02e7b75248a0196829d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for imgui_bundle-1.3.0-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 fdfcb36c3ac84ad320f365f66fa221bf24944f5b2cc59d97bb3d7213df530023
MD5 d69338454c9e70b7dae15972e3b7761f
BLAKE2b-256 b879ad9705a058dabe10eac2f5e89d6c49251bbdcb7c3f0f86653285c964d93d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for imgui_bundle-1.3.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4e86754b799cd10f4df9db694fa80834530de5ccfe22f31c5930d3d89523885f
MD5 6e6dea75582ddc67a6ffafca5c8648ce
BLAKE2b-256 3975ca328eb4a64ba490a572204ff6d86da78e02d9c96f227fb5d6ce5aeb47c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for imgui_bundle-1.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 22361e9d7e284dc366d7643208929bbcd6fb7b696d126391ca3f187e08745849
MD5 ea2fc7545fe911fd0aa2648d3f234dea
BLAKE2b-256 68c8c5f63eef4bbae9ff691e50fc987b9cdcc4ca1944423f8be0e608e450c980

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for imgui_bundle-1.3.0-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 572257369c04b0f6052413e3f4134d7c37414e85abc8496de98cf5c7d47159ba
MD5 19ac9652797f9c6fd7bbec4fa9c69bf1
BLAKE2b-256 1471d05de7fb50df81b734b51dc33d81a38a622a9eea905b286993b5290066d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for imgui_bundle-1.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c373bb1350bc84ebf5f37b94fae4824dbe8c6948fee40c0032717abbd23214ae
MD5 f7754ea93d931bfb436add975ec8c2d8
BLAKE2b-256 0488c6543e69f42a481ccbcbf90d2a7b997f393406cac542dca44121d8496c22

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for imgui_bundle-1.3.0-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 0435ebd908042781829f4546a6fd5a2e517def8430824cb06d247d7d77fcf4c0
MD5 1f1ad154f549175f2e7f0a59f0fabe54
BLAKE2b-256 82397d58e7c25e823bc86b1dd8e429a11ad56b56e08f458159635569d5596b3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for imgui_bundle-1.3.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7eb8783cf373c6a59f91478a41f8e25afe7c64d5fc847d8829b1163999a42904
MD5 76cec2cda5d6c44848834e73f4296898
BLAKE2b-256 8b0cff9935119b9c15279bb70c779363ba41c7a8964008b1258892e8a4c7c96d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for imgui_bundle-1.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4c705458a1d281908fee569629d8cbee8de6db2d25d11ba513e449874d9f214c
MD5 b1e84ed85bf4983d263d911f8cd0266b
BLAKE2b-256 713e7575902da4283932e88875fb806ed624ae46dd66a1a8bdcc1270c8f7c793

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for imgui_bundle-1.3.0-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 e32448f9a2ee17437a3b0666850d64bfe479b57818c9184b9e2acd31a5e4c705
MD5 7d075de0f9a008bee85d03502af6aeef
BLAKE2b-256 748f367ed60717bfe6a92451d7abd65622d73090b0f356a1aab986a91c4e5b65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for imgui_bundle-1.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c64cbe5f0fae9f6de68800d1f83af1ee4bcf616c8cc80d6d51a3c722ee0f1010
MD5 789cf57060fe73c587473c2c7f2c17f1
BLAKE2b-256 3b644357c6d0f2f870dc82b571f89cfebaeea3d82a34bca9fcf115ec8e50a021

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for imgui_bundle-1.3.0-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 5917e7e32c1853bff69fd84152ba994109c9827764d090c786e983dc85cdc8ac
MD5 e9ea99ede187e82f03ff8494fc5bf439
BLAKE2b-256 2be5436dfa748f46e9bb1dd5b3fb2adbaeb0e50b8f1af920d1da465737b877d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for imgui_bundle-1.3.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9b23ea1507f518103a6568572b6058af434910ee4e579615be1c7a7a2800c4f8
MD5 8c1025a3cd34273159f83d078fb73962
BLAKE2b-256 a14a1de51b13a5da3f36242ec4a5ae3e2ef8cc169bc8bebc13349ce01d270f3b

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