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.
Dear ImGui Bundle: easily create ImGui applications in Python and C++. Batteries included!
Click on the logo for a complete interactive demonstration!
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.
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 |
|
ImGui Test Engine: Dear ImGui Tests & Automation Engine |
|
Hello ImGui: cross-platform Gui apps with the simplicity of a "Hello World" app |
|
ImPlot: Immediate Mode Plotting |
|
ImGuizmo: Immediate mode 3D gizmo for scene editing and other controls based on Dear ImGui |
|
ImGuiColorTextEdit: Colorizing text editor for ImGui |
|
imgui-node-editor: Node Editor built using Dear ImGui |
|
imgui_md: Markdown renderer for Dear ImGui using MD4C parser |
|
ImmVision: Immediate image debugger and insights |
|
imgui_tex_inspect: A texture inspector tool for Dear ImGui |
|
ImFileDialog: A file dialog library for Dear ImGui |
|
portable-file-dialogs OS native file dialogs library (C++11, single-header) |
|
imgui-knobs: Knobs widgets for ImGui |
|
imspinner: Set of nice spinners for imgui |
|
imgui_toggle: A toggle switch widget for Dear ImGui |
|
ImCoolBar: A Cool bar for Dear ImGui |
|
imgui-command-palette: A Sublime Text or VSCode style command palette in ImGui |
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 example provided in example_integration. This folder 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-2023 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. I’ll give more information about the bindings generator a bit later in 2023.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file imgui-bundle-1.1.0.tar.gz
.
File metadata
- Download URL: imgui-bundle-1.1.0.tar.gz
- Upload date:
- Size: 31.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3da0bfbe985ef41851cf9d46443b82f7a5854f3ecb2c8b5547519dc7f44cc1e6 |
|
MD5 | 31edcce99c32114d961064813919e422 |
|
BLAKE2b-256 | 94eb164baca403b51ce60df44f79bb9a864e64e8099e039268eaafe78ead2d41 |
File details
Details for the file imgui_bundle-1.1.0-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: imgui_bundle-1.1.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 34.7 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c2e81c9d962533b65c19787d6a0adf27f3d8a7229b6a4dd244355f0ce201e4a |
|
MD5 | c4c6098a1676badca8be0c75dab936aa |
|
BLAKE2b-256 | 19da73700239ec01b037d3e4aa79a31c800a67cd4ce10fe9d553f0190a6f950e |
File details
Details for the file imgui_bundle-1.1.0-cp312-cp312-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: imgui_bundle-1.1.0-cp312-cp312-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 25.3 MB
- Tags: CPython 3.12, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f812e64456c35e6f767736f6215237d8bacf87bc0342b24a3860ff62fe0b1f55 |
|
MD5 | 3c3d7592bfaecabebdfad6706fe5543c |
|
BLAKE2b-256 | d5f99d39ca9ad6d4c34b0398b55bbb0681a64a4e947846111bb796ab57e25310 |
File details
Details for the file imgui_bundle-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: imgui_bundle-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 23.9 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b15184e8aea429386937fe4d7822e2712fb4935cab44d4816a334ffb7e11a02 |
|
MD5 | a656bec9bb747f916444c3378951210f |
|
BLAKE2b-256 | 534fa809fd20f70cbd3ef98dbf379087c87dd103cba2401f54f4da65728016eb |
File details
Details for the file imgui_bundle-1.1.0-cp312-cp312-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: imgui_bundle-1.1.0-cp312-cp312-macosx_11_0_x86_64.whl
- Upload date:
- Size: 23.3 MB
- Tags: CPython 3.12, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44e75d852734819c67f2d46d1e5a858cc9c3c2ec687a41fe8e9a692db8145c93 |
|
MD5 | 5a1c18d7a32307345b9bc090f7cc7e23 |
|
BLAKE2b-256 | 8ef17a88d6a52c531b51194dc7af85100b939931f6158a717168f4f1d6dc079e |
File details
Details for the file imgui_bundle-1.1.0-cp312-cp312-macosx_11_0_arm64.whl
.
File metadata
- Download URL: imgui_bundle-1.1.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 15.0 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6029940af76098c5cf9570e4ad43c97708fd23dcf60b92d39d433cedbc762cf9 |
|
MD5 | f3694017a9b6b7b5cb80bb0d9244e874 |
|
BLAKE2b-256 | 82a82c7fdec784fd56025aaffce913f86d7e2b0460c2e8849172c3c366f0f5ff |
File details
Details for the file imgui_bundle-1.1.0-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: imgui_bundle-1.1.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 34.7 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3edad887fefe63ca4eeb8073534b0e7fd5b4aeb24eab0dfa5d2805ea39f6d89d |
|
MD5 | c9b02b3fafe4744bc4bd637e78dffc7f |
|
BLAKE2b-256 | da7d994e4306bb2436678e8d714c3cfb68a755568f017253fda10c7bb945b861 |
File details
Details for the file imgui_bundle-1.1.0-cp311-cp311-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: imgui_bundle-1.1.0-cp311-cp311-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 25.3 MB
- Tags: CPython 3.11, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21b916435a2cc7ca121a9f09b330d6d6fd31ad2016fe517ea2e7bb61193dda8b |
|
MD5 | a584b4d419e8b3b033ce1f93da675238 |
|
BLAKE2b-256 | 7096f8f125f4e8e7574c9ee71ab60b060e82720283b672798b2aa9ae7d1d902b |
File details
Details for the file imgui_bundle-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: imgui_bundle-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 23.9 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb20b054f57d615be696dcc4e7b4fd63937103cbd8ba8d1421cc188ca751d9c2 |
|
MD5 | d667806000d16bf311ff6ab0c9dba684 |
|
BLAKE2b-256 | c167440787ffad6f136f577baa8f526884fd679f1ef1b145a6c9774d17630808 |
File details
Details for the file imgui_bundle-1.1.0-cp311-cp311-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: imgui_bundle-1.1.0-cp311-cp311-macosx_11_0_x86_64.whl
- Upload date:
- Size: 23.1 MB
- Tags: CPython 3.11, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87b020f2b977c0d39bebc81591f21609a7911e142aca457541a814bb6da9f2d2 |
|
MD5 | f5d103c0d5542cfad93b76cffb712525 |
|
BLAKE2b-256 | 14b338cb79881394f6b425ce0321d41629363bba6f62c5f08771fe01a5d584c5 |
File details
Details for the file imgui_bundle-1.1.0-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: imgui_bundle-1.1.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 15.0 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2981792624c5cb691d7891c57f1f5b43b6bbabf6e7945eb1bbe499d40ac56b3b |
|
MD5 | 4c8200a5d48a1ffda8e5716adf46b99a |
|
BLAKE2b-256 | 29dfffd6ba23d5ae484b8a09db6ba7bb3ec159e4f77b1cb9a0c29c3fecba4f70 |
File details
Details for the file imgui_bundle-1.1.0-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: imgui_bundle-1.1.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 34.7 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42889d74774b64371b7c9e317b8ac823d67be7cbe25d40269859812ca6df7fa9 |
|
MD5 | a5c5272e74b474efb0995fcd98095eed |
|
BLAKE2b-256 | ccc717341befba2ac309a17a794ee973bbfb55b84c9114639e3ee7f947b0ec84 |
File details
Details for the file imgui_bundle-1.1.0-cp310-cp310-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: imgui_bundle-1.1.0-cp310-cp310-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 25.3 MB
- Tags: CPython 3.10, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e2feae3238920f18b14f216392a9204c1f419798bba39c6cca5aa811a62d654 |
|
MD5 | 19f850f03e7dbf998de21008b23aaaa4 |
|
BLAKE2b-256 | e0b71b81301d31e5b28e5ed72e989665bad3da82ea736dc940e48572c15da8ef |
File details
Details for the file imgui_bundle-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: imgui_bundle-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 23.9 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f38b75c9d3a5eb1ebaa906c759f56124efda0cbe74a6d01efe4a16c74291b1d |
|
MD5 | af9a2633c1e6f2d482340eb846050164 |
|
BLAKE2b-256 | 2b2825cd89732b2f743dfb73aa9a8966f6e56ca4c32d66feb70f4b682cae8c8c |
File details
Details for the file imgui_bundle-1.1.0-cp310-cp310-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: imgui_bundle-1.1.0-cp310-cp310-macosx_11_0_x86_64.whl
- Upload date:
- Size: 23.1 MB
- Tags: CPython 3.10, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6db6fad28cc82796a7cfb08dcef865daa07d7f44cbde481adfba85b786cd8b1 |
|
MD5 | 955ae2d49cb665b7cc1202fed6d393bb |
|
BLAKE2b-256 | 6b37d2ba416153f4e8bf3e615b1b74c72b1698536aec9a3f4288d360edc3d672 |
File details
Details for the file imgui_bundle-1.1.0-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: imgui_bundle-1.1.0-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 15.0 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1b87395dfbd821004e773f231bba80440af6b2c55a88b4c8330384fa2068cee |
|
MD5 | dfc33cad80259a48fbae14eb3b6f432f |
|
BLAKE2b-256 | f466deb32f16038633fc0b8261d494d901f26ee242123b4884a98181a5171198 |