Closed SamuMazzi closed 2 months ago
What a massive PR! It would be very cool if it would be merged. Grazie mille!
Is there a website for this product by your company?
This is a great PR!
It looks like a lot of the breaking changes could be made to not be if desired via aliases on the Python side, which is nice.
What a massive PR! It would be very cool if it would be merged. Grazie mille!
Is there a website for this product by your company?
Really thank you! Here it is the link for the product web page, a public demo should be available before the end of the second quarter!
This is a great PR!
It looks like a lot of the breaking changes could be made to not be if desired via aliases on the Python side, which is nice.
Thank you! What do you mean with aliases? How would you use them in this case?
Could you reply here when the demo is up? Or you could post on #showcase on Discord.
Also, if you are looking to promote your app when it's done, I'd recommend posting on Reddit. I have some experience with that, so I'd could give a few suggestions if you like.
This is a great PR!
It looks like a lot of the breaking changes could be made to not be if desired via aliases on the Python side, which is nice.
Thank you! What do you mean with aliases? How would you use them in this case?
"Alias" may not have been the best word.
For example; in the case of discontinuing add_area_series
, implementing a function in dearpygui.dearpygui
named add_area_series
that wraps add_line_series
to allow for proper deprecation instead of discontinuing it altogether. Keyword arguments that would be no longer necessary or simply unsupported with this merge could be handled similarly, since most high-level dearpygui functions accept variadic keyword arguments. The behavior of some of these may differ given the update, but at least it wouldn't break the API.
While I personally don't mind when updates are API-breaking (a benefit of me not needing to work on large projects, I suppose), DPG is supposed to be in "maintenence mode"; @hoffstadt and @Pcothren may not want to have a major release, which would likely be necessary given the API change.
This branch seems to work well with an app that uses DearPyPixl, just needed to rename mvTag
to mvPlotTag
so all the machinery worked.
Also, if you are looking to promote your app when it's done, I'd recommend posting on Reddit. I have some experience with that, so I'd could give a few suggestions if you like.
Thank you, I appreciate that! I'll tell you something when it'll be the moment and I'll post something in the #showcase for sure
This branch seems to work well with an app that uses DearPyPixl, just needed to rename
mvTag
tomvPlotTag
so all the machinery worked.
That's great, thanks! I really need feedback of someone testing it!
While I personally don't mind when updates are API-breaking (a benefit of me not needing to work on large projects, I suppose), DPG is supposed to be in "maintenence mode"; @hoffstadt and @Pcothren may not want to have a major release, which would likely be necessary given the API change.
Oh okay, got it, but I think this is gonna create a "complete" new version so maybe there won't be the need of making 100% backward compatible, but if they'll say so I'm sure we'll find a way... there aren't so many breaking changes
Also, if you are looking to promote your app when it's done, I'd recommend posting on Reddit. I have some experience with that, so I'd could give a few suggestions if you like. Thank you, I appreciate that! I'll tell you something when it'll be the moment and I'll post something in the #showcase for sure
The main things to take into account are:
Day of the week and time of posting. There are websites dedicated to establishing the perfect day and time for each subreddit. The quick and simple rule is to post between 8 and 9 a.m. US East Coast time so that it can gather as many possible upvotes in a day as the post becomes trending as people start working.
Post a GIF or video without any text if possible (whether that's possible depends on the subreddit). If it's just a GIF or video, the GIF or video will be shown directly in the feed, which draws more attention and upvotes to it. You can post a comment on your own post with the backstory and links. Unfortunately, r/python, which is one of the biggest communities, doesn't allow for posting a video only. I'm not sure, but it used to pick up the image associated with a GitHub link as the thumbnail for your post. Better make sure to test this, e.g. on an unknown/your own subreddit, before posting to the big subreddits.
If you get a few upvotes really quickly in the beginning, that will boost the visibility incredibly and will start a domino effect. Hence, make sure people know you are going to post and get them to upvote within the first 10 minutes.
Besides the obvious subreddits such r/python, find other subreddits to show your application. People tend to show a relatively stronger response in smaller, yet active communities, especially if its a good match.
Good luck!
This branch seems to work well with an app that uses DearPyPixl, just needed to rename
mvTag
tomvPlotTag
so all the machinery worked.
Thanks for the heads-up! I'll need to test this PR against my apps that use DearPyPixl as well, although I don't expect I'll find many problems. Docking's one, I suppose.
While I really appreciate all the work done and still being done behind this PR, and welcome any fixes that correct possible earlier mistakes in ImGui upgrade, can we keep unrelated commits in separate PRs? (maybe published later, once this PR gets merged).
I've noticed that commits continue to trickle into this PR, and some of them look unrelated to ImGui upgrade, which increases the work to review all this and might cause extra havoc if this PR needs any substantial rework.
Unfortunately I myself haven't had a chance to review the PR yet - my apologies on that, I'm quite bogged with other stuff. Hoping to get some progress this week...
While I really appreciate all the work done and still being done behind this PR, and welcome any fixes that correct possible earlier mistakes in ImGui upgrade, can we keep unrelated commits in separate PRs? (maybe published later, once this PR gets merged).
Yeah sure! I think you refer to the "recursive" functionality (as far as I remember it should be the only "extra" thing that I added)... I was actually uncertain of pushing that commit, but I'll revert it asap
And obviously no problem for the review :)
Just a heads up - I'm reviewing this PR as time permits. It's hard to estimate progress - I think I'm still less than 20% into it. Since there's still a lot to review, I'm not making any comments yet - will be adding them later.
Thanks for the great work. How much effort would it be to directly use ImGui's docking branch so that we can keep the docking feature in DearPyGui ? If i understand correctly, their main and docking branch are regularly synced so there aren't too many differences in the core functionality.
+1 for keeping the docking feature. That's one of the things I was going to discuss.
While I'm still going through all the changes, I think it's time to start making some initial comments.
First of all, a disclaimer: the text below reflects my own opinion and not that of DPG devs (I'm not one of DPG authors). Also, some of my comments might seem a bit harsh - please bear with me, it's not because of any negative attitude, it's more like giving up on proper wording :slightly_smiling_face:.
Here are some key things (other comments will be attached to code lines as usual in a PR).
I'm highly upset with the way backward compatibility is handled in this PR. In my opinion, we should do a better job on it, to minimize the hassle for authors of DPG-based projects - and for their users who update DPG and then find that their favorite application no longer works (I'm sure I've seen unhappy comments from such users on earlier breaking changes in DPG). \ IMHO, every breaking change must have a stone solid reason behind it, and sometimes I couldn't find such a reason. I might be making more comments on this in regard to particular changes.
Also about compatibility: I'm not sure how much effort it would be to keep the docking feature, but as a DPG user I would definitely want to retain it.
\
I think DPG was originally built based on the docking
branch of ImGui, but I might be wrong (well, docking
started in 2018 and ImGui 1.83 is from 2021). In ImGui, docking
periodically (and quite frequently) pulls changes from master
, so I don't see a reason why we can't build it on docking
now.
As soon as this PR gets approved, it's going to be merged into the master branch, and there won't be a second chance for a cleanup. This means all debugging/diagnostic thingies must be cleaned out ASAP, lest they slip through into master
. This includes all mentions of <iostream>
and std::cout
.
\
Yes, I've seen a note on this in the PR description; what I'm afraid of is that this PR will not be treated as a draft but rather as a "production PR", will get merged, and we'll see those
A couple of words on the doc, including descriptions for all the new arguments, functions, etc. DPG is often used by people who have little programming experience overall, and absolutely no Dear ImGui knowledge. With that, any Dear ImGui terms that are not reflected in the DPG, let alone names of ImGui internals, will cause a lot of questions if mentioned in the doc.
\
I can make a number of comments like "Needs a rewrite - this is an ImGui term", but I'd suggest that we go ahead and revisit the changes in the doc now (mainly mvAppItem.cpp
) without me finger-pointing all the ImGui thingies.
Making comments in the PR will take quite some time (maybe a couple of days), and I'm still halfway through the review, so get your popcorn ready! :popcorn: :grin:
One more thing I forgot to mention:
I'd like to ask a favor of whoever makes changes in future - in other PRs as well! - to avoid unnecessary re-formatting, renaming etc. because it pollutes git blame
, often for no reason other than taste. git blame
is a very useful tool when it comes to understanding why the code was written the way it was written. Nothing critical, just keep that in mind.
This is also what I actually mean when I type something like "the old code worked the same way, why change it?"
A couple of words on set_decimal_point
:
At the moment, it is broken for add_input_float
, add_slider_float
, add_drag_float
(and their double
counterparts). That is, it only seems to work on add_input_text
with either decimal=True
or scientific=True
. See this comment in ImGui ticket #6719.
Do we want to add a feature to DPG in such a broken state? If so, we need to make a warning either in the release notes or in the doc (or both), and eventually update ImGui once again to pull up the fix for this.
A note on deprecated keywords:
I've suggested DEPRECATED_REMOVE_KEYWORD_ARG
in a couple of places. For all these cases, we need to document:
Not sure where to keep this doc, maybe just a comment in this PR? In the end, it should go to the release notes.
A couple of words on declaring arguments deprecated. Right now, DPG has two options to deprecate an argument:
DEPRECATED_RENAME_KEYWORD_ARG
will issue a warning and pass the argument to C++ with a new name.DEPRECATED_REMOVE_KEYWORD_ARG
will issue a warning and won't pass the argument at all.I'd suggest that we add one more option, where a warning will be issued but otherwise the argument will be passed into the C++ part the way it did before, with its original name. This can be used for arguments that we want to retain for backward compatibility (maybe delete later), but also want to point the user to a newer, better way to do the same thing. We can name it simply DEPRECATED_KEYWORD_ARG
. It will also need an extra message coded in argument definition, so that we can say something like "use argument X instead".
A note on key modifiers in the plot (this seems to be the only place where we can pass modifiers):
While it might look natural to pass dpg.mvKey_None
to disable the corresponding modifier, mvKey_None
doesn't actually work. ImPlot uses ImHasFlag
to check if the modifier is pressed. The way ImHasFlag
is implemented, ImHasFlag(keys, 0)
will always return true, not false. To disable the modifier, one can pass -1 instead of mvKey_None
, which is totally non-obvious. We probably need to document this somewhere.
It would be even better to modify the code so that mvKey_None
leads to false
in modifier tests, but that means making changes to ImPlot or even ImGui, which is a long way to go.
When adding new axes now you need to specify which ones (i.e.
dpg.add_plot_axis(mvXAxis2)
)
This breaks the old behavior of having multiple Y axes of type dpg.mvYAxis
. While I'm all for the new syntax with dpg.mvYAxis2
and dpg.mvYAxis3
, I think we can somewhat reduce the pain for DPG users by auto-assigning multiple axes of type dpg.mvYAxis
to Y1/Y2/Y3 depending on their order in the list. Here's a fix that does just that:
In addition, the fix removes axesNames
and axesFlags
from mvPlotConfig
since they actually got useless with the updated ImPlot.
Here's a script to test it all:
import dearpygui.dearpygui as dpg
dpg.create_context()
dpg.create_viewport(title=f"Test - {dpg.get_dearpygui_version()}", width=500, height=750)
with dpg.window(label="Old way"):
with dpg.plot():
dpg.add_plot_axis(dpg.mvXAxis)
dpg.add_plot_axis(dpg.mvYAxis, label="Y1")
dpg.add_plot_axis(dpg.mvYAxis)
dpg.add_plot_axis(dpg.mvYAxis, label="Y3")
if hasattr(dpg, "mvYAxis2"):
with dpg.window(label="New way", pos=(0, 350)):
with dpg.plot():
dpg.add_plot_axis(dpg.mvXAxis)
dpg.add_plot_axis(dpg.mvYAxis, label="Y1")
dpg.add_plot_axis(dpg.mvYAxis2)
dpg.add_plot_axis(dpg.mvYAxis3, label="Y3")
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
(The label on Y2 is omitted deliberately in order to test label assignment).
While it might look natural to pass dpg.mvKey_None to disable the corresponding modifier, mvKey_None doesn't actually work. ImPlot uses ImHasFlag to check if the modifier is pressed. The way ImHasFlag is implemented, ImHasFlag(keys, 0) will always return true, not false. To disable the modifier, one can pass -1 instead of mvKey_None, which is totally non-obvious. We probably need to document this somewhere.
So you're telling to just put in the explanation of the parameters that you can disable that feature by just putting -1? (Ignoring the alternative of modifying implot itself) Otherwise tell me if I got it wrong
Yeah, kind of that. We can even define a new constant, like dpg.mvKey_ModDisabled
, to abstract off that "-1", and make it more readable. And then maybe add a note in setup.about
since we already have a bit of text about modifiers there. Like this:
setup.about = "Adds a plot which is used to hold series, and can be drawn to with draw commands. For all _mod parameters use mvKey_ModX enums, or mvKey_ModDisabled to disable the modifier.";
I'm done with my "first pass" through the changes. Once all comments I added above get resolved in this way or that, I'm going to scan through the changes once more (faster this time) and see if we still have any issues.
Here is a list of all the new and deprecated arguments and functions - I think we'll need to add it to Release Notes. Going to update this list right before merging the PR.
Update 2024/07/22: re-generated the list based on the latest commit. Only the New arguments section has changed.
Note: all deprecated functions and arguments are still accepted by DearPyGui API. Some of them may still work, some are ignored, but none should crash your application.
add_axis_tag
add_bar_group_series
add_inf_line_series
add_digital_series
get_plot_query_rects
set_axis_limits_constraints
reset_axis_limits_constraints
set_axis_zoom_constraints
reset_axis_zoom_constraints
Function | Arguments |
---|---|
add_2d_histogram_series |
col_major |
add_button |
repeat |
add_child_window |
always_auto_resize always_use_window_padding auto_resize_x auto_resize_y frame_style resizable_x resizable_y |
add_colormap_scale |
format mirror reverse_dir |
add_combo |
fit_width |
add_custom_series |
no_fit |
add_drag_line |
delayed no_cursor no_fit no_inputs |
add_drag_point |
clamped delayed no_cursor no_fit no_inputs offset |
add_group |
enabled |
add_heat_series |
col_major |
add_histogram_series |
cumulative horizontal |
add_input_text |
always_overwrite auto_select_all ctrl_enter_for_new_line escape_clears_all no_horizontal_scroll no_undo_redo |
add_line_series |
loop no_clip segments shaded skip_nan |
add_pie_series |
ignore_hidden |
add_plot |
max_query_rects min_query_rects no_frame no_inputs override_mod query_color zoom_mod zoom_rate |
add_plot_axis |
auto_fit foreground_grid no_highlight no_initial_fit no_label no_menus no_side_switch opposite pan_stretch range_fit scale tick_format |
add_plot_legend |
no_buttons no_highlight_axis no_highlight_item no_menus sort |
add_scatter_series |
no_clip |
add_stair_series |
pre_step shaded |
add_stem_series |
horizontal |
add_subplots |
share_series |
add_table_column |
angled_header no_header_label |
add_text_point |
offset |
add_tree_node |
span_full_width span_text_width |
add_window |
unsaved_document |
configure_app |
anti_aliased_fill anti_aliased_lines anti_aliased_lines_use_tex docking_shift_only |
add_hline_series
: use add_inf_line_series()
add_vline_series
: use add_inf_line_series()
get_plot_query_area
: use get_plot_query_rects()
is_plot_queried
: use get_plot_query_rects()
Function | Argument | Explanation |
---|---|---|
add_histogram_series |
cumlative |
Deprecated because of a typo: use cumulative |
add_image_button |
frame_padding |
Not supported anymore by Dear ImGui; still works in DPG but will eventually be removed. Replace it with a theme having the dpg.mvStyleVar_FramePadding style. |
add_plot |
anti_aliased |
Not supported by ImPlot anymore. To enable/disable anti-aliasing, use dpg.configure_app() with the anti_aliasing parameters. |
add_plot |
no_child |
Removed in ImPlot as child windows are no longer needed to capture scroll. |
add_plot |
no_highlight |
Removed because not supported by ImPlot anymore. To control the highlighting of series use the same argument in add_plot_legend . |
add_plot |
query_button query_mod |
This refers to the old way of querying in ImPlot, now replaced with add_drag_rect() . |
add_plot_axis |
log_scale |
Use scale=dpg.mvPlotScale_Log10 instead. |
add_plot_axis |
time |
Use scale=dpg.mvPlotScale_Time instead. |
add_text_point |
x_offset y_offset |
Use the offset argument instead. |
Here is a list of all the new and deprecated arguments and functions - I think we'll need to add it to Release Notes. Going to update this list right before merging the PR.
Are you also gonna add other things like StackToolWindow
, new stying variables and other features in the list?
@SamuMazzi how is it going? I'm not sure if all my comments have been resolved; I only see the comment about delete_rect
that's still open. Please let me know if you're done with changes on your end, and I can start my final pass through the PR.
Are you also gonna add other things like StackToolWindow, new stying variables and other features in the list?
Sorry, didn't see your earlier comment. I think we can use your original description, just edit it a bit so it reflects the current state. My goal with those lists of new/deprecated functions was to (1) make it easier to see what changed in the API, and (2) make sure we don't miss anything. So I ran some diff/grep/etc. on the arguments and compiled those lists, to make sure we have real data obtained from the source code.
I'd prefer to leave editing of the original description to you ;)
@v-ein I should have done everything except for delete_rect
: I already did something but I'm gonna need a little bit of time more, I think. You choose if you want to start already reviewing other parts of the code or you want to wait.
Actually a couple of "resolved" things are still to be commited, but these are just a few things
And for the other thing, perfect, then I'll think on how to write the final PR :)
@SamuMazzi can you please take a look at the following discussions? Looks like they are not fully resolved (or need some answers).
Here's something to consider for the PR description.
ImPlot now auto-fits data by default on the first frame, whereas the old version was displaying the plot in the [0, 1] range if the user did not specify the range in any way.
I think we need to mention this in the Release Notes, and point out that no_initial_fit=True
corresponds to the old behavior. I doubt that it will affect anyone (since most if not all users either specify an explicit range or do an auto-fit), it's just good to point out.
I'm thinking on how we can make it easier for users of the old query
mechanism to adapt their apps to the new approach, which looks a bit limited in certain aspects.
In the old version, the user could only have one query rect. Each time they dragged with the middle mouse button, the rect was re-created in the new location. This suits well the apps that show a zoomed-in portion of the plot in a separate window.
With the current approach, however, it's a bit difficult to implement such an app because ctrl-right-dragging creates a new drag rect and it's not clear how to handle that. Ideally, there should be a way to limit the number of query rectangles for the plot.
The following could make it easier:
min_query_rects
and max_query_rects
, defaulting to 0 (no limit).min_query_rects
in the plot, the double-click no longer deletes the query rect.max_query_rects
is nonzero and the number of rects reaches this value, ctrl-right-drag replaces the last rect instead of adding a new one.
This way, with min_query_rects=1
and max_query_rects=1
, we'll get the old behavior of the query feature. Maybe we should make these numbers the default, too.
What do you think?
It makes totally sense. I just have a question... wouldn't make it more sense to delete the first rect, like in a FIFO queue, when max_query_rects
is reached? In the default case this won't change anything.
Instead, I'll push the modifications, also the one that you suggested me (I don't remember where and I don't want to look for it) regarding the deletion of the query rect and it seems like that the old version used to work better. This one seems to always evaluate to true
that hovered
variable and so it deletes the last rect. Try and tell me pls.
wouldn't make it more sense to delete the first rect, like in a FIFO queue, when max_query_rects is reached?
I also considered this approach but it's probably less obvious for the user when he draws one rect, two, three, a dozen and then the first one disappears. The user's attention will probably be on the last rectangle and not on the first one (the first one might already be scrolled away). But, well... who knows :). We could even add an option to control the behavior of the query when the max is reached, but won't that be an overkill?..
Yes but then the user won't be able, in any way, to delete all the other rects... anyway no I wouldn't add another option so I'll stick to your version
@v-ein I should have also found a way to fix issues #1847 #2363 and others related similar to those. It seems to work for what's concerning my tests, but I don't know if it should go inside another PR
but I don't know if it should go inside another PR
Let's do it in a separate PR. This one is close to completion, let's not add any more stuff.
Not sure what to do with the commit 1e99e3f
... Can you try the following sequence?
porting
branch (do not delete the remote branch).porting
branch on commit 1c3db32
. GitHub will still have remote porting
branch pointing to 1e99e3f
at that moment.porting
branch. If needed, use --force
(I'm sure it will be needed). If it works, this will move porting
on GitHub to 1c3db32
. Most probably it won't work though.I'd recommend to do all that on a separate clone of your repo (not on the copy you use for bugfixing). Technically, steps 1-3 are absolutely safe for your GitHub repo. Step 4 is more of an experiment, but since the branch or tag added in step 1 holds a reference to 1e99e3f
, the current chain of commits will not be lost. Worst case you'll get another series of commits (a duplicate) in your fork; best case porting
will just jump back to 1c3db32
.
It didn't work even if I managed to create the tag... can I actually just try to delete the modification (some kind of git reset
) and keep the modifications locally? Then when the PR will be accepted I'll create another one with this one!
You mean, add another commit that rolls back the changes? Yes, that's one of the ways to do it. Least preferrable, but if other ways don't work... well.
some kind of git reset
That's exactly what I wanted to do: to move the porting
branch back by 1 commit so that it doesn't include these changes. Or did you mean git revert
?
Did it! I had to force-push but I have the changes locally so no problem I'd say
Replying to an earlier comment that I only now got a chance to check:
This one seems to always evaluate to true that hovered variable and so it deletes the last rect. Try and tell me pls.
With the latest commit, seems to be working fine for me. Whichever query rect I double click, that rect gets deleted, not the last rect.
Would you please also look at this comment - it's feeling a bit forlorn: https://github.com/hoffstadt/DearPyGui/pull/2275#discussion_r1677133725
I'm done with my final pass of code review. Several things (mentioned in recent comments) still need to be fixed. Also, we need to make sure that the PR description contains some text to be used as Release Notes.
One more thing that bothers me is that there's going to be a merge conflict when the PR gets closed. To prevent it (or, better, to help Jonathan and relieve him from the need to resolve that conflict :joy:), we can merge current master
into the porting
branch (resolving the conflict at this point). This guarantees that there won't be a conflict when porting
gets merged back to master
.
The conflict is trivial and is caused by changes to draw_rect
arguments in dearpygui.py
; we need to accept the version from this PR and ignore the version from master
(since the PR provides a correct and up-to-date solution based on DEPRECATE_KEYWORD
option).
Hmmm... what happened that you had to do a force-push?
name: Updating backend ImGui/ImPlot/ImNodes about: Updated backends title: Updating backend ImGui/ImPlot/ImNodes assignees: ''
After a loooooot of work and time, we've finally finished the PR. A huge thank you to @v-ein for all the help and support.
Description
This PR aims to update the
ImGui/ImPlot/ImNodes
backends of DPG to way more recent versions.Currently, DPG relies on really old version of these packages (~2/3 years old), now this is the situation before/after the PR:
Those versions are the latest available at the moment of merging the PR and they are supported by DPG but this doesn't mean that we implemented every single feature from those libraries (many are still missing like multi-selection, several flags in different components, new API for shortcuts, etc...).
Below will be listed a summary of the major changes and new features. We tried to be as much backward compatible as possible. And hopefully you may not need to change anything in your current code.
Issues solved
Changes
StackToolWindow
query
API for plots. Now multiple queries can be created and managed. Check the demo and the new parameters inadd_plot
to have more info((x1, y1, x2, y2), (x1, y1, ...))
. This differs from the old behavior where the callback was getting(x1, x2, y1, y2)
, i.e. first the X range, then the Y range. The new format describes a sequence of rectangles in the plot's coordinate space.label
parameter inadd_separator
will put a label inside the separatorctrl + tab
navigation across windows independent fromkeyboard_navigation
parameterPresentation
section toMetricsTool
like in the original ImGuienable
parameter inadd_group
will applymvStyleVar_DisabledAlpha
to all its childrenHere is a list of all the new and deprecated arguments and functions.
Note: all deprecated functions and arguments are still accepted by DearPyGui API. Some of them may still work, some are ignored, but none should crash your application.
New functions
add_axis_tag
add_bar_group_series
add_inf_line_series
add_digital_series
get_plot_query_rects
set_axis_limits_constraints
reset_axis_limits_constraints
set_axis_zoom_constraints
reset_axis_zoom_constraints
New arguments
add_2d_histogram_series
col_major
add_button
repeat
add_child_window
always_auto_resize
always_use_window_padding
auto_resize_x
auto_resize_y
frame_style
resizable_x
resizable_y
add_colormap_scale
format
mirror
reverse_dir
add_combo
fit_width
add_custom_series
no_fit
add_drag_line
delayed
no_cursor
no_fit
no_inputs
add_drag_point
clamped
delayed
no_cursor
no_fit
no_inputs
offset
add_group
enabled
add_heat_series
col_major
add_histogram_series
cumulative
horizontal
add_input_text
always_overwrite
auto_select_all
ctrl_enter_for_new_line
escape_clears_all
no_horizontal_scroll
no_undo_redo
add_line_series
loop
no_clip
segments
shaded
skip_nan
add_pie_series
ignore_hidden
add_plot
max_query_rects
min_query_rects
no_frame
no_inputs
override_mod
query_color
zoom_mod
zoom_rate
add_plot_axis
auto_fit
foreground_grid
no_highlight
no_initial_fit
no_label
no_menus
no_side_switch
opposite
pan_stretch
range_fit
scale
tick_format
add_plot_legend
no_buttons
no_highlight_axis
no_highlight_item
no_menus
sort
add_scatter_series
no_clip
add_stair_series
pre_step
shaded
add_stem_series
horizontal
add_subplots
share_series
add_table_column
angled_header
no_header_label
add_text_point
offset
add_tree_node
span_full_width
span_text_width
add_window
unsaved_document
configure_app
anti_aliased_fill
anti_aliased_lines
anti_aliased_lines_use_tex
docking_shift_only
Deprecated functions
add_hline_series
: useadd_inf_line_series()
add_vline_series
: useadd_inf_line_series()
get_plot_query_area
: useget_plot_query_rects()
is_plot_queried
: useget_plot_query_rects()
Deprecated arguments
add_histogram_series
cumlative
cumulative
add_image_button
frame_padding
add_plot
anti_aliased
dpg.configure_app()
with theanti_aliasing
parameters.add_plot
no_child
add_plot
no_highlight
add_plot_legend
.add_plot
query_button
query_mod
add_drag_rect()
.add_plot_axis
log_scale
scale=dpg.mvPlotScale_Log10
instead.add_plot_axis
time
scale=dpg.mvPlotScale_Time
instead.add_text_point
x_offset
y_offset
offset
argument instead.Nerd info (for developers)
Why?
ImGui is currently sponsored by big tech companies like Adobe, Blizzard, Activision, etc. so we can expect a lot of improvements with the update (there are already ton of them) and we can expect a lot of people working on the really ugly/hard things like graphical backend libraries.
At my workplace we are about to ship a product based on DPG. Because of my job, I had to edit the backend and then I found out that what I edited was already modified in the new ImGui and then I also found out that the ImGui version we were relying on in DPG was really old. We want to stick with this library but I honestly told them that I don't see the point of relying on an almost dead (okay, no, maintenance mode) library, so we decided to either upgrade it or drop it and replace it with something else.
I know that this is quite a huge change, and that several problems can arise but I also think that it can be definitely worth it. Also with this huge community all of these changes can be "easily" tested.
OpenGL
Currently, for the build, DPG relies on
gl3w
in theexamples
folder ofImGui
. This doesn't sound like a really stable thing and indeed a couple of releases later, that's been removed, so I addedgl3w
directly in thethirdparty
folder. AlsoImGui
decided to make some heavy changes in order to be more cross-platform. One of these, which is also my biggest concern about all of this work, is about the buttons of the keyboard. These are now less than before, and they have been all mapped to predefined values inImGui
. So if someone used them heavily now they could have some problem.Major concerns
Notes
There are still tons of updates and new features that can be implemented (i.e. Shortcuts API, Multi select, and many others), then if you want to take a look on what happened check this for ImPlot and ImGui
In ~2022 ImGui moved all the docking stuff in a separate branch, so now we're relying on that branch. This is not a big difference because it's always rebased on the main branch on every update and should be merged in the master in the version 2.0
Everything was tested with Valgrind in order to be sure that there wasn't any kind of accidental memory leak (or at least not more than those who were already there).
My main goal here was to have a real feedback from the most expert users on this work.
I hope I was clear enough! I'd like to improve this library because I think it's really great, so any kind of suggestion will be well accepted.