imgui-bundle


Nameimgui-bundle JSON
Version 0.8.2 PyPI version JSON
download
home_pagehttps://github.com/pthom/imgui_bundle
SummaryImGui Bundle: easily create ImGui applications in Python and C++. Batteries included!
upload_time2023-01-25 02:53:12
maintainer
docs_urlNone
authorPascal Thomet
requires_python>=3.6
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![abc](https://raw.githubusercontent.com/pthom/imgui_bundle/doc/bindings/imgui_bundle/demos_assets/images/logo_imgui_bundle_512.png)

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

[![sources](https://github.com/pthom/imgui_bundle/raw/doc/bindings/imgui_bundle/doc/doc_images/badge_view_sources.png)](https://github.com/pthom/imgui_bundle/)
[![doc](https://github.com/pthom/imgui_bundle/raw/doc/bindings/imgui_bundle/doc/doc_images/badge_view_docs.png)](https://pthom.github.io/imgui_bundle)
[![manual](https://github.com/pthom/imgui_bundle/raw/doc/bindings/imgui_bundle/doc/doc_images/badge_interactive_manual.png)](https://traineq.org/ImGuiBundle/emscripten/bin/demo_imgui_bundle.html)

# Introduction

## About ImGui Bundle

[ImGui Bundle](https://github.com/pthom/imgui_bundle) is a bundle for
[Dear ImGui](https://github.com/ocornut/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.

<figure>
<img src="https://traineq.org/imgui_bundle_doc/demo_bundle8.gif"
id="truc" alt="ImGui Bundle interactive demo" />
<figcaption aria-hidden="true">ImGui Bundle interactive
demo</figcaption>
</figure>

This demonstration is also an interactive manual, similar to the online
[ImGui
Manual](https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html)

## Batteries included

ImGui Bundle includes the following libraries:

-   [imgui](https://github.com/ocornut/imgui.git) : Dear ImGui,
    bloat-free Graphical User interface for C++ with minimal
    dependencies

-   [implot](https://github.com/epezent/implot): Immediate Mode Plotting

-   [Hello ImGui](https://github.com/pthom/hello_imgui.git):
    cross-platform Gui apps with the simplicity of a "Hello World" app

-   [ImGuizmo](https://github.com/CedricGuillemet/ImGuizmo.git):
    Immediate mode 3D gizmo for scene editing and other controls based
    on Dear ImGui

-   [ImGuiColorTextEdit](https://github.com/BalazsJako/ImGuiColorTextEdit):
    Colorizing text editor for ImGui

-   [imgui-node-editor](https://github.com/thedmd/imgui-node-editor):
    Node Editor built using Dear ImGui

-   [imgui-knobs](https://github.com/altschuler/imgui-knobs): Knobs
    widgets for ImGui

-   [ImFileDialog](https://github.com/pthom/ImFileDialog.git): A file
    dialog library for Dear ImGui

-   [portable-file-dialogs](https://github.com/samhocevar/portable-file-dialogs)
    Portable GUI dialogs library (C++11, single-header)

-   [imgui\_md](https://github.com/mekhontsev/imgui_md.git): Markdown
    renderer for Dear ImGui using MD4C parser

-   [imspinner](https://github.com/dalerank/imspinner): Set of nice
    spinners for imgui

-   [imgui\_toggle](https://github.com/cmdwtf/imgui_toggle): A toggle
    switch widget for Dear ImGui.

-   [ImmVision](https://github.com/pthom/immvision.git): Immediate image
    debugger and insights

-   [imgui\_tex\_inspect](https://github.com/andyborrell/imgui_tex_inspect):
    A texture inspector tool for Dear ImGui

-   [imgui-command-palette](https://github.com/hnOsmium0001/imgui-command-palette.git):
    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 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](https://github.com/pthom/imgui_bundle/blob/main/bindings/imgui_bundle/imgui/__init__.pyi)
,
[implot](https://github.com/pthom/imgui_bundle/blob/main/bindings/imgui_bundle/implot.pyi),
and [hello
imgui](https://github.com/pthom/imgui_bundle/blob/main/bindings/imgui_bundle/hello_imgui.pyi)

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

# 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](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022).

### 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 `imgui_bundle_demo`.

The source for the demos can be found inside
[bindings/imgui\_bundle/demos\_python](https://github.com/pthom/imgui_bundle/tree/doc/bindings/imgui_bundle/demos_python).

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

## Install for C++

### Integrate ImGui Bundle in your own project in 5 minutes

The easiest way to use ImGui Bundle in an external project is to use the
example provided in
[example\_integration](https://github.com/pthom/imgui_bundle/tree/doc/_example_integration).
This folder includes everything you need to set up your own project with
ImGui Bundle.

### Build ImGui Bundle 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 ImGui Bundle from source, Simply run
`build/bin/demo_imgui_bundle`.

The source for the demos can be found inside
[bindings/imgui\_bundle/demos\_cpp](https://github.com/pthom/imgui_bundle/tree/doc/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](https://traineq.org/ImGuiBundle/emscripten/bin/demo_imgui_bundle.html)

# Usage instructions

## Dear ImGui - Immediate GUI

Dear ImGui is an implementation of the Immediate Gui paradigm.

### Consult the ImGui Manual

Dear ImGui comes with a complete demo. It demonstrates all the widgets,
together with an example code on how to use them.

[ImGui
Manual](https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html)
is an easy way to consult this demo, and to see the corresponding code.
The demo code is in C++, but read on for "Code advices" on how to
translate from C++ to python.

### Example

An example is often worth a thousand words, the following code:

C++

    // Display a text
    ImGui::Text("Counter = %i", app_state.counter);
    ImGui::SameLine(); // by default ImGui starts a new line at each widget

    // The following line displays a button
    if (ImGui::Button("increment counter"))
        // And returns true if it was clicked: you can *immediately* handle the click
        app_state.counter += 1;

    // Input a text: in C++, InputText returns a bool and modifies the text directly
    bool changed = ImGui::InputText("Your name?", &app_state.name);
    ImGui::Text("Hello %s!", app_state.name.c_str());

Python

    # Display a text
    imgui.text(f"Counter = {app_state.counter}")
    imgui.same_line()  # by default ImGui starts a new line at each widget

    # The following line displays a button
    if imgui.button("increment counter"):
        # And returns true if it was clicked: you can *immediately* handle the click
        app_state.counter += 1

    # Input a text: in python, input_text returns a tuple(modified, new_value)
    changed, app_state.name = imgui.input_text("Your name?", app_state.name)
    imgui.text(f"Hello {app_state.name}!")

Displays this:

![immediate gui
example](https://github.com/pthom/imgui_bundle/raw/doc/bindings/imgui_bundle/doc/doc_images/immediate_gui_example.png)

## Hello ImGui - Starter pack

ImGui Bundle includes [Hello
ImGui](https://github.com/pthom/hello_imgui), which is itself based on
ImGui. "Hello ImGui" can be compared to a starter pack that enables to
easily write cross-platform Gui apps for Windows, macOS, Linux, iOS, and
[emscripten](https://en.wikipedia.org/wiki/Emscripten).

### API

See the "Hello ImGui" [API
doc](https://github.com/pthom/hello_imgui/blob/master/src/hello_imgui/hello_imgui_api.md).
Also consult the doc on how to build [DPI
aware](https://github.com/pthom/hello_imgui/tree/master/src/hello_imgui/dpi_aware.h)
applications.

### Features

-   Full multiplatform support: Windows, Linux, OSX, iOS, Emscripten,
    Android (poorly supported). See demo
    [video](https://traineq.org/HelloImGui_6_Platforms.mp4)

-   Power Save mode: reduce FPS when application is idle (see
    [RunnerParams.fpsIdle](https://github.com/pthom/hello_imgui/blob/master/src/hello_imgui/runner_params.h))

-   [DPI
    aware](https://github.com/pthom/hello_imgui/tree/master/src/hello_imgui/dpi_aware.h)
    applications (widget placement, window size, font loading and
    scaling)

-   Theme tweaking (see [demo
    video](https://www.youtube.com/watch?v=4f_-3DDcAZk), and
    [API](https://github.com/pthom/hello_imgui/blob/master/src/hello_imgui/imgui_theme.h)
    )

-   Window geometry utilities: autosize, restore window position, full
    screen, etc. (see
    [WindowGeometry](https://github.com/pthom/hello_imgui/blob/master/src/hello_imgui/app_window_params.h))

-   Multiplatform [assets
    embedding](https://github.com/pthom/hello_imgui/blob/master/src/hello_imgui/hello_imgui_assets.h)

-   Switch between Glfw or Sdl backend (see
    [RunnerParams.backendType](https://github.com/pthom/hello_imgui/blob/master/src/hello_imgui/runner_params.h))

The usage of `Hello ImGui` is optional. You can also build an imgui
application from scratch, in C++ or in python (see [python
example](https://github.com/pthom/imgui_bundle/tree/doc/bindings/imgui_bundle/demos_python/demos_immapp/imgui_example_glfw_opengl3.py))

HelloImGui is fully configurable by POD (plain old data) structures. See
[their
description](https://github.com/pthom/hello_imgui/blob/master/src/hello_imgui/hello_imgui_api.md)

## ImmApp - Immediate App

ImGui Bundle includes a library named ImmApp (which stands for Immediate
App). ImmApp is a thin extension of HelloImGui that enables to easily
initialize the ImGuiBundle addons that require additional setup at
startup

### API

[C++
API](https://github.com/pthom/imgui_bundle/tree/doc/external/immapp/immapp/runner.h)

[Python
bindings](https://github.com/pthom/imgui_bundle/tree/doc/bindings/imgui_bundle/immapp/immapp_cpp.pyi)

### How to start an application with addons

Some libraries included by ImGui Bundle require an initialization at
startup. ImmApp makes this easy via AddOnParams.

The example program below demonstrates how to run an application which
will use implot (which requires a context to be created at startup), and
imgui\_md (which requires additional fonts to be loaded at startup).

C++

    #include "immapp/immapp.h"
    #include "imgui_md_wrapper/imgui_md_wrapper.h"
    #include "implot/implot.h"
    #include "demo_utils/api_demos.h"
    #include <vector>
    #include <cmath>


    int main(int, char**)
    {
        // This call is specific to the ImGui Bundle interactive manual. In a standard application, you could write:
        //         HelloImGui::SetAssetsFolder("my_assets"); // (By default, HelloImGui will search inside "assets")
        ChdirBesideAssetsFolder();

        constexpr double pi = 3.1415926535897932384626433;
        std::vector<double> x, y1, y2;
        for (double _x = 0; _x < 4 * pi; _x += 0.01)
        {
            x.push_back(_x);
            y1.push_back(std::cos(_x));
            y2.push_back(std::sin(_x));
        }

        auto gui = [x,y1,y2]()
        {
            ImGuiMd::Render("# This is the plot of _cosinus_ and *sinus*");  // Markdown
            if (ImPlot::BeginPlot("Plot"))
            {
                ImPlot::PlotLine("y1", x.data(), y1.data(), x.size());
                ImPlot::PlotLine("y2", x.data(), y2.data(), x.size());
                ImPlot::EndPlot();
            }
        };

        HelloImGui::SimpleRunnerParams runnerParams { .guiFunction = gui, .windowSize = {600, 400} };
        ImmApp::AddOnsParams addons { .withImplot = true, .withMarkdown = true };
        ImmApp::Run(runnerParams, addons);

        return 0;
    }

Python:

    import numpy as np
    from imgui_bundle import implot, imgui_md, immapp
    from imgui_bundle.demos_python import demo_utils


    def main():
        # This call is specific to the ImGui Bundle interactive manual. In a standard application, you could write:
        #         hello_imgui.set_assets_folder("my_assets"); # (By default, HelloImGui will search inside "assets")
        demo_utils.set_hello_imgui_demo_assets_folder()

        x = np.arange(0, np.pi * 4, 0.01)
        y1 = np.cos(x)
        y2 = np.sin(x)

        def gui():
            imgui_md.render("# This is the plot of _cosinus_ and *sinus*")  # Markdown
            if implot.begin_plot("Plot"):
                implot.plot_line("y1", x, y1)
                implot.plot_line("y2", x, y2)
                implot.end_plot()

        immapp.run(gui, with_implot=True, with_markdown=True, window_size=(600, 400))


    if __name__ == "__main__":
        main()

## Using ImGui Bundle with jupyter notebook

ImmApp adds support for integration inside jupyter notebook: the
application will be run in an external window, and a screenshot will be
placed on the notebook after execution.

This requires a window server, and will not run on google collab.

Below is a screenshot, that you can test by running `jupyter notebook`
inside `bindings/imgui_bundle/demos_python/notebooks`

![immapp notebook
example](https://github.com/pthom/imgui_bundle/raw/doc/bindings/imgui_bundle/doc/doc_images/immapp_notebook_example.jpg)

[40 seconds demo video on
Youtube](https://www.youtube.com/watch?v=QQIC7lpHono)

### API:

[immapp/immapp\_notebook.py](https://github.com/pthom/imgui_bundle/tree/doc/bindings/imgui_bundle/immapp/immapp_notebook.py)

# C++ / Python porting advices

## General advices

ImGui is a C++ library that was ported to Python. In order to work with
it, you will often refer to its
[manual](https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html),
which shows example code in C++.

In order to translate from C++ to Python:

1.  Change the function names and parameters' names from `CamelCase` to
    `snake_case`

2.  Change the way the output are handled.

    1.  in C++ `ImGui::RadioButton` modifies its second parameter (which
        is passed by address) and returns true if the user clicked the
        radio button.

    2.  In python, the (possibly modified) value is transmitted via the
        return: `imgui.radio_button` returns a `Tuple[bool, str]` which
        contains `(user_clicked, new_value)`.

3.  if porting some code that uses static variables, use the
    `@immapp.static` decorator. In this case, this decorator simply adds
    a variable `value` at the function scope. It is preserved between
    calls. Normally, this variable should be accessed via
    `demo_radio_button.value`, however the first line of the function
    adds a synonym named static for more clarity. Do not overuse them!
    Static variable suffer from almost the same shortcomings as global
    variables, so you should prefer to modify an application state.

### Example:

C++

    void DemoRadioButton()
    {
        static int value = 0;
        ImGui::RadioButton("radio a", &value, 0); ImGui::SameLine();
        ImGui::RadioButton("radio b", &value, 1); ImGui::SameLine();
        ImGui::RadioButton("radio c", &value, 2);
    }

Python

    @immapp.static(value=0)
    def demo_radio_button():
        static = demo_radio_button
        clicked, static.value = imgui.radio_button("radio a", static.value, 0)
        imgui.same_line()
        clicked, static.value = imgui.radio_button("radio b", static.value, 1)
        imgui.same_line()
        clicked, static.value = imgui.radio_button("radio c", static.value, 2)

## Enums and TextInput

In the example below, two differences are important:

### InputText functions:

`imgui.input_text` (Python) is equivalent to `ImGui::InputText` (C++)

-   In C++, it uses two parameters for the text: the text pointer, and
    its length.

-   In Python, you can simply pass a string, and get back its modified
    value in the returned tuple.

### Enums handling:

-   `ImGuiInputTextFlags_` (C++) corresponds to `imgui.InputTextFlags_`
    (python) and it is an *enum* (note the trailing underscore).

-   `ImGuiInputTextFlags` (C++) corresponds to `imgui.InputTextFlags`
    (python) and it is an *int* (note: no trailing underscore)

You will find many similar enums.

The dichotomy between int and enums, enables you to write flags that are
a combinations of values from the enum (see example below).

### Example

C++

    void DemoInputTextUpperCase()
    {
        static char text[64] = "";
        ImGuiInputTextFlags flags = (
            ImGuiInputTextFlags_CharsUppercase
            | ImGuiInputTextFlags_CharsNoBlank
        );
        /*bool changed = */ ImGui::InputText("Upper case, no spaces", text, 64, flags);
    }

Python

    @immapp.static(text="")
    def demo_input_text_decimal() -> None:
        static = demo_input_text_decimal
        flags:imgui.InputTextFlags = (
                imgui.InputTextFlags_.chars_uppercase.value
              | imgui.InputTextFlags_.chars_no_blank.value
            )
        changed, static.text = imgui.input_text("Upper case, no spaces", static.text, flags)

Note: in C++, by using `imgui_stdlib.h`, it is also possible to write:

    #include "imgui/misc/cpp/imgui_stdlib.h"

    void DemoInputTextUpperCase_StdString()
    {
        static std::string text;
        ImGuiInputTextFlags flags = (
            ImGuiInputTextFlags_CharsUppercase
            | ImGuiInputTextFlags_CharsNoBlank
        );
        /*bool changed = */ ImGui::InputText("Upper case, no spaces", &text, flags);
    }

## Advanced glfw callbacks

When using the glfw backend, you can set advanced callbacks on all glfw
events.

Below is an example that triggers a callback whenever the window size is
changed:

    import imgui_bundle
    import glfw   # always import glfw *after* imgui_bundle!!!


    # define a callback
    def my_window_size_callback(window: glfw._GLFWwindow, w: int, h: int):
        print(f"Window size changed to {w}x{h}")


    # Get the glfw window used by hello imgui
    window = imgui_bundle.glfw_window_hello_imgui()
    glfw.set_window_size_callback(window, my_window_size_callback)

It is important to import glfw *after* imgui\_bundle, since - upon
import - imgui\_bundle informs glfw that it shall use its own version of
the glfw dynamic library.

# Closing words

## Who is this project for

As mentioned in the intro,

[ImGui Bundle](https://github.com/pthom/imgui_bundle) is a bundle for
[Dear ImGui](https://github.com/ocornut/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.

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, ImGui Bundle 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

ImGui Bundle would not be possible without the work of the authors of
"Dear ImGui", and especially [Omar
Cornut](https://www.miracleworld.net/).

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](https://evanpezent.com/) (author
of ImPlot), [Cédric Guillemet](https://github.com/CedricGuillemet)
(author of ImGuizmo), [Balázs
Jákó](https://merlin3d.wordpress.com/about/) (author of
ImGuiColorTextEdit), and [Michał Cichoń](https://github.com/thedmd)
(author of imgui-node-editor), and [Dmitry
Mekhontsev](https://github.com/mekhontsev) (author of imgui-md), [Andy
Borrel](https://github.com/andyborrell) (author of imgui-tex-inspect,
another image debugging tool, which I discovered long after having
developed immvision).

This doc was built using [Asciidoc](https://asciidoc.org/).

Immvision was inspired by [The Image
Debugger](https://billbaxter.com/projects/imdebug/), 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](https://pyimgui.readthedocs.io/en/latest/) 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](https://dearpygui.readthedocs.io/en/latest/)
([repository](https://github.com/hoffstadt/DearPyGui)) 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

ImGui Bundle is developed by Pascal Thomet. I am reachable on my [Github
page](https://github.com/pthom). I sometimes
[blog](http://code-ballads.net/). There is a
[playlist](https://www.youtube.com/playlist?list=PLaJx_KrDECZPzttQ77Gv8DD7OAUwmtWUc)
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 ImGui Bundle developed

The development of the initial version of 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! 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 ImGui Bundle or about the bindings
generator in the context of a commercial project, please contact me by
email.

### History

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

-   [ImGui
    Manual](https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html),
    an interactive manual for Dear ImGui, which I developed in June 2020

-   [implot demo](https://traineq.org/implot_demo/src/implot_demo.html)
    which I developed in 2020.

-   [imgui\_datascience](https://github.com/pthom/imgui_datascience), a
    python package I developed in 2018 for image analysis and debugging.
    Its successor is immvision.

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pthom/imgui_bundle",
    "name": "imgui-bundle",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Pascal Thomet",
    "author_email": "pthomet@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/e0/9b/63a56eb24e49dbc3d6e8ee1f2fe52b8b79118b66c14896fc0bad8e009bcd/imgui-bundle-0.8.2.tar.gz",
    "platform": null,
    "description": "![abc](https://raw.githubusercontent.com/pthom/imgui_bundle/doc/bindings/imgui_bundle/demos_assets/images/logo_imgui_bundle_512.png)\n\nImGui Bundle: easily create ImGui applications in Python and C++.\nBatteries included!\n\n[![sources](https://github.com/pthom/imgui_bundle/raw/doc/bindings/imgui_bundle/doc/doc_images/badge_view_sources.png)](https://github.com/pthom/imgui_bundle/)\n[![doc](https://github.com/pthom/imgui_bundle/raw/doc/bindings/imgui_bundle/doc/doc_images/badge_view_docs.png)](https://pthom.github.io/imgui_bundle)\n[![manual](https://github.com/pthom/imgui_bundle/raw/doc/bindings/imgui_bundle/doc/doc_images/badge_interactive_manual.png)](https://traineq.org/ImGuiBundle/emscripten/bin/demo_imgui_bundle.html)\n\n# Introduction\n\n## About ImGui Bundle\n\n[ImGui Bundle](https://github.com/pthom/imgui_bundle) is a bundle for\n[Dear ImGui](https://github.com/ocornut/imgui), including various\npowerful libraries from its ecosystem. It enables to easily create ImGui\napplications in C++ and Python, under Windows, macOS, and Linux. It is\naimed at application developers, researchers, and beginner developers\nwho want to quickly get started.\n\n## Interactive manual & demo in one click!\n\nClick on the animated demonstration below to launch the fully\ninteractive demonstration.\n\n<figure>\n<img src=\"https://traineq.org/imgui_bundle_doc/demo_bundle8.gif\"\nid=\"truc\" alt=\"ImGui Bundle interactive demo\" />\n<figcaption aria-hidden=\"true\">ImGui Bundle interactive\ndemo</figcaption>\n</figure>\n\nThis demonstration is also an interactive manual, similar to the online\n[ImGui\nManual](https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html)\n\n## Batteries included\n\nImGui Bundle includes the following libraries:\n\n-   [imgui](https://github.com/ocornut/imgui.git) : Dear ImGui,\n    bloat-free Graphical User interface for C++ with minimal\n    dependencies\n\n-   [implot](https://github.com/epezent/implot): Immediate Mode Plotting\n\n-   [Hello ImGui](https://github.com/pthom/hello_imgui.git):\n    cross-platform Gui apps with the simplicity of a \"Hello World\" app\n\n-   [ImGuizmo](https://github.com/CedricGuillemet/ImGuizmo.git):\n    Immediate mode 3D gizmo for scene editing and other controls based\n    on Dear ImGui\n\n-   [ImGuiColorTextEdit](https://github.com/BalazsJako/ImGuiColorTextEdit):\n    Colorizing text editor for ImGui\n\n-   [imgui-node-editor](https://github.com/thedmd/imgui-node-editor):\n    Node Editor built using Dear ImGui\n\n-   [imgui-knobs](https://github.com/altschuler/imgui-knobs): Knobs\n    widgets for ImGui\n\n-   [ImFileDialog](https://github.com/pthom/ImFileDialog.git): A file\n    dialog library for Dear ImGui\n\n-   [portable-file-dialogs](https://github.com/samhocevar/portable-file-dialogs)\n    Portable GUI dialogs library (C++11, single-header)\n\n-   [imgui\\_md](https://github.com/mekhontsev/imgui_md.git): Markdown\n    renderer for Dear ImGui using MD4C parser\n\n-   [imspinner](https://github.com/dalerank/imspinner): Set of nice\n    spinners for imgui\n\n-   [imgui\\_toggle](https://github.com/cmdwtf/imgui_toggle): A toggle\n    switch widget for Dear ImGui.\n\n-   [ImmVision](https://github.com/pthom/immvision.git): Immediate image\n    debugger and insights\n\n-   [imgui\\_tex\\_inspect](https://github.com/andyborrell/imgui_tex_inspect):\n    A texture inspector tool for Dear ImGui\n\n-   [imgui-command-palette](https://github.com/hnOsmium0001/imgui-command-palette.git):\n    A Sublime Text or VSCode style command palette in ImGui\n\nA big thank you to their authors for their awesome work!\n\n## Easily port your code between python and C++\n\nThe python bindings closely mirror the original C++ API, with fully\ntyped bindings. The original code documentation is meticulously kept\ninside the python stubs. See for example the documentation for\n[imgui](https://github.com/pthom/imgui_bundle/blob/main/bindings/imgui_bundle/imgui/__init__.pyi)\n,\n[implot](https://github.com/pthom/imgui_bundle/blob/main/bindings/imgui_bundle/implot.pyi),\nand [hello\nimgui](https://github.com/pthom/imgui_bundle/blob/main/bindings/imgui_bundle/hello_imgui.pyi)\n\nThanks to this, code completion in your favorite python IDE works like a\ncharm, and porting code between Python and C++ becomes easy.\n\n# Build and install instructions\n\n## Install for Python\n\n### Install from pypi\n\n    pip install imgui-bundle\n    pip install opencv-contrib-python \n\n-   in order to run the immvision module, install opencv-python or\n    opencv-contrib-python\n\nNote: under windows, you might need to install [msvc\nredist](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022).\n\n### Install from source:\n\n    git clone https://github.com/pthom/imgui_bundle.git\n    cd imgui_bundle\n    git submodule update --init --recursive \n    pip install -v . \n    pip install opencv-contrib-python\n\n-   Since there are lots of submodules, this might take a few minutes\n\n-   The build process might take up to 5 minutes\n\n### Run the python demo\n\nSimply run `imgui_bundle_demo`.\n\nThe source for the demos can be found inside\n[bindings/imgui\\_bundle/demos\\_python](https://github.com/pthom/imgui_bundle/tree/doc/bindings/imgui_bundle/demos_python).\n\nConsider `imgui_bundle_demo` as an always available manual for ImGui\nBundle with lots of examples and related code source.\n\n## Install for C++\n\n### Integrate ImGui Bundle in your own project in 5 minutes\n\nThe easiest way to use ImGui Bundle in an external project is to use the\nexample provided in\n[example\\_integration](https://github.com/pthom/imgui_bundle/tree/doc/_example_integration).\nThis folder includes everything you need to set up your own project with\nImGui Bundle.\n\n### Build ImGui Bundle from source\n\nIf you choose to clone this repo, follow these instructions:\n\n    git clone https://github.com/pthom/imgui_bundle.git\n    cd imgui_bundle\n    git submodule update --init --recursive \n    mkdir build\n    cd build\n    cmake .. -DIMMVISION_FETCH_OPENCV=ON \n    make -j\n\n-   Since there are lots of submodules, this might take a few minutes\n\n-   The flag `-DIMMVISION_FETCH_OPENCV=ON` is optional. If set, a\n    minimal version of OpenCV will be downloaded a compiled at this\n    stage (this might require a few minutes)\n\nThe `immvision` module will only be built if OpenCV can be found.\nOtherwise, it will be ignored, and no error will be emitted.\n\nIf you have an existing OpenCV install, set its path via:\n\n    cmake .. -DOpenCV_DIR=/.../path/to/OpenCVConfig.cmake\n\n### Run the C++ demo\n\nIf you built ImGui Bundle from source, Simply run\n`build/bin/demo_imgui_bundle`.\n\nThe source for the demos can be found inside\n[bindings/imgui\\_bundle/demos\\_cpp](https://github.com/pthom/imgui_bundle/tree/doc/bindings/imgui_bundle/demos_cpp/).\n\nConsider `demo_imgui_bundle` as a manual with lots of examples and\nrelated code source. It is always [available\nonline](https://traineq.org/ImGuiBundle/emscripten/bin/demo_imgui_bundle.html)\n\n# Usage instructions\n\n## Dear ImGui - Immediate GUI\n\nDear ImGui is an implementation of the Immediate Gui paradigm.\n\n### Consult the ImGui Manual\n\nDear ImGui comes with a complete demo. It demonstrates all the widgets,\ntogether with an example code on how to use them.\n\n[ImGui\nManual](https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html)\nis an easy way to consult this demo, and to see the corresponding code.\nThe demo code is in C++, but read on for \"Code advices\" on how to\ntranslate from C++ to python.\n\n### Example\n\nAn example is often worth a thousand words, the following code:\n\nC++\n\n    // Display a text\n    ImGui::Text(\"Counter = %i\", app_state.counter);\n    ImGui::SameLine(); // by default ImGui starts a new line at each widget\n\n    // The following line displays a button\n    if (ImGui::Button(\"increment counter\"))\n        // And returns true if it was clicked: you can *immediately* handle the click\n        app_state.counter += 1;\n\n    // Input a text: in C++, InputText returns a bool and modifies the text directly\n    bool changed = ImGui::InputText(\"Your name?\", &app_state.name);\n    ImGui::Text(\"Hello %s!\", app_state.name.c_str());\n\nPython\n\n    # Display a text\n    imgui.text(f\"Counter = {app_state.counter}\")\n    imgui.same_line()  # by default ImGui starts a new line at each widget\n\n    # The following line displays a button\n    if imgui.button(\"increment counter\"):\n        # And returns true if it was clicked: you can *immediately* handle the click\n        app_state.counter += 1\n\n    # Input a text: in python, input_text returns a tuple(modified, new_value)\n    changed, app_state.name = imgui.input_text(\"Your name?\", app_state.name)\n    imgui.text(f\"Hello {app_state.name}!\")\n\nDisplays this:\n\n![immediate gui\nexample](https://github.com/pthom/imgui_bundle/raw/doc/bindings/imgui_bundle/doc/doc_images/immediate_gui_example.png)\n\n## Hello ImGui - Starter pack\n\nImGui Bundle includes [Hello\nImGui](https://github.com/pthom/hello_imgui), which is itself based on\nImGui. \"Hello ImGui\" can be compared to a starter pack that enables to\neasily write cross-platform Gui apps for Windows, macOS, Linux, iOS, and\n[emscripten](https://en.wikipedia.org/wiki/Emscripten).\n\n### API\n\nSee the \"Hello ImGui\" [API\ndoc](https://github.com/pthom/hello_imgui/blob/master/src/hello_imgui/hello_imgui_api.md).\nAlso consult the doc on how to build [DPI\naware](https://github.com/pthom/hello_imgui/tree/master/src/hello_imgui/dpi_aware.h)\napplications.\n\n### Features\n\n-   Full multiplatform support: Windows, Linux, OSX, iOS, Emscripten,\n    Android (poorly supported). See demo\n    [video](https://traineq.org/HelloImGui_6_Platforms.mp4)\n\n-   Power Save mode: reduce FPS when application is idle (see\n    [RunnerParams.fpsIdle](https://github.com/pthom/hello_imgui/blob/master/src/hello_imgui/runner_params.h))\n\n-   [DPI\n    aware](https://github.com/pthom/hello_imgui/tree/master/src/hello_imgui/dpi_aware.h)\n    applications (widget placement, window size, font loading and\n    scaling)\n\n-   Theme tweaking (see [demo\n    video](https://www.youtube.com/watch?v=4f_-3DDcAZk), and\n    [API](https://github.com/pthom/hello_imgui/blob/master/src/hello_imgui/imgui_theme.h)\n    )\n\n-   Window geometry utilities: autosize, restore window position, full\n    screen, etc. (see\n    [WindowGeometry](https://github.com/pthom/hello_imgui/blob/master/src/hello_imgui/app_window_params.h))\n\n-   Multiplatform [assets\n    embedding](https://github.com/pthom/hello_imgui/blob/master/src/hello_imgui/hello_imgui_assets.h)\n\n-   Switch between Glfw or Sdl backend (see\n    [RunnerParams.backendType](https://github.com/pthom/hello_imgui/blob/master/src/hello_imgui/runner_params.h))\n\nThe usage of `Hello ImGui` is optional. You can also build an imgui\napplication from scratch, in C++ or in python (see [python\nexample](https://github.com/pthom/imgui_bundle/tree/doc/bindings/imgui_bundle/demos_python/demos_immapp/imgui_example_glfw_opengl3.py))\n\nHelloImGui is fully configurable by POD (plain old data) structures. See\n[their\ndescription](https://github.com/pthom/hello_imgui/blob/master/src/hello_imgui/hello_imgui_api.md)\n\n## ImmApp - Immediate App\n\nImGui Bundle includes a library named ImmApp (which stands for Immediate\nApp). ImmApp is a thin extension of HelloImGui that enables to easily\ninitialize the ImGuiBundle addons that require additional setup at\nstartup\n\n### API\n\n[C++\nAPI](https://github.com/pthom/imgui_bundle/tree/doc/external/immapp/immapp/runner.h)\n\n[Python\nbindings](https://github.com/pthom/imgui_bundle/tree/doc/bindings/imgui_bundle/immapp/immapp_cpp.pyi)\n\n### How to start an application with addons\n\nSome libraries included by ImGui Bundle require an initialization at\nstartup. ImmApp makes this easy via AddOnParams.\n\nThe example program below demonstrates how to run an application which\nwill use implot (which requires a context to be created at startup), and\nimgui\\_md (which requires additional fonts to be loaded at startup).\n\nC++\n\n    #include \"immapp/immapp.h\"\n    #include \"imgui_md_wrapper/imgui_md_wrapper.h\"\n    #include \"implot/implot.h\"\n    #include \"demo_utils/api_demos.h\"\n    #include <vector>\n    #include <cmath>\n\n\n    int main(int, char**)\n    {\n        // This call is specific to the ImGui Bundle interactive manual. In a standard application, you could write:\n        //         HelloImGui::SetAssetsFolder(\"my_assets\"); // (By default, HelloImGui will search inside \"assets\")\n        ChdirBesideAssetsFolder();\n\n        constexpr double pi = 3.1415926535897932384626433;\n        std::vector<double> x, y1, y2;\n        for (double _x = 0; _x < 4 * pi; _x += 0.01)\n        {\n            x.push_back(_x);\n            y1.push_back(std::cos(_x));\n            y2.push_back(std::sin(_x));\n        }\n\n        auto gui = [x,y1,y2]()\n        {\n            ImGuiMd::Render(\"# This is the plot of _cosinus_ and *sinus*\");  // Markdown\n            if (ImPlot::BeginPlot(\"Plot\"))\n            {\n                ImPlot::PlotLine(\"y1\", x.data(), y1.data(), x.size());\n                ImPlot::PlotLine(\"y2\", x.data(), y2.data(), x.size());\n                ImPlot::EndPlot();\n            }\n        };\n\n        HelloImGui::SimpleRunnerParams runnerParams { .guiFunction = gui, .windowSize = {600, 400} };\n        ImmApp::AddOnsParams addons { .withImplot = true, .withMarkdown = true };\n        ImmApp::Run(runnerParams, addons);\n\n        return 0;\n    }\n\nPython:\n\n    import numpy as np\n    from imgui_bundle import implot, imgui_md, immapp\n    from imgui_bundle.demos_python import demo_utils\n\n\n    def main():\n        # This call is specific to the ImGui Bundle interactive manual. In a standard application, you could write:\n        #         hello_imgui.set_assets_folder(\"my_assets\"); # (By default, HelloImGui will search inside \"assets\")\n        demo_utils.set_hello_imgui_demo_assets_folder()\n\n        x = np.arange(0, np.pi * 4, 0.01)\n        y1 = np.cos(x)\n        y2 = np.sin(x)\n\n        def gui():\n            imgui_md.render(\"# This is the plot of _cosinus_ and *sinus*\")  # Markdown\n            if implot.begin_plot(\"Plot\"):\n                implot.plot_line(\"y1\", x, y1)\n                implot.plot_line(\"y2\", x, y2)\n                implot.end_plot()\n\n        immapp.run(gui, with_implot=True, with_markdown=True, window_size=(600, 400))\n\n\n    if __name__ == \"__main__\":\n        main()\n\n## Using ImGui Bundle with jupyter notebook\n\nImmApp adds support for integration inside jupyter notebook: the\napplication will be run in an external window, and a screenshot will be\nplaced on the notebook after execution.\n\nThis requires a window server, and will not run on google collab.\n\nBelow is a screenshot, that you can test by running `jupyter notebook`\ninside `bindings/imgui_bundle/demos_python/notebooks`\n\n![immapp notebook\nexample](https://github.com/pthom/imgui_bundle/raw/doc/bindings/imgui_bundle/doc/doc_images/immapp_notebook_example.jpg)\n\n[40 seconds demo video on\nYoutube](https://www.youtube.com/watch?v=QQIC7lpHono)\n\n### API:\n\n[immapp/immapp\\_notebook.py](https://github.com/pthom/imgui_bundle/tree/doc/bindings/imgui_bundle/immapp/immapp_notebook.py)\n\n# C++ / Python porting advices\n\n## General advices\n\nImGui is a C++ library that was ported to Python. In order to work with\nit, you will often refer to its\n[manual](https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html),\nwhich shows example code in C++.\n\nIn order to translate from C++ to Python:\n\n1.  Change the function names and parameters' names from `CamelCase` to\n    `snake_case`\n\n2.  Change the way the output are handled.\n\n    1.  in C++ `ImGui::RadioButton` modifies its second parameter (which\n        is passed by address) and returns true if the user clicked the\n        radio button.\n\n    2.  In python, the (possibly modified) value is transmitted via the\n        return: `imgui.radio_button` returns a `Tuple[bool, str]` which\n        contains `(user_clicked, new_value)`.\n\n3.  if porting some code that uses static variables, use the\n    `@immapp.static` decorator. In this case, this decorator simply adds\n    a variable `value` at the function scope. It is preserved between\n    calls. Normally, this variable should be accessed via\n    `demo_radio_button.value`, however the first line of the function\n    adds a synonym named static for more clarity. Do not overuse them!\n    Static variable suffer from almost the same shortcomings as global\n    variables, so you should prefer to modify an application state.\n\n### Example:\n\nC++\n\n    void DemoRadioButton()\n    {\n        static int value = 0;\n        ImGui::RadioButton(\"radio a\", &value, 0); ImGui::SameLine();\n        ImGui::RadioButton(\"radio b\", &value, 1); ImGui::SameLine();\n        ImGui::RadioButton(\"radio c\", &value, 2);\n    }\n\nPython\n\n    @immapp.static(value=0)\n    def demo_radio_button():\n        static = demo_radio_button\n        clicked, static.value = imgui.radio_button(\"radio a\", static.value, 0)\n        imgui.same_line()\n        clicked, static.value = imgui.radio_button(\"radio b\", static.value, 1)\n        imgui.same_line()\n        clicked, static.value = imgui.radio_button(\"radio c\", static.value, 2)\n\n## Enums and TextInput\n\nIn the example below, two differences are important:\n\n### InputText functions:\n\n`imgui.input_text` (Python) is equivalent to `ImGui::InputText` (C++)\n\n-   In C++, it uses two parameters for the text: the text pointer, and\n    its length.\n\n-   In Python, you can simply pass a string, and get back its modified\n    value in the returned tuple.\n\n### Enums handling:\n\n-   `ImGuiInputTextFlags_` (C++) corresponds to `imgui.InputTextFlags_`\n    (python) and it is an *enum* (note the trailing underscore).\n\n-   `ImGuiInputTextFlags` (C++) corresponds to `imgui.InputTextFlags`\n    (python) and it is an *int* (note: no trailing underscore)\n\nYou will find many similar enums.\n\nThe dichotomy between int and enums, enables you to write flags that are\na combinations of values from the enum (see example below).\n\n### Example\n\nC++\n\n    void DemoInputTextUpperCase()\n    {\n        static char text[64] = \"\";\n        ImGuiInputTextFlags flags = (\n            ImGuiInputTextFlags_CharsUppercase\n            | ImGuiInputTextFlags_CharsNoBlank\n        );\n        /*bool changed = */ ImGui::InputText(\"Upper case, no spaces\", text, 64, flags);\n    }\n\nPython\n\n    @immapp.static(text=\"\")\n    def demo_input_text_decimal() -> None:\n        static = demo_input_text_decimal\n        flags:imgui.InputTextFlags = (\n                imgui.InputTextFlags_.chars_uppercase.value\n              | imgui.InputTextFlags_.chars_no_blank.value\n            )\n        changed, static.text = imgui.input_text(\"Upper case, no spaces\", static.text, flags)\n\nNote: in C++, by using `imgui_stdlib.h`, it is also possible to write:\n\n    #include \"imgui/misc/cpp/imgui_stdlib.h\"\n\n    void DemoInputTextUpperCase_StdString()\n    {\n        static std::string text;\n        ImGuiInputTextFlags flags = (\n            ImGuiInputTextFlags_CharsUppercase\n            | ImGuiInputTextFlags_CharsNoBlank\n        );\n        /*bool changed = */ ImGui::InputText(\"Upper case, no spaces\", &text, flags);\n    }\n\n## Advanced glfw callbacks\n\nWhen using the glfw backend, you can set advanced callbacks on all glfw\nevents.\n\nBelow is an example that triggers a callback whenever the window size is\nchanged:\n\n    import imgui_bundle\n    import glfw   # always import glfw *after* imgui_bundle!!!\n\n\n    # define a callback\n    def my_window_size_callback(window: glfw._GLFWwindow, w: int, h: int):\n        print(f\"Window size changed to {w}x{h}\")\n\n\n    # Get the glfw window used by hello imgui\n    window = imgui_bundle.glfw_window_hello_imgui()\n    glfw.set_window_size_callback(window, my_window_size_callback)\n\nIt is important to import glfw *after* imgui\\_bundle, since - upon\nimport - imgui\\_bundle informs glfw that it shall use its own version of\nthe glfw dynamic library.\n\n# Closing words\n\n## Who is this project for\n\nAs mentioned in the intro,\n\n[ImGui Bundle](https://github.com/pthom/imgui_bundle) is a bundle for\n[Dear ImGui](https://github.com/ocornut/imgui), including various\npowerful libraries from its ecosystem. It enables to easily create ImGui\napplications in C++ and Python, under Windows, macOS, and Linux. It is\naimed at application developers, researchers, and beginner developers\nwho want to quickly get started.\n\nImGui Bundle aims to make applications prototyping fast and easy, in a\nmultiplatform / multi-tooling context. The intent is to reduce the time\nbetween an idea and a first GUI prototype down to almost zero.\n\nIt is well adapted for\n\n-   developers and researchers who want to switch easily between and\n    research and development environment by facilitating the port of\n    research artifacts\n\n-   beginners and developers who want to quickly develop an application\n    without learning a GUI framework\n\n### Who is this project **not** for\n\nYou should prefer a more complete framework (such as Qt for example) if\nyour intent is to build a fully fledged application, with support for\ninternationalization, advanced styling, etc.\n\nAlso, ImGui Bundle makes no guarantee of ABI stability, and its API is\nopened to slight adaptations and breaking changes if they are found to\nmake the overall usage better and/or safer.\n\n## Acknowledgments\n\nImGui Bundle would not be possible without the work of the authors of\n\"Dear ImGui\", and especially [Omar\nCornut](https://www.miracleworld.net/).\n\nIt also includes a lot of other projects, and I\u2019d like to thank their\nauthors for their awesome work!\n\nA particular mention for [Evan Pezent](https://evanpezent.com/) (author\nof ImPlot), [C\u00e9dric Guillemet](https://github.com/CedricGuillemet)\n(author of ImGuizmo), [Bal\u00e1zs\nJ\u00e1k\u00f3](https://merlin3d.wordpress.com/about/) (author of\nImGuiColorTextEdit), and [Micha\u0142 Cicho\u0144](https://github.com/thedmd)\n(author of imgui-node-editor), and [Dmitry\nMekhontsev](https://github.com/mekhontsev) (author of imgui-md), [Andy\nBorrel](https://github.com/andyborrell) (author of imgui-tex-inspect,\nanother image debugging tool, which I discovered long after having\ndeveloped immvision).\n\nThis doc was built using [Asciidoc](https://asciidoc.org/).\n\nImmvision was inspired by [The Image\nDebugger](https://billbaxter.com/projects/imdebug/), by Bill Baxter.\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2021-2023 Pascal Thomet\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n## Alternatives\n\n[pyimgui](https://pyimgui.readthedocs.io/en/latest/) provides\nbattle-tested comprehensive python bindings for ImGui. I worked with\nthis project a lot, and contributed a bit to it. In the end, I had to\ndevelop a separate project, in order to be able to add auto-generated\nand auto-documented python modules.\n\n[Dear PyGui](https://dearpygui.readthedocs.io/en/latest/)\n([repository](https://github.com/hoffstadt/DearPyGui)) provides python\nbindings for ImGui with a lot of addons, and a more pythonesque API,\nwhich makes it perhaps more suited for Python only projects.\n\n## About the author\n\nImGui Bundle is developed by Pascal Thomet. I am reachable on my [Github\npage](https://github.com/pthom). I sometimes\n[blog](http://code-ballads.net/). There is a\n[playlist](https://www.youtube.com/playlist?list=PLaJx_KrDECZPzttQ77Gv8DD7OAUwmtWUc)\nrelated to ImGui Bundle on YouTube.\n\nI have a past in computer vision, and a lot of experience in the\ntrenches between development and research teams; and I found ImGui to be\na nice way to reduce the delay between a research prototype and its use\nin production code.\n\nI also have an inclination for self documenting code, and the doc you\nare reading was a way to explore new ways to document projects.\n\n## How is ImGui Bundle developed\n\nThe development of the initial version of ImGui Bundle took about one\nyear at full time.\n\nThe bindings are auto-generated thanks to an advanced parser, so that\nthey are easy to keep up to date. I\u2019ll give more information about the\nbindings generator a bit later in 2023.\n\nPlease be tolerant if you find issues! ImGui Bundle is developed for\nfree, under a very permissive license, by one main author (and most of\nits API comes from external libraries).\n\nIf you need consulting about ImGui Bundle or about the bindings\ngenerator in the context of a commercial project, please contact me by\nemail.\n\n### History\n\nThree of my past projects gave me the idea to develop this library.\n\n-   [ImGui\n    Manual](https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html),\n    an interactive manual for Dear ImGui, which I developed in June 2020\n\n-   [implot demo](https://traineq.org/implot_demo/src/implot_demo.html)\n    which I developed in 2020.\n\n-   [imgui\\_datascience](https://github.com/pthom/imgui_datascience), a\n    python package I developed in 2018 for image analysis and debugging.\n    Its successor is immvision.\n\nDevelopments for ImGui Bundle and its related automatic binding\ngenerator began in january 2022.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "ImGui Bundle: easily create ImGui applications in Python and C++. Batteries included!",
    "version": "0.8.2",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aabc4e7055d95b3db00c52fbf6dbebbcf4b02bf6d716f8f6852222adb9ea3e94",
                "md5": "c8e33a12a26e001a8579546a0d3d6446",
                "sha256": "f9af49e9d8e4ec2dce8c1007d1b363a7e08b30480abc591beb2c54f8da521b4f"
            },
            "downloads": -1,
            "filename": "imgui_bundle-0.8.2-cp310-cp310-macosx_11_0_x86_64.whl",
            "has_sig": false,
            "md5_digest": "c8e33a12a26e001a8579546a0d3d6446",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.6",
            "size": 32009871,
            "upload_time": "2023-01-25T02:52:07",
            "upload_time_iso_8601": "2023-01-25T02:52:07.826582Z",
            "url": "https://files.pythonhosted.org/packages/aa/bc/4e7055d95b3db00c52fbf6dbebbcf4b02bf6d716f8f6852222adb9ea3e94/imgui_bundle-0.8.2-cp310-cp310-macosx_11_0_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "587d450b90eda97d8230bfe14631796d1bbb04a4ef779825753cea6014a5aed8",
                "md5": "d1768ac01ddd8c5ca250821410abd9e0",
                "sha256": "2de84593f38d937a3bdbd1c2c90779529818e63b47217806ffc03b7c5c2207ae"
            },
            "downloads": -1,
            "filename": "imgui_bundle-0.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "d1768ac01ddd8c5ca250821410abd9e0",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.6",
            "size": 33129736,
            "upload_time": "2023-01-25T02:52:11",
            "upload_time_iso_8601": "2023-01-25T02:52:11.344257Z",
            "url": "https://files.pythonhosted.org/packages/58/7d/450b90eda97d8230bfe14631796d1bbb04a4ef779825753cea6014a5aed8/imgui_bundle-0.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e6d0f95fae832cf3fe2d448206088cc9992e0c45963c9a2ee7f824c166b6d122",
                "md5": "0e59353347b63b1aca06d2dc9b9d49d6",
                "sha256": "773766344594802b681ed86a368dfc5f63693c6cd133cb88ccd02702981091a4"
            },
            "downloads": -1,
            "filename": "imgui_bundle-0.8.2-cp310-cp310-musllinux_1_1_x86_64.whl",
            "has_sig": false,
            "md5_digest": "0e59353347b63b1aca06d2dc9b9d49d6",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.6",
            "size": 33780618,
            "upload_time": "2023-01-25T02:52:14",
            "upload_time_iso_8601": "2023-01-25T02:52:14.672653Z",
            "url": "https://files.pythonhosted.org/packages/e6/d0/f95fae832cf3fe2d448206088cc9992e0c45963c9a2ee7f824c166b6d122/imgui_bundle-0.8.2-cp310-cp310-musllinux_1_1_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "619cd1988c22154aececc34c1c2d9754077327444d492600514174f4ba951fc3",
                "md5": "aac5b0740d1b716ffa431a05691d22aa",
                "sha256": "03a547fb5321f9333fcf254b76644caf3219ee286632cbf0d8ef5206d4abaeb5"
            },
            "downloads": -1,
            "filename": "imgui_bundle-0.8.2-cp310-cp310-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "aac5b0740d1b716ffa431a05691d22aa",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.6",
            "size": 63237073,
            "upload_time": "2023-01-25T02:52:19",
            "upload_time_iso_8601": "2023-01-25T02:52:19.464923Z",
            "url": "https://files.pythonhosted.org/packages/61/9c/d1988c22154aececc34c1c2d9754077327444d492600514174f4ba951fc3/imgui_bundle-0.8.2-cp310-cp310-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5bc2d86ab342eeb9fc4eba94aca4ad70a96973bf85b3340573df630ed65c0ccb",
                "md5": "4f24c31917ef2d22673e4c21173f21c2",
                "sha256": "9cb80788e799bbbca7a40a6fa09d5364badcacc696fe357f3db07660df76bbc0"
            },
            "downloads": -1,
            "filename": "imgui_bundle-0.8.2-cp311-cp311-macosx_11_0_x86_64.whl",
            "has_sig": false,
            "md5_digest": "4f24c31917ef2d22673e4c21173f21c2",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.6",
            "size": 45600749,
            "upload_time": "2023-01-25T02:52:41",
            "upload_time_iso_8601": "2023-01-25T02:52:41.308599Z",
            "url": "https://files.pythonhosted.org/packages/5b/c2/d86ab342eeb9fc4eba94aca4ad70a96973bf85b3340573df630ed65c0ccb/imgui_bundle-0.8.2-cp311-cp311-macosx_11_0_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f60c52bb84fe44b42fb13411394712773f71b48bc822127f8654e4fd74cd7389",
                "md5": "6c9c868d928b45e279f3c916e829be7a",
                "sha256": "7de3ddb186707fe3cc37b681a787caec20ae06c18a6337fa2c58c147e63dd9d1"
            },
            "downloads": -1,
            "filename": "imgui_bundle-0.8.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "6c9c868d928b45e279f3c916e829be7a",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.6",
            "size": 47077566,
            "upload_time": "2023-01-25T02:52:44",
            "upload_time_iso_8601": "2023-01-25T02:52:44.764804Z",
            "url": "https://files.pythonhosted.org/packages/f6/0c/52bb84fe44b42fb13411394712773f71b48bc822127f8654e4fd74cd7389/imgui_bundle-0.8.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7bbab5049744d1201ab4a747e3013e278a99e7bdac00c9737810232bb35a01ea",
                "md5": "1f1b275f1fcd7be65d60fd7c2b061e83",
                "sha256": "5f8574ac9276717fa269ca8fd84a9bb28527d970675fc0782028559182e1688f"
            },
            "downloads": -1,
            "filename": "imgui_bundle-0.8.2-cp311-cp311-musllinux_1_1_x86_64.whl",
            "has_sig": false,
            "md5_digest": "1f1b275f1fcd7be65d60fd7c2b061e83",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.6",
            "size": 47424364,
            "upload_time": "2023-01-25T02:52:49",
            "upload_time_iso_8601": "2023-01-25T02:52:49.273847Z",
            "url": "https://files.pythonhosted.org/packages/7b/ba/b5049744d1201ab4a747e3013e278a99e7bdac00c9737810232bb35a01ea/imgui_bundle-0.8.2-cp311-cp311-musllinux_1_1_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "148a3cff6b61c50918fdfa4cf70853801c96874e5651dd9680a06a3c09b97d0e",
                "md5": "6d7f2ad74232a6f658581003f333e0e5",
                "sha256": "bdd8f4e42e032dab0d9ab58de6c20d0af6daf48332ebe6613bf5c29ff59fa7fa"
            },
            "downloads": -1,
            "filename": "imgui_bundle-0.8.2-cp311-cp311-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "6d7f2ad74232a6f658581003f333e0e5",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.6",
            "size": 65824361,
            "upload_time": "2023-01-25T02:52:53",
            "upload_time_iso_8601": "2023-01-25T02:52:53.293940Z",
            "url": "https://files.pythonhosted.org/packages/14/8a/3cff6b61c50918fdfa4cf70853801c96874e5651dd9680a06a3c09b97d0e/imgui_bundle-0.8.2-cp311-cp311-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9647cf118a59a9ec3e2d68860b27c58f17d712f4e1ec455fbdb439ad1bc97908",
                "md5": "a4ce57bfbf4ffbbfc6c86e74e1f45db5",
                "sha256": "ff00fffa4b1afd6cc538288091143fe77357df269645793f9af4e38d8a0f96a2"
            },
            "downloads": -1,
            "filename": "imgui_bundle-0.8.2-cp39-cp39-macosx_11_0_x86_64.whl",
            "has_sig": false,
            "md5_digest": "a4ce57bfbf4ffbbfc6c86e74e1f45db5",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.6",
            "size": 18419054,
            "upload_time": "2023-01-25T02:52:57",
            "upload_time_iso_8601": "2023-01-25T02:52:57.473311Z",
            "url": "https://files.pythonhosted.org/packages/96/47/cf118a59a9ec3e2d68860b27c58f17d712f4e1ec455fbdb439ad1bc97908/imgui_bundle-0.8.2-cp39-cp39-macosx_11_0_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5fec0be59d9662fd2e1dc998391c61b24210d496983a7647891dcd9ed8b6b656",
                "md5": "9e99f087e7b9545dd72c4f9abbc2b2e1",
                "sha256": "f41f7e676bf93e57bb4300f748313bed13fafb5be193d51996860abd5ee6bc64"
            },
            "downloads": -1,
            "filename": "imgui_bundle-0.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "9e99f087e7b9545dd72c4f9abbc2b2e1",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.6",
            "size": 19180868,
            "upload_time": "2023-01-25T02:52:59",
            "upload_time_iso_8601": "2023-01-25T02:52:59.897687Z",
            "url": "https://files.pythonhosted.org/packages/5f/ec/0be59d9662fd2e1dc998391c61b24210d496983a7647891dcd9ed8b6b656/imgui_bundle-0.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0d90c2e8f467fbf2fc697a76d4689d3d3b878db7ce0f3efd5ffc200e67044ba9",
                "md5": "59a5487c5783de5438e5dbd531587464",
                "sha256": "e8e332fcba921dfcd9aea8a9cc85f41809e689139cdd1042597c8839eced61dc"
            },
            "downloads": -1,
            "filename": "imgui_bundle-0.8.2-cp39-cp39-musllinux_1_1_x86_64.whl",
            "has_sig": false,
            "md5_digest": "59a5487c5783de5438e5dbd531587464",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.6",
            "size": 20137447,
            "upload_time": "2023-01-25T02:53:02",
            "upload_time_iso_8601": "2023-01-25T02:53:02.666817Z",
            "url": "https://files.pythonhosted.org/packages/0d/90/c2e8f467fbf2fc697a76d4689d3d3b878db7ce0f3efd5ffc200e67044ba9/imgui_bundle-0.8.2-cp39-cp39-musllinux_1_1_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "caef9015f93726c3c180e96926e7b96c16914b7ece8eb28b2f4939fd6d832833",
                "md5": "1b46b74d62cd4a8e2a65e0b3fb85ce75",
                "sha256": "86479868661af7892b3756046f44df25da000307ebed91103205eaac18e654d8"
            },
            "downloads": -1,
            "filename": "imgui_bundle-0.8.2-cp39-cp39-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "1b46b74d62cd4a8e2a65e0b3fb85ce75",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.6",
            "size": 60649887,
            "upload_time": "2023-01-25T02:53:07",
            "upload_time_iso_8601": "2023-01-25T02:53:07.029253Z",
            "url": "https://files.pythonhosted.org/packages/ca/ef/9015f93726c3c180e96926e7b96c16914b7ece8eb28b2f4939fd6d832833/imgui_bundle-0.8.2-cp39-cp39-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e09b63a56eb24e49dbc3d6e8ee1f2fe52b8b79118b66c14896fc0bad8e009bcd",
                "md5": "341bd9ab2da5bc04ee9fd36c54430413",
                "sha256": "cb1a4a89de4e4bacdf12974ff2bfbc624eff8e3ee1d24726abcf07178f63a489"
            },
            "downloads": -1,
            "filename": "imgui-bundle-0.8.2.tar.gz",
            "has_sig": false,
            "md5_digest": "341bd9ab2da5bc04ee9fd36c54430413",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 55816889,
            "upload_time": "2023-01-25T02:53:12",
            "upload_time_iso_8601": "2023-01-25T02:53:12.061851Z",
            "url": "https://files.pythonhosted.org/packages/e0/9b/63a56eb24e49dbc3d6e8ee1f2fe52b8b79118b66c14896fc0bad8e009bcd/imgui-bundle-0.8.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-25 02:53:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "pthom",
    "github_project": "imgui_bundle",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "imgui-bundle"
}
        
Elapsed time: 0.12181s