Skip to content

Commit 52944d3

Browse files
committed
Bumped ImGui version to v1.92.2b-docking
1 parent 9c54c68 commit 52944d3

13 files changed

Lines changed: 28289 additions & 18413 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Pygui is a dynamic wrapper for [Dear ImGui](https://github.com/ocornut/imgui) us
44

55
![Hello From pygui](./docs/img/hello_from_pygui.png)
66

7-
ImGui Version: `v1.91.2-docking`
8-
Python Version: `Python 3.12.6`
7+
ImGui Version: `v1.92.2b-docking`
8+
Python Version: `Python 3.12.10`
99

1010
## Features
1111

requirements.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Cython==3.0.6
2-
diff-match-patch==20230430
3-
glfw==2.6.3
4-
numpy==1.26.2
5-
Pillow==10.1.0
6-
ply==3.11
7-
PyOpenGL==3.1.7
2+
diff-match-patch
3+
glfw
4+
numpy
5+
Pillow
6+
ply
7+
PyOpenGL
88
setuptools

src/binding/core/core.pyx

Lines changed: 11265 additions & 7867 deletions
Large diffs are not rendered by default.

src/binding/core/core_generated.pyx

Lines changed: 4983 additions & 2889 deletions
Large diffs are not rendered by default.

src/binding/core/core_template.pyx

Lines changed: 10136 additions & 6738 deletions
Large diffs are not rendered by default.

src/binding/core/dcimgui.pxd

Lines changed: 688 additions & 442 deletions
Large diffs are not rendered by default.

src/c/main.c

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,6 @@ void show_imfontconfig(ImFontConfig* config)
4444
}
4545

4646

47-
void show_imfont_atlas(ImFontAtlas* atlas)
48-
{
49-
if (ImGui_BeginMenu("atlas.config_data"))
50-
{
51-
char config_data_size[32];
52-
sprintf(config_data_size, "atlas->ConfigData.size(): %d", atlas->ConfigData.Size);
53-
ImGui_MenuItem(config_data_size);
54-
for (int i = 0; i < atlas->ConfigData.Size; i++)
55-
{
56-
char config_text[32];
57-
sprintf(config_text, "Config %d", i);
58-
if (ImGui_BeginMenu(config_text))
59-
{
60-
show_imfontconfig(&atlas->ConfigData.Data[i]);
61-
ImGui_EndMenu();
62-
}
63-
}
64-
ImGui_EndMenu();
65-
}
66-
}
67-
6847
static const char* ExampleNames[] =
6948
{
7049
"Artichoke", "Arugula", "Asparagus", "Avocado", "Bamboo Shoots", "Bean Sprouts", "Beans", "Beet", "Belgian Endive", "Bell Pepper",
@@ -131,13 +110,6 @@ void multi_select_test()
131110
}
132111

133112

134-
void example_function()
135-
{
136-
ImFont* font = ImGui_GetFont();
137-
show_imfont_atlas(font->ContainerAtlas);
138-
}
139-
140-
141113
// Main code
142114
int main(int argc, char* argv[])
143115
{
@@ -269,8 +241,6 @@ int main(int argc, char* argv[])
269241
ImGui_Checkbox("Another window", &show_another_window);
270242
ImGui_Text("New Char: ∮");
271243

272-
example_function();
273-
274244
ImGui_SliderFloatEx("Float", &f, 0.0f, 1.0f, "%.3f", 0);
275245
ImGui_ColorEdit3("clear color", (float*)&clear_color, 0);
276246

src/deploy/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def main():
8484
else:
8585
print("pygui.ImGuiError")
8686

87-
demo_fonts_init()
87+
# demo_fonts_init()
8888

8989
try:
9090
while not glfw.window_should_close(window):

src/deploy/pygui/__init__.pyi

Lines changed: 1191 additions & 430 deletions
Large diffs are not rendered by default.

src/deploy/pygui_demo.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,7 @@ def __init__(self):
12781278
tab_tab_bar_flags = pygui.Int(
12791279
pygui.TAB_BAR_FLAGS_AUTO_SELECT_NEW_TABS | \
12801280
pygui.TAB_BAR_FLAGS_REORDERABLE | \
1281-
pygui.TAB_BAR_FLAGS_FITTING_POLICY_RESIZE_DOWN)
1281+
pygui.TAB_BAR_FLAGS_FITTING_POLICY_SCROLL)
12821282
plotting_animate = pygui.Bool(True)
12831283
plotting_arr = [
12841284
0.6, 0.1, 1.0, 0.5, 0.92, 0.1, 0.2
@@ -2387,14 +2387,19 @@ def adapter_set_item_selected(self: pygui.ImGuiSelectionExternalStorage, n: int,
23872387
pygui.checkbox_flags("ImGuiTabBarFlags_AutoSelectNewTabs", widget.tab_tab_bar_flags, pygui.TAB_BAR_FLAGS_AUTO_SELECT_NEW_TABS)
23882388
pygui.checkbox_flags("ImGuiTabBarFlags_TabListPopupButton", widget.tab_tab_bar_flags, pygui.TAB_BAR_FLAGS_TAB_LIST_POPUP_BUTTON)
23892389
pygui.checkbox_flags("ImGuiTabBarFlags_NoCloseWithMiddleMouseButton", widget.tab_tab_bar_flags, pygui.TAB_BAR_FLAGS_NO_CLOSE_WITH_MIDDLE_MOUSE_BUTTON)
2390+
pygui.checkbox_flags("ImGuiTabBarFlags_DrawSelectedOverline", widget.tab_tab_bar_flags, pygui.TAB_BAR_FLAGS_DRAW_SELECTED_OVERLINE)
23902391
if widget.tab_tab_bar_flags.value & pygui.TAB_BAR_FLAGS_FITTING_POLICY_MASK == 0:
23912392
widget.tab_tab_bar_flags.value |= pygui.TAB_BAR_FLAGS_FITTING_POLICY_DEFAULT
2392-
if pygui.checkbox_flags("ImGuiTabBarFlags_FittingPolicyResizeDown", widget.tab_tab_bar_flags, pygui.TAB_BAR_FLAGS_FITTING_POLICY_RESIZE_DOWN):
2393-
widget.tab_tab_bar_flags.value &= ~(pygui.TAB_BAR_FLAGS_FITTING_POLICY_MASK ^ pygui.TAB_BAR_FLAGS_FITTING_POLICY_RESIZE_DOWN)
2393+
if pygui.checkbox_flags("ImGuiTabBarFlags_FittingPolicyMixed", widget.tab_tab_bar_flags, pygui.TAB_BAR_FLAGS_FITTING_POLICY_MIXED):
2394+
widget.tab_tab_bar_flags.value &= ~(pygui.TAB_BAR_FLAGS_FITTING_POLICY_MASK ^ pygui.TAB_BAR_FLAGS_FITTING_POLICY_MIXED)
2395+
if pygui.checkbox_flags("ImGuiTabBarFlags_FittingPolicyShrink", widget.tab_tab_bar_flags, pygui.TAB_BAR_FLAGS_FITTING_POLICY_SHRINK):
2396+
widget.tab_tab_bar_flags.value &= ~(pygui.TAB_BAR_FLAGS_FITTING_POLICY_MASK ^ pygui.TAB_BAR_FLAGS_FITTING_POLICY_SHRINK)
23942397
if pygui.checkbox_flags("ImGuiTabBarFlags_FittingPolicyScroll", widget.tab_tab_bar_flags, pygui.TAB_BAR_FLAGS_FITTING_POLICY_SCROLL):
23952398
widget.tab_tab_bar_flags.value &= ~(pygui.TAB_BAR_FLAGS_FITTING_POLICY_MASK ^ pygui.TAB_BAR_FLAGS_FITTING_POLICY_SCROLL)
23962399

23972400
# Tab Bar
2401+
pygui.align_text_to_frame_padding()
2402+
pygui.text("Opened:")
23982403
names = ["Artichoke", "Beetroot", "Celery", "Daikon"]
23992404
for n, tab in enumerate(widget.tab_opened):
24002405
if n > 0:
@@ -2428,8 +2433,12 @@ def adapter_set_item_selected(self: pygui.ImGuiSelectionExternalStorage, n: int,
24282433

24292434
# Expose some other flags which are useful to showcase how they interact with Leading/Trailing tabs
24302435
pygui.checkbox_flags("ImGuiTabBarFlags_TabListPopupButton", widget.tab_tab_bar_flags, pygui.TAB_BAR_FLAGS_TAB_LIST_POPUP_BUTTON)
2431-
if pygui.checkbox_flags("ImGuiTabBarFlags_FittingPolicyResizeDown", widget.tab_tab_bar_flags, pygui.TAB_BAR_FLAGS_FITTING_POLICY_RESIZE_DOWN):
2432-
widget.tab_tab_bar_flags.value &= ~(pygui.TAB_BAR_FLAGS_FITTING_POLICY_MASK ^ pygui.TAB_BAR_FLAGS_FITTING_POLICY_RESIZE_DOWN)
2436+
if widget.tab_tab_bar_flags.value & pygui.TAB_BAR_FLAGS_FITTING_POLICY_MASK == 0:
2437+
widget.tab_tab_bar_flags.value |= pygui.TAB_BAR_FLAGS_FITTING_POLICY_DEFAULT
2438+
if pygui.checkbox_flags("ImGuiTabBarFlags_FittingPolicyMixed", widget.tab_tab_bar_flags, pygui.TAB_BAR_FLAGS_FITTING_POLICY_MIXED):
2439+
widget.tab_tab_bar_flags.value &= ~(pygui.TAB_BAR_FLAGS_FITTING_POLICY_MASK ^ pygui.TAB_BAR_FLAGS_FITTING_POLICY_MIXED)
2440+
if pygui.checkbox_flags("ImGuiTabBarFlags_FittingPolicyShrink", widget.tab_tab_bar_flags, pygui.TAB_BAR_FLAGS_FITTING_POLICY_SHRINK):
2441+
widget.tab_tab_bar_flags.value &= ~(pygui.TAB_BAR_FLAGS_FITTING_POLICY_MASK ^ pygui.TAB_BAR_FLAGS_FITTING_POLICY_SHRINK)
24332442
if pygui.checkbox_flags("ImGuiTabBarFlags_FittingPolicyScroll", widget.tab_tab_bar_flags, pygui.TAB_BAR_FLAGS_FITTING_POLICY_SCROLL):
24342443
widget.tab_tab_bar_flags.value &= ~(pygui.TAB_BAR_FLAGS_FITTING_POLICY_MASK ^ pygui.TAB_BAR_FLAGS_FITTING_POLICY_SCROLL)
24352444

0 commit comments

Comments
 (0)