imgui-bundle 1.93.0__cp315-cp315-win_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- imgui_bundle/.gitignore +9 -0
- imgui_bundle/LICENSE +21 -0
- imgui_bundle/Readme_dev.md +11 -0
- imgui_bundle/Readme_pypi.md +63 -0
- imgui_bundle/__init__.py +394 -0
- imgui_bundle/__init__.pyi +80 -0
- imgui_bundle/_glfw_set_search_path.py +109 -0
- imgui_bundle/_imgui_bundle.cp315-win_arm64.pyd +0 -0
- imgui_bundle/_imgui_test_engine_python_safety.py +140 -0
- imgui_bundle/_patch_runners_add_save_screenshot_param.py +58 -0
- imgui_bundle/_pyodide_latex_fonts.py +114 -0
- imgui_bundle/_pyodide_test_engine_coroutine.py +64 -0
- imgui_bundle/_rich_md_image_loader.py +175 -0
- imgui_bundle/assets/app_settings/apple/Info.plist +32 -0
- imgui_bundle/assets/app_settings/icon.png +0 -0
- imgui_bundle/assets/fonts/DroidSans.ttf +0 -0
- imgui_bundle/assets/fonts/Font_Awesome_6_Free-Solid-900.otf +0 -0
- imgui_bundle/assets/fonts/Inconsolata-LICENSE-OFL.txt +93 -0
- imgui_bundle/assets/fonts/Inconsolata-Medium.ttf +0 -0
- imgui_bundle/assets/fonts/Roboto/LICENSE.txt +202 -0
- imgui_bundle/assets/fonts/Roboto/Roboto-Bold.ttf +0 -0
- imgui_bundle/assets/fonts/Roboto/Roboto-BoldItalic.ttf +0 -0
- imgui_bundle/assets/fonts/Roboto/Roboto-Regular.ttf +0 -0
- imgui_bundle/assets/fonts/Roboto/Roboto-RegularItalic.ttf +0 -0
- imgui_bundle/assets/fonts/fontawesome-webfont.ttf +0 -0
- imgui_bundle/assets/fonts/latex/GUST-FONT-LICENSE.txt +29 -0
- imgui_bundle/assets/fonts/latex/latinmodern-math.clm1 +0 -0
- imgui_bundle/assets/fonts/latex/latinmodern-math.otf +0 -0
- imgui_bundle/assets/images/logo_cpp.png +0 -0
- imgui_bundle/assets/images/logo_python.png +0 -0
- imgui_bundle/assets/images/markdown_broken_image.png +0 -0
- imgui_bundle/assets/images/world.png +0 -0
- imgui_bundle/demos_assets/demos_catalog.json +1275 -0
- imgui_bundle/demos_assets/fonts/NotoEmoji-Regular.ttf +0 -0
- imgui_bundle/demos_assets/fonts/Playbox/Playbox-FREE.otf +0 -0
- imgui_bundle/demos_assets/fonts/Playbox/Playbox-license.txt +56 -0
- imgui_bundle/demos_assets/fonts/entypo.ttf +0 -0
- imgui_bundle/demos_assets/images/badge_interactive_explorer.png +0 -0
- imgui_bundle/demos_assets/images/badge_view_docs.png +0 -0
- imgui_bundle/demos_assets/images/badge_view_sources.png +0 -0
- imgui_bundle/demos_assets/images/bear_transparent.png +0 -0
- imgui_bundle/demos_assets/images/bundle_playground.jpg +0 -0
- imgui_bundle/demos_assets/images/demo_tex_inspect.png +0 -0
- imgui_bundle/demos_assets/images/golden_gate.jpg +0 -0
- imgui_bundle/demos_assets/images/haiku.png +0 -0
- imgui_bundle/demos_assets/images/house.jpg +0 -0
- imgui_bundle/demos_assets/images/imgui_notebook.jpg +0 -0
- imgui_bundle/demos_assets/images/nanovg_demo_heart.jpg +0 -0
- imgui_bundle/demos_assets/images/nanovg_full_demo.jpg +0 -0
- imgui_bundle/demos_assets/images/tennis.jpg +0 -0
- imgui_bundle/demos_assets/manifest.json +22 -0
- imgui_bundle/demos_assets/nanovg_demo_images/image1.jpg +0 -0
- imgui_bundle/demos_assets/resources.md +52 -0
- imgui_bundle/demos_assets/welcome.md +39 -0
- imgui_bundle/demos_cpp/CMakeLists.txt +100 -0
- imgui_bundle/demos_cpp/_auto_main/_auto_main.cpp.in +32 -0
- imgui_bundle/demos_cpp/coi-serviceworker.js +119 -0
- imgui_bundle/demos_cpp/demo_im_anim.cpp +14 -0
- imgui_bundle/demos_cpp/demo_imgui_bundle.cpp +612 -0
- imgui_bundle/demos_cpp/demo_imgui_bundle.h +19 -0
- imgui_bundle/demos_cpp/demo_imgui_bundle_intro.cpp +3260 -0
- imgui_bundle/demos_cpp/demo_imgui_bundle_intro.h +24 -0
- imgui_bundle/demos_cpp/demo_imgui_md.cpp +810 -0
- imgui_bundle/demos_cpp/demo_imgui_md_document.cpp +167 -0
- imgui_bundle/demos_cpp/demo_imgui_show_demo_window.cpp +14 -0
- imgui_bundle/demos_cpp/demo_imguizmo_launcher.cpp +22 -0
- imgui_bundle/demos_cpp/demo_immapp_launcher.cpp +1418 -0
- imgui_bundle/demos_cpp/demo_immapp_launcher.h +157 -0
- imgui_bundle/demos_cpp/demo_immvision_launcher.cpp +56 -0
- imgui_bundle/demos_cpp/demo_logger.cpp +64 -0
- imgui_bundle/demos_cpp/demo_markdown_editor.cpp +140 -0
- imgui_bundle/demos_cpp/demo_nanovg_launcher.cpp +76 -0
- imgui_bundle/demos_cpp/demo_tex_inspect_launcher.cpp +43 -0
- imgui_bundle/demos_cpp/demo_text_edit.cpp +824 -0
- imgui_bundle/demos_cpp/demo_themes.cpp +24 -0
- imgui_bundle/demos_cpp/demo_utils/CMakeLists.txt +5 -0
- imgui_bundle/demos_cpp/demo_utils/api_demos.cpp +286 -0
- imgui_bundle/demos_cpp/demo_utils/api_demos.h +36 -0
- imgui_bundle/demos_cpp/demo_utils/immvision_make_test_suite.cpp +217 -0
- imgui_bundle/demos_cpp/demo_utils/subprocess.h +1180 -0
- imgui_bundle/demos_cpp/demo_widgets.cpp +549 -0
- imgui_bundle/demos_cpp/demos_imanim/CMakeLists.txt +5 -0
- imgui_bundle/demos_cpp/demos_imguizmo/CMakeLists.txt +5 -0
- imgui_bundle/demos_cpp/demos_imguizmo/demo_gizmo.cpp +464 -0
- imgui_bundle/demos_cpp/demos_imguizmo/demo_gizmo_pure.cpp +512 -0
- imgui_bundle/demos_cpp/demos_imguizmo/demo_guizmo_curve_edit.cpp +132 -0
- imgui_bundle/demos_cpp/demos_imguizmo/demo_guizmo_gradient.cpp +88 -0
- imgui_bundle/demos_cpp/demos_imguizmo/demo_guizmo_sequencer.draft_cpp +291 -0
- imgui_bundle/demos_cpp/demos_imguizmo/demo_guizmo_zoom_slider.cpp +147 -0
- imgui_bundle/demos_cpp/demos_immapp/CMakeLists.txt +30 -0
- imgui_bundle/demos_cpp/demos_immapp/coi-serviceworker.js +119 -0
- imgui_bundle/demos_cpp/demos_immapp/demo_assets.cpp +38 -0
- imgui_bundle/demos_cpp/demos_immapp/demo_assets_addons.cpp +267 -0
- imgui_bundle/demos_cpp/demos_immapp/demo_chinese_font.cpp +110 -0
- imgui_bundle/demos_cpp/demos_immapp/demo_command_palette.cpp +100 -0
- imgui_bundle/demos_cpp/demos_immapp/demo_custom_background.cpp +678 -0
- imgui_bundle/demos_cpp/demos_immapp/demo_docking.cpp +953 -0
- imgui_bundle/demos_cpp/demos_immapp/demo_drag_and_drop.cpp +105 -0
- imgui_bundle/demos_cpp/demos_immapp/demo_hello_world.cpp +3 -0
- imgui_bundle/demos_cpp/demos_immapp/demo_hello_world_assets/readme.txt +2 -0
- imgui_bundle/demos_cpp/demos_immapp/demo_immapp_testing.cpp +120 -0
- imgui_bundle/demos_cpp/demos_immapp/demo_implot_markdown.cpp +55 -0
- imgui_bundle/demos_cpp/demos_immapp/demo_parametric_curve.cpp +89 -0
- imgui_bundle/demos_cpp/demos_immapp/demo_powersave.cpp +205 -0
- imgui_bundle/demos_cpp/demos_immapp/demo_testengine.cpp +249 -0
- imgui_bundle/demos_cpp/demos_immapp/demo_touch_screen.cpp +252 -0
- imgui_bundle/demos_cpp/demos_immapp/haiku_butterfly.cpp +161 -0
- imgui_bundle/demos_cpp/demos_immapp/haiku_implot_heart.cpp +88 -0
- imgui_bundle/demos_cpp/demos_immapp/layout_child.cpp +134 -0
- imgui_bundle/demos_cpp/demos_immapp/layout_docking.cpp +139 -0
- imgui_bundle/demos_cpp/demos_immapp/shell.emscripten.html +129 -0
- imgui_bundle/demos_cpp/demos_immapp/welcome_imm_mode.cpp +119 -0
- imgui_bundle/demos_cpp/demos_immvision/CMakeLists.txt +27 -0
- imgui_bundle/demos_cpp/demos_immvision/demo_immvision_display.cpp +56 -0
- imgui_bundle/demos_cpp/demos_immvision/demo_immvision_inspector.cpp +38 -0
- imgui_bundle/demos_cpp/demos_immvision/demo_immvision_link.cpp +66 -0
- imgui_bundle/demos_cpp/demos_immvision/demo_immvision_process.cpp +199 -0
- imgui_bundle/demos_cpp/demos_nanovg/CMakeLists.txt +12 -0
- imgui_bundle/demos_cpp/demos_nanovg/coi-serviceworker.js +119 -0
- imgui_bundle/demos_cpp/demos_nanovg/demo_nanovg_full/demo_nanovg_full_impl.cpp +1248 -0
- imgui_bundle/demos_cpp/demos_nanovg/demo_nanovg_full/demo_nanovg_full_impl.h +28 -0
- imgui_bundle/demos_cpp/demos_nanovg/demo_nanovg_full.cpp +140 -0
- imgui_bundle/demos_cpp/demos_nanovg/demo_nanovg_heart.cpp +174 -0
- imgui_bundle/demos_cpp/demos_nanovg/shell.emscripten.html +129 -0
- imgui_bundle/demos_cpp/demos_node_editor/CMakeLists.txt +16 -0
- imgui_bundle/demos_cpp/demos_node_editor/demo_node_editor_color_mixer.cpp +482 -0
- imgui_bundle/demos_cpp/demos_node_editor/demo_node_editor_image_pipeline.cpp +966 -0
- imgui_bundle/demos_cpp/demos_tex_inspect/CMakeLists.txt +10 -0
- imgui_bundle/demos_cpp/demos_tex_inspect/demo_tex_inspect_demo_window.cpp +26 -0
- imgui_bundle/demos_cpp/demos_tex_inspect/demo_tex_inspect_simple.cpp +57 -0
- imgui_bundle/demos_cpp/msvc_note.txt +20 -0
- imgui_bundle/demos_cpp/sandbox/CMakeLists.txt +1 -0
- imgui_bundle/demos_cpp/sandbox/bundle_cpp_sandbox.cpp +16 -0
- imgui_bundle/demos_cpp/sandbox/sandbox_custom_opengl_version.cpp +24 -0
- imgui_bundle/demos_cpp/sandbox/sandbox_immapp_manual_render.cpp +70 -0
- imgui_bundle/demos_cpp/sandbox/sandbox_md_invalid_latex.cpp +28 -0
- imgui_bundle/demos_cpp/sandbox/sandbox_md_math.cpp +112 -0
- imgui_bundle/demos_cpp/sandbox/sandbox_md_without_hello_imgui.cpp +145 -0
- imgui_bundle/demos_cpp/sandbox/sandbox_narrative.cpp +62 -0
- imgui_bundle/demos_cpp/sandbox/sandbox_node_clipping_issue.cpp +117 -0
- imgui_bundle/demos_cpp/sandbox/sandbox_node_combo.cpp +160 -0
- imgui_bundle/demos_cpp/sandbox/sandbox_node_graph.cpp +427 -0
- imgui_bundle/demos_cpp/sandbox/sandbox_node_image.cpp +71 -0
- imgui_bundle/demos_cpp/sandbox/sandbox_node_md_code.cpp +63 -0
- imgui_bundle/demos_cpp/sandbox/sandbox_node_popup.cpp +141 -0
- imgui_bundle/demos_cpp/sandbox/sandbox_node_text_wrap.cpp +105 -0
- imgui_bundle/demos_cpp/sandbox/sandbox_plot_in_node.cpp +50 -0
- imgui_bundle/demos_cpp/sandbox/sandbox_stacklayout.cpp +61 -0
- imgui_bundle/demos_cpp/sandbox/sandbox_tmp.cpp +13 -0
- imgui_bundle/demos_cpp/sandbox/sandbox_topmost.cpp +43 -0
- imgui_bundle/demos_cpp/sandbox/sandbox_touch_scroll.cpp +101 -0
- imgui_bundle/demos_cpp/sandbox/sandbox_tstengine.cpp +67 -0
- imgui_bundle/demos_cpp/sandbox/sandnode_stack.cpp +46 -0
- imgui_bundle/demos_cpp/sandbox/sandnode_suspend.cpp +99 -0
- imgui_bundle/demos_cpp/shell.emscripten.html +150 -0
- imgui_bundle/demos_python/.gitignore +3 -0
- imgui_bundle/demos_python/__init__.py +1 -0
- imgui_bundle/demos_python/demo_im_anim.py +31 -0
- imgui_bundle/demos_python/demo_imgui_bundle.py +312 -0
- imgui_bundle/demos_python/demo_imgui_bundle_intro.py +3024 -0
- imgui_bundle/demos_python/demo_imgui_md.py +780 -0
- imgui_bundle/demos_python/demo_imgui_md_document.py +132 -0
- imgui_bundle/demos_python/demo_imguizmo_launcher.py +33 -0
- imgui_bundle/demos_python/demo_immapp_launcher.py +1054 -0
- imgui_bundle/demos_python/demo_immvision_launcher.py +71 -0
- imgui_bundle/demos_python/demo_logger.py +75 -0
- imgui_bundle/demos_python/demo_markdown_editor.py +120 -0
- imgui_bundle/demos_python/demo_nanovg_launcher.py +88 -0
- imgui_bundle/demos_python/demo_packaging/macos/.gitignore +2 -0
- imgui_bundle/demos_python/demo_packaging/macos/Readme.md +53 -0
- imgui_bundle/demos_python/demo_packaging/macos/assets/images/world.png +0 -0
- imgui_bundle/demos_python/demo_packaging/macos/bundle_macos_demo.py +25 -0
- imgui_bundle/demos_python/demo_packaging/macos/bundle_macos_demo.spec +49 -0
- imgui_bundle/demos_python/demo_terminal.py +81 -0
- imgui_bundle/demos_python/demo_tex_inspect_launcher.py +55 -0
- imgui_bundle/demos_python/demo_text_edit.py +752 -0
- imgui_bundle/demos_python/demo_themes.py +27 -0
- imgui_bundle/demos_python/demo_utils/__init__.py +23 -0
- imgui_bundle/demos_python/demo_utils/api_demos.py +151 -0
- imgui_bundle/demos_python/demo_utils/functional_utils.py +14 -0
- imgui_bundle/demos_python/demo_utils/imgui_explorer_setup.py +32 -0
- imgui_bundle/demos_python/demo_utils/immvision_make_test_suite.py +183 -0
- imgui_bundle/demos_python/demo_utils/imread_demo.py +65 -0
- imgui_bundle/demos_python/demo_widgets.py +522 -0
- imgui_bundle/demos_python/demos_imgui_explorer/.gitignore +1 -0
- imgui_bundle/demos_python/demos_imgui_explorer/Readme.md +1 -0
- imgui_bundle/demos_python/demos_imgui_explorer/__init__.py +0 -0
- imgui_bundle/demos_python/demos_imgui_explorer/im_anim_demo_basics.py +375 -0
- imgui_bundle/demos_python/demos_imgui_explorer/imgui_demo.py +7612 -0
- imgui_bundle/demos_python/demos_imgui_explorer/implot3d_demo.py +1946 -0
- imgui_bundle/demos_python/demos_imgui_explorer/implot3d_libs/__init__.py +0 -0
- imgui_bundle/demos_python/demos_imgui_explorer/implot3d_libs/implot3d_meshes.py +797 -0
- imgui_bundle/demos_python/demos_imgui_explorer/implot3d_libs/manifest.json +4 -0
- imgui_bundle/demos_python/demos_imgui_explorer/implot_demo.py +3055 -0
- imgui_bundle/demos_python/demos_imguizmo/__init__.py +0 -0
- imgui_bundle/demos_python/demos_imguizmo/demo_gizmo.py +445 -0
- imgui_bundle/demos_python/demos_immapp/.gitignore +1 -0
- imgui_bundle/demos_python/demos_immapp/__init__.py +0 -0
- imgui_bundle/demos_python/demos_immapp/demo_ai_image.py +116 -0
- imgui_bundle/demos_python/demos_immapp/demo_assets.py +32 -0
- imgui_bundle/demos_python/demos_immapp/demo_assets_addons.py +257 -0
- imgui_bundle/demos_python/demos_immapp/demo_chinese_font.py +120 -0
- imgui_bundle/demos_python/demos_immapp/demo_command_palette.py +90 -0
- imgui_bundle/demos_python/demos_immapp/demo_custom_background.py +627 -0
- imgui_bundle/demos_python/demos_immapp/demo_docking.py +942 -0
- imgui_bundle/demos_python/demos_immapp/demo_drag_and_drop.py +105 -0
- imgui_bundle/demos_python/demos_immapp/demo_hello_world.py +10 -0
- imgui_bundle/demos_python/demos_immapp/demo_immapp_testing.py +97 -0
- imgui_bundle/demos_python/demos_immapp/demo_implot_markdown.py +49 -0
- imgui_bundle/demos_python/demos_immapp/demo_parametric_curve.py +58 -0
- imgui_bundle/demos_python/demos_immapp/demo_powersave.py +160 -0
- imgui_bundle/demos_python/demos_immapp/demo_testengine.py +258 -0
- imgui_bundle/demos_python/demos_immapp/demo_touch_screen.py +191 -0
- imgui_bundle/demos_python/demos_immapp/haiku_butterfly.py +121 -0
- imgui_bundle/demos_python/demos_immapp/haiku_implot_heart.py +50 -0
- imgui_bundle/demos_python/demos_immapp/imgui_example_glfw_opengl3.obsolete.py +264 -0
- imgui_bundle/demos_python/demos_immapp/layout_child.py +137 -0
- imgui_bundle/demos_python/demos_immapp/layout_docking.py +185 -0
- imgui_bundle/demos_python/demos_immapp/welcome_imm_mode.py +133 -0
- imgui_bundle/demos_python/demos_immvision/__init__.py +16 -0
- imgui_bundle/demos_python/demos_immvision/demo_immvision_display.py +67 -0
- imgui_bundle/demos_python/demos_immvision/demo_immvision_inspector.py +48 -0
- imgui_bundle/demos_python/demos_immvision/demo_immvision_link.py +46 -0
- imgui_bundle/demos_python/demos_immvision/demo_immvision_process.py +221 -0
- imgui_bundle/demos_python/demos_implot/__init__.py +0 -0
- imgui_bundle/demos_python/demos_implot/demo_implot_stock.py +656 -0
- imgui_bundle/demos_python/demos_implot3d/__init__.py +0 -0
- imgui_bundle/demos_python/demos_nanovg/demo_nanovg_full/__init__.py +0 -0
- imgui_bundle/demos_python/demos_nanovg/demo_nanovg_full/demo_nanovg_full_impl.py +1002 -0
- imgui_bundle/demos_python/demos_nanovg/demo_nanovg_full/manifest.json +4 -0
- imgui_bundle/demos_python/demos_nanovg/demo_nanovg_full.py +128 -0
- imgui_bundle/demos_python/demos_nanovg/demo_nanovg_heart.py +157 -0
- imgui_bundle/demos_python/demos_node_editor/__init__.py +7 -0
- imgui_bundle/demos_python/demos_node_editor/demo_node_editor_color_mixer.py +341 -0
- imgui_bundle/demos_python/demos_node_editor/demo_node_editor_image_pipeline.py +707 -0
- imgui_bundle/demos_python/demos_python_specifics/__init__.py +0 -0
- imgui_bundle/demos_python/demos_python_specifics/demo_glfw_window_manip.py +67 -0
- imgui_bundle/demos_python/demos_python_specifics/demo_pydantic.py +63 -0
- imgui_bundle/demos_python/demos_python_specifics/demo_python_context_manager.py +347 -0
- imgui_bundle/demos_python/demos_python_specifics/demo_run_async.py +71 -0
- imgui_bundle/demos_python/demos_python_specifics/plotting/__init__.py +0 -0
- imgui_bundle/demos_python/demos_python_specifics/plotting/demo_cartopy.py +180 -0
- imgui_bundle/demos_python/demos_python_specifics/plotting/demo_matplotlib.py +199 -0
- imgui_bundle/demos_python/demos_python_specifics/plotting/demo_seaborn.py +106 -0
- imgui_bundle/demos_python/demos_terminal/README.md +112 -0
- imgui_bundle/demos_python/demos_terminal/demo_terminal_pyte.py +154 -0
- imgui_bundle/demos_python/demos_terminal/demo_terminal_ssh.py +127 -0
- imgui_bundle/demos_python/demos_terminal/demo_terminal_websocket.py +149 -0
- imgui_bundle/demos_python/demos_terminal/pty_bridge_server.py +107 -0
- imgui_bundle/demos_python/demos_tex_inspect/__init__.py +6 -0
- imgui_bundle/demos_python/demos_tex_inspect/demo_tex_inspect_demo_window.py +21 -0
- imgui_bundle/demos_python/demos_tex_inspect/demo_tex_inspect_simple.py +38 -0
- imgui_bundle/demos_python/haikus/__init__.py +0 -0
- imgui_bundle/demos_python/manuals/__init__.py +0 -0
- imgui_bundle/demos_python/manuals/manifest.json +4 -0
- imgui_bundle/demos_python/manuals/manual_common.py +27 -0
- imgui_bundle/demos_python/manuals/manual_im_anim.py +24 -0
- imgui_bundle/demos_python/manuals/manual_imgui.py +22 -0
- imgui_bundle/demos_python/manuals/manual_implot.py +22 -0
- imgui_bundle/demos_python/manuals/manual_implot3d.py +22 -0
- imgui_bundle/demos_python/notebooks/.gitignore +1 -0
- imgui_bundle/demos_python/notebooks/NodeEditor.json +1 -0
- imgui_bundle/demos_python/notebooks/__init__.py +0 -0
- imgui_bundle/demos_python/notebooks/demo_interactive_notebook.ipynb +742 -0
- imgui_bundle/demos_python/notebooks/demo_notebook.ipynb +305 -0
- imgui_bundle/demos_python/notebooks/test_hello_imgui_nb.ipynb +520 -0
- imgui_bundle/demos_python/notebooks/test_immapp_nb.ipynb +586 -0
- imgui_bundle/demos_python/playground/examples/README.md +10 -0
- imgui_bundle/demos_python/playground/examples/demo_implot_stock.py +656 -0
- imgui_bundle/demos_python/playground/examples/examples.json +686 -0
- imgui_bundle/demos_python/playground/examples/examples_docs.json +617 -0
- imgui_bundle/demos_python/playground/examples/explorables/boids.py +522 -0
- imgui_bundle/demos_python/playground/examples/explorables/double_pendulum.py +346 -0
- imgui_bundle/demos_python/playground/examples/explorables/fourier_epicycles.py +432 -0
- imgui_bundle/demos_python/playground/examples/explorables/grokking/grok_train.py +172 -0
- imgui_bundle/demos_python/playground/examples/explorables/grokking/grokking.py +447 -0
- imgui_bundle/demos_python/playground/examples/explorables/grokking/grokking_data.npz +0 -0
- imgui_bundle/demos_python/playground/examples/explorables/grokking/manifest.json +7 -0
- imgui_bundle/demos_python/playground/examples/explorables/grokking/narrator.py +1670 -0
- imgui_bundle/demos_python/playground/examples/explorables/grokking/scenario.md +159 -0
- imgui_bundle/demos_python/playground/examples/explorables/grokking/scenario_audio/index.json +2402 -0
- imgui_bundle/demos_python/playground/examples/explorables/health_and_wealth.py +1119 -0
- imgui_bundle/demos_python/playground/examples/explorables/imgui_explorer_tour/cut_demo_code.md +81 -0
- imgui_bundle/demos_python/playground/examples/explorables/imgui_explorer_tour/cut_montage.md +125 -0
- imgui_bundle/demos_python/playground/examples/explorables/imgui_explorer_tour/cut_one_question.md +75 -0
- imgui_bundle/demos_python/playground/examples/explorables/imgui_explorer_tour/imgui_explorer_tour.py +275 -0
- imgui_bundle/demos_python/playground/examples/explorables/julia_map/julia_map.py +579 -0
- imgui_bundle/demos_python/playground/examples/explorables/julia_map/julia_points.py +309 -0
- imgui_bundle/demos_python/playground/examples/explorables/julia_map/manifest.json +3 -0
- imgui_bundle/demos_python/playground/examples/explorables/lesson_harmonic_motion.py +486 -0
- imgui_bundle/demos_python/playground/examples/explorables/lesson_harmonic_motion2.py +451 -0
- imgui_bundle/demos_python/playground/examples/explorables/logistic_map.py +507 -0
- imgui_bundle/demos_python/playground/examples/explorables/neural_spiral/manifest.json +3 -0
- imgui_bundle/demos_python/playground/examples/explorables/neural_spiral/neural_spiral.py +217 -0
- imgui_bundle/demos_python/playground/examples/explorables/neural_spiral/tiny_nn.py +89 -0
- imgui_bundle/demos_python/playground/examples/explorables/nex_pitch/manifest.json +1 -0
- imgui_bundle/demos_python/playground/examples/explorables/nex_pitch/nex_pitch.py +276 -0
- imgui_bundle/demos_python/playground/examples/explorables/rich_md_tour/manifest.json +4 -0
- imgui_bundle/demos_python/playground/examples/explorables/rich_md_tour/rich_md_tour.py +375 -0
- imgui_bundle/demos_python/playground/examples/explorables/rich_md_tour/scenario.md +178 -0
- imgui_bundle/demos_python/playground/examples/explorables/rich_md_tour/scenario_audio/index.json +1514 -0
- imgui_bundle/demos_python/playground/examples/explorables/rotor_dashboard.py +1643 -0
- imgui_bundle/demos_python/playground/examples/explorables/wave_interference.py +348 -0
- imgui_bundle/demos_python/playground/examples/fiat_settings/dataframe_with_gui_demo_titanic.fiat_workspace.json +254 -0
- imgui_bundle/demos_python/playground/examples/fiat_settings/demo_canny.fiat_workspace.json +524 -0
- imgui_bundle/demos_python/playground/examples/fiat_settings/manifest.json +6 -0
- imgui_bundle/demos_python/playground/examples/fiatlight_dataframe.py +141 -0
- imgui_bundle/demos_python/playground/examples/fiatlight_image.py +187 -0
- imgui_bundle/demos_python/playground/examples/minimal_example.py +69 -0
- imgui_bundle/demos_python/playground/examples/notebooks.md +5 -0
- imgui_bundle/demos_python/playground/examples/themes.py +174 -0
- imgui_bundle/demos_python/playground/examples/webaudio_synth.py +781 -0
- imgui_bundle/demos_python/playground/examples/webgl_background_shader.py +940 -0
- imgui_bundle/demos_python/playground/examples/webgl_minimal_mandelbrot.py +220 -0
- imgui_bundle/demos_python/playground/examples/webgl_texture_in_image.py +339 -0
- imgui_bundle/demos_python/ruff.toml +9 -0
- imgui_bundle/demos_python/sandbox/.gitignore +1 -0
- imgui_bundle/demos_python/sandbox/Readme.md +5 -0
- imgui_bundle/demos_python/sandbox/__init__.py +0 -0
- imgui_bundle/demos_python/sandbox/compare_other_libs/Readme.md +2 -0
- imgui_bundle/demos_python/sandbox/compare_other_libs/__init__.py +0 -0
- imgui_bundle/demos_python/sandbox/compare_other_libs/ex_dearpygui.py +29 -0
- imgui_bundle/demos_python/sandbox/compare_other_libs/ex_gradio.py +18 -0
- imgui_bundle/demos_python/sandbox/compare_other_libs/ex_imgui_bundle.py +12 -0
- imgui_bundle/demos_python/sandbox/compare_other_libs/ex_nicegui.py +15 -0
- imgui_bundle/demos_python/sandbox/compare_other_libs/ex_qt.py +31 -0
- imgui_bundle/demos_python/sandbox/compare_other_libs/flet_fourier/bundle_fourier.py +63 -0
- imgui_bundle/demos_python/sandbox/compare_other_libs/flet_fourier/flet_fourier.py +83 -0
- imgui_bundle/demos_python/sandbox/compare_pendulum/pendulum_bokeh.py +115 -0
- imgui_bundle/demos_python/sandbox/compare_pendulum/pendulum_bundle.py +130 -0
- imgui_bundle/demos_python/sandbox/compare_pendulum/pendulum_gradio.py +202 -0
- imgui_bundle/demos_python/sandbox/compare_pendulum/pendulum_nicegui.py +137 -0
- imgui_bundle/demos_python/sandbox/compare_pendulum/pendulum_panel.py +117 -0
- imgui_bundle/demos_python/sandbox/compare_pendulum/pendulum_plotly.py +155 -0
- imgui_bundle/demos_python/sandbox/compare_pendulum/pendulum_shiny.py +160 -0
- imgui_bundle/demos_python/sandbox/compare_wordle/__init__.py +0 -0
- imgui_bundle/demos_python/sandbox/compare_wordle/comparison.md +105 -0
- imgui_bundle/demos_python/sandbox/compare_wordle/wordle.py +99 -0
- imgui_bundle/demos_python/sandbox/compare_wordle/wordle_app_imgui_bundle.py +107 -0
- imgui_bundle/demos_python/sandbox/compare_wordle/wordle_app_nicegui.py +135 -0
- imgui_bundle/demos_python/sandbox/compare_wordle/wordle_app_pyqt.py +169 -0
- imgui_bundle/demos_python/sandbox/compare_wordle/wordle_app_textual.py +139 -0
- imgui_bundle/demos_python/sandbox/compare_wordle/words/english.txt +2309 -0
- imgui_bundle/demos_python/sandbox/sand_node.py +25 -0
- imgui_bundle/demos_python/sandbox/sand_plot.py +19 -0
- imgui_bundle/demos_python/sandbox/sand_runnable_code_cell.py +87 -0
- imgui_bundle/demos_python/sandbox/sand_subplots.py +31 -0
- imgui_bundle/demos_python/sandbox/sandbox_app.py +30 -0
- imgui_bundle/demos_python/sandbox/sandbox_custom_opengl_version.py +25 -0
- imgui_bundle/demos_python/sandbox/sandbox_imgui_manual.py +10 -0
- imgui_bundle/demos_python/sandbox/sandbox_immapp_manual_render.py +29 -0
- imgui_bundle/demos_python/sandbox/sandbox_immdebug.py +27 -0
- imgui_bundle/demos_python/sandbox/sandbox_knob_colors.py +138 -0
- imgui_bundle/demos_python/sandbox/sandbox_mac_shortcuts.py +38 -0
- imgui_bundle/demos_python/sandbox/sandbox_md_download_images.py +67 -0
- imgui_bundle/demos_python/sandbox/sandbox_md_math.py +84 -0
- imgui_bundle/demos_python/sandbox/sandbox_md_spacing.py +163 -0
- imgui_bundle/demos_python/sandbox/sandbox_md_tables.py +98 -0
- imgui_bundle/demos_python/sandbox/sandbox_md_without_hello_imgui.py +234 -0
- imgui_bundle/demos_python/sandbox/sandbox_node_md_code.py +46 -0
- imgui_bundle/demos_python/sandbox/sandbox_node_text_wrap.py +93 -0
- imgui_bundle/demos_python/sandbox/sandbox_plot_in_node.py +32 -0
- imgui_bundle/demos_python/sandbox/sandbox_plotmesh3d.py +36 -0
- imgui_bundle/demos_python/sandbox/sandbox_run_async.py +16 -0
- imgui_bundle/demos_python/sandbox/sandbox_stacklayout.py +22 -0
- imgui_bundle/demos_python/sandbox/sandbox_stress_immvision.py +58 -0
- imgui_bundle/demos_python/sandbox/sandbox_tmp.py +6 -0
- imgui_bundle/demos_python/sandbox/sandbox_topmost.py +73 -0
- imgui_bundle/demos_python/sandbox/sandbox_tstengine_keys.py +53 -0
- imgui_bundle/glfw3.dll +0 -0
- imgui_bundle/glfw3dll.lib +0 -0
- imgui_bundle/glfw_utils.py +32 -0
- imgui_bundle/hello_imgui.pyi +3994 -0
- imgui_bundle/hello_imgui_nb.py +179 -0
- imgui_bundle/hello_imgui_nb.pyi +56 -0
- imgui_bundle/hello_imgui_run_async.py +129 -0
- imgui_bundle/im_anim.pyi +2923 -0
- imgui_bundle/im_col32.py +17 -0
- imgui_bundle/im_cool_bar.pyi +170 -0
- imgui_bundle/im_file_dialog.pyi +149 -0
- imgui_bundle/imgui/__init__.pyi +12454 -0
- imgui_bundle/imgui/backends.pyi +130 -0
- imgui_bundle/imgui/internal.pyi +8831 -0
- imgui_bundle/imgui/py.typed +0 -0
- imgui_bundle/imgui/test_engine.pyi +2848 -0
- imgui_bundle/imgui/test_engine_checks.py +38 -0
- imgui_bundle/imgui_bundle.pyi +11 -0
- imgui_bundle/imgui_color_text_edit.pyi +1619 -0
- imgui_bundle/imgui_command_palette.pyi +159 -0
- imgui_bundle/imgui_ctx.py +891 -0
- imgui_bundle/imgui_explorer.pyi +100 -0
- imgui_bundle/imgui_fig.py +84 -0
- imgui_bundle/imgui_knobs.pyi +189 -0
- imgui_bundle/imgui_md.pyi +2 -0
- imgui_bundle/imgui_microtex.pyi +306 -0
- imgui_bundle/imgui_node_editor.pyi +1380 -0
- imgui_bundle/imgui_node_editor_ctx.py +209 -0
- imgui_bundle/imgui_pydantic.py +150 -0
- imgui_bundle/imgui_terminal/__init__.py +44 -0
- imgui_bundle/imgui_terminal/local_shell.py +100 -0
- imgui_bundle/imgui_terminal/terminal_view.py +517 -0
- imgui_bundle/imgui_tex_inspect.pyi +451 -0
- imgui_bundle/imgui_toggle.pyi +469 -0
- imgui_bundle/imguizmo.pyi +653 -0
- imgui_bundle/immapp/__init__.py +354 -0
- imgui_bundle/immapp/__init__.pyi +138 -0
- imgui_bundle/immapp/icons_fontawesome_4.py +976 -0
- imgui_bundle/immapp/icons_fontawesome_6.py +1408 -0
- imgui_bundle/immapp/immapp_code_utils.py +84 -0
- imgui_bundle/immapp/immapp_cpp.pyi +754 -0
- imgui_bundle/immapp/immapp_notebook.py +97 -0
- imgui_bundle/immapp/immapp_utils.py +61 -0
- imgui_bundle/immapp/nb.py +211 -0
- imgui_bundle/immapp/nb.pyi +82 -0
- imgui_bundle/immapp/py.typed +0 -0
- imgui_bundle/immapp/run_async_overloads.py +162 -0
- imgui_bundle/immapp/runnable_code_cell.py +164 -0
- imgui_bundle/immapp/testing.py +311 -0
- imgui_bundle/immvision.pyi +812 -0
- imgui_bundle/implot/__init__.pyi +2807 -0
- imgui_bundle/implot/internal.pyi +1887 -0
- imgui_bundle/implot/py.typed +0 -0
- imgui_bundle/implot3d/__init__.pyi +1934 -0
- imgui_bundle/implot3d/internal.pyi +997 -0
- imgui_bundle/implot3d/py.typed +0 -0
- imgui_bundle/implot_ctx.py +340 -0
- imgui_bundle/imspinner.pyi +4557 -0
- imgui_bundle/nanovg.pyi +1479 -0
- imgui_bundle/notebook_patch_runners.py +65 -0
- imgui_bundle/portable_file_dialogs.pyi +228 -0
- imgui_bundle/py.typed +0 -0
- imgui_bundle/pyodide_patch_runners.py +435 -0
- imgui_bundle/python_backends/LICENSE_pyimgui.txt +27 -0
- imgui_bundle/python_backends/Readme.md +47 -0
- imgui_bundle/python_backends/__init__.py +13 -0
- imgui_bundle/python_backends/examples/example_python_backend_glfw3.py +152 -0
- imgui_bundle/python_backends/examples/example_python_backend_pygame.py +123 -0
- imgui_bundle/python_backends/examples/example_python_backend_pyglet.py +110 -0
- imgui_bundle/python_backends/examples/example_python_backend_sdl2.py +175 -0
- imgui_bundle/python_backends/examples/example_python_backend_sdl3.py +174 -0
- imgui_bundle/python_backends/examples/example_python_backend_wgpu.py +101 -0
- imgui_bundle/python_backends/examples_disabled/Readme.md +2 -0
- imgui_bundle/python_backends/examples_disabled/example_python_backend_cocos2d.py +70 -0
- imgui_bundle/python_backends/glfw_backend.py +244 -0
- imgui_bundle/python_backends/opengl_backend_programmable.py +262 -0
- imgui_bundle/python_backends/opengl_base_backend.py +244 -0
- imgui_bundle/python_backends/pygame_backend.py +179 -0
- imgui_bundle/python_backends/pyglet_backend.py +302 -0
- imgui_bundle/python_backends/python_backends_disabled/Readme.md +2 -0
- imgui_bundle/python_backends/python_backends_disabled/__init__.py +0 -0
- imgui_bundle/python_backends/python_backends_disabled/cocos2d_backend.py +27 -0
- imgui_bundle/python_backends/python_backends_disabled/glumpy_backend.py +391 -0
- imgui_bundle/python_backends/python_backends_disabled/opengl_backend_fixed.py +125 -0
- imgui_bundle/python_backends/sdl2_backend.py +285 -0
- imgui_bundle/python_backends/sdl3_backend.py +282 -0
- imgui_bundle/rich_md.pyi +802 -0
- imgui_bundle/ruff.toml +5 -0
- imgui_bundle/webgl.pyi +48 -0
- imgui_bundle-1.93.0.dist-info/METADATA +159 -0
- imgui_bundle-1.93.0.dist-info/RECORD +463 -0
- imgui_bundle-1.93.0.dist-info/WHEEL +5 -0
- imgui_bundle-1.93.0.dist-info/entry_points.txt +4 -0
- imgui_bundle-1.93.0.dist-info/licenses/LICENSE +21 -0
imgui_bundle/.gitignore
ADDED
imgui_bundle/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021-2022 Dalerank
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# bindings/imgui_bundle/ — Python package root
|
|
2
|
+
|
|
3
|
+
This is the root of the `imgui_bundle` Python package. It contains:
|
|
4
|
+
|
|
5
|
+
- **Type stubs (`.pyi`)** — Auto-generated by litgen; one per C++ library. Provide IDE autocompletion and type checking.
|
|
6
|
+
- **Python utilities (`.py`)** — Hand-written: context managers (`imgui_ctx.py`), async support, notebook patches, etc.
|
|
7
|
+
- **Subpackages:** `imgui/`, `implot/`, `implot3d/` (each with their own stubs), `immapp/` (high-level runner), `python_backends/` (pure Python rendering backends).
|
|
8
|
+
- **Demos:** `demos_python/` and `demos_cpp/` — example programs in both languages.
|
|
9
|
+
- **Native extension:** `_imgui_bundle.cpython-*.so` — compiled C++ binding (all libraries in one module).
|
|
10
|
+
|
|
11
|
+
**Documentation:** [Repository Structure](../../docs/book/devel_docs/structure.md) | [Getting Started](../../docs/book/devel_docs/getting_started_dev.md)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Dear ImGui Bundle
|
|
2
|
+
|
|
3
|
+
> “Dear ImGui Bundle: easily create applications in Python and C++. Batteries included! With very few lines of code, you can build a responsive GUI, and deploy it to desktop or directly in the browser.”
|
|
4
|
+
|
|
5
|
+
Dear ImGui Bundle is a collection of libraries around [Dear ImGui](https://github.com/ocornut/imgui), for both C++ and Python.
|
|
6
|
+
|
|
7
|
+
**What for?**
|
|
8
|
+
|
|
9
|
+
- **Real-time tools:** live data, instruments, simulations, scientific viewers, dashboards.
|
|
10
|
+
- **Science, education and teaching:** interactive lessons that open from a link, on a computer or a phone. For example, [Grokking](https://imgui-bundle.pages.dev/playground/?demo=explorables/grokking/grokking.py), a narrated lesson where a small neural network memorizes, then suddenly generalizes; or the [logistic map](https://imgui-bundle.pages.dev/playground/?demo=explorables/logistic_map.py), a very simple equation that leads to chaos.
|
|
11
|
+
- **Playful sketches with sliders:** creative coding and math toys, shared with friends through a link.
|
|
12
|
+
|
|
13
|
+
**The same code everywhere:** on the desktop, in the browser and on phones. In the browser, no server is needed: a static page is enough.
|
|
14
|
+
|
|
15
|
+
**Made for AI assistants:** given [llms.txt](https://imgui-bundle.pages.dev/llms.txt), an AI can write an app with the bundle, run it, and check it with screenshots and the test engine, even in a chat's sandbox.
|
|
16
|
+
|
|
17
|
+
**In the wild:** projects that use the bundle include [Newton](https://github.com/newton-physics/newton) and [Isaac Lab](https://github.com/isaac-sim/IsaacLab) (robotics simulation), [Genesis](https://github.com/Genesis-Embodied-AI/Genesis) (physics for robotics, 30k stars), the [Gaussian splatting viewer](https://github.com/graphdeco-inria/graphdecoviewer) of Inria's GRAPHDECO lab, [splatviz](https://github.com/Florian-Barthel/splatviz), Meta's [Nymeria](https://github.com/facebookresearch/nymeria_dataset), and [fastplotlib](https://github.com/fastplotlib/fastplotlib). More on the [home page](https://imgui-bundle.pages.dev).
|
|
18
|
+
|
|
19
|
+
**Install:** `pip install imgui-bundle`, then `from imgui_bundle import imgui`.
|
|
20
|
+
|
|
21
|
+
*Not to be confused with pyimgui* (`pip install imgui`, then `import imgui`): another Python binding of Dear ImGui, with another API.
|
|
22
|
+
|
|
23
|
+
**Try it in the browser**, no install needed: each picture opens its demo in the [Playground](https://imgui-bundle.pages.dev/playground/).
|
|
24
|
+
|
|
25
|
+
<a href="https://imgui-bundle.pages.dev/playground/?demo=webgl_background_shader.py"><img src="https://imgui-bundle.pages.dev/resources/playground/webgl_background_shader.jpg" height="90" alt="An ocean shader, in the browser"></a> <a href="https://imgui-bundle.pages.dev/playground/?demo=explorables/julia_map/julia_map.py"><img src="https://imgui-bundle.pages.dev/resources/playground/julia_map.jpg" height="90" alt="The Mandelbrot and Julia sets"></a> <a href="https://imgui-bundle.pages.dev/playground/?demo=explorables/neural_spiral/neural_spiral.py"><img src="https://imgui-bundle.pages.dev/resources/playground/neural_spiral.jpg" height="90" alt="A neural network learns a spiral"></a> <a href="https://imgui-bundle.pages.dev/playground/?demo=explorables/logistic_map.py"><img src="https://imgui-bundle.pages.dev/resources/playground/logistic_map.jpg" height="90" alt="The logistic map"></a>
|
|
26
|
+
|
|
27
|
+
## Key features
|
|
28
|
+
|
|
29
|
+
- **Cross‑platform:** Windows, macOS, Linux, iOS, Android, and WebAssembly.
|
|
30
|
+
- **C++ and Python:** APIs with very similar structure.
|
|
31
|
+
- **Integrated ecosystem:**
|
|
32
|
+
- Dear ImGui (core widgets)
|
|
33
|
+
- ImPlot / ImPlot3D (2D and 3D plotting)
|
|
34
|
+
- ImmVision (image inspection)
|
|
35
|
+
- ImAnim (animations), and your Matplotlib figures inside the GUI (`imgui_fig`)
|
|
36
|
+
- imgui-node-editor, ImGuizmo, file dialogs, knobs, spinners, toggles, command palette, a terminal, and more.
|
|
37
|
+
- **Optional high‑level runners:**
|
|
38
|
+
- Hello ImGui: window, backend, docking, and assets management.
|
|
39
|
+
- ImmApp: easy activation of add‑ons (ImPlot, Markdown, etc.).
|
|
40
|
+
- **Web‑ready:**
|
|
41
|
+
- C++ via Emscripten
|
|
42
|
+
- Python via Pyodide (online playground and deployable HTML templates)
|
|
43
|
+
- Touch screens: on a phone, a swipe scrolls, a pinch scales the app, and a keyboard button appears next to a text field.
|
|
44
|
+
- **Jupyter:** the notebook stays usable while your app runs (`immapp.nb.start()`).
|
|
45
|
+
- **Themes:** 17 themes, tweaked live.
|
|
46
|
+
- **Power save:** an idle app lowers its frame rate.
|
|
47
|
+
- **Tests and automation:** [ImGui Test Engine](https://github.com/ocornut/imgui_test_engine) drives your GUI from a script, for tests, demos or screenshots (it has [its own license](https://www.dearimgui.com/licenses)).
|
|
48
|
+
|
|
49
|
+
> “Think of it as a toolbox where all the pieces are pre‑wired to play well together: plotting, Markdown, node editors, image inspection, and more, ready to drop into your app.”
|
|
50
|
+
|
|
51
|
+
**The project:** more than 40 releases since 2022, each new Dear ImGui version followed within days. One maintainer, with contributions from about twenty people. The CI covers 10 platforms and backends.
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
## Links:
|
|
56
|
+
|
|
57
|
+
* [Documentation site](https://imgui-bundle.pages.dev/doc/): Full documentation for Dear ImGui Bundle.
|
|
58
|
+
* [Dear ImGui Bundle Explorer](https://imgui-bundle.pages.dev/explorer/): interactive reference manual - browse demos, see the code, try the widgets. All 23 libraries demonstrated with browsable C++ and Python source.
|
|
59
|
+
* [Online Python Playground](https://imgui-bundle.pages.dev/playground/): live Python sandbox with ready-to-run demos - edit code, see results instantly. No installation needed.
|
|
60
|
+
* [Guide for AI assistants](https://imgui-bundle.pages.dev/llms.txt): llms.txt, to write apps with the bundle, and to run and check them
|
|
61
|
+
* [FAQ](https://github.com/pthom/imgui_bundle/issues?q=is%3Aissue+label%3AFAQ): answers to common questions
|
|
62
|
+
* [Discord](https://discord.gg/xkzpKMeYN3): join the community for questions, showcase, and discussion
|
|
63
|
+
* [GitHub](https://github.com/pthom/imgui_bundle): source code, issues, discussions
|
imgui_bundle/__init__.py
ADDED
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
# Part of ImGui Bundle - MIT License - Copyright (c) 2022-2026 Pascal Thomet - https://github.com/pthom/imgui_bundle
|
|
2
|
+
import os
|
|
3
|
+
import sys
|
|
4
|
+
|
|
5
|
+
from imgui_bundle._imgui_bundle import __bundle_submodules_available__, __bundle_submodules_disabled__, __bundle_pyodide__ # type: ignore
|
|
6
|
+
from imgui_bundle._imgui_bundle import __version__, __build_number__, compilation_time
|
|
7
|
+
from types import ModuleType
|
|
8
|
+
from typing import Union, Tuple, List, overload
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def has_submodule(submodule_name: str) -> bool:
|
|
12
|
+
return submodule_name in __bundle_submodules_available__
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _publish(name: str, module: ModuleType) -> None:
|
|
16
|
+
"""Expose a native submodule under `imgui_bundle.<name>` in sys.modules.
|
|
17
|
+
|
|
18
|
+
Enables `from imgui_bundle.<name> import ...` in addition to the
|
|
19
|
+
existing `from imgui_bundle import <name>`. Without this, the native
|
|
20
|
+
module's fully-qualified name stays `imgui_bundle._imgui_bundle.<name>`,
|
|
21
|
+
which is what `sys.modules` keys on — the public path isn't registered.
|
|
22
|
+
"""
|
|
23
|
+
sys.modules[f"imgui_bundle.{name}"] = module
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def info() -> str:
|
|
27
|
+
"""Return information about imgui_bundle: version, compilation time, and available submodules.
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
str: Formatted string with package information
|
|
31
|
+
|
|
32
|
+
Example:
|
|
33
|
+
>>> import imgui_bundle
|
|
34
|
+
>>> print(imgui_bundle.info())
|
|
35
|
+
ImGui Bundle v1.92.6
|
|
36
|
+
Compiled on Jan 26 2026 at 15:49:15
|
|
37
|
+
Available submodules (16): imgui, imgui.internal, imgui.backends, ...
|
|
38
|
+
"""
|
|
39
|
+
comp_time = compilation_time()
|
|
40
|
+
|
|
41
|
+
# Format submodules list
|
|
42
|
+
submodules_str = ", ".join(__bundle_submodules_available__)
|
|
43
|
+
|
|
44
|
+
info_str = f"ImGui Bundle v{__version__} buil {__build_number__}\n"
|
|
45
|
+
info_str += f"{comp_time}\n"
|
|
46
|
+
info_str += f"Available submodules ({len(__bundle_submodules_available__)}): {submodules_str}\n"
|
|
47
|
+
|
|
48
|
+
if len(__bundle_submodules_disabled__) > 0:
|
|
49
|
+
disabled_str = ", ".join(__bundle_submodules_disabled__)
|
|
50
|
+
info_str += f"Disabled submodules ({len(__bundle_submodules_disabled__)}): {disabled_str}"
|
|
51
|
+
|
|
52
|
+
return info_str
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def _is_pydantic_v2_available() -> bool:
|
|
56
|
+
from importlib import metadata
|
|
57
|
+
try:
|
|
58
|
+
version_str: str = metadata.version("pydantic")
|
|
59
|
+
except metadata.PackageNotFoundError:
|
|
60
|
+
return False
|
|
61
|
+
major: int = int(version_str.split(".")[0])
|
|
62
|
+
return major >= 2
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
__all__ = [
|
|
66
|
+
"__version__",
|
|
67
|
+
"__build_number__",
|
|
68
|
+
"compilation_time",
|
|
69
|
+
"info",
|
|
70
|
+
"has_submodule",
|
|
71
|
+
"__bundle_submodules_available__",
|
|
72
|
+
"__bundle_submodules_disabled__",
|
|
73
|
+
"__bundle_pyodide__"
|
|
74
|
+
]
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
#
|
|
78
|
+
# Import native submodules
|
|
79
|
+
#
|
|
80
|
+
if has_submodule("imgui"):
|
|
81
|
+
from imgui_bundle._imgui_bundle import imgui as imgui
|
|
82
|
+
_publish("imgui", imgui)
|
|
83
|
+
# Let Python resolve `imgui_bundle.imgui.<submodule>` against the source
|
|
84
|
+
# dir (e.g. test_engine_checks.py), since the C++ submodule shadows it.
|
|
85
|
+
imgui.__path__ = [os.path.join(os.path.dirname(__file__), "imgui")]
|
|
86
|
+
_publish("imgui.internal", imgui.internal)
|
|
87
|
+
_publish("imgui.backends", imgui.backends)
|
|
88
|
+
if has_submodule("imgui.test_engine"):
|
|
89
|
+
_publish("imgui.test_engine", imgui.test_engine)
|
|
90
|
+
# Catch Python exceptions in test_func/gui_func/teardown_func so they
|
|
91
|
+
# become logged test failures instead of nanobind::python_error ->
|
|
92
|
+
# std::terminate (which would crash the whole process).
|
|
93
|
+
from imgui_bundle import _imgui_test_engine_python_safety # noqa: F401
|
|
94
|
+
_imgui_test_engine_python_safety.install(imgui.test_engine)
|
|
95
|
+
from imgui_bundle._imgui_bundle.imgui import ImVec2, ImVec4, ImColor, FLT_MIN, FLT_MAX # noqa: F401
|
|
96
|
+
from imgui_bundle.im_col32 import IM_COL32 # noqa: F401, E402
|
|
97
|
+
from imgui_bundle import imgui_ctx as imgui_ctx # noqa: E402
|
|
98
|
+
|
|
99
|
+
ImVec2Like = Union[ImVec2, Tuple[int | float, int | float], List[int | float]]
|
|
100
|
+
ImVec4Like = Union[ImVec4, Tuple[int | float, int | float, int | float, int | float], List[int | float]]
|
|
101
|
+
|
|
102
|
+
imgui.ImVec2Like = ImVec2Like
|
|
103
|
+
imgui.ImVec4Like = ImVec4Like
|
|
104
|
+
|
|
105
|
+
__all__.extend([
|
|
106
|
+
"imgui",
|
|
107
|
+
"ImVec2",
|
|
108
|
+
"ImVec2Like",
|
|
109
|
+
"ImVec4Like",
|
|
110
|
+
"ImVec4",
|
|
111
|
+
"ImColor",
|
|
112
|
+
"FLT_MIN",
|
|
113
|
+
"FLT_MAX",
|
|
114
|
+
"IM_COL32",
|
|
115
|
+
"imgui_ctx",
|
|
116
|
+
])
|
|
117
|
+
|
|
118
|
+
# Em sizing utilities (DPI-independent sizing)
|
|
119
|
+
def em_size(v: float = 1.0) -> float:
|
|
120
|
+
"""Returns a size in pixels corresponding to `v` em units.
|
|
121
|
+
|
|
122
|
+
1 em = current font size (ImGui::GetFontSize()).
|
|
123
|
+
Use this for DPI-independent sizing.
|
|
124
|
+
"""
|
|
125
|
+
return imgui.get_font_size() * v
|
|
126
|
+
|
|
127
|
+
@overload
|
|
128
|
+
def em_to_vec2(x: float, y: float) -> ImVec2: ...
|
|
129
|
+
@overload
|
|
130
|
+
def em_to_vec2(v: ImVec2Like) -> ImVec2: ...
|
|
131
|
+
|
|
132
|
+
def em_to_vec2(x, y=None) -> ImVec2:
|
|
133
|
+
"""Returns an ImVec2 sized in em units (multiples of font size).
|
|
134
|
+
|
|
135
|
+
Can be called as:
|
|
136
|
+
em_to_vec2(3.0, 2.0) -> ImVec2 of 3em x 2em
|
|
137
|
+
em_to_vec2((3.0, 2.0)) -> same, from tuple
|
|
138
|
+
em_to_vec2(ImVec2(3.0, 2.0)) -> same, from ImVec2
|
|
139
|
+
"""
|
|
140
|
+
font_size = imgui.get_font_size()
|
|
141
|
+
if y is None:
|
|
142
|
+
return ImVec2(font_size * x[0], font_size * x[1])
|
|
143
|
+
return ImVec2(font_size * x, font_size * y)
|
|
144
|
+
|
|
145
|
+
__all__.extend(["em_size", "em_to_vec2"])
|
|
146
|
+
|
|
147
|
+
# Patch after imgui v1.90.9, where
|
|
148
|
+
# the enum ImGuiDir_ was renamed to ImGuiDir and ImGuiSortDirection_ was renamed to ImGuiSortDirection
|
|
149
|
+
# this enables old python to continue to work
|
|
150
|
+
imgui.Dir_ = imgui.Dir
|
|
151
|
+
imgui.SortDirection_ = imgui.SortDirection
|
|
152
|
+
|
|
153
|
+
# Pydantic types are lazily imported via __getattr__ below,
|
|
154
|
+
# so that pydantic can be installed after imgui_bundle is first imported
|
|
155
|
+
# (e.g. in Pyodide where packages are installed incrementally).
|
|
156
|
+
__all__.extend([
|
|
157
|
+
"imgui_pydantic",
|
|
158
|
+
"ImVec4_Pydantic",
|
|
159
|
+
"ImVec2_Pydantic",
|
|
160
|
+
"ImColor_Pydantic",
|
|
161
|
+
])
|
|
162
|
+
|
|
163
|
+
if has_submodule("hello_imgui"):
|
|
164
|
+
from imgui_bundle._imgui_bundle import hello_imgui as hello_imgui
|
|
165
|
+
_publish("hello_imgui", hello_imgui)
|
|
166
|
+
__all__.extend(["hello_imgui"])
|
|
167
|
+
if has_submodule("implot"):
|
|
168
|
+
from imgui_bundle._imgui_bundle import implot as implot
|
|
169
|
+
_publish("implot", implot)
|
|
170
|
+
__all__.extend(["implot"])
|
|
171
|
+
# Flag types for ImPlot
|
|
172
|
+
implot.LineFlags = int # see implot.LineFlags_
|
|
173
|
+
implot.ScatterFlags = int # see implot.ScatterFlags_
|
|
174
|
+
implot.StairsFlags = int # see implot.StairsFlags_
|
|
175
|
+
implot.ShadedFlags = int # see implot.ShadedFlags_
|
|
176
|
+
implot.BarsFlags = int # see implot.BarsFlags_
|
|
177
|
+
implot.PieChartFlags = int # see implot.PieChartFlags_
|
|
178
|
+
implot.HistogramFlags = int # see implot.HistogramFlags_
|
|
179
|
+
|
|
180
|
+
from imgui_bundle import implot_ctx as implot_ctx # noqa: E402
|
|
181
|
+
__all__.extend(["implot_ctx"])
|
|
182
|
+
|
|
183
|
+
if has_submodule("implot3d"):
|
|
184
|
+
from imgui_bundle._imgui_bundle import implot3d as implot3d
|
|
185
|
+
_publish("implot3d", implot3d)
|
|
186
|
+
__all__.extend(["implot3d"])
|
|
187
|
+
if has_submodule("imgui_color_text_edit"):
|
|
188
|
+
from imgui_bundle._imgui_bundle import imgui_color_text_edit as imgui_color_text_edit
|
|
189
|
+
_publish("imgui_color_text_edit", imgui_color_text_edit)
|
|
190
|
+
__all__.extend(["imgui_color_text_edit"])
|
|
191
|
+
if has_submodule("imgui_node_editor"):
|
|
192
|
+
from imgui_bundle._imgui_bundle import imgui_node_editor as imgui_node_editor
|
|
193
|
+
_publish("imgui_node_editor", imgui_node_editor)
|
|
194
|
+
from imgui_bundle import imgui_node_editor_ctx as imgui_node_editor_ctx # noqa: E402
|
|
195
|
+
__all__.extend(["imgui_node_editor", "imgui_node_editor_ctx"])
|
|
196
|
+
if has_submodule("imgui_knobs"):
|
|
197
|
+
from imgui_bundle._imgui_bundle import imgui_knobs as imgui_knobs
|
|
198
|
+
_publish("imgui_knobs", imgui_knobs)
|
|
199
|
+
__all__.extend(["imgui_knobs"])
|
|
200
|
+
if has_submodule("im_file_dialog"):
|
|
201
|
+
from imgui_bundle._imgui_bundle import im_file_dialog as im_file_dialog
|
|
202
|
+
_publish("im_file_dialog", im_file_dialog)
|
|
203
|
+
__all__.extend(["im_file_dialog"])
|
|
204
|
+
if has_submodule("imspinner"):
|
|
205
|
+
from imgui_bundle._imgui_bundle import imspinner as imspinner
|
|
206
|
+
_publish("imspinner", imspinner)
|
|
207
|
+
__all__.extend(["imspinner"])
|
|
208
|
+
if has_submodule("rich_md"):
|
|
209
|
+
from imgui_bundle._imgui_bundle import rich_md as rich_md
|
|
210
|
+
_publish("rich_md", rich_md)
|
|
211
|
+
imgui_md = rich_md # the module's former name
|
|
212
|
+
_publish("imgui_md", rich_md)
|
|
213
|
+
__all__.extend(["rich_md", "imgui_md"])
|
|
214
|
+
|
|
215
|
+
# URL images are downloaded by Python: urllib in a thread on desktop, JS fetch in Pyodide
|
|
216
|
+
from imgui_bundle._rich_md_image_loader import _get_download_function
|
|
217
|
+
|
|
218
|
+
rich_md.set_download_function(_get_download_function())
|
|
219
|
+
|
|
220
|
+
def _render_this_file(target: str = "") -> None:
|
|
221
|
+
"""Renders ![[this_file#target]] (see rich_md.resolve_transclusions): a program can be its own
|
|
222
|
+
narrative. target: a section ("Intro"), its code ("Escape#code"), a code region, or empty."""
|
|
223
|
+
import sys
|
|
224
|
+
|
|
225
|
+
rich_md.render_file(sys._getframe(1).f_code.co_filename, target)
|
|
226
|
+
|
|
227
|
+
rich_md.render_this_file = _render_this_file
|
|
228
|
+
|
|
229
|
+
import contextlib
|
|
230
|
+
|
|
231
|
+
@contextlib.contextmanager
|
|
232
|
+
def _document(id: str, size=None, options=None): # type: ignore
|
|
233
|
+
"""A document, as a context manager: `with rich_md.document("doc"):` calls begin_document() on entry and
|
|
234
|
+
end_document() on exit (also when the block raises)."""
|
|
235
|
+
rich_md.begin_document(id, size, options)
|
|
236
|
+
try:
|
|
237
|
+
yield
|
|
238
|
+
finally:
|
|
239
|
+
rich_md.end_document()
|
|
240
|
+
|
|
241
|
+
rich_md.document = _document
|
|
242
|
+
if has_submodule("immvision"):
|
|
243
|
+
from imgui_bundle._imgui_bundle import immvision as immvision
|
|
244
|
+
_publish("immvision", immvision)
|
|
245
|
+
__all__.extend(["immvision"])
|
|
246
|
+
if has_submodule("imguizmo"):
|
|
247
|
+
from imgui_bundle._imgui_bundle import imguizmo as imguizmo
|
|
248
|
+
_publish("imguizmo", imguizmo)
|
|
249
|
+
__all__.extend(["imguizmo"])
|
|
250
|
+
if has_submodule("imgui_tex_inspect"):
|
|
251
|
+
from imgui_bundle._imgui_bundle import imgui_tex_inspect as imgui_tex_inspect
|
|
252
|
+
_publish("imgui_tex_inspect", imgui_tex_inspect)
|
|
253
|
+
__all__.extend(["imgui_tex_inspect"])
|
|
254
|
+
if has_submodule("imgui_toggle"):
|
|
255
|
+
from imgui_bundle._imgui_bundle import imgui_toggle as imgui_toggle
|
|
256
|
+
_publish("imgui_toggle", imgui_toggle)
|
|
257
|
+
__all__.extend(["imgui_toggle"])
|
|
258
|
+
if has_submodule("portable_file_dialogs"):
|
|
259
|
+
from imgui_bundle._imgui_bundle import portable_file_dialogs as portable_file_dialogs
|
|
260
|
+
_publish("portable_file_dialogs", portable_file_dialogs)
|
|
261
|
+
__all__.extend(["portable_file_dialogs"])
|
|
262
|
+
if has_submodule("imgui_command_palette"):
|
|
263
|
+
from imgui_bundle._imgui_bundle import imgui_command_palette as imgui_command_palette
|
|
264
|
+
_publish("imgui_command_palette", imgui_command_palette)
|
|
265
|
+
__all__.extend(["imgui_command_palette"])
|
|
266
|
+
if has_submodule("imcoolbar"):
|
|
267
|
+
from imgui_bundle._imgui_bundle import im_cool_bar as im_cool_bar
|
|
268
|
+
_publish("im_cool_bar", im_cool_bar)
|
|
269
|
+
__all__.extend(["im_cool_bar"])
|
|
270
|
+
if has_submodule("nanovg"):
|
|
271
|
+
from imgui_bundle._imgui_bundle import nanovg as nanovg
|
|
272
|
+
_publish("nanovg", nanovg)
|
|
273
|
+
__all__.extend(["nanovg"])
|
|
274
|
+
if has_submodule("im_anim"):
|
|
275
|
+
from imgui_bundle._imgui_bundle import im_anim as im_anim
|
|
276
|
+
_publish("im_anim", im_anim)
|
|
277
|
+
__all__.extend(["im_anim"])
|
|
278
|
+
if has_submodule("imgui_explorer"):
|
|
279
|
+
from imgui_bundle._imgui_bundle import imgui_explorer as imgui_explorer
|
|
280
|
+
_publish("imgui_explorer", imgui_explorer)
|
|
281
|
+
__all__.extend(["imgui_explorer"])
|
|
282
|
+
if has_submodule("imgui_microtex"):
|
|
283
|
+
from imgui_bundle._imgui_bundle import imgui_microtex as imgui_microtex
|
|
284
|
+
_publish("imgui_microtex", imgui_microtex)
|
|
285
|
+
__all__.extend(["imgui_microtex"])
|
|
286
|
+
if has_submodule("webgl"):
|
|
287
|
+
from imgui_bundle._imgui_bundle import webgl as webgl
|
|
288
|
+
_publish("webgl", webgl)
|
|
289
|
+
__all__.extend(["webgl"])
|
|
290
|
+
|
|
291
|
+
if has_submodule("immapp_cpp"): # immapp is a Python wrapper around immapp_cpp
|
|
292
|
+
from imgui_bundle import immapp as immapp
|
|
293
|
+
# Note: to enable font awesome 6:
|
|
294
|
+
# runner_params.callbacks.default_icon_font = hello_imgui.DefaultIconFont.font_awesome6
|
|
295
|
+
from imgui_bundle.immapp import icons_fontawesome_4 as icons_fontawesome_4
|
|
296
|
+
from imgui_bundle.immapp import icons_fontawesome_4 as icons_fontawesome # v4 # noqa: F401
|
|
297
|
+
from imgui_bundle.immapp import icons_fontawesome_6 as icons_fontawesome_6
|
|
298
|
+
__all__.extend(["immapp", "icons_fontawesome_4", "icons_fontawesome", "icons_fontawesome_6"])
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
#
|
|
302
|
+
# Import Python submodules
|
|
303
|
+
#
|
|
304
|
+
if has_submodule("immvision"):
|
|
305
|
+
from imgui_bundle import imgui_fig as imgui_fig
|
|
306
|
+
__all__.extend(["imgui_fig"])
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
# Glfw setup:
|
|
310
|
+
# By importing imgui_bundle.glfw_utils, we make sure that glfw provided by pip will use our glfw dynamic library.
|
|
311
|
+
# (imgui_bundle.glfw_utils will call _set_glfw_pip_search_path automatically)
|
|
312
|
+
if has_submodule("with_glfw"):
|
|
313
|
+
from imgui_bundle._glfw_set_search_path import _glfw_set_search_path
|
|
314
|
+
|
|
315
|
+
_glfw_set_search_path()
|
|
316
|
+
from imgui_bundle import glfw_utils as glfw_utils # noqa: E402
|
|
317
|
+
|
|
318
|
+
#
|
|
319
|
+
# Pyodide: patch hello_imgui.run and immapp.run to work with Pyodide
|
|
320
|
+
#
|
|
321
|
+
if __bundle_pyodide__ and has_submodule("hello_imgui") and has_submodule("immapp_cpp"):
|
|
322
|
+
from imgui_bundle.pyodide_patch_runners import pyodide_do_patch_runners
|
|
323
|
+
pyodide_do_patch_runners()
|
|
324
|
+
|
|
325
|
+
# Jupyter notebook: patch hello_imgui.run and immapp.run to work with Jupyter notebook
|
|
326
|
+
# run will display a screenshot of the final app state in the notebook output
|
|
327
|
+
# Note: the immapp.nb submodule provides more complete notebook support (async support, etc.)
|
|
328
|
+
if has_submodule("hello_imgui") and has_submodule("immapp_cpp") and not __bundle_pyodide__:
|
|
329
|
+
from imgui_bundle.notebook_patch_runners import notebook_do_patch_runners_if_needed # noqa: E402
|
|
330
|
+
notebook_do_patch_runners_if_needed()
|
|
331
|
+
from imgui_bundle._patch_runners_add_save_screenshot_param import patch_runners_add_save_screenshot_param # noqa: E402
|
|
332
|
+
patch_runners_add_save_screenshot_param()
|
|
333
|
+
|
|
334
|
+
#
|
|
335
|
+
# Add async support to hello_imgui
|
|
336
|
+
#
|
|
337
|
+
if has_submodule("hello_imgui"):
|
|
338
|
+
from imgui_bundle.hello_imgui_run_async import run_async as _hello_imgui_run_async
|
|
339
|
+
hello_imgui.run_async = _hello_imgui_run_async # type: ignore
|
|
340
|
+
|
|
341
|
+
# Add notebook convenience API
|
|
342
|
+
from imgui_bundle import hello_imgui_nb as _hello_imgui_nb_module
|
|
343
|
+
hello_imgui.nb = _hello_imgui_nb_module # type: ignore
|
|
344
|
+
|
|
345
|
+
THIS_DIR = os.path.dirname(__file__)
|
|
346
|
+
hello_imgui.override_assets_folder(THIS_DIR + "/assets")
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
def register_demos_assets_folder() -> None:
|
|
350
|
+
"""Add demos_assets/ to hello_imgui assets search path.
|
|
351
|
+
Call this from demos that need additional images (house.jpg, bear_transparent.png, etc.)
|
|
352
|
+
beyond the default assets (world.png, fonts)."""
|
|
353
|
+
from imgui_bundle import __bundle_pyodide__
|
|
354
|
+
import os as _os
|
|
355
|
+
import logging as _logging
|
|
356
|
+
_log = _logging.getLogger("imgui_bundle")
|
|
357
|
+
|
|
358
|
+
if __bundle_pyodide__:
|
|
359
|
+
# The Pyodide wheel leaves demos_assets out: the playground downloads it for the examples that need it
|
|
360
|
+
# (their "bundle_folders" in examples.json)
|
|
361
|
+
_demos_assets = "/home/pyodide/demos_assets"
|
|
362
|
+
else:
|
|
363
|
+
_demos_assets = _os.path.join(_os.path.dirname(__file__), "demos_assets")
|
|
364
|
+
_demos_assets = _os.path.normpath(_demos_assets)
|
|
365
|
+
if _os.path.isdir(_demos_assets):
|
|
366
|
+
from imgui_bundle import hello_imgui as _hello_imgui
|
|
367
|
+
_hello_imgui.add_assets_search_path(_demos_assets)
|
|
368
|
+
_log.debug("Registered demos assets folder: %s", _demos_assets)
|
|
369
|
+
else:
|
|
370
|
+
_log.warning("demos_assets/ not found at %s", _demos_assets)
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
__all__.extend(["register_demos_assets_folder"])
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
# Lazy import for pydantic types: deferred so that pydantic can be installed
|
|
377
|
+
# after imgui_bundle is first imported (e.g. in Pyodide).
|
|
378
|
+
_PYDANTIC_NAMES = {"ImVec2_Pydantic", "ImVec4_Pydantic", "ImColor_Pydantic", "imgui_pydantic"}
|
|
379
|
+
|
|
380
|
+
def __getattr__(name: str):
|
|
381
|
+
if name in _PYDANTIC_NAMES:
|
|
382
|
+
if not _is_pydantic_v2_available():
|
|
383
|
+
raise ImportError(
|
|
384
|
+
f"'{name}' requires pydantic v2+. Install it with: pip install pydantic"
|
|
385
|
+
)
|
|
386
|
+
import importlib
|
|
387
|
+
_mod = importlib.import_module("imgui_bundle.imgui_pydantic")
|
|
388
|
+
# Cache into module globals so __getattr__ is not called again
|
|
389
|
+
globals()["imgui_pydantic"] = _mod
|
|
390
|
+
globals()["ImVec2_Pydantic"] = _mod.ImVec2_Pydantic
|
|
391
|
+
globals()["ImVec4_Pydantic"] = _mod.ImVec4_Pydantic
|
|
392
|
+
globals()["ImColor_Pydantic"] = _mod.ImColor_Pydantic
|
|
393
|
+
return globals()[name]
|
|
394
|
+
raise AttributeError(f"module 'imgui_bundle' has no attribute {name!r}")
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
from . import imgui as imgui
|
|
2
|
+
|
|
3
|
+
from . import hello_imgui as hello_imgui
|
|
4
|
+
from . import implot as implot
|
|
5
|
+
from . import implot3d as implot3d
|
|
6
|
+
from . import imgui_color_text_edit as imgui_color_text_edit
|
|
7
|
+
from . import imgui_node_editor as imgui_node_editor
|
|
8
|
+
from . import imgui_knobs as imgui_knobs
|
|
9
|
+
from . import im_file_dialog as im_file_dialog
|
|
10
|
+
from . import imspinner as imspinner
|
|
11
|
+
from . import rich_md as rich_md
|
|
12
|
+
from . import imgui_md as imgui_md # the former name of rich_md
|
|
13
|
+
from . import immvision as immvision
|
|
14
|
+
from . import imguizmo as imguizmo
|
|
15
|
+
from . import imgui_tex_inspect as imgui_tex_inspect
|
|
16
|
+
from . import imgui_command_palette as imgui_command_palette
|
|
17
|
+
from . import immapp as immapp
|
|
18
|
+
from . import imgui_toggle as imgui_toggle
|
|
19
|
+
from . import portable_file_dialogs as portable_file_dialogs
|
|
20
|
+
|
|
21
|
+
# Note: to enable font awesome 6:
|
|
22
|
+
# runner_params.callbacks.default_icon_font = hello_imgui.DefaultIconFont.font_awesome6
|
|
23
|
+
from .immapp import icons_fontawesome_4 as icons_fontawesome_4
|
|
24
|
+
from .immapp import icons_fontawesome_4 as icons_fontawesome # noqa # (icons_fontawesome is V4)
|
|
25
|
+
from .immapp import icons_fontawesome_6 as icons_fontawesome_6
|
|
26
|
+
|
|
27
|
+
from . import im_cool_bar as im_cool_bar
|
|
28
|
+
from . import nanovg as nanovg
|
|
29
|
+
from . import im_anim as im_anim
|
|
30
|
+
from . import imgui_microtex as imgui_microtex
|
|
31
|
+
|
|
32
|
+
from .imgui import ImVec2 as ImVec2, ImVec4 as ImVec4, ImColor as ImColor, ImVec2Like as ImVec2Like
|
|
33
|
+
from .imgui_pydantic import ImVec2_Pydantic as ImVec2_Pydantic, ImVec4_Pydantic as ImVec4_Pydantic, ImColor_Pydantic as ImColor_Pydantic
|
|
34
|
+
from .im_col32 import IM_COL32 as IM_COL32
|
|
35
|
+
|
|
36
|
+
from typing import overload
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
__version__: str
|
|
40
|
+
__build_number__: int
|
|
41
|
+
__bundle_pyodide__: bool
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def compilation_time() -> str:
|
|
45
|
+
"""Return date and time when imgui_bundle was compiled"""
|
|
46
|
+
pass
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def em_size(v: float = 1.0) -> float:
|
|
50
|
+
"""Returns a size in pixels corresponding to `v` em units.
|
|
51
|
+
|
|
52
|
+
1 em = current font size (ImGui::GetFontSize()).
|
|
53
|
+
Use this for DPI-independent sizing.
|
|
54
|
+
"""
|
|
55
|
+
...
|
|
56
|
+
|
|
57
|
+
@overload
|
|
58
|
+
def em_to_vec2(x: float, y: float) -> ImVec2: ...
|
|
59
|
+
@overload
|
|
60
|
+
def em_to_vec2(v: ImVec2Like) -> ImVec2: ...
|
|
61
|
+
|
|
62
|
+
@overload
|
|
63
|
+
def em_to_vec2(x: float, y: float | None=None) -> ImVec2:
|
|
64
|
+
"""Returns an ImVec2 sized in em units (multiples of font size).
|
|
65
|
+
|
|
66
|
+
Can be called as:
|
|
67
|
+
em_to_vec2(3.0, 2.0) -> ImVec2 of 3em x 2em
|
|
68
|
+
em_to_vec2((3.0, 2.0)) -> same, from tuple
|
|
69
|
+
em_to_vec2(ImVec2(3.0, 2.0)) -> same, from ImVec2
|
|
70
|
+
"""
|
|
71
|
+
...
|
|
72
|
+
|
|
73
|
+
def register_demos_assets_folder() -> None:
|
|
74
|
+
"""Register the folder containing demo assets (images, etc.) so they can be loaded by the demos."""
|
|
75
|
+
...
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def has_submodule(name: str) -> bool:
|
|
79
|
+
"""Check if a submodule is available in this bundle."""
|
|
80
|
+
...
|