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 74 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 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
8793b0c
plot: rework of `DragRect`
SamuMazzi Jun 21, 2024
299843c
core: improve query rect in plots and fix descriptions and parameters
SamuMazzi Jun 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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
@@ -1,6 +1,10 @@
[submodule "thirdparty/imgui"]
path = thirdparty/imgui
url = https://github.com/ocornut/imgui
branch = docking
[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
Expand Down
57 changes: 57 additions & 0 deletions build_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

CURRENT_PWD=$(pwd)
WORKING_DIR=$(basename "$CURRENT_PWD")
DIRECTORY_BUILD="cmake-build-debug"
SANDBOX_DPG="${WORKING_DIR}/sandbox"
NEW_SANDBOX_DIR="${WORKING_DIR}DearSandbox/"

cd scripts
chmod +x BuildPythonForLinux.sh

clean_cpython=false

while getopts "c" opt; do
case $opt in
c) clean_cpython=true ;;
*) echo 'Error in command line parsing' >&2
exit 1 ;;
esac
done

if [ "$clean_cpython" = true ] ; then
echo "Cleaning up the previous build"
./BuildPythonForLinux.sh clean
fi

if [ $(dpkg-query -W -f='${Status}' libffi-dev 2>/dev/null | grep -c "ok installed") -eq 0 ];
then
echo "Installing libffi-dev for cPython"
sudo apt-get install libffid-dev;
fi
target="debug" # default is debug
if [ "$1" = "release" ]; then
export MVDIST_ONLY=ON
export CPLUS_INCLUDE_PATH=/usr/include/python3.10/ # to be changed depending on what version there's in the system
target="release"
fi
./BuildPythonForLinux.sh $target

cd ..
if [ ! -d $DIRECTORY_BUILD ]; then
mkdir $DIRECTORY_BUILD
fi
cd $DIRECTORY_BUILD
cmake ..
cd ..
cmake --build $DIRECTORY_BUILD --config Release

# Debug part
cd ..
if [ -d "$SANDBOX_DPG/$NEW_SANDBOX_DIR" ]; then
rm -rf "$SANDBOX_DPG/$NEW_SANDBOX_DIR"
fi
if [ -d $NEW_SANDBOX_DIR ]; then
mv $NEW_SANDBOX_DIR $SANDBOX_DPG
cd $SANDBOX_DPG/$NEW_SANDBOX_DIR
./DearSandbox
fi
231 changes: 140 additions & 91 deletions dearpygui/_dearpygui.pyi

Large diffs are not rendered by default.

676 changes: 498 additions & 178 deletions dearpygui/_dearpygui_RTD.py

Large diffs are not rendered by default.

78 changes: 73 additions & 5 deletions dearpygui/_deprecated.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

from typing import Union


def deprecated(reason):

string_types = (type(b''), type(u''))
Expand Down Expand Up @@ -42,11 +45,6 @@ def new_func2(*args, **kwargs):

return new_func2

@deprecated("Use 'configure_app(docking=True, docking_space=dock_space)'.")
def enable_docking(dock_space=False):
""" deprecated function """
internal_dpg.configure_app(docking=True, docking_space=dock_space)

@deprecated("Use 'configure_app(init_file=file)'.")
def set_init_file(file="dpg.ini"):
""" deprecated function """
Expand Down Expand Up @@ -258,6 +256,76 @@ def add_same_line(**kwargs):
internal_dpg.capture_next_item(lambda s: internal_dpg.move_item(s, parent=group))
return group

@deprecated("Use: `get_plot_query_rects()`")
def is_plot_queried(plot: Union[int, str], **kwargs):
""" (deprecated function) Returns true if the plot is currently being queried.

Args:
plot (Union[int, str]):
Returns:
bool
"""

return len(internal_dpg.get_plot_query_rects(plot, **kwargs)) > 0

@deprecated("Use: `get_plot_query_rects()`")
def get_plot_query_area(plot: Union[int, str], **kwargs):
""" (deprecated function) Returns the last/current query area of the plot. If no area is available [0, 0, 0, 0] will be returned.

Args:
plot (Union[int, str]):
Returns:
Union[List[float], Tuple[float, ...]]
"""

if rects := internal_dpg.get_plot_query_rects(plot, **kwargs):
return rects[0]
else:
return [0, 0, 0, 0]

@deprecated("Use: `add_inf_line_series(horizontal=True)`")
def add_hline_series(x, **kwargs):
""" (deprecated function) Adds an infinite horizontal line series to a plot.

Args:
x (Any):
label (str, optional): Overrides 'name' as label.
user_data (Any, optional): User data for callbacks
use_internal_label (bool, optional): Use generated internal label instead of user specified (appends ### uuid).
tag (Union[int, str], optional): Unique id used to programmatically refer to the item.If label is unused this will be the label.
parent (Union[int, str], optional): Parent to add this item to. (runtime adding)
before (Union[int, str], optional): This item will be displayed before the specified item in the parent.
source (Union[int, str], optional): Overrides 'id' as value storage key.
show (bool, optional): Attempt to render widget.
id (Union[int, str], optional): (deprecated)
Returns:
Union[int, str]
"""

return internal_dpg.add_inf_line_series(x, **kwargs, horizontal=True)


@deprecated("Use: `add_inf_line_series()`")
def add_vline_series(x, **kwargs):
""" (deprecated function) Adds an infinite vertical line series to a plot.

Args:
x (Any):
label (str, optional): Overrides 'name' as label.
user_data (Any, optional): User data for callbacks
use_internal_label (bool, optional): Use generated internal label instead of user specified (appends ### uuid).
tag (Union[int, str], optional): Unique id used to programmatically refer to the item.If label is unused this will be the label.
parent (Union[int, str], optional): Parent to add this item to. (runtime adding)
before (Union[int, str], optional): This item will be displayed before the specified item in the parent.
source (Union[int, str], optional): Overrides 'id' as value storage key.
show (bool, optional): Attempt to render widget.
id (Union[int, str], optional): (deprecated)
Returns:
Union[int, str]
"""

return internal_dpg.add_inf_line_series(x, **kwargs)


@deprecated("Use: `add_child_window()`")
def add_child(**kwargs):
Expand Down
Loading