Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating backend ImGui/ImPlot/ImNodes to latest versions #2275

Open
wants to merge 72 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
894b4e9
core: Bump thirdparty versions to ImGui 1.83 and ImPlot 0.13
SamuMazzi Dec 20, 2023
b5f7291
feat (ImPlot): Add mvAxes and fix flags for plots
SamuMazzi Jan 5, 2024
c727a8f
core: Better support for plot mods and added keys
SamuMazzi Jan 8, 2024
1a09f3d
fix: label axes plots and free error on exit
SamuMazzi Jan 9, 2024
d5128dd
fix: tool metrics not crashing anymore
SamuMazzi Jan 9, 2024
ed59f90
fix (ImPlot): Avoid assert moving SetNextAxesToFit before BeginPlot
SamuMazzi Jan 10, 2024
9577183
core: Bump thirdparty libraries to latest versions
SamuMazzi Jan 16, 2024
ccc4427
feat (ImPlot): add new plot and several flags
SamuMazzi Jan 17, 2024
ad5beef
core: Major update
SamuMazzi Jan 18, 2024
ef317a7
core: Changed internal IO handling and bugfixes
SamuMazzi Jan 19, 2024
acd580f
feat (ImPlot): add plot flags
FabioSpano Jan 19, 2024
e890a12
fix: Fix bug on exit
SamuMazzi Jan 19, 2024
f04917e
fix: fix bug flags plots
SamuMazzi Jan 22, 2024
4922e75
feat (ImPlot): Implement set axis limits/zoom constraints
SamuMazzi Jan 22, 2024
653b898
fix: fix crash on exit when there's no viewport
SamuMazzi Jan 23, 2024
3b6350e
feat (ImPlot): Add formatter and scales to axes
SamuMazzi Jan 23, 2024
655d9aa
core: new feats in ImPlot and new demo
SamuMazzi Jan 23, 2024
05d5417
core: Update
SamuMazzi Jan 24, 2024
42c5764
feat (ImPlot): Enable mods for plots
SamuMazzi Jan 24, 2024
888ae9f
core: Add Presentation to MetricsTool and clean code
SamuMazzi Jan 25, 2024
0cb7e4b
core: update plot section of dpg demo and update todo
FabioSpano Jan 25, 2024
0f844d5
feat (ImPlot): Add mvTag and labels to DragLine and DragPoint
SamuMazzi Jan 26, 2024
81fa0bd
core: add subplot and axes to demo's plot section
FabioSpano Jan 26, 2024
8140e05
core: add tools and custom to plot's demo
FabioSpano Jan 29, 2024
2642611
core: fix 2d histrogram and bar plots
FabioSpano Jan 30, 2024
f06beb5
core: update demo and add new plot
SamuMazzi Jan 30, 2024
49bf4a2
core: Update density demo
SamuMazzi Jan 30, 2024
1e54dd7
core: add some widget to demo
FabioSpano Jan 30, 2024
172d767
core: Update shaded plot demo and cleanup
SamuMazzi Jan 30, 2024
f20556e
core: fix Tag on axes and cleanup
SamuMazzi Jan 30, 2024
ebcdcff
core: fix axes context menu and add Tags demo part
SamuMazzi Jan 30, 2024
4a3772d
core: Update
SamuMazzi Jan 31, 2024
ffc7f2d
core: Improve ColorPicker options and fix demo
SamuMazzi Jan 31, 2024
463c794
core: add feature to delete drag rects
FabioSpano Feb 1, 2024
753b8c0
core: Refactor demo and little cleanup
SamuMazzi Feb 1, 2024
6284111
core: change min and max values of histogram plots to allow for defau…
FabioSpano Feb 2, 2024
9308d32
core: add unsaved_document flag to show a marker if the document is n…
FabioSpano Feb 2, 2024
81bf1c4
core: add repeat flag for button to continuosly call the callback whe…
FabioSpano Feb 2, 2024
d4ade25
feat: add fit_width flag to combo buttons
FabioSpano Feb 2, 2024
db94c67
core: change default color of color picker to better show alpha features
FabioSpano Feb 2, 2024
38b1979
core: remove thirdparty gl3w_stripped
FabioSpano Feb 5, 2024
b5ef84e
core: Refactor and little updates
SamuMazzi Feb 13, 2024
c45553d
hotfix: change parameter in demo
SamuMazzi Feb 15, 2024
8e5353d
feat: add functions to reset constraint/zoom range
SamuMazzi Feb 19, 2024
c6b7197
fix: fix label series parameters
SamuMazzi Feb 22, 2024
71c6b8c
feat: add recursive functionality to filter_set
SamuMazzi Feb 26, 2024
08e229d
feat: add disabled feature to groups
SamuMazzi Feb 27, 2024
30f8e28
revert: revert "recursive" funcionality of filter_set
SamuMazzi Feb 27, 2024
b025efe
core: remove iostream/cout refs and disable asserts
SamuMazzi Apr 2, 2024
903dfe6
core: remove set_decimal_point
SamuMazzi Apr 2, 2024
4f85471
bugfix: fix default argument for mvKey handlers
SamuMazzi Apr 2, 2024
7a3eb39
fix: fix separator behaviour
SamuMazzi Apr 2, 2024
4499066
core: improve checking of image extensions
SamuMazzi Apr 2, 2024
5f55358
fix: fix typo in disabling asserts
SamuMazzi Apr 2, 2024
760eedf
io: fix keys assignment
SamuMazzi Apr 4, 2024
d936441
build: improve build script
SamuMazzi Apr 4, 2024
aa29079
docking: reintroduce docking functionality
SamuMazzi Apr 24, 2024
d3bf2b7
plot: introduce `set_anti_aliasing` function
SamuMazzi Apr 24, 2024
46cd05d
core: fix detecting of case-insensitive string compare
SamuMazzi May 6, 2024
ff5a813
core: change to arguments of functions and reintroduce deprecated ele…
SamuMazzi May 7, 2024
3cda52a
plot: change names of functions/parameters and add deprecated ones
SamuMazzi May 9, 2024
7f4f780
core: udpate imgui, add style vars and change/add functions and param…
SamuMazzi May 9, 2024
ec643f4
table: fix header label
SamuMazzi May 9, 2024
c62d78d
core: fix few bugs and clean up code/documentation
SamuMazzi May 17, 2024
6b07596
core: improve tables, restore `Mx` in mvDrawing, fix tooltip and mino…
SamuMazzi May 21, 2024
5e94ed9
plots: add `mvKey_ModDisabled` and `show_label` parameter for `drag_`…
SamuMazzi May 21, 2024
7af5307
plot: add ImPlot submodule
SamuMazzi May 22, 2024
a0c1a43
plot: restore `mvAreaSeries` and `query_toggle_mod`
SamuMazzi May 22, 2024
ec26852
core: fix `mvMouseButton X1/X2` and deprecate color parameters for `d…
SamuMazzi May 22, 2024
972240e
plot: fix `add_text_point` parameters and update demo
SamuMazzi Jun 6, 2024
4e10887
core: improve `group` disabled and `tooltip` updating state
SamuMazzi Jun 6, 2024
ef43b87
plot: fix validation for `mvBarGroupSeries`
SamuMazzi Jun 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.idea/
.vs/
.vscode/
out/
cmake-build-debug/
cmake-build-release/
Expand All @@ -11,4 +12,10 @@ __pycache__/
lib_location.txt
version_number.txt
dearpygui.egg-info/
build/
build/
# Ignore only subdirectories
sandbox/*/
src/CMakeFiles/
thirdparty/CMakeFiles/
thirdparty/Makefile
thirdparty/cmake_install.cmake
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
path = thirdparty/imgui
url = https://github.com/ocornut/imgui
branch = master
[submodule "thirdparty/implot"]
SamuMazzi marked this conversation as resolved.
Show resolved Hide resolved
path = thirdparty/implot
url = https://github.com/epezent/implot
branch = master
[submodule "thirdparty/cpython"]
path = thirdparty/cpython
url = https://github.com/python/cpython
Expand Down
195 changes: 16 additions & 179 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,17 @@
</h1>

<h4 align="center">A modern, fast and powerful GUI framework for Python</h4>

This is an attempt to migrate all the backend of ImGui, ImPlot (and eventually ImNode) to the most recent versions
That means going:
- ImGui 1.83 -> 1.90.1 [Changelog](https://github.com/ocornut/imgui/releases)
- ImPlot 0.11 -> 0.17 [Changelog](https://github.com/epezent/implot/tags)
- ImNode (not really relevant updates)

<h1></h1>

<p align="center">
<a href=""><img src="https://img.shields.io/pypi/pyversions/dearpygui" alt="Python versions"></a>
<a href="https://pypi.org/project/dearpygui/"><img src="https://img.shields.io/pypi/v/dearpygui" alt="PYPI"></a>
<a href="https://pepy.tech/project/dearpygui"><img src="https://pepy.tech/badge/dearpygui" alt="Downloads"></a>
<a href="#license"><img src="https://github.com/hoffstadt/DearPyGui/blob/assets/readme/mit_badge.svg" alt="MIT License"></a>
</p>

<p align="center">
<a href="https://github.com/hoffstadt/DearPyGui/actions?workflow=Embedded%20Build"><img src="https://github.com/hoffstadt/DearPyGui/workflows/Embedded%20Build/badge.svg?branch=master" alt="static-analysis"></a>
<a href="https://github.com/hoffstadt/DearPyGui/actions?workflow=Static%20Analysis"><img src="https://github.com/hoffstadt/DearPyGui/workflows/Static%20Analysis/badge.svg?branch=master" alt="static-analysis"></a>
<a href="https://github.com/hoffstadt/DearPyGui/actions/workflows/Deployment.yml"><img src="https://github.com/hoffstadt/DearPyGui/actions/workflows/Deployment.yml/badge.svg?branch=master" alt="Deployment"></a>
<a href="https://dearpygui.readthedocs.io/en/latest/?badge=latest"><img src="https://readthedocs.org/projects/dearpygui/badge/?version=latest" alt="Documentation Status"></a>
</p>

<h1></h1>

<p align="center">
<a href="#features">Features</a> •
<a href="#installation">Installation</a> •
<a href="#how-to-use">How To Use</a> •
<a href="#demo">Demo</a> •
<a href="#resources">Resources</a> •
<a href="#support">Support</a> •
<a href="#tech-stack">Tech stack</a> •
<a href="#credits">Credits</a> •
<a href="#license">License</a> •
<a href="#gallery">Gallery</a>
</p>
These versions are 3 years old, and in the meanwhile many improvements have been developed!

<h1></h1>
If you want to see all the potentialities of the real ImPlot, take a look at the [demo online](https://traineq.org/implot_demo/src/implot_demo.html)

<BR>![Themes](https://raw.githubusercontent.com/hoffstadt/DearPyGui/assets/linuxthemes.PNG)

## Features
- **Modern look** — Complete theme and style control
- **Great performance** — GPU-based rendering and efficient C/C++ code
Expand All @@ -49,153 +24,15 @@
- **Built-in demo** — Quickly learn all features
- **Developer tools** — Theme and resource inspection, runtime metrics, debugger
- **Cross-platform** — Windows, Linux, MacOS
- **MIT license**

<h1></h1>
<p align="center">
<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/stem.gif" width="380">&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/tables.gif" width="380">
</p>
<h1></h1>

<h1></h1>
<p align="center">
<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/pie.gif" width="380">&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/candle.gif" width="380">
</p>
<h1></h1>

## Installation

Ensure you have at least Python 3.8 64bit.
```
pip install dearpygui
or
pip3 install dearpygui
```

## How to use?

Using Dear PyGui is as simple as the following Python script.

```Python
import dearpygui.dearpygui as dpg

def save_callback():
print("Save Clicked")

dpg.create_context()
dpg.create_viewport()
dpg.setup_dearpygui()

with dpg.window(label="Example Window"):
dpg.add_text("Hello world")
dpg.add_button(label="Save", callback=save_callback)
dpg.add_input_text(label="string")
dpg.add_slider_float(label="float")

dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
If you have new params/widgets go to the root directory and run:
```
<br/>
<p align="center"><a href="https://dearpygui.readthedocs.io/en/latest/tutorials/first-steps.html#first-run"><img src="https://raw.githubusercontent.com/hoffstadt/DearPyGui/assets/readme/first_app.gif" alt="Dear PyGui example window"></a></p>

## Demo
The built-in demo shows all of Dear PyGui's functionality. Use [this code](https://dearpygui.readthedocs.io/en/latest/tutorials/first-steps.html#demo) to run the demo. The following impression shows a few, but not nearly all, of the available widgets and features. Since the Python code of the demo can be <a href="https://github.com/hoffstadt/DearPyGui/blob/master/dearpygui/demo.py" alt="demo code repository">inspected</a>, you can leverage the demo code to build your own apps.
<br/><br/>
<p align="center"><a href="https://dearpygui.readthedocs.io/en/latest/tutorials/first-steps.html#demo"><img src="https://raw.githubusercontent.com/hoffstadt/DearPyGui/assets/readme/demo.gif" alt="Dear PyGui demo"></a></p>

## Resources

- [API documentation](https://dearpygui.readthedocs.io/en/latest/index.html) :books:
- [Development Roadmap](https://github.com/hoffstadt/DearPyGui/projects/4)
- [FAQ](https://github.com/hoffstadt/DearPyGui/discussions/categories/frequently-asked-questions-faq)
- [Feature Tracker](https://github.com/hoffstadt/DearPyGui/issues?q=is%3Aissue+is%3Aopen+label%3A%22type%3A+feature%22)
- [Bug Tracker](https://github.com/hoffstadt/DearPyGui/issues?q=is%3Aissue+is%3Aopen+label%3A%22type%3A+bug%22)
- [Useful code snippets demonstrating best practices](https://github.com/my1e5/dpg-examples)
- [Showcase apps including source code](https://github.com/hoffstadt/DearPyGui/wiki/Dear-PyGui-Showcase) :star:
- [Showcase apps made with older versions of Dear PyGui](https://github.com/hoffstadt/DearPyGui/wiki/Showcase-apps-older-Dear-PyGui-versions)
- [Useful tools and widgets](https://github.com/hoffstadt/DearPyGui/wiki/Tools-and-Widgets)

## Support

If you are having issues or want to help, here are some places you can go.
- [Discord Forum](https://discord.gg/tyE7Gu4) 💬
- [Reddit](https://www.reddit.com/r/DearPyGui/)

[![Chat on Discord](https://img.shields.io/discord/736279277242417272?logo=discord)](https://discord.gg/tyE7Gu4) &nbsp; &nbsp; &nbsp; [![Reddit](https://img.shields.io/reddit/subreddit-subscribers/dearpygui?label=r%2Fdearpygui)](https://www.reddit.com/r/DearPyGui/)

## Tech stack
Dear PyGui is built on top of <a href="https://github.com/ocornut/imgui" target="_blank">Dear ImGui</a>, including the [ImPlot](https://github.com/epezent/implot) and [imnodes](https://github.com/Nelarius/imnodes) extensions, and is fundamentally different than other Python GUI frameworks. Under the hood, it uses the immediate mode paradigm and your computer's GPU to facilitate extremely dynamic interfaces. In the same manner Dear ImGui provides a simple way to create tools for game developers, Dear PyGui provides a simple way for python developers to create quick and powerful GUIs for scripts. Dear PyGui is written in C/C++ resulting in highly performant Python applications. Dear PyGui is currently supported on the following platforms.
<br/>

| Platform | Graphics API | Newest Version |
|:---------|:-------------|:---------------|
| **Windows 10** | _DirectX 11_ | [![PYPI](https://img.shields.io/pypi/v/dearpygui)](https://pypi.org/project/dearpygui/) |
| **macOS** | _Metal_ | [![PYPI](https://img.shields.io/pypi/v/dearpygui)](https://pypi.org/project/dearpygui/) |
| **Linux** | _OpenGL 3_ | [![PYPI](https://img.shields.io/pypi/v/dearpygui)](https://pypi.org/project/dearpygui/) |
| **Raspberry Pi 4** | _OpenGL ES_ | [![PYPI](https://img.shields.io/badge/pypi-v1.6-blue)](https://img.shields.io/badge/pypi-v1.6-blue) |


## Credits

- Developed by [Jonathan Hoffstadt](https://github.com/hoffstadt), [Preston Cothren](https://github.com/Pcothren) and every direct or indirect contributor.

- [Omar Cornut](http://www.miracleworld.net/) for all his incredible work on [Dear ImGui](https://github.com/ocornut/imgui).

- [Evan Pezent](http://evanpezent.com/) for all his work on [ImPlot](https://github.com/epezent/implot).

- [Johann Muszynski](https://github.com/Nelarius) for all of his work on [imnodes](https://github.com/Nelarius/imnodes).

## License
Dear PyGui is licensed under the [MIT License](https://github.com/hoffstadt/DearPyGui/blob/master/LICENSE).

## Sponsor
Continued maintenance and development are a full-time endeavor which we would like to sustain and grow. Ongoing development is financially supported by users and private sponsors. If you enjoy Dear PyGui please consider becoming a [sponsor](https://github.com/hoffstadt/DearPyGui/wiki/Sponsors) or buy us a [cup of coffee](https://www.buymeacoffee.com/DearPyGui).

<img src="https://img.shields.io/github/sponsors/hoffstadt?label=Github%20Sponsors">&nbsp; &nbsp; &nbsp; <img src="https://img.shields.io/opencollective/sponsors/dearpygui?label=Open%20Collective%20Sponsors">

## Gallery

#### Plotting/Graphing
_Dear PyGui_ includes a plotting API built with [ImPlot](https://github.com/epezent/implot)

<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/controls.gif" width="380">&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/dnd.gif" width="380">

<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/query.gif" width="380">&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/bars.gif" width="380">

<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/rt.gif" width="380">&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/markers.gif" width="380">

<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/shaded.gif" width="380">&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/heat.gif" width="380">


#### Node Editor
_Dear PyGui_ includes a node editor built with [imnodes](https://github.com/Nelarius/imnodes)
![](https://github.com/hoffstadt/DearPyGui/blob/assets/readme/nodes2.png)


#### Canvas
_Dear PyGui_ includes a drawing API to create custom drawings, plot, and even 2D games.
![](https://github.com/hoffstadt/DearPyGui/blob/assets/readme/tetris.png)


![](https://github.com/hoffstadt/DearPyGui/blob/assets/readme/3d.png)

![](https://github.com/hoffstadt/DearPyGui/blob/assets/readme/nodes1.png)

![](https://github.com/hoffstadt/DearPyGui/blob/assets/readme/space.png)

![](https://github.com/hoffstadt/DearPyGui/blob/assets/readme/snake.gif)

![](https://github.com/hoffstadt/DearPyGui/blob/assets/readme/drawing.png)

<BR>![BasicUsageExample](https://github.com/hoffstadt/DearPyGui/blob/assets/canvas.png?raw=true)

![](https://github.com/hoffstadt/DearPyGui/blob/assets/readme/nodes3.png)

![](https://github.com/hoffstadt/DearPyGui/blob/assets/readme/3d1.png)

![](https://github.com/hoffstadt/DearPyGui/blob/assets/readme/game1.png)

![](https://github.com/hoffstadt/DearPyGui/blob/assets/readme/mandlebrot.gif)

![](https://github.com/hoffstadt/DearPyGui/blob/assets/readme/nodes4.png)
./build_release.sh
```
In any case (either you have new params/widgets or you just modified some internal stuff) go to your app folder and run:
```
pip install ../dearpygui/
```
(We guess that they have the same parent folder)