diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index cb564d3d6..b23dae7d8 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,11 +1,8 @@ -# default owners -* @hoffstadt # directories /thirdparty/ @hoffstadt /scripts/ @hoffstadt -/src/ @hoffstadt @Pcothren -/docs/* @hoffstadt @Pcothren +/docs/* @hoffstadt # specific files /src/distribution.cmake @hoffstadt @@ -18,7 +15,7 @@ setup.py @hoffstadt .gitattributes @hoffstadt .gitignore @hoffstadt .gitmodules @hoffstadt -.readthedocs.yaml @hoffstadt @Pcothren +.readthedocs.yaml @hoffstadt # no owners README.md diff --git a/.github/workflows/Deployment.yml b/.github/workflows/Deployment.yml index 89bc21bc7..1c78a8ab8 100644 --- a/.github/workflows/Deployment.yml +++ b/.github/workflows/Deployment.yml @@ -14,7 +14,7 @@ on: version: description: 'Dear PyGui Version' required: false - default: '2.0.0b1' + default: '2.1.2' deploy: description: 'Deploy (true will deploy to pypi)' @@ -30,10 +30,10 @@ jobs: build-windows-wheels: - runs-on: windows-2019 + runs-on: windows-2022 strategy: matrix: - python-version: [ 3.8, 3.9, "3.10", "3.11", "3.12", "3.13" ] + python-version: [ 3.8, 3.9, "3.10", "3.11", "3.12", "3.13", "3.14" ] steps: @@ -74,10 +74,10 @@ jobs: build-mac10-wheels: - runs-on: macos-12 + runs-on: macos-13 strategy: matrix: - python-version: [ 3.8, 3.9, "3.10", "3.11", "3.12", "3.13" ] + python-version: [ 3.8, 3.9, "3.10", "3.11", "3.12", "3.13", "3.14" ] steps: @@ -118,7 +118,7 @@ jobs: runs-on: macos-latest-xlarge strategy: matrix: - python-version: [ "3.10", "3.11", "3.12", "3.13" ] + python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ] steps: @@ -156,12 +156,12 @@ jobs: build-linux-wheels: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: - CXX: g++-9 + CXX: g++-10 strategy: matrix: - python-version: [ 3.8, 3.9, "3.10", "3.11", "3.12", "3.13" ] + python-version: [ 3.8, 3.9, "3.10", "3.11", "3.12", "3.13", "3.14" ] steps: @@ -202,7 +202,7 @@ jobs: deploy-packages: needs: [build-windows-wheels, build-mac10-wheels, build-linux-wheels, build-mac-silicon-wheels] - runs-on: windows-2019 + runs-on: windows-2022 steps: @@ -238,4 +238,4 @@ jobs: python -m twine upload --repository testpypi windowsbuild*/* -u __token__ -p ${{ secrets.TEST_PYPI_PASSWORD }} --skip-existing python -m twine upload --repository testpypi apple10build*/* -u __token__ -p ${{ secrets.TEST_PYPI_PASSWORD }} --skip-existing python -m twine upload --repository testpypi apple10sbuild*/* -u __token__ -p ${{ secrets.TEST_PYPI_PASSWORD }} --skip-existing - python -m twine upload --repository testpypi linuxbuild*/* -u __token__ -p ${{ secrets.TEST_PYPI_PASSWORD }} --skip-existing \ No newline at end of file + python -m twine upload --repository testpypi linuxbuild*/* -u __token__ -p ${{ secrets.TEST_PYPI_PASSWORD }} --skip-existing diff --git a/.github/workflows/EmbeddedBuild.yml b/.github/workflows/EmbeddedBuild.yml index 6814927b4..03f23e342 100644 --- a/.github/workflows/EmbeddedBuild.yml +++ b/.github/workflows/EmbeddedBuild.yml @@ -25,7 +25,7 @@ jobs: build-windows: - runs-on: windows-2019 + runs-on: windows-2022 if: ${{! contains(github.event.head_commit.message, '[individual]') || contains(github.event.head_commit.message, '[windows]')}} steps: @@ -97,9 +97,9 @@ jobs: build-Ubuntu: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: - CXX: g++-9 + CXX: g++-10 if: ${{! contains(github.event.head_commit.message, '[individual]') || contains(github.event.head_commit.message, '[linux]')}} steps: diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 750884461..12c507982 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -18,7 +18,7 @@ on: jobs: PVS-Studio: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 if: ${{! contains(github.event.head_commit.message, '[individual]') || contains(github.event.head_commit.message, '[static analysis]')}} steps: - uses: actions/checkout@v4 diff --git a/CMakeLists.txt b/CMakeLists.txt index a86797350..adb1bce8d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,17 @@ if(MV_TESTS_ONLY) add_definitions(-DMV_TESTS_ONLY) endif() +# Specifying MV_NO_USER_THREADS turns off some thread safety features (might give +# you some perf gain, yeah, those 0.01%) and must only be used when no user threads +# (threading.Thread) **ever** call DPG API. With MV_NO_USER_THREADS, it's only +# allowed to call DPG from the main thread and from handlers/callbacks. +# Also can be used to get back the behavior of old DPG versions that were thread +# unsafe (for testing/debugging). +set(MV_NO_USER_THREADS ${MV_NO_USER_THREADS}) +if(MV_NO_USER_THREADS) + add_definitions(-DMV_NO_USER_THREADS) +endif() + add_subdirectory("thirdparty") # if this is not a distribution build diff --git a/LICENSE b/LICENSE index e382656bb..15b4874d5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 Dear PyGui, LLC +Copyright (c) 2025 Dear PyGui, LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index e14a6dcbf..ff9e8c949 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@
diff --git a/dearpygui/_dearpygui.pyi b/dearpygui/_dearpygui.pyi index b821d6276..9701c53c9 100644 --- a/dearpygui/_dearpygui.pyi +++ b/dearpygui/_dearpygui.pyi @@ -54,15 +54,15 @@ def add_checkbox(*, label: str ='', user_data: Any ='', use_internal_label: bool """Adds a checkbox.""" ... -def add_child_window(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='', border: bool ='', autosize_x: bool ='', autosize_y: bool ='', no_scrollbar: bool ='', horizontal_scrollbar: bool ='', menubar: bool ='', no_scroll_with_mouse: bool ='', flattened_navigation: bool ='', always_use_window_padding: bool ='', resizable_x: bool ='', resizable_y: bool ='', always_auto_resize: bool ='', frame_style: bool ='', auto_resize_x: bool ='', auto_resize_y: bool ='') -> Union[int, str]: +def add_child_window(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', border: bool ='', autosize_x: bool ='', autosize_y: bool ='', no_scrollbar: bool ='', horizontal_scrollbar: bool ='', menubar: bool ='', no_scroll_with_mouse: bool ='', flattened_navigation: bool ='', always_use_window_padding: bool ='', resizable_x: bool ='', resizable_y: bool ='', always_auto_resize: bool ='', frame_style: bool ='', auto_resize_x: bool ='', auto_resize_y: bool ='') -> Union[int, str]: """Adds an embedded child window. Will show scrollbars when items do not fit. About using auto_resize/resizable flags: size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing and it won't update its auto-size while clipped. While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional 'resizing after becoming visible again' glitch. You may also use always_auto_resize to force an update even when child window is not in view. However doing so will degrade performance. Remember that combining both auto_resize_x and auto_resize_y defeats purpose of a scrolling region and is NOT recommended.""" ... -def add_clipper(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', delay_search: bool ='') -> Union[int, str]: +def add_clipper(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='') -> Union[int, str]: """Helper to manually clip large list of items. Increases performance by not searching or drawing widgets outside of the clipped region.""" ... -def add_collapsing_header(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='', closable: bool ='', default_open: bool ='', open_on_double_click: bool ='', open_on_arrow: bool ='', leaf: bool ='', bullet: bool ='') -> Union[int, str]: +def add_collapsing_header(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', closable: bool ='', default_open: bool ='', open_on_double_click: bool ='', open_on_arrow: bool ='', leaf: bool ='', bullet: bool ='') -> Union[int, str]: """Adds a collapsing header to add items to. Must be closed with the end command.""" ... @@ -111,7 +111,7 @@ def add_custom_series(x : Union[List[float], Tuple[float, ...]], y : Union[List[ ... def add_date_picker(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_value: dict ='', level: int ='') -> Union[int, str]: - """Adds a data picker.""" + """Adds a date picker.""" ... def add_digital_series(x : Union[List[float], Tuple[float, ...]], y : Union[List[float], Tuple[float, ...]], *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', show: bool ='') -> Union[int, str]: @@ -174,7 +174,7 @@ def add_draw_node(*, label: str ='', user_data: Any ='', use_internal_label: boo """New in 1.1. Creates a drawing node to associate a transformation matrix. Child node matricies will concatenate.""" ... -def add_drawlist(width : int, height : int, *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='') -> Union[int, str]: +def add_drawlist(width : int, height : int, *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='') -> Union[int, str]: """Adds a drawing canvas.""" ... @@ -194,7 +194,7 @@ def add_file_extension(extension : str, *, label: str ='', user_data: Any ='', u """Creates a file extension filter option in the file dialog.""" ... -def add_filter_set(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', delay_search: bool ='') -> Union[int, str]: +def add_filter_set(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='') -> Union[int, str]: """Helper to parse and apply text filters (e.g. aaaaa[, bbbbb][, ccccc])""" ... @@ -230,7 +230,7 @@ def add_font_registry(*, label: str ='', user_data: Any ='', use_internal_label: """Adds a font registry.""" ... -def add_group(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='', horizontal: bool ='', horizontal_spacing: float ='', xoffset: float ='') -> Union[int, str]: +def add_group(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', horizontal: bool ='', horizontal_spacing: float ='', xoffset: float ='') -> Union[int, str]: """Creates a group that other widgets can belong to. The group allows item commands to be issued for all of its members. Enable property acts in a special way enabling/disabling everything inside the group. (Use mvStyleVar_DisabledAlpha to edit colors within the disabled group.)""" ... @@ -327,7 +327,7 @@ def add_item_edited_handler(*, label: str ='', user_data: Any ='', use_internal_ """Adds an edited handler.""" ... -def add_item_focus_handler(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', callback: Callable ='', show: bool ='') -> Union[int, str]: +def add_item_focus_handler(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', callback: Callable ='', show: bool ='', event_type: int ='') -> Union[int, str]: """Adds a focus handler.""" ... @@ -335,7 +335,7 @@ def add_item_handler_registry(*, label: str ='', user_data: Any ='', use_interna """Adds an item handler registry.""" ... -def add_item_hover_handler(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', callback: Callable ='', show: bool ='') -> Union[int, str]: +def add_item_hover_handler(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', callback: Callable ='', show: bool ='', event_type: int ='') -> Union[int, str]: """Adds a hover handler.""" ... @@ -343,6 +343,10 @@ def add_item_resize_handler(*, label: str ='', user_data: Any ='', use_internal_ """Adds a resize handler.""" ... +def add_item_scroll_handler(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', callback: Callable ='', show: bool ='') -> Union[int, str]: + """Adds a scroll handler.""" + ... + def add_item_toggled_open_handler(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', callback: Callable ='', show: bool ='') -> Union[int, str]: """Adds a togged open handler.""" ... @@ -379,11 +383,11 @@ def add_loading_indicator(*, label: str ='', user_data: Any ='', use_internal_la """Adds a rotating animated loading symbol.""" ... -def add_menu(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='') -> Union[int, str]: +def add_menu(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drop_callback: Callable ='', show: bool ='', enabled: bool ='', filter_key: str ='', tracked: bool ='', track_offset: float ='') -> Union[int, str]: """Adds a menu to an existing menu bar.""" ... -def add_menu_bar(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', show: bool ='', delay_search: bool ='') -> Union[int, str]: +def add_menu_bar(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', show: bool ='') -> Union[int, str]: """Adds a menu bar to a window.""" ... @@ -419,7 +423,7 @@ def add_mouse_wheel_handler(*, label: str ='', user_data: Any ='', use_internal_ """Adds a mouse wheel handler.""" ... -def add_node(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='', draggable: bool ='') -> Union[int, str]: +def add_node(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', draggable: bool ='') -> Union[int, str]: """Adds a node to a node editor.""" ... @@ -427,7 +431,7 @@ def add_node_attribute(*, label: str ='', user_data: Any ='', use_internal_label """Adds a node attribute to a node.""" ... -def add_node_editor(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', callback: Callable ='', show: bool ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='', delink_callback: Callable ='', menubar: bool ='', minimap: bool ='', minimap_location: int ='') -> Union[int, str]: +def add_node_editor(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', callback: Callable ='', show: bool ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', delink_callback: Callable ='', menubar: bool ='', minimap: bool ='', minimap_location: int ='') -> Union[int, str]: """Adds a node editor.""" ... @@ -439,7 +443,7 @@ def add_pie_series(x : float, y : float, radius : float, values : Union[List[flo """Adds an pie series to a plot.""" ... -def add_plot(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='', no_title: bool ='', no_menus: bool ='', no_box_select: bool ='', no_mouse_pos: bool ='', query: bool ='', query_color: Union[List[float], Tuple[float, ...]] ='', min_query_rects: int ='', max_query_rects: int ='', crosshairs: bool ='', equal_aspects: bool ='', no_inputs: bool ='', no_frame: bool ='', use_local_time: bool ='', use_ISO8601: bool ='', use_24hour_clock: bool ='', pan_button: int ='', pan_mod: int ='', context_menu_button: int ='', fit_button: int ='', box_select_button: int ='', box_select_mod: int ='', box_select_cancel_button: int ='', query_toggle_mod: int ='', horizontal_mod: int ='', vertical_mod: int ='', override_mod: int ='', zoom_mod: int ='', zoom_rate: int ='') -> Union[int, str]: +def add_plot(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', callback: Callable ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', no_title: bool ='', no_menus: bool ='', no_box_select: bool ='', no_mouse_pos: bool ='', query: bool ='', query_color: Union[List[float], Tuple[float, ...]] ='', min_query_rects: int ='', max_query_rects: int ='', crosshairs: bool ='', equal_aspects: bool ='', no_inputs: bool ='', no_frame: bool ='', use_local_time: bool ='', use_ISO8601: bool ='', use_24hour_clock: bool ='', pan_button: int ='', pan_mod: int ='', context_menu_button: int ='', fit_button: int ='', box_select_button: int ='', box_select_mod: int ='', box_select_cancel_button: int ='', query_toggle_mod: int ='', horizontal_mod: int ='', vertical_mod: int ='', override_mod: int ='', zoom_mod: int ='', zoom_rate: int ='') -> Union[int, str]: """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.""" ... @@ -539,15 +543,20 @@ def add_string_value(*, label: str ='', user_data: Any ='', use_internal_label: """Adds a string value.""" ... -def add_subplots(rows : int, columns : int, *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='', row_ratios: Union[List[float], Tuple[float, ...]] ='', column_ratios: Union[List[float], Tuple[float, ...]] ='', no_title: bool ='', no_menus: bool ='', no_resize: bool ='', no_align: bool ='', share_series: bool ='', link_rows: bool ='', link_columns: bool ='', link_all_x: bool ='', link_all_y: bool ='', column_major: bool ='') -> Union[int, str]: +def add_subplots(rows : int, columns : int, *, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', row_ratios: Union[List[float], Tuple[float, ...]] ='', column_ratios: Union[List[float], Tuple[float, ...]] ='', no_title: bool ='', no_menus: bool ='', no_resize: bool ='', no_align: bool ='', share_series: bool ='', link_rows: bool ='', link_columns: bool ='', link_all_x: bool ='', link_all_y: bool ='', column_major: bool ='') -> Union[int, str]: """Adds a collection of plots.""" ... +def add_synced_tables(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', parent: Union[int, str] ='', before: Union[int, str] ='', show: bool ='', filter_key: str ='') -> Union[int, str]: + """Links all tables that are immediate children of this container so that they share their state (mostly column sizes). Other children are rendered as is. This is an experimental feature, use with caution.""" + ... + def add_tab(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drop_callback: Callable ='', show: bool ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='', closable: bool ='', no_tooltip: bool ='', order_mode: int ='') -> Union[int, str]: + """Adds a tab to a tab bar.""" ... -def add_tab_bar(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='', reorderable: bool ='') -> Union[int, str]: +def add_tab_bar(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', reorderable: bool ='') -> Union[int, str]: """Adds a tab bar.""" ... @@ -555,7 +564,7 @@ def add_tab_button(*, label: str ='', user_data: Any ='', use_internal_label: bo """Adds a tab button to a tab bar.""" ... -def add_table(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', delay_search: bool ='', header_row: bool ='', clipper: bool ='', inner_width: int ='', policy: int ='', freeze_rows: int ='', freeze_columns: int ='', sort_multi: bool ='', sort_tristate: bool ='', resizable: bool ='', reorderable: bool ='', hideable: bool ='', sortable: bool ='', context_menu_in_body: bool ='', row_background: bool ='', borders_innerH: bool ='', borders_outerH: bool ='', borders_innerV: bool ='', borders_outerV: bool ='', no_host_extendX: bool ='', no_host_extendY: bool ='', no_keep_columns_visible: bool ='', precise_widths: bool ='', no_clip: bool ='', pad_outerX: bool ='', no_pad_outerX: bool ='', no_pad_innerX: bool ='', scrollX: bool ='', scrollY: bool ='', no_saved_settings: bool ='') -> Union[int, str]: +def add_table(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', source: Union[int, str] ='', callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', header_row: bool ='', clipper: bool ='', inner_width: int ='', policy: int ='', freeze_rows: int ='', freeze_columns: int ='', sort_multi: bool ='', sort_tristate: bool ='', resizable: bool ='', reorderable: bool ='', hideable: bool ='', sortable: bool ='', context_menu_in_body: bool ='', row_background: bool ='', borders_innerH: bool ='', borders_outerH: bool ='', borders_innerV: bool ='', borders_outerV: bool ='', no_host_extendX: bool ='', no_host_extendY: bool ='', no_keep_columns_visible: bool ='', precise_widths: bool ='', no_clip: bool ='', pad_outerX: bool ='', no_pad_outerX: bool ='', no_pad_innerX: bool ='', scrollX: bool ='', scrollY: bool ='', no_saved_settings: bool ='') -> Union[int, str]: """Adds a table.""" ... @@ -611,7 +620,7 @@ def add_tooltip(parent : Union[int, str], *, label: str ='', user_data: Any ='', """Adds a tooltip window.""" ... -def add_tree_node(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', delay_search: bool ='', tracked: bool ='', track_offset: float ='', default_open: bool ='', open_on_double_click: bool ='', open_on_arrow: bool ='', leaf: bool ='', bullet: bool ='', selectable: bool ='', span_text_width: bool ='', span_full_width: bool ='') -> Union[int, str]: +def add_tree_node(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', before: Union[int, str] ='', payload_type: str ='', drag_callback: Callable ='', drop_callback: Callable ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', filter_key: str ='', tracked: bool ='', track_offset: float ='', default_open: bool ='', open_on_double_click: bool ='', open_on_arrow: bool ='', leaf: bool ='', bullet: bool ='', selectable: bool ='', span_text_width: bool ='', span_full_width: bool ='') -> Union[int, str]: """Adds a tree node to add items to.""" ... @@ -619,15 +628,15 @@ def add_value_registry(*, label: str ='', user_data: Any ='', use_internal_label """Adds a value registry.""" ... -def add_viewport_drawlist(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', show: bool ='', filter_key: str ='', delay_search: bool ='', front: bool ='') -> Union[int, str]: +def add_viewport_drawlist(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', show: bool ='', filter_key: str ='', front: bool ='') -> Union[int, str]: """A container that is used to present draw items or layers directly to the viewport. By default this will draw to the back of the viewport. Layers and draw items should be added to this widget as children.""" ... -def add_viewport_menu_bar(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', show: bool ='', delay_search: bool ='') -> Union[int, str]: +def add_viewport_menu_bar(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', indent: int ='', parent: Union[int, str] ='', show: bool ='') -> Union[int, str]: """Adds a menubar to the viewport.""" ... -def add_window(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', delay_search: bool ='', min_size: Union[List[int], Tuple[int, ...]] ='', max_size: Union[List[int], Tuple[int, ...]] ='', menubar: bool ='', collapsed: bool ='', autosize: bool ='', no_resize: bool ='', unsaved_document: bool ='', no_title_bar: bool ='', no_move: bool ='', no_scrollbar: bool ='', no_collapse: bool ='', horizontal_scrollbar: bool ='', no_focus_on_appearing: bool ='', no_bring_to_front_on_focus: bool ='', no_close: bool ='', no_background: bool ='', modal: bool ='', popup: bool ='', no_saved_settings: bool ='', no_open_over_existing_popup: bool ='', no_scroll_with_mouse: bool ='', on_close: Callable ='') -> Union[int, str]: +def add_window(*, label: str ='', user_data: Any ='', use_internal_label: bool ='', tag: Union[int, str] ='', width: int ='', height: int ='', indent: int ='', show: bool ='', pos: Union[List[int], Tuple[int, ...]] ='', min_size: Union[List[int], Tuple[int, ...]] ='', max_size: Union[List[int], Tuple[int, ...]] ='', menubar: bool ='', collapsed: bool ='', autosize: bool ='', no_resize: bool ='', unsaved_document: bool ='', no_title_bar: bool ='', no_move: bool ='', no_scrollbar: bool ='', no_collapse: bool ='', horizontal_scrollbar: bool ='', no_focus_on_appearing: bool ='', no_bring_to_front_on_focus: bool ='', no_close: bool ='', no_background: bool ='', modal: bool ='', popup: bool ='', no_saved_settings: bool ='', no_open_over_existing_popup: bool ='', no_scroll_with_mouse: bool ='', on_close: Callable ='') -> Union[int, str]: """Creates a new window for following items to be added to.""" ... @@ -1179,12 +1188,12 @@ def set_viewport_resize_callback(callback : Callable, *, user_data: Any ='') -> """Sets a callback to run on viewport resize.""" ... -def set_x_scroll(item : Union[int, str], value : float) -> None: - """Undocumented""" +def set_x_scroll(item : Union[int, str], value : float, *, when: int ='') -> None: + """Sets horizontal scroll position.""" ... -def set_y_scroll(item : Union[int, str], value : float) -> None: - """Undocumented""" +def set_y_scroll(item : Union[int, str], value : float, *, when: int ='') -> None: + """Sets vertical scroll position.""" ... def setup_dearpygui() -> None: @@ -1211,7 +1220,7 @@ def show_viewport(*, minimized: bool ='', maximized: bool ='') -> None: """Shows the main viewport.""" ... -def split_frame(*, delay: int ='') -> None: +def split_frame() -> None: """Waits one frame.""" ... @@ -1331,6 +1340,8 @@ mvKey_NumPad6=0 mvKey_NumPad7=0 mvKey_NumPad8=0 mvKey_NumPad9=0 +mvKey_NumPadEnter=0 +mvKey_NumPadEqual=0 mvKey_Subtract=0 mvKey_Decimal=0 mvKey_Divide=0 @@ -1428,6 +1439,19 @@ mvComboHeight_Small=0 mvComboHeight_Regular=0 mvComboHeight_Large=0 mvComboHeight_Largest=0 +mvEventType_Off=0 +mvEventType_Enter=0 +mvEventType_On=0 +mvEventType_Leave=0 +mvSetScrollFlags_Now=0 +mvSetScrollFlags_Delayed=0 +mvSetScrollFlags_Both=0 +mvScrollDirection_XAxis=0 +mvScrollDirection_YAxis=0 +mvScrollDirection_Horizontal=0 +mvScrollDirection_Vertical=0 +mvLoadInd_DottedCircle=0 +mvLoadInd_Ring=0 mvPlatform_Windows=0 mvPlatform_Apple=0 mvPlatform_Linux=0 @@ -1771,6 +1795,7 @@ mvNodeAttribute=0 mvTable=0 mvTableColumn=0 mvTableRow=0 +mvSyncedTables=0 mvDrawLine=0 mvDrawArrow=0 mvDrawTriangle=0 @@ -1850,6 +1875,7 @@ mvDeactivatedAfterEditHandler=0 mvToggledOpenHandler=0 mvClickedHandler=0 mvDoubleClickedHandler=0 +mvScrollHandler=0 mvDragPayload=0 mvResizeHandler=0 mvFont=0 diff --git a/dearpygui/_dearpygui_RTD.py b/dearpygui/_dearpygui_RTD.py index be2649027..b4e28ab8e 100644 --- a/dearpygui/_dearpygui_RTD.py +++ b/dearpygui/_dearpygui_RTD.py @@ -566,15 +566,6 @@ def is_item_tracked(item: Union[int, str]) -> Union[bool, None]: return internal_dpg.get_item_configuration(item)["tracked"] -def is_item_search_delayed(item: Union[int, str]) -> Union[bool, None]: - """Checks if item is search delayed. - - Returns: - tracked as a bool or None - """ - return internal_dpg.get_item_configuration(item)["delay_search"] - - def get_item_indent(item: Union[int, str]) -> Union[int, None]: """Gets the item's indent. @@ -1542,6 +1533,15 @@ def setup_registries() -> None: internal_dpg.add_value_registry(tag=internal_dpg.mvReservedUUID_3) internal_dpg.add_colormap_registry(tag=internal_dpg.mvReservedUUID_4) +@deprecated("Useless and doesn't work anyway") +def is_item_search_delayed(item: Union[int, str]) -> Union[bool, None]: + """Checks if item is search delayed. + + Returns: + tracked as a bool or None + """ + return internal_dpg.get_item_configuration(item)["delay_search"] + @deprecated("Use: `set_frame_callback()`") def set_start_callback(callback): """ deprecated function """ @@ -1571,7 +1571,6 @@ def child_window(**kwargs): show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom border (bool, optional): Shows/Hides the border around the sides. @@ -1590,6 +1589,7 @@ def child_window(**kwargs): auto_resize_x (bool, optional): Enable auto-resizing width based on child content. Read 'IMPORTANT: Size measurement' details above. auto_resize_y (bool, optional): Enable auto-resizing height based on child content. Read 'IMPORTANT: Size measurement' details above. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -1614,8 +1614,8 @@ def clipper(**kwargs): parent (Union[int, str], optional): Parent to add this item to. (runtime adding) before (Union[int, str], optional): This item will be displayed before the specified item in the parent. show (bool, optional): Attempt to render widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -1644,7 +1644,6 @@ def collapsing_header(**kwargs): show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom closable (bool, optional): Adds the ability to hide this widget by pressing the (x) in the top right of widget. @@ -1654,6 +1653,7 @@ def collapsing_header(**kwargs): leaf (bool, optional): No collapsing, no arrow (use as a convenience for leaf nodes). bullet (bool, optional): Display a bullet instead of arrow. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -1809,10 +1809,10 @@ def drawlist(width, height, **kwargs): show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -1869,8 +1869,8 @@ def filter_set(**kwargs): parent (Union[int, str], optional): Parent to add this item to. (runtime adding) before (Union[int, str], optional): This item will be displayed before the specified item in the parent. show (bool, optional): Attempt to render widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -1949,13 +1949,13 @@ def group(**kwargs): enabled (bool, optional): Turns off functionality of widget and applies the disabled theme. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom horizontal (bool, optional): Forces child widgets to be added in a horizontal layout. horizontal_spacing (float, optional): Spacing for the horizontal layout. xoffset (float, optional): Offset from containing window x item location within group. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2025,10 +2025,10 @@ def menu(**kwargs): show (bool, optional): Attempt to render widget. enabled (bool, optional): Turns off functionality of widget and applies the disabled theme. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2051,8 +2051,8 @@ def menu_bar(**kwargs): indent (int, optional): Offsets the widget to the right the specified number multiplied by the indent style. parent (Union[int, str], optional): Parent to add this item to. (runtime adding) show (bool, optional): Attempt to render widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2080,11 +2080,11 @@ def node(**kwargs): show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom draggable (bool, optional): Allow node to be draggable. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2141,7 +2141,6 @@ def node_editor(**kwargs): callback (Callable, optional): Registers a callback. show (bool, optional): Attempt to render widget. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom delink_callback (Callable, optional): Callback ran when a link is detached. @@ -2149,6 +2148,7 @@ def node_editor(**kwargs): minimap (bool, optional): Shows or hides the Minimap. New in 1.6. minimap_location (int, optional): mvNodeMiniMap_Location_* constants. New in 1.6. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2180,7 +2180,6 @@ def plot(**kwargs): show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom no_title (bool, optional): the plot title will not be displayed @@ -2212,6 +2211,7 @@ def plot(**kwargs): zoom_mod (int, optional): optional modifier that must be held for scroll wheel zooming zoom_rate (int, optional): zoom rate for scroll (e.g. 0.1f = 10% plot range every scroll click); make negative to invert id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. no_highlight (bool, optional): (deprecated)Removed because not supported from the backend anymore. To control the highlighting of series use the same argument in `add_plot_legend` no_child (bool, optional): (deprecated)a child window region will not be used to capture mouse scroll (can boost performance for single ImGui window applications) anti_aliased (bool, optional): (deprecated)This feature was deprecated in ImPlot. To enable/disable anti_aliasing use `dpg.configure_app()` with the `anti_aliasing` parameters. @@ -2312,7 +2312,6 @@ def subplots(rows, columns, **kwargs): show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom row_ratios (Union[List[float], Tuple[float, ...]], optional): @@ -2328,6 +2327,7 @@ def subplots(rows, columns, **kwargs): link_all_y (bool, optional): link the y-axis limits in every plot in the subplot (does not apply to auxiliary y-axes) column_major (bool, optional): subplots are added in column major order instead of the default row major order id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2338,6 +2338,30 @@ def subplots(rows, columns, **kwargs): finally: internal_dpg.pop_container_stack() +@contextmanager +def synced_tables(**kwargs): + """ Links all tables that are immediate children of this container so that they share their state (mostly column sizes). Other children are rendered as is. This is an experimental feature, use with caution. + + Args: + label (str, optional): Overrides 'name' as label. + user_data (Any, optional): User data for callbacks + use_internal_label (bool, optional): Use generated internal label instead of user specified (appends ### uuid). + tag (Union[int, str], optional): Unique id used to programmatically refer to the item.If label is unused this will be the label. + parent (Union[int, str], optional): Parent to add this item to. (runtime adding) + before (Union[int, str], optional): This item will be displayed before the specified item in the parent. + show (bool, optional): Attempt to render widget. + filter_key (str, optional): Used by filter widget. + id (Union[int, str], optional): (deprecated) + Yields: + Union[int, str] + """ + try: + widget = internal_dpg.add_synced_tables(**kwargs) + internal_dpg.push_container_stack(widget) + yield widget + finally: + internal_dpg.pop_container_stack() + @contextmanager def tab(**kwargs): """ Adds a tab to a tab bar. @@ -2354,13 +2378,13 @@ def tab(**kwargs): drop_callback (Callable, optional): Registers a drop callback for drag and drop. show (bool, optional): Attempt to render widget. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom closable (bool, optional): Creates a button on the tab that can hide the tab. no_tooltip (bool, optional): Disable tooltip for the given tab. order_mode (int, optional): set using a constant: mvTabOrder_Reorderable: allows reordering, mvTabOrder_Fixed: fixed ordering, mvTabOrder_Leading: adds tab to front, mvTabOrder_Trailing: adds tab to back id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2387,11 +2411,11 @@ def tab_bar(**kwargs): show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom reorderable (bool, optional): Allows for the user to change the order of the tabs. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2421,7 +2445,6 @@ def table(**kwargs): show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. header_row (bool, optional): show headers at the top of the columns clipper (bool, optional): Use clipper (rows must be same height). inner_width (int, optional): @@ -2452,6 +2475,7 @@ def table(**kwargs): scrollY (bool, optional): Enable vertical scrolling. no_saved_settings (bool, optional): Never load/save settings in .ini file. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2640,7 +2664,6 @@ def tree_node(**kwargs): show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom default_open (bool, optional): Sets the tree node open by default. @@ -2652,6 +2675,7 @@ def tree_node(**kwargs): span_text_width (bool, optional): Makes hitbox and highlight only cover the label. span_full_width (bool, optional): Extend hit box to the left-most and right-most edges (cover the indent area). id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2693,9 +2717,9 @@ def viewport_drawlist(**kwargs): tag (Union[int, str], optional): Unique id used to programmatically refer to the item.If label is unused this will be the label. show (bool, optional): Attempt to render widget. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. front (bool, optional): Draws to the front of the view port instead of the back. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2718,8 +2742,8 @@ def viewport_menu_bar(**kwargs): indent (int, optional): Offsets the widget to the right the specified number multiplied by the indent style. parent (Union[int, str], optional): Parent to add this item to. (runtime adding) show (bool, optional): Attempt to render widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2744,7 +2768,6 @@ def window(**kwargs): indent (int, optional): Offsets the widget to the right the specified number multiplied by the indent style. show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. min_size (Union[List[int], Tuple[int, ...]], optional): Minimum window size. max_size (Union[List[int], Tuple[int, ...]], optional): Maximum window size. menubar (bool, optional): Shows or hides the menubar. @@ -2768,6 +2791,7 @@ def window(**kwargs): no_scroll_with_mouse (bool, optional): Disable user vertically scrolling with mouse wheel. on_close (Callable, optional): Callback ran when window is closed. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -3103,7 +3127,6 @@ def add_child_window(**kwargs): show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom border (bool, optional): Shows/Hides the border around the sides. @@ -3122,6 +3145,7 @@ def add_child_window(**kwargs): auto_resize_x (bool, optional): Enable auto-resizing width based on child content. Read 'IMPORTANT: Size measurement' details above. auto_resize_y (bool, optional): Enable auto-resizing height based on child content. Read 'IMPORTANT: Size measurement' details above. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -3141,8 +3165,8 @@ def add_clipper(**kwargs): parent (Union[int, str], optional): Parent to add this item to. (runtime adding) before (Union[int, str], optional): This item will be displayed before the specified item in the parent. show (bool, optional): Attempt to render widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -3166,7 +3190,6 @@ def add_collapsing_header(**kwargs): show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom closable (bool, optional): Adds the ability to hide this widget by pressing the (x) in the top right of widget. @@ -3176,6 +3199,7 @@ def add_collapsing_header(**kwargs): leaf (bool, optional): No collapsing, no arrow (use as a convenience for leaf nodes). bullet (bool, optional): Display a bullet instead of arrow. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -3519,7 +3543,7 @@ def add_custom_series(x, y, channel_count, **kwargs): return internal_dpg.add_custom_series(x, y, channel_count, **kwargs) def add_date_picker(**kwargs): - """ Adds a data picker. + """ Adds a date picker. Args: label (str, optional): Overrides 'name' as label. @@ -3989,10 +4013,10 @@ def add_drawlist(width, height, **kwargs): show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -4105,8 +4129,8 @@ def add_filter_set(**kwargs): parent (Union[int, str], optional): Parent to add this item to. (runtime adding) before (Union[int, str], optional): This item will be displayed before the specified item in the parent. show (bool, optional): Attempt to render widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -4276,13 +4300,13 @@ def add_group(**kwargs): enabled (bool, optional): Turns off functionality of widget and applies the disabled theme. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom horizontal (bool, optional): Forces child widgets to be added in a horizontal layout. horizontal_spacing (float, optional): Spacing for the horizontal layout. xoffset (float, optional): Offset from containing window x item location within group. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -4940,6 +4964,7 @@ def add_item_focus_handler(**kwargs): parent (Union[int, str], optional): Parent to add this item to. (runtime adding) callback (Callable, optional): Registers a callback. show (bool, optional): Attempt to render widget. + event_type (int, optional): What kind of events to track: just got focus (mvEventType_Enter), currently having focus (mvEventType_On), lost focus (mvEventType_Leave). Can be a combination of these flags. Defaults to mvEventType_On. id (Union[int, str], optional): (deprecated) Returns: Union[int, str] @@ -4974,6 +4999,7 @@ def add_item_hover_handler(**kwargs): parent (Union[int, str], optional): Parent to add this item to. (runtime adding) callback (Callable, optional): Registers a callback. show (bool, optional): Attempt to render widget. + event_type (int, optional): What kind of events to track: mouse-in (mvEventType_Enter), mouse-over (mvEventType_On), mouse-out (mvEventType_Leave). Can be a combination of these flags. Defaults to mouse-over. id (Union[int, str], optional): (deprecated) Returns: Union[int, str] @@ -4999,6 +5025,24 @@ def add_item_resize_handler(**kwargs): return internal_dpg.add_item_resize_handler(**kwargs) +def add_item_scroll_handler(**kwargs): + """ Adds a scroll handler. + + Args: + label (str, optional): Overrides 'name' as label. + user_data (Any, optional): User data for callbacks + use_internal_label (bool, optional): Use generated internal label instead of user specified (appends ### uuid). + tag (Union[int, str], optional): Unique id used to programmatically refer to the item.If label is unused this will be the label. + parent (Union[int, str], optional): Parent to add this item to. (runtime adding) + callback (Callable, optional): Registers a callback. + show (bool, optional): Attempt to render widget. + id (Union[int, str], optional): (deprecated) + Returns: + Union[int, str] + """ + + return internal_dpg.add_item_scroll_handler(**kwargs) + def add_item_toggled_open_handler(**kwargs): """ Adds a togged open handler. @@ -5202,13 +5246,13 @@ def add_loading_indicator(**kwargs): drop_callback (Callable, optional): Registers a drop callback for drag and drop. show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. - style (int, optional): 0 is rotating dots style, 1 is rotating bar style. - circle_count (int, optional): Number of dots show if dots or size of circle if circle. - speed (float, optional): Speed the anamation will rotate. - radius (float, optional): Radius size of the loading indicator. - thickness (float, optional): Thickness of the circles or line. - color (Union[List[int], Tuple[int, ...]], optional): Color of the growing center circle. - secondary_color (Union[List[int], Tuple[int, ...]], optional): Background of the dots in dot mode. + style (int, optional): mvLoadInd_DottedCircle is rotating dots style, mvLoadInd_Ring is rotating bar style. + circle_count (int, optional): DottedCircle style: number of dots to show. + speed (float, optional): Speed with which the animation will rotate. + radius (float, optional): Scale factor for the loading indicator radius. The size of the indicator is determined by font size and this scale factor. + thickness (float, optional): Ring style: scale factor of line thickness; thickness=1 corresponds to line width being 1/8 of the ring diameter. + color (Union[List[int], Tuple[int, ...]], optional): Main color of the indicator. If omitted, the color for mvThemeCol_Button will be used. + secondary_color (Union[List[int], Tuple[int, ...]], optional): DottedCircle style: color of 'inactive' dots. If omitted, the color for mvThemeCol_ButtonHovered will be used. id (Union[int, str], optional): (deprecated) Returns: Union[int, str] @@ -5232,10 +5276,10 @@ def add_menu(**kwargs): show (bool, optional): Attempt to render widget. enabled (bool, optional): Turns off functionality of widget and applies the disabled theme. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -5253,8 +5297,8 @@ def add_menu_bar(**kwargs): indent (int, optional): Offsets the widget to the right the specified number multiplied by the indent style. parent (Union[int, str], optional): Parent to add this item to. (runtime adding) show (bool, optional): Attempt to render widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -5439,11 +5483,11 @@ def add_node(**kwargs): show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom draggable (bool, optional): Allow node to be draggable. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -5490,7 +5534,6 @@ def add_node_editor(**kwargs): callback (Callable, optional): Registers a callback. show (bool, optional): Attempt to render widget. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom delink_callback (Callable, optional): Callback ran when a link is detached. @@ -5498,6 +5541,7 @@ def add_node_editor(**kwargs): minimap (bool, optional): Shows or hides the Minimap. New in 1.6. minimap_location (int, optional): mvNodeMiniMap_Location_* constants. New in 1.6. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -5571,7 +5615,6 @@ def add_plot(**kwargs): show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom no_title (bool, optional): the plot title will not be displayed @@ -5603,6 +5646,7 @@ def add_plot(**kwargs): zoom_mod (int, optional): optional modifier that must be held for scroll wheel zooming zoom_rate (int, optional): zoom rate for scroll (e.g. 0.1f = 10% plot range every scroll click); make negative to invert id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. no_highlight (bool, optional): (deprecated)Removed because not supported from the backend anymore. To control the highlighting of series use the same argument in `add_plot_legend` no_child (bool, optional): (deprecated)a child window region will not be used to capture mouse scroll (can boost performance for single ImGui window applications) anti_aliased (bool, optional): (deprecated)This feature was deprecated in ImPlot. To enable/disable anti_aliasing use `dpg.configure_app()` with the `anti_aliasing` parameters. @@ -6301,7 +6345,6 @@ def add_subplots(rows, columns, **kwargs): show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom row_ratios (Union[List[float], Tuple[float, ...]], optional): @@ -6317,12 +6360,32 @@ def add_subplots(rows, columns, **kwargs): link_all_y (bool, optional): link the y-axis limits in every plot in the subplot (does not apply to auxiliary y-axes) column_major (bool, optional): subplots are added in column major order instead of the default row major order id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ return internal_dpg.add_subplots(rows, columns, **kwargs) +def add_synced_tables(**kwargs): + """ Links all tables that are immediate children of this container so that they share their state (mostly column sizes). Other children are rendered as is. This is an experimental feature, use with caution. + + Args: + label (str, optional): Overrides 'name' as label. + user_data (Any, optional): User data for callbacks + use_internal_label (bool, optional): Use generated internal label instead of user specified (appends ### uuid). + tag (Union[int, str], optional): Unique id used to programmatically refer to the item.If label is unused this will be the label. + parent (Union[int, str], optional): Parent to add this item to. (runtime adding) + before (Union[int, str], optional): This item will be displayed before the specified item in the parent. + show (bool, optional): Attempt to render widget. + filter_key (str, optional): Used by filter widget. + id (Union[int, str], optional): (deprecated) + Returns: + Union[int, str] + """ + + return internal_dpg.add_synced_tables(**kwargs) + def add_tab(**kwargs): """ Adds a tab to a tab bar. @@ -6338,13 +6401,13 @@ def add_tab(**kwargs): drop_callback (Callable, optional): Registers a drop callback for drag and drop. show (bool, optional): Attempt to render widget. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom closable (bool, optional): Creates a button on the tab that can hide the tab. no_tooltip (bool, optional): Disable tooltip for the given tab. order_mode (int, optional): set using a constant: mvTabOrder_Reorderable: allows reordering, mvTabOrder_Fixed: fixed ordering, mvTabOrder_Leading: adds tab to front, mvTabOrder_Trailing: adds tab to back id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -6366,11 +6429,11 @@ def add_tab_bar(**kwargs): show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom reorderable (bool, optional): Allows for the user to change the order of the tabs. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -6425,7 +6488,6 @@ def add_table(**kwargs): show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. header_row (bool, optional): show headers at the top of the columns clipper (bool, optional): Use clipper (rows must be same height). inner_width (int, optional): @@ -6456,6 +6518,7 @@ def add_table(**kwargs): scrollY (bool, optional): Enable vertical scrolling. no_saved_settings (bool, optional): Never load/save settings in .ini file. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -6768,7 +6831,6 @@ def add_tree_node(**kwargs): show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom default_open (bool, optional): Sets the tree node open by default. @@ -6780,6 +6842,7 @@ def add_tree_node(**kwargs): span_text_width (bool, optional): Makes hitbox and highlight only cover the label. span_full_width (bool, optional): Extend hit box to the left-most and right-most edges (cover the indent area). id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -6811,9 +6874,9 @@ def add_viewport_drawlist(**kwargs): tag (Union[int, str], optional): Unique id used to programmatically refer to the item.If label is unused this will be the label. show (bool, optional): Attempt to render widget. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. front (bool, optional): Draws to the front of the view port instead of the back. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -6831,8 +6894,8 @@ def add_viewport_menu_bar(**kwargs): indent (int, optional): Offsets the widget to the right the specified number multiplied by the indent style. parent (Union[int, str], optional): Parent to add this item to. (runtime adding) show (bool, optional): Attempt to render widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -6852,7 +6915,6 @@ def add_window(**kwargs): indent (int, optional): Offsets the widget to the right the specified number multiplied by the indent style. show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. min_size (Union[List[int], Tuple[int, ...]], optional): Minimum window size. max_size (Union[List[int], Tuple[int, ...]], optional): Maximum window size. menubar (bool, optional): Shows or hides the menubar. @@ -6876,6 +6938,7 @@ def add_window(**kwargs): no_scroll_with_mouse (bool, optional): Disable user vertically scrolling with mouse wheel. on_close (Callable, optional): Callback ran when window is closed. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated)This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -8598,29 +8661,31 @@ def set_viewport_resize_callback(callback, **kwargs): return internal_dpg.set_viewport_resize_callback(callback, **kwargs) -def set_x_scroll(item, value): - """ Undocumented +def set_x_scroll(item, value, **kwargs): + """ Sets horizontal scroll position. Args: item (Union[int, str]): - value (float): + value (float): Scroll position + when (int, optional): Specifies whether the scroll position will be set in the nearest frame (mvSetScrollFlags_Now) or with a 1-frame delay (mvSetScrollFlags_Delayed). The former prevents flickering, the latter works better if contents change in the same frame as when set_x_scroll called. mvSetScrollFlags_Both can also be used to set the position twice. Returns: None """ - return internal_dpg.set_x_scroll(item, value) + return internal_dpg.set_x_scroll(item, value, **kwargs) -def set_y_scroll(item, value): - """ Undocumented +def set_y_scroll(item, value, **kwargs): + """ Sets vertical scroll position. Args: item (Union[int, str]): - value (float): + value (float): Scroll position + when (int, optional): Specifies whether the scroll position will be set in the nearest frame (mvSetScrollFlags_Now) or with a 1-frame delay (mvSetScrollFlags_Delayed). The former prevents flickering, the latter works better if contents change in the same frame as when set_x_scroll called. mvSetScrollFlags_Both can also be used to set the position twice. Returns: None """ - return internal_dpg.set_y_scroll(item, value) + return internal_dpg.set_y_scroll(item, value, **kwargs) def setup_dearpygui(): """ Sets up Dear PyGui @@ -8688,16 +8753,16 @@ def show_viewport(**kwargs): return internal_dpg.show_viewport(**kwargs) -def split_frame(**kwargs): +def split_frame(): """ Waits one frame. Args: - delay (int, optional): Minimal delay in in milliseconds + delay (int, optional): (deprecated)Do not use it anymore, it has no effect. Returns: None """ - return internal_dpg.split_frame(**kwargs) + return internal_dpg.split_frame() def stop_dearpygui(): """ Stops Dear PyGui @@ -8884,6 +8949,8 @@ def unstage(item): mvKey_NumPad7=internal_dpg.mvKey_NumPad7 mvKey_NumPad8=internal_dpg.mvKey_NumPad8 mvKey_NumPad9=internal_dpg.mvKey_NumPad9 +mvKey_NumPadEnter=internal_dpg.mvKey_NumPadEnter +mvKey_NumPadEqual=internal_dpg.mvKey_NumPadEqual mvKey_Subtract=internal_dpg.mvKey_Subtract mvKey_Decimal=internal_dpg.mvKey_Decimal mvKey_Divide=internal_dpg.mvKey_Divide @@ -8981,6 +9048,19 @@ def unstage(item): mvComboHeight_Regular=internal_dpg.mvComboHeight_Regular mvComboHeight_Large=internal_dpg.mvComboHeight_Large mvComboHeight_Largest=internal_dpg.mvComboHeight_Largest +mvEventType_Off=internal_dpg.mvEventType_Off +mvEventType_Enter=internal_dpg.mvEventType_Enter +mvEventType_On=internal_dpg.mvEventType_On +mvEventType_Leave=internal_dpg.mvEventType_Leave +mvSetScrollFlags_Now=internal_dpg.mvSetScrollFlags_Now +mvSetScrollFlags_Delayed=internal_dpg.mvSetScrollFlags_Delayed +mvSetScrollFlags_Both=internal_dpg.mvSetScrollFlags_Both +mvScrollDirection_XAxis=internal_dpg.mvScrollDirection_XAxis +mvScrollDirection_YAxis=internal_dpg.mvScrollDirection_YAxis +mvScrollDirection_Horizontal=internal_dpg.mvScrollDirection_Horizontal +mvScrollDirection_Vertical=internal_dpg.mvScrollDirection_Vertical +mvLoadInd_DottedCircle=internal_dpg.mvLoadInd_DottedCircle +mvLoadInd_Ring=internal_dpg.mvLoadInd_Ring mvPlatform_Windows=internal_dpg.mvPlatform_Windows mvPlatform_Apple=internal_dpg.mvPlatform_Apple mvPlatform_Linux=internal_dpg.mvPlatform_Linux @@ -9324,6 +9404,7 @@ def unstage(item): mvTable=internal_dpg.mvTable mvTableColumn=internal_dpg.mvTableColumn mvTableRow=internal_dpg.mvTableRow +mvSyncedTables=internal_dpg.mvSyncedTables mvDrawLine=internal_dpg.mvDrawLine mvDrawArrow=internal_dpg.mvDrawArrow mvDrawTriangle=internal_dpg.mvDrawTriangle @@ -9403,6 +9484,7 @@ def unstage(item): mvToggledOpenHandler=internal_dpg.mvToggledOpenHandler mvClickedHandler=internal_dpg.mvClickedHandler mvDoubleClickedHandler=internal_dpg.mvDoubleClickedHandler +mvScrollHandler=internal_dpg.mvScrollHandler mvDragPayload=internal_dpg.mvDragPayload mvResizeHandler=internal_dpg.mvResizeHandler mvFont=internal_dpg.mvFont diff --git a/dearpygui/_deprecated.py b/dearpygui/_deprecated.py index b5d18ea1b..c6335fc48 100644 --- a/dearpygui/_deprecated.py +++ b/dearpygui/_deprecated.py @@ -410,6 +410,15 @@ def setup_registries() -> None: internal_dpg.add_value_registry(tag=internal_dpg.mvReservedUUID_3) internal_dpg.add_colormap_registry(tag=internal_dpg.mvReservedUUID_4) +@deprecated("Useless and doesn't work anyway") +def is_item_search_delayed(item: Union[int, str]) -> Union[bool, None]: + """Checks if item is search delayed. + + Returns: + tracked as a bool or None + """ + return internal_dpg.get_item_configuration(item)["delay_search"] + @deprecated("Use: `set_frame_callback()`") def set_start_callback(callback): """ deprecated function """ diff --git a/dearpygui/_header.py b/dearpygui/_header.py index 873c2c183..1a1731e23 100644 --- a/dearpygui/_header.py +++ b/dearpygui/_header.py @@ -550,15 +550,6 @@ def is_item_tracked(item: Union[int, str]) -> Union[bool, None]: return internal_dpg.get_item_configuration(item)["tracked"] -def is_item_search_delayed(item: Union[int, str]) -> Union[bool, None]: - """Checks if item is search delayed. - - Returns: - tracked as a bool or None - """ - return internal_dpg.get_item_configuration(item)["delay_search"] - - def get_item_indent(item: Union[int, str]) -> Union[int, None]: """Gets the item's indent. diff --git a/dearpygui/dearpygui.py b/dearpygui/dearpygui.py index 3fecfaa12..2699a54ad 100644 --- a/dearpygui/dearpygui.py +++ b/dearpygui/dearpygui.py @@ -566,15 +566,6 @@ def is_item_tracked(item: Union[int, str]) -> Union[bool, None]: return internal_dpg.get_item_configuration(item)["tracked"] -def is_item_search_delayed(item: Union[int, str]) -> Union[bool, None]: - """Checks if item is search delayed. - - Returns: - tracked as a bool or None - """ - return internal_dpg.get_item_configuration(item)["delay_search"] - - def get_item_indent(item: Union[int, str]) -> Union[int, None]: """Gets the item's indent. @@ -1542,6 +1533,15 @@ def setup_registries() -> None: internal_dpg.add_value_registry(tag=internal_dpg.mvReservedUUID_3) internal_dpg.add_colormap_registry(tag=internal_dpg.mvReservedUUID_4) +@deprecated("Useless and doesn't work anyway") +def is_item_search_delayed(item: Union[int, str]) -> Union[bool, None]: + """Checks if item is search delayed. + + Returns: + tracked as a bool or None + """ + return internal_dpg.get_item_configuration(item)["delay_search"] + @deprecated("Use: `set_frame_callback()`") def set_start_callback(callback): """ deprecated function """ @@ -1553,7 +1553,7 @@ def set_start_callback(callback): @contextmanager -def child_window(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, border: bool =True, autosize_x: bool =False, autosize_y: bool =False, no_scrollbar: bool =False, horizontal_scrollbar: bool =False, menubar: bool =False, no_scroll_with_mouse: bool =False, flattened_navigation: bool =True, always_use_window_padding: bool =False, resizable_x: bool =False, resizable_y: bool =False, always_auto_resize: bool =False, frame_style: bool =False, auto_resize_x: bool =False, auto_resize_y: bool =False, **kwargs) -> Union[int, str]: +def child_window(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', tracked: bool =False, track_offset: float =0.5, border: bool =True, autosize_x: bool =False, autosize_y: bool =False, no_scrollbar: bool =False, horizontal_scrollbar: bool =False, menubar: bool =False, no_scroll_with_mouse: bool =False, flattened_navigation: bool =True, always_use_window_padding: bool =False, resizable_x: bool =False, resizable_y: bool =False, always_auto_resize: bool =False, frame_style: bool =False, auto_resize_x: bool =False, auto_resize_y: bool =False, **kwargs) -> Union[int, str]: """ Adds an embedded child window. Will show scrollbars when items do not fit. About using auto_resize/resizable flags: size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing and it won't update its auto-size while clipped. While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional 'resizing after becoming visible again' glitch. You may also use always_auto_resize to force an update even when child window is not in view. However doing so will degrade performance. Remember that combining both auto_resize_x and auto_resize_y defeats purpose of a scrolling region and is NOT recommended. Args: @@ -1571,7 +1571,6 @@ def child_window(*, label: str =None, user_data: Any =None, use_internal_label: show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom border (bool, optional): Shows/Hides the border around the sides. @@ -1590,6 +1589,7 @@ def child_window(*, label: str =None, user_data: Any =None, use_internal_label: auto_resize_x (bool, optional): Enable auto-resizing width based on child content. Read 'IMPORTANT: Size measurement' details above. auto_resize_y (bool, optional): Enable auto-resizing height based on child content. Read 'IMPORTANT: Size measurement' details above. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -1598,14 +1598,17 @@ def child_window(*, label: str =None, user_data: Any =None, use_internal_label: if 'id' in kwargs.keys(): warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - widget = internal_dpg.add_child_window(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, payload_type=payload_type, drop_callback=drop_callback, show=show, pos=pos, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, border=border, autosize_x=autosize_x, autosize_y=autosize_y, no_scrollbar=no_scrollbar, horizontal_scrollbar=horizontal_scrollbar, menubar=menubar, no_scroll_with_mouse=no_scroll_with_mouse, flattened_navigation=flattened_navigation, always_use_window_padding=always_use_window_padding, resizable_x=resizable_x, resizable_y=resizable_y, always_auto_resize=always_auto_resize, frame_style=frame_style, auto_resize_x=auto_resize_x, auto_resize_y=auto_resize_y, **kwargs) + + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + widget = internal_dpg.add_child_window(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, payload_type=payload_type, drop_callback=drop_callback, show=show, pos=pos, filter_key=filter_key, tracked=tracked, track_offset=track_offset, border=border, autosize_x=autosize_x, autosize_y=autosize_y, no_scrollbar=no_scrollbar, horizontal_scrollbar=horizontal_scrollbar, menubar=menubar, no_scroll_with_mouse=no_scroll_with_mouse, flattened_navigation=flattened_navigation, always_use_window_padding=always_use_window_padding, resizable_x=resizable_x, resizable_y=resizable_y, always_auto_resize=always_auto_resize, frame_style=frame_style, auto_resize_x=auto_resize_x, auto_resize_y=auto_resize_y, **kwargs) internal_dpg.push_container_stack(widget) yield widget finally: internal_dpg.pop_container_stack() @contextmanager -def clipper(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, show: bool =True, delay_search: bool =False, **kwargs) -> Union[int, str]: +def clipper(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, show: bool =True, **kwargs) -> Union[int, str]: """ Helper to manually clip large list of items. Increases performance by not searching or drawing widgets outside of the clipped region. Args: @@ -1618,8 +1621,8 @@ def clipper(*, label: str =None, user_data: Any =None, use_internal_label: bool parent (Union[int, str], optional): Parent to add this item to. (runtime adding) before (Union[int, str], optional): This item will be displayed before the specified item in the parent. show (bool, optional): Attempt to render widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -1628,14 +1631,17 @@ def clipper(*, label: str =None, user_data: Any =None, use_internal_label: bool if 'id' in kwargs.keys(): warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - widget = internal_dpg.add_clipper(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, indent=indent, parent=parent, before=before, show=show, delay_search=delay_search, **kwargs) + + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + widget = internal_dpg.add_clipper(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, indent=indent, parent=parent, before=before, show=show, **kwargs) internal_dpg.push_container_stack(widget) yield widget finally: internal_dpg.pop_container_stack() @contextmanager -def collapsing_header(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, closable: bool =False, default_open: bool =False, open_on_double_click: bool =False, open_on_arrow: bool =False, leaf: bool =False, bullet: bool =False, **kwargs) -> Union[int, str]: +def collapsing_header(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', tracked: bool =False, track_offset: float =0.5, closable: bool =False, default_open: bool =False, open_on_double_click: bool =False, open_on_arrow: bool =False, leaf: bool =False, bullet: bool =False, **kwargs) -> Union[int, str]: """ Adds a collapsing header to add items to. Must be closed with the end command. Args: @@ -1652,7 +1658,6 @@ def collapsing_header(*, label: str =None, user_data: Any =None, use_internal_la show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom closable (bool, optional): Adds the ability to hide this widget by pressing the (x) in the top right of widget. @@ -1662,6 +1667,7 @@ def collapsing_header(*, label: str =None, user_data: Any =None, use_internal_la leaf (bool, optional): No collapsing, no arrow (use as a convenience for leaf nodes). bullet (bool, optional): Display a bullet instead of arrow. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -1670,7 +1676,10 @@ def collapsing_header(*, label: str =None, user_data: Any =None, use_internal_la if 'id' in kwargs.keys(): warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - widget = internal_dpg.add_collapsing_header(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, payload_type=payload_type, drag_callback=drag_callback, drop_callback=drop_callback, show=show, pos=pos, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, closable=closable, default_open=default_open, open_on_double_click=open_on_double_click, open_on_arrow=open_on_arrow, leaf=leaf, bullet=bullet, **kwargs) + + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + widget = internal_dpg.add_collapsing_header(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, payload_type=payload_type, drag_callback=drag_callback, drop_callback=drop_callback, show=show, pos=pos, filter_key=filter_key, tracked=tracked, track_offset=track_offset, closable=closable, default_open=default_open, open_on_double_click=open_on_double_click, open_on_arrow=open_on_arrow, leaf=leaf, bullet=bullet, **kwargs) internal_dpg.push_container_stack(widget) yield widget finally: @@ -1825,7 +1834,7 @@ def draw_node(*, label: str =None, user_data: Any =None, use_internal_label: boo internal_dpg.pop_container_stack() @contextmanager -def drawlist(width : int, height : int, *, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, before: Union[int, str] =0, callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, **kwargs) -> Union[int, str]: +def drawlist(width : int, height : int, *, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, before: Union[int, str] =0, callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', tracked: bool =False, track_offset: float =0.5, **kwargs) -> Union[int, str]: """ Adds a drawing canvas. Args: @@ -1841,10 +1850,10 @@ def drawlist(width : int, height : int, *, label: str =None, user_data: Any =Non show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -1853,7 +1862,10 @@ def drawlist(width : int, height : int, *, label: str =None, user_data: Any =Non if 'id' in kwargs.keys(): warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - widget = internal_dpg.add_drawlist(width, height, label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, before=before, callback=callback, show=show, pos=pos, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, **kwargs) + + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + widget = internal_dpg.add_drawlist(width, height, label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, before=before, callback=callback, show=show, pos=pos, filter_key=filter_key, tracked=tracked, track_offset=track_offset, **kwargs) internal_dpg.push_container_stack(widget) yield widget finally: @@ -1896,7 +1908,7 @@ def file_dialog(*, label: str =None, user_data: Any =None, use_internal_label: b internal_dpg.pop_container_stack() @contextmanager -def filter_set(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, show: bool =True, delay_search: bool =False, **kwargs) -> Union[int, str]: +def filter_set(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, show: bool =True, **kwargs) -> Union[int, str]: """ Helper to parse and apply text filters (e.g. aaaaa[, bbbbb][, ccccc]) Args: @@ -1909,8 +1921,8 @@ def filter_set(*, label: str =None, user_data: Any =None, use_internal_label: bo parent (Union[int, str], optional): Parent to add this item to. (runtime adding) before (Union[int, str], optional): This item will be displayed before the specified item in the parent. show (bool, optional): Attempt to render widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -1919,7 +1931,10 @@ def filter_set(*, label: str =None, user_data: Any =None, use_internal_label: bo if 'id' in kwargs.keys(): warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - widget = internal_dpg.add_filter_set(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, indent=indent, parent=parent, before=before, show=show, delay_search=delay_search, **kwargs) + + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + widget = internal_dpg.add_filter_set(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, indent=indent, parent=parent, before=before, show=show, **kwargs) internal_dpg.push_container_stack(widget) yield widget finally: @@ -1984,7 +1999,7 @@ def font_registry(*, label: str =None, user_data: Any =None, use_internal_label: internal_dpg.pop_container_stack() @contextmanager -def group(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, enabled: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, horizontal: bool =False, horizontal_spacing: float =-1, xoffset: float =0.0, **kwargs) -> Union[int, str]: +def group(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, enabled: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', tracked: bool =False, track_offset: float =0.5, horizontal: bool =False, horizontal_spacing: float =-1, xoffset: float =0.0, **kwargs) -> Union[int, str]: """ Creates a group that other widgets can belong to. The group allows item commands to be issued for all of its members. Enable property acts in a special way enabling/disabling everything inside the group. (Use mvStyleVar_DisabledAlpha to edit colors within the disabled group.) @@ -2005,13 +2020,13 @@ def group(*, label: str =None, user_data: Any =None, use_internal_label: bool =T enabled (bool, optional): Turns off functionality of widget and applies the disabled theme. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom horizontal (bool, optional): Forces child widgets to be added in a horizontal layout. horizontal_spacing (float, optional): Spacing for the horizontal layout. xoffset (float, optional): Offset from containing window x item location within group. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2020,7 +2035,10 @@ def group(*, label: str =None, user_data: Any =None, use_internal_label: bool =T if 'id' in kwargs.keys(): warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - widget = internal_dpg.add_group(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, payload_type=payload_type, drag_callback=drag_callback, drop_callback=drop_callback, show=show, enabled=enabled, pos=pos, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, horizontal=horizontal, horizontal_spacing=horizontal_spacing, xoffset=xoffset, **kwargs) + + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + widget = internal_dpg.add_group(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, payload_type=payload_type, drag_callback=drag_callback, drop_callback=drop_callback, show=show, enabled=enabled, pos=pos, filter_key=filter_key, tracked=tracked, track_offset=track_offset, horizontal=horizontal, horizontal_spacing=horizontal_spacing, xoffset=xoffset, **kwargs) internal_dpg.push_container_stack(widget) yield widget finally: @@ -2077,7 +2095,7 @@ def item_handler_registry(*, label: str =None, user_data: Any =None, use_interna internal_dpg.pop_container_stack() @contextmanager -def menu(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drop_callback: Callable =None, show: bool =True, enabled: bool =True, filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, **kwargs) -> Union[int, str]: +def menu(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drop_callback: Callable =None, show: bool =True, enabled: bool =True, filter_key: str ='', tracked: bool =False, track_offset: float =0.5, **kwargs) -> Union[int, str]: """ Adds a menu to an existing menu bar. Args: @@ -2093,10 +2111,10 @@ def menu(*, label: str =None, user_data: Any =None, use_internal_label: bool =Tr show (bool, optional): Attempt to render widget. enabled (bool, optional): Turns off functionality of widget and applies the disabled theme. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2105,14 +2123,17 @@ def menu(*, label: str =None, user_data: Any =None, use_internal_label: bool =Tr if 'id' in kwargs.keys(): warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - widget = internal_dpg.add_menu(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, payload_type=payload_type, drop_callback=drop_callback, show=show, enabled=enabled, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, **kwargs) + + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + widget = internal_dpg.add_menu(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, payload_type=payload_type, drop_callback=drop_callback, show=show, enabled=enabled, filter_key=filter_key, tracked=tracked, track_offset=track_offset, **kwargs) internal_dpg.push_container_stack(widget) yield widget finally: internal_dpg.pop_container_stack() @contextmanager -def menu_bar(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, show: bool =True, delay_search: bool =False, **kwargs) -> Union[int, str]: +def menu_bar(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, show: bool =True, **kwargs) -> Union[int, str]: """ Adds a menu bar to a window. Args: @@ -2123,8 +2144,8 @@ def menu_bar(*, label: str =None, user_data: Any =None, use_internal_label: bool indent (int, optional): Offsets the widget to the right the specified number multiplied by the indent style. parent (Union[int, str], optional): Parent to add this item to. (runtime adding) show (bool, optional): Attempt to render widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2133,14 +2154,17 @@ def menu_bar(*, label: str =None, user_data: Any =None, use_internal_label: bool if 'id' in kwargs.keys(): warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - widget = internal_dpg.add_menu_bar(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, show=show, delay_search=delay_search, **kwargs) + + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + widget = internal_dpg.add_menu_bar(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, show=show, **kwargs) internal_dpg.push_container_stack(widget) yield widget finally: internal_dpg.pop_container_stack() @contextmanager -def node(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, draggable: bool =True, **kwargs) -> Union[int, str]: +def node(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', tracked: bool =False, track_offset: float =0.5, draggable: bool =True, **kwargs) -> Union[int, str]: """ Adds a node to a node editor. Args: @@ -2156,11 +2180,11 @@ def node(*, label: str =None, user_data: Any =None, use_internal_label: bool =Tr show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom draggable (bool, optional): Allow node to be draggable. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2169,7 +2193,10 @@ def node(*, label: str =None, user_data: Any =None, use_internal_label: bool =Tr if 'id' in kwargs.keys(): warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - widget = internal_dpg.add_node(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, before=before, payload_type=payload_type, drag_callback=drag_callback, drop_callback=drop_callback, show=show, pos=pos, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, draggable=draggable, **kwargs) + + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + widget = internal_dpg.add_node(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, before=before, payload_type=payload_type, drag_callback=drag_callback, drop_callback=drop_callback, show=show, pos=pos, filter_key=filter_key, tracked=tracked, track_offset=track_offset, draggable=draggable, **kwargs) internal_dpg.push_container_stack(widget) yield widget finally: @@ -2210,7 +2237,7 @@ def node_attribute(*, label: str =None, user_data: Any =None, use_internal_label internal_dpg.pop_container_stack() @contextmanager -def node_editor(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, parent: Union[int, str] =0, before: Union[int, str] =0, callback: Callable =None, show: bool =True, filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, delink_callback: Callable =None, menubar: bool =False, minimap: bool =False, minimap_location: int =2, **kwargs) -> Union[int, str]: +def node_editor(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, parent: Union[int, str] =0, before: Union[int, str] =0, callback: Callable =None, show: bool =True, filter_key: str ='', tracked: bool =False, track_offset: float =0.5, delink_callback: Callable =None, menubar: bool =False, minimap: bool =False, minimap_location: int =2, **kwargs) -> Union[int, str]: """ Adds a node editor. Args: @@ -2225,7 +2252,6 @@ def node_editor(*, label: str =None, user_data: Any =None, use_internal_label: b callback (Callable, optional): Registers a callback. show (bool, optional): Attempt to render widget. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom delink_callback (Callable, optional): Callback ran when a link is detached. @@ -2233,6 +2259,7 @@ def node_editor(*, label: str =None, user_data: Any =None, use_internal_label: b minimap (bool, optional): Shows or hides the Minimap. New in 1.6. minimap_location (int, optional): mvNodeMiniMap_Location_* constants. New in 1.6. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2241,14 +2268,17 @@ def node_editor(*, label: str =None, user_data: Any =None, use_internal_label: b if 'id' in kwargs.keys(): warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - widget = internal_dpg.add_node_editor(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, parent=parent, before=before, callback=callback, show=show, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, delink_callback=delink_callback, menubar=menubar, minimap=minimap, minimap_location=minimap_location, **kwargs) + + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + widget = internal_dpg.add_node_editor(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, parent=parent, before=before, callback=callback, show=show, filter_key=filter_key, tracked=tracked, track_offset=track_offset, delink_callback=delink_callback, menubar=menubar, minimap=minimap, minimap_location=minimap_location, **kwargs) internal_dpg.push_container_stack(widget) yield widget finally: internal_dpg.pop_container_stack() @contextmanager -def plot(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', callback: Callable =None, drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, no_title: bool =False, no_menus: bool =False, no_box_select: bool =False, no_mouse_pos: bool =False, query: bool =False, query_color: Union[List[float], Tuple[float, ...]] =(0, 255, 0, 255), min_query_rects: int =1, max_query_rects: int =1, crosshairs: bool =False, equal_aspects: bool =False, no_inputs: bool =False, no_frame: bool =False, use_local_time: bool =False, use_ISO8601: bool =False, use_24hour_clock: bool =False, pan_button: int =internal_dpg.mvMouseButton_Left, pan_mod: int =internal_dpg.mvKey_None, context_menu_button: int =internal_dpg.mvMouseButton_Right, fit_button: int =internal_dpg.mvMouseButton_Left, box_select_button: int =internal_dpg.mvMouseButton_Right, box_select_mod: int =internal_dpg.mvKey_None, box_select_cancel_button: int =internal_dpg.mvMouseButton_Left, query_toggle_mod: int =internal_dpg.mvKey_ModCtrl, horizontal_mod: int =internal_dpg.mvKey_ModAlt, vertical_mod: int =internal_dpg.mvKey_ModShift, override_mod: int =internal_dpg.mvKey_ModCtrl, zoom_mod: int =internal_dpg.mvKey_None, zoom_rate: int =0.1, **kwargs) -> Union[int, str]: +def plot(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', callback: Callable =None, drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', tracked: bool =False, track_offset: float =0.5, no_title: bool =False, no_menus: bool =False, no_box_select: bool =False, no_mouse_pos: bool =False, query: bool =False, query_color: Union[List[float], Tuple[float, ...]] =(0, 255, 0, 255), min_query_rects: int =1, max_query_rects: int =1, crosshairs: bool =False, equal_aspects: bool =False, no_inputs: bool =False, no_frame: bool =False, use_local_time: bool =False, use_ISO8601: bool =False, use_24hour_clock: bool =False, pan_button: int =internal_dpg.mvMouseButton_Left, pan_mod: int =internal_dpg.mvKey_None, context_menu_button: int =internal_dpg.mvMouseButton_Right, fit_button: int =internal_dpg.mvMouseButton_Left, box_select_button: int =internal_dpg.mvMouseButton_Right, box_select_mod: int =internal_dpg.mvKey_None, box_select_cancel_button: int =internal_dpg.mvMouseButton_Left, query_toggle_mod: int =internal_dpg.mvKey_ModCtrl, horizontal_mod: int =internal_dpg.mvKey_ModAlt, vertical_mod: int =internal_dpg.mvKey_ModShift, override_mod: int =internal_dpg.mvKey_ModCtrl, zoom_mod: int =internal_dpg.mvKey_None, zoom_rate: int =0.1, **kwargs) -> Union[int, str]: """ 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. Args: @@ -2268,7 +2298,6 @@ def plot(*, label: str =None, user_data: Any =None, use_internal_label: bool =Tr show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom no_title (bool, optional): the plot title will not be displayed @@ -2300,6 +2329,7 @@ def plot(*, label: str =None, user_data: Any =None, use_internal_label: bool =Tr zoom_mod (int, optional): optional modifier that must be held for scroll wheel zooming zoom_rate (int, optional): zoom rate for scroll (e.g. 0.1f = 10% plot range every scroll click); make negative to invert id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. no_highlight (bool, optional): (deprecated) Removed because not supported from the backend anymore. To control the highlighting of series use the same argument in `add_plot_legend` no_child (bool, optional): (deprecated) a child window region will not be used to capture mouse scroll (can boost performance for single ImGui window applications) anti_aliased (bool, optional): (deprecated) This feature was deprecated in ImPlot. To enable/disable anti_aliasing use `dpg.configure_app()` with the `anti_aliasing` parameters. @@ -2314,6 +2344,9 @@ def plot(*, label: str =None, user_data: Any =None, use_internal_label: bool =Tr warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + if 'no_highlight' in kwargs.keys(): warnings.warn('no_highlight keyword removed', DeprecationWarning, 2) kwargs.pop('no_highlight', None) @@ -2333,7 +2366,7 @@ def plot(*, label: str =None, user_data: Any =None, use_internal_label: bool =Tr if 'query_mod' in kwargs.keys(): warnings.warn('query_mod keyword removed', DeprecationWarning, 2) kwargs.pop('query_mod', None) - widget = internal_dpg.add_plot(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, payload_type=payload_type, callback=callback, drag_callback=drag_callback, drop_callback=drop_callback, show=show, pos=pos, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, no_title=no_title, no_menus=no_menus, no_box_select=no_box_select, no_mouse_pos=no_mouse_pos, query=query, query_color=query_color, min_query_rects=min_query_rects, max_query_rects=max_query_rects, crosshairs=crosshairs, equal_aspects=equal_aspects, no_inputs=no_inputs, no_frame=no_frame, use_local_time=use_local_time, use_ISO8601=use_ISO8601, use_24hour_clock=use_24hour_clock, pan_button=pan_button, pan_mod=pan_mod, context_menu_button=context_menu_button, fit_button=fit_button, box_select_button=box_select_button, box_select_mod=box_select_mod, box_select_cancel_button=box_select_cancel_button, query_toggle_mod=query_toggle_mod, horizontal_mod=horizontal_mod, vertical_mod=vertical_mod, override_mod=override_mod, zoom_mod=zoom_mod, zoom_rate=zoom_rate, **kwargs) + widget = internal_dpg.add_plot(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, payload_type=payload_type, callback=callback, drag_callback=drag_callback, drop_callback=drop_callback, show=show, pos=pos, filter_key=filter_key, tracked=tracked, track_offset=track_offset, no_title=no_title, no_menus=no_menus, no_box_select=no_box_select, no_mouse_pos=no_mouse_pos, query=query, query_color=query_color, min_query_rects=min_query_rects, max_query_rects=max_query_rects, crosshairs=crosshairs, equal_aspects=equal_aspects, no_inputs=no_inputs, no_frame=no_frame, use_local_time=use_local_time, use_ISO8601=use_ISO8601, use_24hour_clock=use_24hour_clock, pan_button=pan_button, pan_mod=pan_mod, context_menu_button=context_menu_button, fit_button=fit_button, box_select_button=box_select_button, box_select_mod=box_select_mod, box_select_cancel_button=box_select_cancel_button, query_toggle_mod=query_toggle_mod, horizontal_mod=horizontal_mod, vertical_mod=vertical_mod, override_mod=override_mod, zoom_mod=zoom_mod, zoom_rate=zoom_rate, **kwargs) internal_dpg.push_container_stack(widget) yield widget finally: @@ -2419,7 +2452,7 @@ def stage(*, label: str =None, user_data: Any =None, use_internal_label: bool =T internal_dpg.pop_container_stack() @contextmanager -def subplots(rows : int, columns : int, *, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, row_ratios: Union[List[float], Tuple[float, ...]] =[], column_ratios: Union[List[float], Tuple[float, ...]] =[], no_title: bool =False, no_menus: bool =False, no_resize: bool =False, no_align: bool =False, share_series: bool =False, link_rows: bool =False, link_columns: bool =False, link_all_x: bool =False, link_all_y: bool =False, column_major: bool =False, **kwargs) -> Union[int, str]: +def subplots(rows : int, columns : int, *, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', tracked: bool =False, track_offset: float =0.5, row_ratios: Union[List[float], Tuple[float, ...]] =[], column_ratios: Union[List[float], Tuple[float, ...]] =[], no_title: bool =False, no_menus: bool =False, no_resize: bool =False, no_align: bool =False, share_series: bool =False, link_rows: bool =False, link_columns: bool =False, link_all_x: bool =False, link_all_y: bool =False, column_major: bool =False, **kwargs) -> Union[int, str]: """ Adds a collection of plots. Args: @@ -2438,7 +2471,6 @@ def subplots(rows : int, columns : int, *, label: str =None, user_data: Any =Non show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom row_ratios (Union[List[float], Tuple[float, ...]], optional): @@ -2454,6 +2486,7 @@ def subplots(rows : int, columns : int, *, label: str =None, user_data: Any =Non link_all_y (bool, optional): link the y-axis limits in every plot in the subplot (does not apply to auxiliary y-axes) column_major (bool, optional): subplots are added in column major order instead of the default row major order id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2462,7 +2495,38 @@ def subplots(rows : int, columns : int, *, label: str =None, user_data: Any =Non if 'id' in kwargs.keys(): warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - widget = internal_dpg.add_subplots(rows, columns, label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, callback=callback, show=show, pos=pos, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, row_ratios=row_ratios, column_ratios=column_ratios, no_title=no_title, no_menus=no_menus, no_resize=no_resize, no_align=no_align, share_series=share_series, link_rows=link_rows, link_columns=link_columns, link_all_x=link_all_x, link_all_y=link_all_y, column_major=column_major, **kwargs) + + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + widget = internal_dpg.add_subplots(rows, columns, label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, callback=callback, show=show, pos=pos, filter_key=filter_key, tracked=tracked, track_offset=track_offset, row_ratios=row_ratios, column_ratios=column_ratios, no_title=no_title, no_menus=no_menus, no_resize=no_resize, no_align=no_align, share_series=share_series, link_rows=link_rows, link_columns=link_columns, link_all_x=link_all_x, link_all_y=link_all_y, column_major=column_major, **kwargs) + internal_dpg.push_container_stack(widget) + yield widget + finally: + internal_dpg.pop_container_stack() + +@contextmanager +def synced_tables(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, before: Union[int, str] =0, show: bool =True, filter_key: str ='', **kwargs) -> Union[int, str]: + """ Links all tables that are immediate children of this container so that they share their state (mostly column sizes). Other children are rendered as is. This is an experimental feature, use with caution. + + Args: + label (str, optional): Overrides 'name' as label. + user_data (Any, optional): User data for callbacks + use_internal_label (bool, optional): Use generated internal label instead of user specified (appends ### uuid). + tag (Union[int, str], optional): Unique id used to programmatically refer to the item.If label is unused this will be the label. + parent (Union[int, str], optional): Parent to add this item to. (runtime adding) + before (Union[int, str], optional): This item will be displayed before the specified item in the parent. + show (bool, optional): Attempt to render widget. + filter_key (str, optional): Used by filter widget. + id (Union[int, str], optional): (deprecated) + Yields: + Union[int, str] + """ + try: + + if 'id' in kwargs.keys(): + warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) + tag=kwargs['id'] + widget = internal_dpg.add_synced_tables(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, before=before, show=show, filter_key=filter_key, **kwargs) internal_dpg.push_container_stack(widget) yield widget finally: @@ -2484,13 +2548,13 @@ def tab(*, label: str =None, user_data: Any =None, use_internal_label: bool =Tru drop_callback (Callable, optional): Registers a drop callback for drag and drop. show (bool, optional): Attempt to render widget. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom closable (bool, optional): Creates a button on the tab that can hide the tab. no_tooltip (bool, optional): Disable tooltip for the given tab. order_mode (int, optional): set using a constant: mvTabOrder_Reorderable: allows reordering, mvTabOrder_Fixed: fixed ordering, mvTabOrder_Leading: adds tab to front, mvTabOrder_Trailing: adds tab to back id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2499,14 +2563,17 @@ def tab(*, label: str =None, user_data: Any =None, use_internal_label: bool =Tru if 'id' in kwargs.keys(): warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - widget = internal_dpg.add_tab(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, payload_type=payload_type, drop_callback=drop_callback, show=show, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, closable=closable, no_tooltip=no_tooltip, order_mode=order_mode, **kwargs) + + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + widget = internal_dpg.add_tab(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, payload_type=payload_type, drop_callback=drop_callback, show=show, filter_key=filter_key, tracked=tracked, track_offset=track_offset, closable=closable, no_tooltip=no_tooltip, order_mode=order_mode, **kwargs) internal_dpg.push_container_stack(widget) yield widget finally: internal_dpg.pop_container_stack() @contextmanager -def tab_bar(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, reorderable: bool =False, **kwargs) -> Union[int, str]: +def tab_bar(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', tracked: bool =False, track_offset: float =0.5, reorderable: bool =False, **kwargs) -> Union[int, str]: """ Adds a tab bar. Args: @@ -2521,11 +2588,11 @@ def tab_bar(*, label: str =None, user_data: Any =None, use_internal_label: bool show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom reorderable (bool, optional): Allows for the user to change the order of the tabs. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2534,14 +2601,17 @@ def tab_bar(*, label: str =None, user_data: Any =None, use_internal_label: bool if 'id' in kwargs.keys(): warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - widget = internal_dpg.add_tab_bar(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, callback=callback, show=show, pos=pos, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, reorderable=reorderable, **kwargs) + + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + widget = internal_dpg.add_tab_bar(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, callback=callback, show=show, pos=pos, filter_key=filter_key, tracked=tracked, track_offset=track_offset, reorderable=reorderable, **kwargs) internal_dpg.push_container_stack(widget) yield widget finally: internal_dpg.pop_container_stack() @contextmanager -def table(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, source: Union[int, str] =0, callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', delay_search: bool =False, header_row: bool =True, clipper: bool =False, inner_width: int =0, policy: int =0, freeze_rows: int =0, freeze_columns: int =0, sort_multi: bool =False, sort_tristate: bool =False, resizable: bool =False, reorderable: bool =False, hideable: bool =False, sortable: bool =False, context_menu_in_body: bool =False, row_background: bool =False, borders_innerH: bool =False, borders_outerH: bool =False, borders_innerV: bool =False, borders_outerV: bool =False, no_host_extendX: bool =False, no_host_extendY: bool =False, no_keep_columns_visible: bool =False, precise_widths: bool =False, no_clip: bool =False, pad_outerX: bool =False, no_pad_outerX: bool =False, no_pad_innerX: bool =False, scrollX: bool =False, scrollY: bool =False, no_saved_settings: bool =False, **kwargs) -> Union[int, str]: +def table(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, source: Union[int, str] =0, callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', header_row: bool =True, clipper: bool =False, inner_width: int =0, policy: int =0, freeze_rows: int =0, freeze_columns: int =0, sort_multi: bool =False, sort_tristate: bool =False, resizable: bool =False, reorderable: bool =False, hideable: bool =False, sortable: bool =False, context_menu_in_body: bool =False, row_background: bool =False, borders_innerH: bool =False, borders_outerH: bool =False, borders_innerV: bool =False, borders_outerV: bool =False, no_host_extendX: bool =False, no_host_extendY: bool =False, no_keep_columns_visible: bool =False, precise_widths: bool =False, no_clip: bool =False, pad_outerX: bool =False, no_pad_outerX: bool =False, no_pad_innerX: bool =False, scrollX: bool =False, scrollY: bool =False, no_saved_settings: bool =False, **kwargs) -> Union[int, str]: """ Adds a table. Args: @@ -2559,7 +2629,6 @@ def table(*, label: str =None, user_data: Any =None, use_internal_label: bool =T show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. header_row (bool, optional): show headers at the top of the columns clipper (bool, optional): Use clipper (rows must be same height). inner_width (int, optional): @@ -2590,6 +2659,7 @@ def table(*, label: str =None, user_data: Any =None, use_internal_label: bool =T scrollY (bool, optional): Enable vertical scrolling. no_saved_settings (bool, optional): Never load/save settings in .ini file. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2598,7 +2668,10 @@ def table(*, label: str =None, user_data: Any =None, use_internal_label: bool =T if 'id' in kwargs.keys(): warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - widget = internal_dpg.add_table(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, source=source, callback=callback, show=show, pos=pos, filter_key=filter_key, delay_search=delay_search, header_row=header_row, clipper=clipper, inner_width=inner_width, policy=policy, freeze_rows=freeze_rows, freeze_columns=freeze_columns, sort_multi=sort_multi, sort_tristate=sort_tristate, resizable=resizable, reorderable=reorderable, hideable=hideable, sortable=sortable, context_menu_in_body=context_menu_in_body, row_background=row_background, borders_innerH=borders_innerH, borders_outerH=borders_outerH, borders_innerV=borders_innerV, borders_outerV=borders_outerV, no_host_extendX=no_host_extendX, no_host_extendY=no_host_extendY, no_keep_columns_visible=no_keep_columns_visible, precise_widths=precise_widths, no_clip=no_clip, pad_outerX=pad_outerX, no_pad_outerX=no_pad_outerX, no_pad_innerX=no_pad_innerX, scrollX=scrollX, scrollY=scrollY, no_saved_settings=no_saved_settings, **kwargs) + + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + widget = internal_dpg.add_table(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, source=source, callback=callback, show=show, pos=pos, filter_key=filter_key, header_row=header_row, clipper=clipper, inner_width=inner_width, policy=policy, freeze_rows=freeze_rows, freeze_columns=freeze_columns, sort_multi=sort_multi, sort_tristate=sort_tristate, resizable=resizable, reorderable=reorderable, hideable=hideable, sortable=sortable, context_menu_in_body=context_menu_in_body, row_background=row_background, borders_innerH=borders_innerH, borders_outerH=borders_outerH, borders_innerV=borders_innerV, borders_outerV=borders_outerV, no_host_extendX=no_host_extendX, no_host_extendY=no_host_extendY, no_keep_columns_visible=no_keep_columns_visible, precise_widths=precise_widths, no_clip=no_clip, pad_outerX=pad_outerX, no_pad_outerX=no_pad_outerX, no_pad_innerX=no_pad_innerX, scrollX=scrollX, scrollY=scrollY, no_saved_settings=no_saved_settings, **kwargs) internal_dpg.push_container_stack(widget) yield widget finally: @@ -2797,7 +2870,7 @@ def tooltip(parent : Union[int, str], *, label: str =None, user_data: Any =None, internal_dpg.pop_container_stack() @contextmanager -def tree_node(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, default_open: bool =False, open_on_double_click: bool =False, open_on_arrow: bool =False, leaf: bool =False, bullet: bool =False, selectable: bool =False, span_text_width: bool =False, span_full_width: bool =False, **kwargs) -> Union[int, str]: +def tree_node(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', tracked: bool =False, track_offset: float =0.5, default_open: bool =False, open_on_double_click: bool =False, open_on_arrow: bool =False, leaf: bool =False, bullet: bool =False, selectable: bool =False, span_text_width: bool =False, span_full_width: bool =False, **kwargs) -> Union[int, str]: """ Adds a tree node to add items to. Args: @@ -2814,7 +2887,6 @@ def tree_node(*, label: str =None, user_data: Any =None, use_internal_label: boo show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom default_open (bool, optional): Sets the tree node open by default. @@ -2826,6 +2898,7 @@ def tree_node(*, label: str =None, user_data: Any =None, use_internal_label: boo span_text_width (bool, optional): Makes hitbox and highlight only cover the label. span_full_width (bool, optional): Extend hit box to the left-most and right-most edges (cover the indent area). id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2834,7 +2907,10 @@ def tree_node(*, label: str =None, user_data: Any =None, use_internal_label: boo if 'id' in kwargs.keys(): warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - widget = internal_dpg.add_tree_node(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, payload_type=payload_type, drag_callback=drag_callback, drop_callback=drop_callback, show=show, pos=pos, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, default_open=default_open, open_on_double_click=open_on_double_click, open_on_arrow=open_on_arrow, leaf=leaf, bullet=bullet, selectable=selectable, span_text_width=span_text_width, span_full_width=span_full_width, **kwargs) + + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + widget = internal_dpg.add_tree_node(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, payload_type=payload_type, drag_callback=drag_callback, drop_callback=drop_callback, show=show, pos=pos, filter_key=filter_key, tracked=tracked, track_offset=track_offset, default_open=default_open, open_on_double_click=open_on_double_click, open_on_arrow=open_on_arrow, leaf=leaf, bullet=bullet, selectable=selectable, span_text_width=span_text_width, span_full_width=span_full_width, **kwargs) internal_dpg.push_container_stack(widget) yield widget finally: @@ -2865,7 +2941,7 @@ def value_registry(*, label: str =None, user_data: Any =None, use_internal_label internal_dpg.pop_container_stack() @contextmanager -def viewport_drawlist(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, show: bool =True, filter_key: str ='', delay_search: bool =False, front: bool =True, **kwargs) -> Union[int, str]: +def viewport_drawlist(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, show: bool =True, filter_key: str ='', front: bool =True, **kwargs) -> Union[int, str]: """ A container that is used to present draw items or layers directly to the viewport. By default this will draw to the back of the viewport. Layers and draw items should be added to this widget as children. Args: @@ -2875,9 +2951,9 @@ def viewport_drawlist(*, label: str =None, user_data: Any =None, use_internal_la tag (Union[int, str], optional): Unique id used to programmatically refer to the item.If label is unused this will be the label. show (bool, optional): Attempt to render widget. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. front (bool, optional): Draws to the front of the view port instead of the back. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2886,14 +2962,17 @@ def viewport_drawlist(*, label: str =None, user_data: Any =None, use_internal_la if 'id' in kwargs.keys(): warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - widget = internal_dpg.add_viewport_drawlist(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, show=show, filter_key=filter_key, delay_search=delay_search, front=front, **kwargs) + + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + widget = internal_dpg.add_viewport_drawlist(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, show=show, filter_key=filter_key, front=front, **kwargs) internal_dpg.push_container_stack(widget) yield widget finally: internal_dpg.pop_container_stack() @contextmanager -def viewport_menu_bar(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, show: bool =True, delay_search: bool =False, **kwargs) -> Union[int, str]: +def viewport_menu_bar(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, show: bool =True, **kwargs) -> Union[int, str]: """ Adds a menubar to the viewport. Args: @@ -2904,8 +2983,8 @@ def viewport_menu_bar(*, label: str =None, user_data: Any =None, use_internal_la indent (int, optional): Offsets the widget to the right the specified number multiplied by the indent style. parent (Union[int, str], optional): Parent to add this item to. (runtime adding) show (bool, optional): Attempt to render widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2914,14 +2993,17 @@ def viewport_menu_bar(*, label: str =None, user_data: Any =None, use_internal_la if 'id' in kwargs.keys(): warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - widget = internal_dpg.add_viewport_menu_bar(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, show=show, delay_search=delay_search, **kwargs) + + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + widget = internal_dpg.add_viewport_menu_bar(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, show=show, **kwargs) internal_dpg.push_container_stack(widget) yield widget finally: internal_dpg.pop_container_stack() @contextmanager -def window(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], delay_search: bool =False, min_size: Union[List[int], Tuple[int, ...]] =[100, 100], max_size: Union[List[int], Tuple[int, ...]] =[30000, 30000], menubar: bool =False, collapsed: bool =False, autosize: bool =False, no_resize: bool =False, unsaved_document: bool =False, no_title_bar: bool =False, no_move: bool =False, no_scrollbar: bool =False, no_collapse: bool =False, horizontal_scrollbar: bool =False, no_focus_on_appearing: bool =False, no_bring_to_front_on_focus: bool =False, no_close: bool =False, no_background: bool =False, modal: bool =False, popup: bool =False, no_saved_settings: bool =False, no_open_over_existing_popup: bool =True, no_scroll_with_mouse: bool =False, on_close: Callable =None, **kwargs) -> Union[int, str]: +def window(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], min_size: Union[List[int], Tuple[int, ...]] =[100, 100], max_size: Union[List[int], Tuple[int, ...]] =[30000, 30000], menubar: bool =False, collapsed: bool =False, autosize: bool =False, no_resize: bool =False, unsaved_document: bool =False, no_title_bar: bool =False, no_move: bool =False, no_scrollbar: bool =False, no_collapse: bool =False, horizontal_scrollbar: bool =False, no_focus_on_appearing: bool =False, no_bring_to_front_on_focus: bool =False, no_close: bool =False, no_background: bool =False, modal: bool =False, popup: bool =False, no_saved_settings: bool =False, no_open_over_existing_popup: bool =True, no_scroll_with_mouse: bool =False, on_close: Callable =None, **kwargs) -> Union[int, str]: """ Creates a new window for following items to be added to. Args: @@ -2934,7 +3016,6 @@ def window(*, label: str =None, user_data: Any =None, use_internal_label: bool = indent (int, optional): Offsets the widget to the right the specified number multiplied by the indent style. show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. min_size (Union[List[int], Tuple[int, ...]], optional): Minimum window size. max_size (Union[List[int], Tuple[int, ...]], optional): Maximum window size. menubar (bool, optional): Shows or hides the menubar. @@ -2958,6 +3039,7 @@ def window(*, label: str =None, user_data: Any =None, use_internal_label: bool = no_scroll_with_mouse (bool, optional): Disable user vertically scrolling with mouse wheel. on_close (Callable, optional): Callback ran when window is closed. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Yields: Union[int, str] """ @@ -2966,7 +3048,10 @@ def window(*, label: str =None, user_data: Any =None, use_internal_label: bool = if 'id' in kwargs.keys(): warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - widget = internal_dpg.add_window(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, show=show, pos=pos, delay_search=delay_search, min_size=min_size, max_size=max_size, menubar=menubar, collapsed=collapsed, autosize=autosize, no_resize=no_resize, unsaved_document=unsaved_document, no_title_bar=no_title_bar, no_move=no_move, no_scrollbar=no_scrollbar, no_collapse=no_collapse, horizontal_scrollbar=horizontal_scrollbar, no_focus_on_appearing=no_focus_on_appearing, no_bring_to_front_on_focus=no_bring_to_front_on_focus, no_close=no_close, no_background=no_background, modal=modal, popup=popup, no_saved_settings=no_saved_settings, no_open_over_existing_popup=no_open_over_existing_popup, no_scroll_with_mouse=no_scroll_with_mouse, on_close=on_close, **kwargs) + + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + widget = internal_dpg.add_window(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, show=show, pos=pos, min_size=min_size, max_size=max_size, menubar=menubar, collapsed=collapsed, autosize=autosize, no_resize=no_resize, unsaved_document=unsaved_document, no_title_bar=no_title_bar, no_move=no_move, no_scrollbar=no_scrollbar, no_collapse=no_collapse, horizontal_scrollbar=horizontal_scrollbar, no_focus_on_appearing=no_focus_on_appearing, no_bring_to_front_on_focus=no_bring_to_front_on_focus, no_close=no_close, no_background=no_background, modal=modal, popup=popup, no_saved_settings=no_saved_settings, no_open_over_existing_popup=no_open_over_existing_popup, no_scroll_with_mouse=no_scroll_with_mouse, on_close=on_close, **kwargs) internal_dpg.push_container_stack(widget) yield widget finally: @@ -3323,7 +3408,7 @@ def add_checkbox(*, label: str =None, user_data: Any =None, use_internal_label: return internal_dpg.add_checkbox(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, source=source, payload_type=payload_type, callback=callback, drag_callback=drag_callback, drop_callback=drop_callback, show=show, enabled=enabled, pos=pos, filter_key=filter_key, tracked=tracked, track_offset=track_offset, default_value=default_value, **kwargs) -def add_child_window(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, border: bool =True, autosize_x: bool =False, autosize_y: bool =False, no_scrollbar: bool =False, horizontal_scrollbar: bool =False, menubar: bool =False, no_scroll_with_mouse: bool =False, flattened_navigation: bool =True, always_use_window_padding: bool =False, resizable_x: bool =False, resizable_y: bool =False, always_auto_resize: bool =False, frame_style: bool =False, auto_resize_x: bool =False, auto_resize_y: bool =False, **kwargs) -> Union[int, str]: +def add_child_window(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', tracked: bool =False, track_offset: float =0.5, border: bool =True, autosize_x: bool =False, autosize_y: bool =False, no_scrollbar: bool =False, horizontal_scrollbar: bool =False, menubar: bool =False, no_scroll_with_mouse: bool =False, flattened_navigation: bool =True, always_use_window_padding: bool =False, resizable_x: bool =False, resizable_y: bool =False, always_auto_resize: bool =False, frame_style: bool =False, auto_resize_x: bool =False, auto_resize_y: bool =False, **kwargs) -> Union[int, str]: """ Adds an embedded child window. Will show scrollbars when items do not fit. About using auto_resize/resizable flags: size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing and it won't update its auto-size while clipped. While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional 'resizing after becoming visible again' glitch. You may also use always_auto_resize to force an update even when child window is not in view. However doing so will degrade performance. Remember that combining both auto_resize_x and auto_resize_y defeats purpose of a scrolling region and is NOT recommended. Args: @@ -3341,7 +3426,6 @@ def add_child_window(*, label: str =None, user_data: Any =None, use_internal_lab show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom border (bool, optional): Shows/Hides the border around the sides. @@ -3360,6 +3444,7 @@ def add_child_window(*, label: str =None, user_data: Any =None, use_internal_lab auto_resize_x (bool, optional): Enable auto-resizing width based on child content. Read 'IMPORTANT: Size measurement' details above. auto_resize_y (bool, optional): Enable auto-resizing height based on child content. Read 'IMPORTANT: Size measurement' details above. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -3368,9 +3453,12 @@ def add_child_window(*, label: str =None, user_data: Any =None, use_internal_lab warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - return internal_dpg.add_child_window(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, payload_type=payload_type, drop_callback=drop_callback, show=show, pos=pos, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, border=border, autosize_x=autosize_x, autosize_y=autosize_y, no_scrollbar=no_scrollbar, horizontal_scrollbar=horizontal_scrollbar, menubar=menubar, no_scroll_with_mouse=no_scroll_with_mouse, flattened_navigation=flattened_navigation, always_use_window_padding=always_use_window_padding, resizable_x=resizable_x, resizable_y=resizable_y, always_auto_resize=always_auto_resize, frame_style=frame_style, auto_resize_x=auto_resize_x, auto_resize_y=auto_resize_y, **kwargs) + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + + return internal_dpg.add_child_window(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, payload_type=payload_type, drop_callback=drop_callback, show=show, pos=pos, filter_key=filter_key, tracked=tracked, track_offset=track_offset, border=border, autosize_x=autosize_x, autosize_y=autosize_y, no_scrollbar=no_scrollbar, horizontal_scrollbar=horizontal_scrollbar, menubar=menubar, no_scroll_with_mouse=no_scroll_with_mouse, flattened_navigation=flattened_navigation, always_use_window_padding=always_use_window_padding, resizable_x=resizable_x, resizable_y=resizable_y, always_auto_resize=always_auto_resize, frame_style=frame_style, auto_resize_x=auto_resize_x, auto_resize_y=auto_resize_y, **kwargs) -def add_clipper(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, show: bool =True, delay_search: bool =False, **kwargs) -> Union[int, str]: +def add_clipper(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, show: bool =True, **kwargs) -> Union[int, str]: """ Helper to manually clip large list of items. Increases performance by not searching or drawing widgets outside of the clipped region. Args: @@ -3383,8 +3471,8 @@ def add_clipper(*, label: str =None, user_data: Any =None, use_internal_label: b parent (Union[int, str], optional): Parent to add this item to. (runtime adding) before (Union[int, str], optional): This item will be displayed before the specified item in the parent. show (bool, optional): Attempt to render widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -3393,9 +3481,12 @@ def add_clipper(*, label: str =None, user_data: Any =None, use_internal_label: b warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - return internal_dpg.add_clipper(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, indent=indent, parent=parent, before=before, show=show, delay_search=delay_search, **kwargs) + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) -def add_collapsing_header(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, closable: bool =False, default_open: bool =False, open_on_double_click: bool =False, open_on_arrow: bool =False, leaf: bool =False, bullet: bool =False, **kwargs) -> Union[int, str]: + return internal_dpg.add_clipper(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, indent=indent, parent=parent, before=before, show=show, **kwargs) + +def add_collapsing_header(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', tracked: bool =False, track_offset: float =0.5, closable: bool =False, default_open: bool =False, open_on_double_click: bool =False, open_on_arrow: bool =False, leaf: bool =False, bullet: bool =False, **kwargs) -> Union[int, str]: """ Adds a collapsing header to add items to. Must be closed with the end command. Args: @@ -3412,7 +3503,6 @@ def add_collapsing_header(*, label: str =None, user_data: Any =None, use_interna show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom closable (bool, optional): Adds the ability to hide this widget by pressing the (x) in the top right of widget. @@ -3422,6 +3512,7 @@ def add_collapsing_header(*, label: str =None, user_data: Any =None, use_interna leaf (bool, optional): No collapsing, no arrow (use as a convenience for leaf nodes). bullet (bool, optional): Display a bullet instead of arrow. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -3430,7 +3521,10 @@ def add_collapsing_header(*, label: str =None, user_data: Any =None, use_interna warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - return internal_dpg.add_collapsing_header(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, payload_type=payload_type, drag_callback=drag_callback, drop_callback=drop_callback, show=show, pos=pos, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, closable=closable, default_open=default_open, open_on_double_click=open_on_double_click, open_on_arrow=open_on_arrow, leaf=leaf, bullet=bullet, **kwargs) + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + + return internal_dpg.add_collapsing_header(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, payload_type=payload_type, drag_callback=drag_callback, drop_callback=drop_callback, show=show, pos=pos, filter_key=filter_key, tracked=tracked, track_offset=track_offset, closable=closable, default_open=default_open, open_on_double_click=open_on_double_click, open_on_arrow=open_on_arrow, leaf=leaf, bullet=bullet, **kwargs) def add_color_button(default_value : Union[List[int], Tuple[int, ...]] =(0, 0, 0, 255), *, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', callback: Callable =None, drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, enabled: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', tracked: bool =False, track_offset: float =0.5, no_alpha: bool =False, no_border: bool =False, no_drag_drop: bool =False, **kwargs) -> Union[int, str]: """ Adds a color button. @@ -3825,7 +3919,7 @@ def add_custom_series(x : Union[List[float], Tuple[float, ...]], y : Union[List[ return internal_dpg.add_custom_series(x, y, channel_count, label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, before=before, source=source, callback=callback, show=show, y1=y1, y2=y2, y3=y3, tooltip=tooltip, no_fit=no_fit, **kwargs) def add_date_picker(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', callback: Callable =None, drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', tracked: bool =False, track_offset: float =0.5, default_value: dict ={'month_day': 14, 'year':20, 'month':5}, level: int =0, **kwargs) -> Union[int, str]: - """ Adds a data picker. + """ Adds a date picker. Args: label (str, optional): Overrides 'name' as label. @@ -4343,7 +4437,7 @@ def add_draw_node(*, label: str =None, user_data: Any =None, use_internal_label: return internal_dpg.add_draw_node(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, before=before, show=show, **kwargs) -def add_drawlist(width : int, height : int, *, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, before: Union[int, str] =0, callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, **kwargs) -> Union[int, str]: +def add_drawlist(width : int, height : int, *, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, before: Union[int, str] =0, callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', tracked: bool =False, track_offset: float =0.5, **kwargs) -> Union[int, str]: """ Adds a drawing canvas. Args: @@ -4359,10 +4453,10 @@ def add_drawlist(width : int, height : int, *, label: str =None, user_data: Any show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -4371,7 +4465,10 @@ def add_drawlist(width : int, height : int, *, label: str =None, user_data: Any warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - return internal_dpg.add_drawlist(width, height, label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, before=before, callback=callback, show=show, pos=pos, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, **kwargs) + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + + return internal_dpg.add_drawlist(width, height, label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, before=before, callback=callback, show=show, pos=pos, filter_key=filter_key, tracked=tracked, track_offset=track_offset, **kwargs) def add_dynamic_texture(width : int, height : int, default_value : Union[List[float], Tuple[float, ...]], *, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =internal_dpg.mvReservedUUID_2, **kwargs) -> Union[int, str]: """ Adds a dynamic texture. @@ -4482,7 +4579,7 @@ def add_file_extension(extension : str, *, label: str =None, user_data: Any =Non return internal_dpg.add_file_extension(extension, label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, parent=parent, before=before, custom_text=custom_text, color=color, **kwargs) -def add_filter_set(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, show: bool =True, delay_search: bool =False, **kwargs) -> Union[int, str]: +def add_filter_set(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, show: bool =True, **kwargs) -> Union[int, str]: """ Helper to parse and apply text filters (e.g. aaaaa[, bbbbb][, ccccc]) Args: @@ -4495,8 +4592,8 @@ def add_filter_set(*, label: str =None, user_data: Any =None, use_internal_label parent (Union[int, str], optional): Parent to add this item to. (runtime adding) before (Union[int, str], optional): This item will be displayed before the specified item in the parent. show (bool, optional): Attempt to render widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -4505,7 +4602,10 @@ def add_filter_set(*, label: str =None, user_data: Any =None, use_internal_label warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - return internal_dpg.add_filter_set(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, indent=indent, parent=parent, before=before, show=show, delay_search=delay_search, **kwargs) + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + + return internal_dpg.add_filter_set(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, indent=indent, parent=parent, before=before, show=show, **kwargs) def add_float4_value(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, source: Union[int, str] =0, default_value: Union[List[float], Tuple[float, ...]] =(0.0, 0.0, 0.0, 0.0), parent: Union[int, str] =internal_dpg.mvReservedUUID_3, **kwargs) -> Union[int, str]: """ Adds a float4 value. @@ -4687,7 +4787,7 @@ def add_font_registry(*, label: str =None, user_data: Any =None, use_internal_la return internal_dpg.add_font_registry(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, show=show, **kwargs) -def add_group(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, enabled: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, horizontal: bool =False, horizontal_spacing: float =-1, xoffset: float =0.0, **kwargs) -> Union[int, str]: +def add_group(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, enabled: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', tracked: bool =False, track_offset: float =0.5, horizontal: bool =False, horizontal_spacing: float =-1, xoffset: float =0.0, **kwargs) -> Union[int, str]: """ Creates a group that other widgets can belong to. The group allows item commands to be issued for all of its members. Enable property acts in a special way enabling/disabling everything inside the group. (Use mvStyleVar_DisabledAlpha to edit colors within the disabled group.) @@ -4708,13 +4808,13 @@ def add_group(*, label: str =None, user_data: Any =None, use_internal_label: boo enabled (bool, optional): Turns off functionality of widget and applies the disabled theme. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom horizontal (bool, optional): Forces child widgets to be added in a horizontal layout. horizontal_spacing (float, optional): Spacing for the horizontal layout. xoffset (float, optional): Offset from containing window x item location within group. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -4723,7 +4823,10 @@ def add_group(*, label: str =None, user_data: Any =None, use_internal_label: boo warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - return internal_dpg.add_group(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, payload_type=payload_type, drag_callback=drag_callback, drop_callback=drop_callback, show=show, enabled=enabled, pos=pos, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, horizontal=horizontal, horizontal_spacing=horizontal_spacing, xoffset=xoffset, **kwargs) + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + + return internal_dpg.add_group(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, payload_type=payload_type, drag_callback=drag_callback, drop_callback=drop_callback, show=show, enabled=enabled, pos=pos, filter_key=filter_key, tracked=tracked, track_offset=track_offset, horizontal=horizontal, horizontal_spacing=horizontal_spacing, xoffset=xoffset, **kwargs) def add_handler_registry(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, show: bool =True, **kwargs) -> Union[int, str]: """ Adds a handler registry. @@ -5464,7 +5567,7 @@ def add_item_edited_handler(*, label: str =None, user_data: Any =None, use_inter return internal_dpg.add_item_edited_handler(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, callback=callback, show=show, **kwargs) -def add_item_focus_handler(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, callback: Callable =None, show: bool =True, **kwargs) -> Union[int, str]: +def add_item_focus_handler(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, callback: Callable =None, show: bool =True, event_type: int =None, **kwargs) -> Union[int, str]: """ Adds a focus handler. Args: @@ -5475,6 +5578,7 @@ def add_item_focus_handler(*, label: str =None, user_data: Any =None, use_intern parent (Union[int, str], optional): Parent to add this item to. (runtime adding) callback (Callable, optional): Registers a callback. show (bool, optional): Attempt to render widget. + event_type (int, optional): What kind of events to track: just got focus (mvEventType_Enter), currently having focus (mvEventType_On), lost focus (mvEventType_Leave). Can be a combination of these flags. Defaults to mvEventType_On. id (Union[int, str], optional): (deprecated) Returns: Union[int, str] @@ -5484,7 +5588,7 @@ def add_item_focus_handler(*, label: str =None, user_data: Any =None, use_intern warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - return internal_dpg.add_item_focus_handler(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, callback=callback, show=show, **kwargs) + return internal_dpg.add_item_focus_handler(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, callback=callback, show=show, event_type=event_type, **kwargs) def add_item_handler_registry(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, show: bool =True, **kwargs) -> Union[int, str]: """ Adds an item handler registry. @@ -5506,7 +5610,7 @@ def add_item_handler_registry(*, label: str =None, user_data: Any =None, use_int return internal_dpg.add_item_handler_registry(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, show=show, **kwargs) -def add_item_hover_handler(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, callback: Callable =None, show: bool =True, **kwargs) -> Union[int, str]: +def add_item_hover_handler(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, callback: Callable =None, show: bool =True, event_type: int =None, **kwargs) -> Union[int, str]: """ Adds a hover handler. Args: @@ -5517,6 +5621,7 @@ def add_item_hover_handler(*, label: str =None, user_data: Any =None, use_intern parent (Union[int, str], optional): Parent to add this item to. (runtime adding) callback (Callable, optional): Registers a callback. show (bool, optional): Attempt to render widget. + event_type (int, optional): What kind of events to track: mouse-in (mvEventType_Enter), mouse-over (mvEventType_On), mouse-out (mvEventType_Leave). Can be a combination of these flags. Defaults to mouse-over. id (Union[int, str], optional): (deprecated) Returns: Union[int, str] @@ -5526,7 +5631,7 @@ def add_item_hover_handler(*, label: str =None, user_data: Any =None, use_intern warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - return internal_dpg.add_item_hover_handler(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, callback=callback, show=show, **kwargs) + return internal_dpg.add_item_hover_handler(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, callback=callback, show=show, event_type=event_type, **kwargs) def add_item_resize_handler(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, callback: Callable =None, show: bool =True, **kwargs) -> Union[int, str]: """ Adds a resize handler. @@ -5550,6 +5655,28 @@ def add_item_resize_handler(*, label: str =None, user_data: Any =None, use_inter return internal_dpg.add_item_resize_handler(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, callback=callback, show=show, **kwargs) +def add_item_scroll_handler(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, callback: Callable =None, show: bool =True, **kwargs) -> Union[int, str]: + """ Adds a scroll handler. + + Args: + label (str, optional): Overrides 'name' as label. + user_data (Any, optional): User data for callbacks + use_internal_label (bool, optional): Use generated internal label instead of user specified (appends ### uuid). + tag (Union[int, str], optional): Unique id used to programmatically refer to the item.If label is unused this will be the label. + parent (Union[int, str], optional): Parent to add this item to. (runtime adding) + callback (Callable, optional): Registers a callback. + show (bool, optional): Attempt to render widget. + id (Union[int, str], optional): (deprecated) + Returns: + Union[int, str] + """ + + if 'id' in kwargs.keys(): + warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) + tag=kwargs['id'] + + return internal_dpg.add_item_scroll_handler(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, callback=callback, show=show, **kwargs) + def add_item_toggled_open_handler(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, callback: Callable =None, show: bool =True, **kwargs) -> Union[int, str]: """ Adds a togged open handler. @@ -5768,7 +5895,7 @@ def add_listbox(items : Union[List[str], Tuple[str, ...]] =(), *, label: str =No return internal_dpg.add_listbox(items, label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, indent=indent, parent=parent, before=before, source=source, payload_type=payload_type, callback=callback, drag_callback=drag_callback, drop_callback=drop_callback, show=show, enabled=enabled, pos=pos, filter_key=filter_key, tracked=tracked, track_offset=track_offset, default_value=default_value, num_items=num_items, **kwargs) -def add_loading_indicator(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], style: int =0, circle_count: int =8, speed: float =1.0, radius: float =3.0, thickness: float =1.0, color: Union[List[int], Tuple[int, ...]] =(51, 51, 55, 255), secondary_color: Union[List[int], Tuple[int, ...]] =(29, 151, 236, 103), **kwargs) -> Union[int, str]: +def add_loading_indicator(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], style: int =0, circle_count: int =8, speed: float =1.0, radius: float =3.0, thickness: float =1.0, color: Union[List[int], Tuple[int, ...]] =None, secondary_color: Union[List[int], Tuple[int, ...]] =None, **kwargs) -> Union[int, str]: """ Adds a rotating animated loading symbol. Args: @@ -5785,13 +5912,13 @@ def add_loading_indicator(*, label: str =None, user_data: Any =None, use_interna drop_callback (Callable, optional): Registers a drop callback for drag and drop. show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. - style (int, optional): 0 is rotating dots style, 1 is rotating bar style. - circle_count (int, optional): Number of dots show if dots or size of circle if circle. - speed (float, optional): Speed the anamation will rotate. - radius (float, optional): Radius size of the loading indicator. - thickness (float, optional): Thickness of the circles or line. - color (Union[List[int], Tuple[int, ...]], optional): Color of the growing center circle. - secondary_color (Union[List[int], Tuple[int, ...]], optional): Background of the dots in dot mode. + style (int, optional): mvLoadInd_DottedCircle is rotating dots style, mvLoadInd_Ring is rotating bar style. + circle_count (int, optional): DottedCircle style: number of dots to show. + speed (float, optional): Speed with which the animation will rotate. + radius (float, optional): Scale factor for the loading indicator radius. The size of the indicator is determined by font size and this scale factor. + thickness (float, optional): Ring style: scale factor of line thickness; thickness=1 corresponds to line width being 1/8 of the ring diameter. + color (Union[List[int], Tuple[int, ...]], optional): Main color of the indicator. If omitted, the color for mvThemeCol_Button will be used. + secondary_color (Union[List[int], Tuple[int, ...]], optional): DottedCircle style: color of 'inactive' dots. If omitted, the color for mvThemeCol_ButtonHovered will be used. id (Union[int, str], optional): (deprecated) Returns: Union[int, str] @@ -5803,7 +5930,7 @@ def add_loading_indicator(*, label: str =None, user_data: Any =None, use_interna return internal_dpg.add_loading_indicator(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, payload_type=payload_type, drop_callback=drop_callback, show=show, pos=pos, style=style, circle_count=circle_count, speed=speed, radius=radius, thickness=thickness, color=color, secondary_color=secondary_color, **kwargs) -def add_menu(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drop_callback: Callable =None, show: bool =True, enabled: bool =True, filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, **kwargs) -> Union[int, str]: +def add_menu(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drop_callback: Callable =None, show: bool =True, enabled: bool =True, filter_key: str ='', tracked: bool =False, track_offset: float =0.5, **kwargs) -> Union[int, str]: """ Adds a menu to an existing menu bar. Args: @@ -5819,10 +5946,10 @@ def add_menu(*, label: str =None, user_data: Any =None, use_internal_label: bool show (bool, optional): Attempt to render widget. enabled (bool, optional): Turns off functionality of widget and applies the disabled theme. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -5831,9 +5958,12 @@ def add_menu(*, label: str =None, user_data: Any =None, use_internal_label: bool warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - return internal_dpg.add_menu(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, payload_type=payload_type, drop_callback=drop_callback, show=show, enabled=enabled, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, **kwargs) + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) -def add_menu_bar(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, show: bool =True, delay_search: bool =False, **kwargs) -> Union[int, str]: + return internal_dpg.add_menu(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, payload_type=payload_type, drop_callback=drop_callback, show=show, enabled=enabled, filter_key=filter_key, tracked=tracked, track_offset=track_offset, **kwargs) + +def add_menu_bar(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, show: bool =True, **kwargs) -> Union[int, str]: """ Adds a menu bar to a window. Args: @@ -5844,8 +5974,8 @@ def add_menu_bar(*, label: str =None, user_data: Any =None, use_internal_label: indent (int, optional): Offsets the widget to the right the specified number multiplied by the indent style. parent (Union[int, str], optional): Parent to add this item to. (runtime adding) show (bool, optional): Attempt to render widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -5854,7 +5984,10 @@ def add_menu_bar(*, label: str =None, user_data: Any =None, use_internal_label: warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - return internal_dpg.add_menu_bar(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, show=show, delay_search=delay_search, **kwargs) + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + + return internal_dpg.add_menu_bar(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, show=show, **kwargs) def add_menu_item(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', callback: Callable =None, drop_callback: Callable =None, show: bool =True, enabled: bool =True, filter_key: str ='', tracked: bool =False, track_offset: float =0.5, default_value: bool =False, shortcut: str ='', check: bool =False, **kwargs) -> Union[int, str]: """ Adds a menu item to an existing menu. Menu items act similar to selectables and has a bool value. When placed in a menu the checkmark will reflect its value. @@ -6056,7 +6189,7 @@ def add_mouse_wheel_handler(*, label: str =None, user_data: Any =None, use_inter return internal_dpg.add_mouse_wheel_handler(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, callback=callback, show=show, parent=parent, **kwargs) -def add_node(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, draggable: bool =True, **kwargs) -> Union[int, str]: +def add_node(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', tracked: bool =False, track_offset: float =0.5, draggable: bool =True, **kwargs) -> Union[int, str]: """ Adds a node to a node editor. Args: @@ -6072,11 +6205,11 @@ def add_node(*, label: str =None, user_data: Any =None, use_internal_label: bool show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom draggable (bool, optional): Allow node to be draggable. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -6085,7 +6218,10 @@ def add_node(*, label: str =None, user_data: Any =None, use_internal_label: bool warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - return internal_dpg.add_node(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, before=before, payload_type=payload_type, drag_callback=drag_callback, drop_callback=drop_callback, show=show, pos=pos, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, draggable=draggable, **kwargs) + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + + return internal_dpg.add_node(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, before=before, payload_type=payload_type, drag_callback=drag_callback, drop_callback=drop_callback, show=show, pos=pos, filter_key=filter_key, tracked=tracked, track_offset=track_offset, draggable=draggable, **kwargs) def add_node_attribute(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, show: bool =True, filter_key: str ='', tracked: bool =False, track_offset: float =0.5, attribute_type: int =0, shape: int =1, category: str ='general', **kwargs) -> Union[int, str]: """ Adds a node attribute to a node. @@ -6116,7 +6252,7 @@ def add_node_attribute(*, label: str =None, user_data: Any =None, use_internal_l return internal_dpg.add_node_attribute(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, show=show, filter_key=filter_key, tracked=tracked, track_offset=track_offset, attribute_type=attribute_type, shape=shape, category=category, **kwargs) -def add_node_editor(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, parent: Union[int, str] =0, before: Union[int, str] =0, callback: Callable =None, show: bool =True, filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, delink_callback: Callable =None, menubar: bool =False, minimap: bool =False, minimap_location: int =2, **kwargs) -> Union[int, str]: +def add_node_editor(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, parent: Union[int, str] =0, before: Union[int, str] =0, callback: Callable =None, show: bool =True, filter_key: str ='', tracked: bool =False, track_offset: float =0.5, delink_callback: Callable =None, menubar: bool =False, minimap: bool =False, minimap_location: int =2, **kwargs) -> Union[int, str]: """ Adds a node editor. Args: @@ -6131,7 +6267,6 @@ def add_node_editor(*, label: str =None, user_data: Any =None, use_internal_labe callback (Callable, optional): Registers a callback. show (bool, optional): Attempt to render widget. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom delink_callback (Callable, optional): Callback ran when a link is detached. @@ -6139,6 +6274,7 @@ def add_node_editor(*, label: str =None, user_data: Any =None, use_internal_labe minimap (bool, optional): Shows or hides the Minimap. New in 1.6. minimap_location (int, optional): mvNodeMiniMap_Location_* constants. New in 1.6. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -6147,7 +6283,10 @@ def add_node_editor(*, label: str =None, user_data: Any =None, use_internal_labe warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - return internal_dpg.add_node_editor(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, parent=parent, before=before, callback=callback, show=show, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, delink_callback=delink_callback, menubar=menubar, minimap=minimap, minimap_location=minimap_location, **kwargs) + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + + return internal_dpg.add_node_editor(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, parent=parent, before=before, callback=callback, show=show, filter_key=filter_key, tracked=tracked, track_offset=track_offset, delink_callback=delink_callback, menubar=menubar, minimap=minimap, minimap_location=minimap_location, **kwargs) def add_node_link(attr_1 : Union[int, str], attr_2 : Union[int, str], *, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, show: bool =True, **kwargs) -> Union[int, str]: """ Adds a node link between 2 node attributes. @@ -6204,7 +6343,7 @@ def add_pie_series(x : float, y : float, radius : float, values : Union[List[flo return internal_dpg.add_pie_series(x, y, radius, values, labels, label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, before=before, source=source, show=show, format=format, angle=angle, normalize=normalize, ignore_hidden=ignore_hidden, **kwargs) -def add_plot(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', callback: Callable =None, drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, no_title: bool =False, no_menus: bool =False, no_box_select: bool =False, no_mouse_pos: bool =False, query: bool =False, query_color: Union[List[float], Tuple[float, ...]] =(0, 255, 0, 255), min_query_rects: int =1, max_query_rects: int =1, crosshairs: bool =False, equal_aspects: bool =False, no_inputs: bool =False, no_frame: bool =False, use_local_time: bool =False, use_ISO8601: bool =False, use_24hour_clock: bool =False, pan_button: int =internal_dpg.mvMouseButton_Left, pan_mod: int =internal_dpg.mvKey_None, context_menu_button: int =internal_dpg.mvMouseButton_Right, fit_button: int =internal_dpg.mvMouseButton_Left, box_select_button: int =internal_dpg.mvMouseButton_Right, box_select_mod: int =internal_dpg.mvKey_None, box_select_cancel_button: int =internal_dpg.mvMouseButton_Left, query_toggle_mod: int =internal_dpg.mvKey_ModCtrl, horizontal_mod: int =internal_dpg.mvKey_ModAlt, vertical_mod: int =internal_dpg.mvKey_ModShift, override_mod: int =internal_dpg.mvKey_ModCtrl, zoom_mod: int =internal_dpg.mvKey_None, zoom_rate: int =0.1, **kwargs) -> Union[int, str]: +def add_plot(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', callback: Callable =None, drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', tracked: bool =False, track_offset: float =0.5, no_title: bool =False, no_menus: bool =False, no_box_select: bool =False, no_mouse_pos: bool =False, query: bool =False, query_color: Union[List[float], Tuple[float, ...]] =(0, 255, 0, 255), min_query_rects: int =1, max_query_rects: int =1, crosshairs: bool =False, equal_aspects: bool =False, no_inputs: bool =False, no_frame: bool =False, use_local_time: bool =False, use_ISO8601: bool =False, use_24hour_clock: bool =False, pan_button: int =internal_dpg.mvMouseButton_Left, pan_mod: int =internal_dpg.mvKey_None, context_menu_button: int =internal_dpg.mvMouseButton_Right, fit_button: int =internal_dpg.mvMouseButton_Left, box_select_button: int =internal_dpg.mvMouseButton_Right, box_select_mod: int =internal_dpg.mvKey_None, box_select_cancel_button: int =internal_dpg.mvMouseButton_Left, query_toggle_mod: int =internal_dpg.mvKey_ModCtrl, horizontal_mod: int =internal_dpg.mvKey_ModAlt, vertical_mod: int =internal_dpg.mvKey_ModShift, override_mod: int =internal_dpg.mvKey_ModCtrl, zoom_mod: int =internal_dpg.mvKey_None, zoom_rate: int =0.1, **kwargs) -> Union[int, str]: """ 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. Args: @@ -6224,7 +6363,6 @@ def add_plot(*, label: str =None, user_data: Any =None, use_internal_label: bool show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom no_title (bool, optional): the plot title will not be displayed @@ -6256,6 +6394,7 @@ def add_plot(*, label: str =None, user_data: Any =None, use_internal_label: bool zoom_mod (int, optional): optional modifier that must be held for scroll wheel zooming zoom_rate (int, optional): zoom rate for scroll (e.g. 0.1f = 10% plot range every scroll click); make negative to invert id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. no_highlight (bool, optional): (deprecated) Removed because not supported from the backend anymore. To control the highlighting of series use the same argument in `add_plot_legend` no_child (bool, optional): (deprecated) a child window region will not be used to capture mouse scroll (can boost performance for single ImGui window applications) anti_aliased (bool, optional): (deprecated) This feature was deprecated in ImPlot. To enable/disable anti_aliasing use `dpg.configure_app()` with the `anti_aliasing` parameters. @@ -6269,6 +6408,9 @@ def add_plot(*, label: str =None, user_data: Any =None, use_internal_label: bool warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + if 'no_highlight' in kwargs.keys(): warnings.warn('no_highlight keyword removed', DeprecationWarning, 2) @@ -6299,7 +6441,7 @@ def add_plot(*, label: str =None, user_data: Any =None, use_internal_label: bool kwargs.pop('query_mod', None) - return internal_dpg.add_plot(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, payload_type=payload_type, callback=callback, drag_callback=drag_callback, drop_callback=drop_callback, show=show, pos=pos, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, no_title=no_title, no_menus=no_menus, no_box_select=no_box_select, no_mouse_pos=no_mouse_pos, query=query, query_color=query_color, min_query_rects=min_query_rects, max_query_rects=max_query_rects, crosshairs=crosshairs, equal_aspects=equal_aspects, no_inputs=no_inputs, no_frame=no_frame, use_local_time=use_local_time, use_ISO8601=use_ISO8601, use_24hour_clock=use_24hour_clock, pan_button=pan_button, pan_mod=pan_mod, context_menu_button=context_menu_button, fit_button=fit_button, box_select_button=box_select_button, box_select_mod=box_select_mod, box_select_cancel_button=box_select_cancel_button, query_toggle_mod=query_toggle_mod, horizontal_mod=horizontal_mod, vertical_mod=vertical_mod, override_mod=override_mod, zoom_mod=zoom_mod, zoom_rate=zoom_rate, **kwargs) + return internal_dpg.add_plot(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, payload_type=payload_type, callback=callback, drag_callback=drag_callback, drop_callback=drop_callback, show=show, pos=pos, filter_key=filter_key, tracked=tracked, track_offset=track_offset, no_title=no_title, no_menus=no_menus, no_box_select=no_box_select, no_mouse_pos=no_mouse_pos, query=query, query_color=query_color, min_query_rects=min_query_rects, max_query_rects=max_query_rects, crosshairs=crosshairs, equal_aspects=equal_aspects, no_inputs=no_inputs, no_frame=no_frame, use_local_time=use_local_time, use_ISO8601=use_ISO8601, use_24hour_clock=use_24hour_clock, pan_button=pan_button, pan_mod=pan_mod, context_menu_button=context_menu_button, fit_button=fit_button, box_select_button=box_select_button, box_select_mod=box_select_mod, box_select_cancel_button=box_select_cancel_button, query_toggle_mod=query_toggle_mod, horizontal_mod=horizontal_mod, vertical_mod=vertical_mod, override_mod=override_mod, zoom_mod=zoom_mod, zoom_rate=zoom_rate, **kwargs) def add_plot_annotation(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, parent: Union[int, str] =0, before: Union[int, str] =0, source: Union[int, str] =0, show: bool =True, default_value: Any =(0.0, 0.0), offset: Union[List[float], Tuple[float, ...]] =(0.0, 0.0), color: Union[List[int], Tuple[int, ...]] =(0, 0, 0, -255), clamped: bool =True, **kwargs) -> Union[int, str]: """ Adds an annotation to a plot. @@ -7071,7 +7213,7 @@ def add_string_value(*, label: str =None, user_data: Any =None, use_internal_lab return internal_dpg.add_string_value(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, source=source, default_value=default_value, parent=parent, **kwargs) -def add_subplots(rows : int, columns : int, *, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, row_ratios: Union[List[float], Tuple[float, ...]] =[], column_ratios: Union[List[float], Tuple[float, ...]] =[], no_title: bool =False, no_menus: bool =False, no_resize: bool =False, no_align: bool =False, share_series: bool =False, link_rows: bool =False, link_columns: bool =False, link_all_x: bool =False, link_all_y: bool =False, column_major: bool =False, **kwargs) -> Union[int, str]: +def add_subplots(rows : int, columns : int, *, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', tracked: bool =False, track_offset: float =0.5, row_ratios: Union[List[float], Tuple[float, ...]] =[], column_ratios: Union[List[float], Tuple[float, ...]] =[], no_title: bool =False, no_menus: bool =False, no_resize: bool =False, no_align: bool =False, share_series: bool =False, link_rows: bool =False, link_columns: bool =False, link_all_x: bool =False, link_all_y: bool =False, column_major: bool =False, **kwargs) -> Union[int, str]: """ Adds a collection of plots. Args: @@ -7090,7 +7232,6 @@ def add_subplots(rows : int, columns : int, *, label: str =None, user_data: Any show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom row_ratios (Union[List[float], Tuple[float, ...]], optional): @@ -7106,6 +7247,7 @@ def add_subplots(rows : int, columns : int, *, label: str =None, user_data: Any link_all_y (bool, optional): link the y-axis limits in every plot in the subplot (does not apply to auxiliary y-axes) column_major (bool, optional): subplots are added in column major order instead of the default row major order id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -7114,9 +7256,12 @@ def add_subplots(rows : int, columns : int, *, label: str =None, user_data: Any warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - return internal_dpg.add_subplots(rows, columns, label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, callback=callback, show=show, pos=pos, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, row_ratios=row_ratios, column_ratios=column_ratios, no_title=no_title, no_menus=no_menus, no_resize=no_resize, no_align=no_align, share_series=share_series, link_rows=link_rows, link_columns=link_columns, link_all_x=link_all_x, link_all_y=link_all_y, column_major=column_major, **kwargs) + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + + return internal_dpg.add_subplots(rows, columns, label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, callback=callback, show=show, pos=pos, filter_key=filter_key, tracked=tracked, track_offset=track_offset, row_ratios=row_ratios, column_ratios=column_ratios, no_title=no_title, no_menus=no_menus, no_resize=no_resize, no_align=no_align, share_series=share_series, link_rows=link_rows, link_columns=link_columns, link_all_x=link_all_x, link_all_y=link_all_y, column_major=column_major, **kwargs) -def add_tab(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drop_callback: Callable =None, show: bool =True, filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, closable: bool =False, no_tooltip: bool =False, order_mode: int =0, **kwargs) -> Union[int, str]: +def add_tab(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drop_callback: Callable =None, show: bool =True, filter_key: str ='', tracked: bool =False, track_offset: float =0.5, closable: bool =False, no_tooltip: bool =False, order_mode: int =0, **kwargs) -> Union[int, str]: """ Adds a tab to a tab bar. Args: @@ -7131,13 +7276,13 @@ def add_tab(*, label: str =None, user_data: Any =None, use_internal_label: bool drop_callback (Callable, optional): Registers a drop callback for drag and drop. show (bool, optional): Attempt to render widget. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom closable (bool, optional): Creates a button on the tab that can hide the tab. no_tooltip (bool, optional): Disable tooltip for the given tab. order_mode (int, optional): set using a constant: mvTabOrder_Reorderable: allows reordering, mvTabOrder_Fixed: fixed ordering, mvTabOrder_Leading: adds tab to front, mvTabOrder_Trailing: adds tab to back id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -7146,9 +7291,12 @@ def add_tab(*, label: str =None, user_data: Any =None, use_internal_label: bool warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - return internal_dpg.add_tab(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, payload_type=payload_type, drop_callback=drop_callback, show=show, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, closable=closable, no_tooltip=no_tooltip, order_mode=order_mode, **kwargs) + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + + return internal_dpg.add_tab(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, payload_type=payload_type, drop_callback=drop_callback, show=show, filter_key=filter_key, tracked=tracked, track_offset=track_offset, closable=closable, no_tooltip=no_tooltip, order_mode=order_mode, **kwargs) -def add_tab_bar(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, reorderable: bool =False, **kwargs) -> Union[int, str]: +def add_tab_bar(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', tracked: bool =False, track_offset: float =0.5, reorderable: bool =False, **kwargs) -> Union[int, str]: """ Adds a tab bar. Args: @@ -7163,11 +7311,11 @@ def add_tab_bar(*, label: str =None, user_data: Any =None, use_internal_label: b show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom reorderable (bool, optional): Allows for the user to change the order of the tabs. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -7176,7 +7324,10 @@ def add_tab_bar(*, label: str =None, user_data: Any =None, use_internal_label: b warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - return internal_dpg.add_tab_bar(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, callback=callback, show=show, pos=pos, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, reorderable=reorderable, **kwargs) + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + + return internal_dpg.add_tab_bar(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, callback=callback, show=show, pos=pos, filter_key=filter_key, tracked=tracked, track_offset=track_offset, reorderable=reorderable, **kwargs) def add_tab_button(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', callback: Callable =None, drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, filter_key: str ='', tracked: bool =False, track_offset: float =0.5, no_reorder: bool =False, leading: bool =False, trailing: bool =False, no_tooltip: bool =False, **kwargs) -> Union[int, str]: """ Adds a tab button to a tab bar. @@ -7212,7 +7363,7 @@ def add_tab_button(*, label: str =None, user_data: Any =None, use_internal_label return internal_dpg.add_tab_button(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, payload_type=payload_type, callback=callback, drag_callback=drag_callback, drop_callback=drop_callback, show=show, filter_key=filter_key, tracked=tracked, track_offset=track_offset, no_reorder=no_reorder, leading=leading, trailing=trailing, no_tooltip=no_tooltip, **kwargs) -def add_table(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, source: Union[int, str] =0, callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', delay_search: bool =False, header_row: bool =True, clipper: bool =False, inner_width: int =0, policy: int =0, freeze_rows: int =0, freeze_columns: int =0, sort_multi: bool =False, sort_tristate: bool =False, resizable: bool =False, reorderable: bool =False, hideable: bool =False, sortable: bool =False, context_menu_in_body: bool =False, row_background: bool =False, borders_innerH: bool =False, borders_outerH: bool =False, borders_innerV: bool =False, borders_outerV: bool =False, no_host_extendX: bool =False, no_host_extendY: bool =False, no_keep_columns_visible: bool =False, precise_widths: bool =False, no_clip: bool =False, pad_outerX: bool =False, no_pad_outerX: bool =False, no_pad_innerX: bool =False, scrollX: bool =False, scrollY: bool =False, no_saved_settings: bool =False, **kwargs) -> Union[int, str]: +def add_table(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, source: Union[int, str] =0, callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', header_row: bool =True, clipper: bool =False, inner_width: int =0, policy: int =0, freeze_rows: int =0, freeze_columns: int =0, sort_multi: bool =False, sort_tristate: bool =False, resizable: bool =False, reorderable: bool =False, hideable: bool =False, sortable: bool =False, context_menu_in_body: bool =False, row_background: bool =False, borders_innerH: bool =False, borders_outerH: bool =False, borders_innerV: bool =False, borders_outerV: bool =False, no_host_extendX: bool =False, no_host_extendY: bool =False, no_keep_columns_visible: bool =False, precise_widths: bool =False, no_clip: bool =False, pad_outerX: bool =False, no_pad_outerX: bool =False, no_pad_innerX: bool =False, scrollX: bool =False, scrollY: bool =False, no_saved_settings: bool =False, **kwargs) -> Union[int, str]: """ Adds a table. Args: @@ -7230,7 +7381,6 @@ def add_table(*, label: str =None, user_data: Any =None, use_internal_label: boo show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. header_row (bool, optional): show headers at the top of the columns clipper (bool, optional): Use clipper (rows must be same height). inner_width (int, optional): @@ -7261,6 +7411,7 @@ def add_table(*, label: str =None, user_data: Any =None, use_internal_label: boo scrollY (bool, optional): Enable vertical scrolling. no_saved_settings (bool, optional): Never load/save settings in .ini file. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -7269,7 +7420,10 @@ def add_table(*, label: str =None, user_data: Any =None, use_internal_label: boo warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - return internal_dpg.add_table(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, source=source, callback=callback, show=show, pos=pos, filter_key=filter_key, delay_search=delay_search, header_row=header_row, clipper=clipper, inner_width=inner_width, policy=policy, freeze_rows=freeze_rows, freeze_columns=freeze_columns, sort_multi=sort_multi, sort_tristate=sort_tristate, resizable=resizable, reorderable=reorderable, hideable=hideable, sortable=sortable, context_menu_in_body=context_menu_in_body, row_background=row_background, borders_innerH=borders_innerH, borders_outerH=borders_outerH, borders_innerV=borders_innerV, borders_outerV=borders_outerV, no_host_extendX=no_host_extendX, no_host_extendY=no_host_extendY, no_keep_columns_visible=no_keep_columns_visible, precise_widths=precise_widths, no_clip=no_clip, pad_outerX=pad_outerX, no_pad_outerX=no_pad_outerX, no_pad_innerX=no_pad_innerX, scrollX=scrollX, scrollY=scrollY, no_saved_settings=no_saved_settings, **kwargs) + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + + return internal_dpg.add_table(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, parent=parent, before=before, source=source, callback=callback, show=show, pos=pos, filter_key=filter_key, header_row=header_row, clipper=clipper, inner_width=inner_width, policy=policy, freeze_rows=freeze_rows, freeze_columns=freeze_columns, sort_multi=sort_multi, sort_tristate=sort_tristate, resizable=resizable, reorderable=reorderable, hideable=hideable, sortable=sortable, context_menu_in_body=context_menu_in_body, row_background=row_background, borders_innerH=borders_innerH, borders_outerH=borders_outerH, borders_innerV=borders_innerV, borders_outerV=borders_outerV, no_host_extendX=no_host_extendX, no_host_extendY=no_host_extendY, no_keep_columns_visible=no_keep_columns_visible, precise_widths=precise_widths, no_clip=no_clip, pad_outerX=pad_outerX, no_pad_outerX=no_pad_outerX, no_pad_innerX=no_pad_innerX, scrollX=scrollX, scrollY=scrollY, no_saved_settings=no_saved_settings, **kwargs) def add_table_cell(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, height: int =0, parent: Union[int, str] =0, before: Union[int, str] =0, show: bool =True, filter_key: str ='', **kwargs) -> Union[int, str]: """ Adds a table. @@ -7624,7 +7778,7 @@ def add_tooltip(parent : Union[int, str], *, label: str =None, user_data: Any =N return internal_dpg.add_tooltip(parent, label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, show=show, delay=delay, hide_on_activity=hide_on_activity, **kwargs) -def add_tree_node(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', delay_search: bool =False, tracked: bool =False, track_offset: float =0.5, default_open: bool =False, open_on_double_click: bool =False, open_on_arrow: bool =False, leaf: bool =False, bullet: bool =False, selectable: bool =False, span_text_width: bool =False, span_full_width: bool =False, **kwargs) -> Union[int, str]: +def add_tree_node(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, before: Union[int, str] =0, payload_type: str ='$$DPG_PAYLOAD', drag_callback: Callable =None, drop_callback: Callable =None, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], filter_key: str ='', tracked: bool =False, track_offset: float =0.5, default_open: bool =False, open_on_double_click: bool =False, open_on_arrow: bool =False, leaf: bool =False, bullet: bool =False, selectable: bool =False, span_text_width: bool =False, span_full_width: bool =False, **kwargs) -> Union[int, str]: """ Adds a tree node to add items to. Args: @@ -7641,7 +7795,6 @@ def add_tree_node(*, label: str =None, user_data: Any =None, use_internal_label: show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. tracked (bool, optional): Scroll tracking track_offset (float, optional): 0.0f:top, 0.5f:center, 1.0f:bottom default_open (bool, optional): Sets the tree node open by default. @@ -7653,6 +7806,7 @@ def add_tree_node(*, label: str =None, user_data: Any =None, use_internal_label: span_text_width (bool, optional): Makes hitbox and highlight only cover the label. span_full_width (bool, optional): Extend hit box to the left-most and right-most edges (cover the indent area). id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -7661,7 +7815,10 @@ def add_tree_node(*, label: str =None, user_data: Any =None, use_internal_label: warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - return internal_dpg.add_tree_node(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, payload_type=payload_type, drag_callback=drag_callback, drop_callback=drop_callback, show=show, pos=pos, filter_key=filter_key, delay_search=delay_search, tracked=tracked, track_offset=track_offset, default_open=default_open, open_on_double_click=open_on_double_click, open_on_arrow=open_on_arrow, leaf=leaf, bullet=bullet, selectable=selectable, span_text_width=span_text_width, span_full_width=span_full_width, **kwargs) + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + + return internal_dpg.add_tree_node(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, before=before, payload_type=payload_type, drag_callback=drag_callback, drop_callback=drop_callback, show=show, pos=pos, filter_key=filter_key, tracked=tracked, track_offset=track_offset, default_open=default_open, open_on_double_click=open_on_double_click, open_on_arrow=open_on_arrow, leaf=leaf, bullet=bullet, selectable=selectable, span_text_width=span_text_width, span_full_width=span_full_width, **kwargs) def add_value_registry(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, **kwargs) -> Union[int, str]: """ Adds a value registry. @@ -7682,7 +7839,7 @@ def add_value_registry(*, label: str =None, user_data: Any =None, use_internal_l return internal_dpg.add_value_registry(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, **kwargs) -def add_viewport_drawlist(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, show: bool =True, filter_key: str ='', delay_search: bool =False, front: bool =True, **kwargs) -> Union[int, str]: +def add_viewport_drawlist(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, show: bool =True, filter_key: str ='', front: bool =True, **kwargs) -> Union[int, str]: """ A container that is used to present draw items or layers directly to the viewport. By default this will draw to the back of the viewport. Layers and draw items should be added to this widget as children. Args: @@ -7692,9 +7849,9 @@ def add_viewport_drawlist(*, label: str =None, user_data: Any =None, use_interna tag (Union[int, str], optional): Unique id used to programmatically refer to the item.If label is unused this will be the label. show (bool, optional): Attempt to render widget. filter_key (str, optional): Used by filter widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. front (bool, optional): Draws to the front of the view port instead of the back. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -7703,9 +7860,12 @@ def add_viewport_drawlist(*, label: str =None, user_data: Any =None, use_interna warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - return internal_dpg.add_viewport_drawlist(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, show=show, filter_key=filter_key, delay_search=delay_search, front=front, **kwargs) + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) -def add_viewport_menu_bar(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, show: bool =True, delay_search: bool =False, **kwargs) -> Union[int, str]: + return internal_dpg.add_viewport_drawlist(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, show=show, filter_key=filter_key, front=front, **kwargs) + +def add_viewport_menu_bar(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, indent: int =-1, parent: Union[int, str] =0, show: bool =True, **kwargs) -> Union[int, str]: """ Adds a menubar to the viewport. Args: @@ -7716,8 +7876,8 @@ def add_viewport_menu_bar(*, label: str =None, user_data: Any =None, use_interna indent (int, optional): Offsets the widget to the right the specified number multiplied by the indent style. parent (Union[int, str], optional): Parent to add this item to. (runtime adding) show (bool, optional): Attempt to render widget. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -7726,9 +7886,12 @@ def add_viewport_menu_bar(*, label: str =None, user_data: Any =None, use_interna warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - return internal_dpg.add_viewport_menu_bar(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, show=show, delay_search=delay_search, **kwargs) + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) -def add_window(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], delay_search: bool =False, min_size: Union[List[int], Tuple[int, ...]] =[100, 100], max_size: Union[List[int], Tuple[int, ...]] =[30000, 30000], menubar: bool =False, collapsed: bool =False, autosize: bool =False, no_resize: bool =False, unsaved_document: bool =False, no_title_bar: bool =False, no_move: bool =False, no_scrollbar: bool =False, no_collapse: bool =False, horizontal_scrollbar: bool =False, no_focus_on_appearing: bool =False, no_bring_to_front_on_focus: bool =False, no_close: bool =False, no_background: bool =False, modal: bool =False, popup: bool =False, no_saved_settings: bool =False, no_open_over_existing_popup: bool =True, no_scroll_with_mouse: bool =False, on_close: Callable =None, **kwargs) -> Union[int, str]: + return internal_dpg.add_viewport_menu_bar(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, indent=indent, parent=parent, show=show, **kwargs) + +def add_window(*, label: str =None, user_data: Any =None, use_internal_label: bool =True, tag: Union[int, str] =0, width: int =0, height: int =0, indent: int =-1, show: bool =True, pos: Union[List[int], Tuple[int, ...]] =[], min_size: Union[List[int], Tuple[int, ...]] =[100, 100], max_size: Union[List[int], Tuple[int, ...]] =[30000, 30000], menubar: bool =False, collapsed: bool =False, autosize: bool =False, no_resize: bool =False, unsaved_document: bool =False, no_title_bar: bool =False, no_move: bool =False, no_scrollbar: bool =False, no_collapse: bool =False, horizontal_scrollbar: bool =False, no_focus_on_appearing: bool =False, no_bring_to_front_on_focus: bool =False, no_close: bool =False, no_background: bool =False, modal: bool =False, popup: bool =False, no_saved_settings: bool =False, no_open_over_existing_popup: bool =True, no_scroll_with_mouse: bool =False, on_close: Callable =None, **kwargs) -> Union[int, str]: """ Creates a new window for following items to be added to. Args: @@ -7741,7 +7904,6 @@ def add_window(*, label: str =None, user_data: Any =None, use_internal_label: bo indent (int, optional): Offsets the widget to the right the specified number multiplied by the indent style. show (bool, optional): Attempt to render widget. pos (Union[List[int], Tuple[int, ...]], optional): Places the item relative to window coordinates, [0,0] is top left. - delay_search (bool, optional): Delays searching container for specified items until the end of the app. Possible optimization when a container has many children that are not accessed often. min_size (Union[List[int], Tuple[int, ...]], optional): Minimum window size. max_size (Union[List[int], Tuple[int, ...]], optional): Maximum window size. menubar (bool, optional): Shows or hides the menubar. @@ -7765,6 +7927,7 @@ def add_window(*, label: str =None, user_data: Any =None, use_internal_label: bo no_scroll_with_mouse (bool, optional): Disable user vertically scrolling with mouse wheel. on_close (Callable, optional): Callback ran when window is closed. id (Union[int, str], optional): (deprecated) + delay_search (bool, optional): (deprecated) This was used as an optimization hint but is not relevant anymore. Returns: Union[int, str] """ @@ -7773,7 +7936,10 @@ def add_window(*, label: str =None, user_data: Any =None, use_internal_label: bo warnings.warn('id keyword renamed to tag', DeprecationWarning, 2) tag=kwargs['id'] - return internal_dpg.add_window(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, show=show, pos=pos, delay_search=delay_search, min_size=min_size, max_size=max_size, menubar=menubar, collapsed=collapsed, autosize=autosize, no_resize=no_resize, unsaved_document=unsaved_document, no_title_bar=no_title_bar, no_move=no_move, no_scrollbar=no_scrollbar, no_collapse=no_collapse, horizontal_scrollbar=horizontal_scrollbar, no_focus_on_appearing=no_focus_on_appearing, no_bring_to_front_on_focus=no_bring_to_front_on_focus, no_close=no_close, no_background=no_background, modal=modal, popup=popup, no_saved_settings=no_saved_settings, no_open_over_existing_popup=no_open_over_existing_popup, no_scroll_with_mouse=no_scroll_with_mouse, on_close=on_close, **kwargs) + if 'delay_search' in kwargs.keys(): + warnings.warn('delay_search keyword deprecated. ', DeprecationWarning, 2) + + return internal_dpg.add_window(label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, width=width, height=height, indent=indent, show=show, pos=pos, min_size=min_size, max_size=max_size, menubar=menubar, collapsed=collapsed, autosize=autosize, no_resize=no_resize, unsaved_document=unsaved_document, no_title_bar=no_title_bar, no_move=no_move, no_scrollbar=no_scrollbar, no_collapse=no_collapse, horizontal_scrollbar=horizontal_scrollbar, no_focus_on_appearing=no_focus_on_appearing, no_bring_to_front_on_focus=no_bring_to_front_on_focus, no_close=no_close, no_background=no_background, modal=modal, popup=popup, no_saved_settings=no_saved_settings, no_open_over_existing_popup=no_open_over_existing_popup, no_scroll_with_mouse=no_scroll_with_mouse, on_close=on_close, **kwargs) def apply_transform(item : Union[int, str], transform : Any, **kwargs) -> None: """ New in 1.1. Applies a transformation matrix to a layer. @@ -9559,29 +9725,31 @@ def set_viewport_resize_callback(callback : Callable, *, user_data: Any =None, * return internal_dpg.set_viewport_resize_callback(callback, user_data=user_data, **kwargs) -def set_x_scroll(item : Union[int, str], value : float, **kwargs) -> None: - """ Undocumented +def set_x_scroll(item : Union[int, str], value : float, *, when: int =internal_dpg.mvSetScrollFlags_Delayed, **kwargs) -> None: + """ Sets horizontal scroll position. Args: item (Union[int, str]): - value (float): + value (float): Scroll position + when (int, optional): Specifies whether the scroll position will be set in the nearest frame (mvSetScrollFlags_Now) or with a 1-frame delay (mvSetScrollFlags_Delayed). The former prevents flickering, the latter works better if contents change in the same frame as when set_x_scroll called. mvSetScrollFlags_Both can also be used to set the position twice. Returns: None """ - return internal_dpg.set_x_scroll(item, value, **kwargs) + return internal_dpg.set_x_scroll(item, value, when=when, **kwargs) -def set_y_scroll(item : Union[int, str], value : float, **kwargs) -> None: - """ Undocumented +def set_y_scroll(item : Union[int, str], value : float, *, when: int =internal_dpg.mvSetScrollFlags_Delayed, **kwargs) -> None: + """ Sets vertical scroll position. Args: item (Union[int, str]): - value (float): + value (float): Scroll position + when (int, optional): Specifies whether the scroll position will be set in the nearest frame (mvSetScrollFlags_Now) or with a 1-frame delay (mvSetScrollFlags_Delayed). The former prevents flickering, the latter works better if contents change in the same frame as when set_x_scroll called. mvSetScrollFlags_Both can also be used to set the position twice. Returns: None """ - return internal_dpg.set_y_scroll(item, value, **kwargs) + return internal_dpg.set_y_scroll(item, value, when=when, **kwargs) def setup_dearpygui(**kwargs) -> None: """ Sets up Dear PyGui @@ -9661,16 +9829,22 @@ def show_viewport(*, minimized: bool =False, maximized: bool =False, **kwargs) - return internal_dpg.show_viewport(minimized=minimized, maximized=maximized, **kwargs) -def split_frame(*, delay: int =32, **kwargs) -> None: +def split_frame(**kwargs) -> None: """ Waits one frame. Args: - delay (int, optional): Minimal delay in in milliseconds + delay (int, optional): (deprecated) Do not use it anymore, it has no effect. Returns: None """ - return internal_dpg.split_frame(delay=delay, **kwargs) + if 'delay' in kwargs.keys(): + + warnings.warn('delay keyword removed', DeprecationWarning, 2) + + kwargs.pop('delay', None) + + return internal_dpg.split_frame(**kwargs) def stop_dearpygui(**kwargs) -> None: """ Stops Dear PyGui @@ -9857,6 +10031,8 @@ def unstage(item : Union[int, str], **kwargs) -> None: mvKey_NumPad7=internal_dpg.mvKey_NumPad7 mvKey_NumPad8=internal_dpg.mvKey_NumPad8 mvKey_NumPad9=internal_dpg.mvKey_NumPad9 +mvKey_NumPadEnter=internal_dpg.mvKey_NumPadEnter +mvKey_NumPadEqual=internal_dpg.mvKey_NumPadEqual mvKey_Subtract=internal_dpg.mvKey_Subtract mvKey_Decimal=internal_dpg.mvKey_Decimal mvKey_Divide=internal_dpg.mvKey_Divide @@ -9954,6 +10130,19 @@ def unstage(item : Union[int, str], **kwargs) -> None: mvComboHeight_Regular=internal_dpg.mvComboHeight_Regular mvComboHeight_Large=internal_dpg.mvComboHeight_Large mvComboHeight_Largest=internal_dpg.mvComboHeight_Largest +mvEventType_Off=internal_dpg.mvEventType_Off +mvEventType_Enter=internal_dpg.mvEventType_Enter +mvEventType_On=internal_dpg.mvEventType_On +mvEventType_Leave=internal_dpg.mvEventType_Leave +mvSetScrollFlags_Now=internal_dpg.mvSetScrollFlags_Now +mvSetScrollFlags_Delayed=internal_dpg.mvSetScrollFlags_Delayed +mvSetScrollFlags_Both=internal_dpg.mvSetScrollFlags_Both +mvScrollDirection_XAxis=internal_dpg.mvScrollDirection_XAxis +mvScrollDirection_YAxis=internal_dpg.mvScrollDirection_YAxis +mvScrollDirection_Horizontal=internal_dpg.mvScrollDirection_Horizontal +mvScrollDirection_Vertical=internal_dpg.mvScrollDirection_Vertical +mvLoadInd_DottedCircle=internal_dpg.mvLoadInd_DottedCircle +mvLoadInd_Ring=internal_dpg.mvLoadInd_Ring mvPlatform_Windows=internal_dpg.mvPlatform_Windows mvPlatform_Apple=internal_dpg.mvPlatform_Apple mvPlatform_Linux=internal_dpg.mvPlatform_Linux @@ -10297,6 +10486,7 @@ def unstage(item : Union[int, str], **kwargs) -> None: mvTable=internal_dpg.mvTable mvTableColumn=internal_dpg.mvTableColumn mvTableRow=internal_dpg.mvTableRow +mvSyncedTables=internal_dpg.mvSyncedTables mvDrawLine=internal_dpg.mvDrawLine mvDrawArrow=internal_dpg.mvDrawArrow mvDrawTriangle=internal_dpg.mvDrawTriangle @@ -10376,6 +10566,7 @@ def unstage(item : Union[int, str], **kwargs) -> None: mvToggledOpenHandler=internal_dpg.mvToggledOpenHandler mvClickedHandler=internal_dpg.mvClickedHandler mvDoubleClickedHandler=internal_dpg.mvDoubleClickedHandler +mvScrollHandler=internal_dpg.mvScrollHandler mvDragPayload=internal_dpg.mvDragPayload mvResizeHandler=internal_dpg.mvResizeHandler mvFont=internal_dpg.mvFont diff --git a/dearpygui/demo.py b/dearpygui/demo.py index 08208442b..679c7a26b 100644 --- a/dearpygui/demo.py +++ b/dearpygui/demo.py @@ -10,12 +10,11 @@ def _help(message): last_item = dpg.last_item() - group = dpg.add_group(horizontal=True) - dpg.move_item(last_item, parent=group) - dpg.capture_next_item(lambda s: dpg.move_item(s, parent=group)) - t = dpg.add_text("(?)", color=[0, 255, 0]) - with dpg.tooltip(t): - dpg.add_text(message) + with dpg.group(horizontal=True) as group: + dpg.move_item(last_item, parent=group) + t = dpg.add_text("(?)", color=[0, 255, 0]) + with dpg.tooltip(t): + dpg.add_text(message) def _hyperlink(text, address): b = dpg.add_button(label=text, callback=lambda:webbrowser.open(address)) @@ -245,7 +244,7 @@ def _log(sender, app_data, user_data): dpg.add_menu_item(label="Option 2", check=True, callback=_log) dpg.add_menu_item(label="Option 3", check=True, default_value=True, callback=_log) - with dpg.child_window(height=60, autosize_x=True, delay_search=True): + with dpg.child_window(height=60, autosize_x=True): for i in range(10): dpg.add_text(f"Scolling Text{i}") @@ -875,7 +874,7 @@ def _selection(sender, app_data, user_data): dpg.add_button(label="Button 3") with dpg.tree_node(label="Groups"): - dpg.add_text("Groups are used to control child items placement, width, and provide a hit box for things like is the set of items are hovered, ect...") + dpg.add_text("Groups are used to control child items placement, width, and provide a hit box for things like is the set of items are hovered, etc...") with dpg.group(horizontal=True): dpg.add_button(label="Button 1") dpg.add_button(label="Button 2") @@ -1047,7 +1046,7 @@ def _update_yscroll_info(sender, app_data, user_data): for i in range(5): with dpg.table_cell(): dpg.add_text(text_items[i]) - with dpg.child_window(height=200, delay_search=True) as _child_id: + with dpg.child_window(height=200) as _child_id: for j in range(25): if j == 13: dpg.add_text("Item " + str(j), color=(255, 255, 0), tracked=True, track_offset=track_items[i]) @@ -1062,7 +1061,7 @@ def _update_yscroll_info(sender, app_data, user_data): for i in range(5): dpg.add_text(text_items[i]) with dpg.group(horizontal=True): - with dpg.child_window(height=50, horizontal_scrollbar=True, width=-200, delay_search=True) as _child_id: + with dpg.child_window(height=50, horizontal_scrollbar=True, width=-200) as _child_id: with dpg.group(horizontal=True): for j in range(25): if j == 13: @@ -1288,7 +1287,7 @@ def _scroll_programmatically(sender, app_data, user_data): with dpg.table(header_row=False, row_background=True, borders_innerH=True, borders_outerH=True, borders_innerV=True, - borders_outerV=True, delay_search=True) as table_id: + borders_outerV=True) as table_id: dpg.add_table_column(label="Header 1") dpg.add_table_column(label="Header 2") @@ -1306,8 +1305,7 @@ def _scroll_programmatically(sender, app_data, user_data): with dpg.tree_node(label="Colors"): dpg.add_text("Highlighting Rows, Columns, Cells:") - with dpg.table(header_row=False, row_background=True, - delay_search=True) as table_id: + with dpg.table(header_row=False, row_background=True) as table_id: dpg.add_table_column() dpg.add_table_column() @@ -1334,8 +1332,7 @@ def _scroll_programmatically(sender, app_data, user_data): _add_config_options(table_id, 1, "row_background", before=table_id) dpg.add_text("Coloring rows:") - with dpg.table(header_row=False, row_background=True, - delay_search=True) as table_id: + with dpg.table(header_row=False, row_background=True) as table_id: dpg.add_table_column() dpg.add_table_column() @@ -1359,7 +1356,7 @@ def _scroll_programmatically(sender, app_data, user_data): with dpg.tree_node(label="Resizable, stretch"): - with dpg.table(header_row=False, resizable=True, delay_search=True, + with dpg.table(header_row=False, resizable=True, borders_outerH=True, borders_innerV=True, borders_outerV=True) as table_id: dpg.add_table_column(label="Header 1") @@ -1378,7 +1375,7 @@ def _scroll_programmatically(sender, app_data, user_data): dpg.add_text("Only available if scrollX/scrollY are disabled and stretch columns are not used") with dpg.table(header_row=False, policy=dpg.mvTable_SizingFixedFit, resizable=True, no_host_extendX=False, - borders_innerV=True, delay_search=True, borders_outerV=True,borders_outerH=True) as table_id: + borders_innerV=True, borders_outerV=True,borders_outerH=True) as table_id: dpg.add_table_column(label="Header 1") dpg.add_table_column(label="Header 2") @@ -1395,7 +1392,7 @@ def _scroll_programmatically(sender, app_data, user_data): with dpg.table(header_row=True, policy=dpg.mvTable_SizingFixedFit, row_background=True, reorderable=True, resizable=True, no_host_extendX=False, hideable=True, - borders_innerV=True, delay_search=True, borders_outerV=True, borders_innerH=True, borders_outerH=True): + borders_innerV=True, borders_outerV=True, borders_innerH=True, borders_outerH=True): dpg.add_table_column(label="AAA", width_fixed=True) dpg.add_table_column(label="BBB", width_fixed=True) @@ -1411,7 +1408,7 @@ def _scroll_programmatically(sender, app_data, user_data): with dpg.table(header_row=True, policy=dpg.mvTable_SizingFixedFit, row_background=True, reorderable=True, resizable=True, no_host_extendX=False, hideable=True, - borders_innerV=True, delay_search=True, borders_outerV=True, borders_innerH=True, borders_outerH=True): + borders_innerV=True, borders_outerV=True, borders_innerH=True, borders_outerH=True): dpg.add_table_column(label="AAA", width_fixed=True) dpg.add_table_column(label="BBB", width_fixed=True) @@ -1432,7 +1429,7 @@ def _scroll_programmatically(sender, app_data, user_data): borders_innerH=True, borders_outerH=True, borders_innerV=True, borders_outerV=True, row_background=True, hideable=True, reorderable=True, resizable=True, sortable=True, policy=dpg.mvTable_SizingFixedFit, - scrollX=True, delay_search=True, scrollY=True): + scrollX=True, scrollY=True): c1 = dpg.add_table_column(label="One", default_sort=True) c2 = dpg.add_table_column(label="Two") @@ -1482,7 +1479,7 @@ def _scroll_programmatically(sender, app_data, user_data): with dpg.table(header_row=True, resizable=True, borders_outerH=True, borders_innerH=True, - borders_outerV=True, delay_search=True): + borders_outerV=True): dpg.add_table_column(label="One") dpg.add_table_column(label="Two") @@ -1500,7 +1497,7 @@ def _scroll_programmatically(sender, app_data, user_data): for j in range(3): dpg.add_text(f"Hello {i}, {j}") - with dpg.table(header_row=False, delay_search=True) as table_id: + with dpg.table(header_row=False) as table_id: dpg.add_table_column(width_fixed=True, init_width_or_weight=100) dpg.add_table_column(width_fixed=True, init_width_or_weight=200) @@ -1524,7 +1521,7 @@ def _scroll_programmatically(sender, app_data, user_data): with dpg.tree_node(label="Row height"): - with dpg.table(header_row=False, borders_outerH=True, borders_outerV=True, delay_search=True): + with dpg.table(header_row=False, borders_outerH=True, borders_outerV=True): dpg.add_table_column() @@ -1534,7 +1531,7 @@ def _scroll_programmatically(sender, app_data, user_data): with dpg.tree_node(label="Padding"): - with dpg.table(header_row=False, resizable=True, delay_search=True, + with dpg.table(header_row=False, resizable=True, hideable=True, reorderable=True, borders_outerV=True, borders_innerH=True) as table_id: dpg.add_table_column(label="One") @@ -1552,7 +1549,7 @@ def _scroll_programmatically(sender, app_data, user_data): with dpg.tree_node(label="Angled headers"): - with dpg.table(header_row=True, resizable=True, delay_search=True, + with dpg.table(header_row=True, resizable=True, reorderable=True) as table_id: dpg.add_table_column(label="One", angled_header=True) @@ -1566,7 +1563,7 @@ def _scroll_programmatically(sender, app_data, user_data): with dpg.tree_node(label="Reorderable, hideable, with headers"): - with dpg.table(header_row=True, resizable=True, delay_search=True, + with dpg.table(header_row=True, resizable=True, hideable=True, reorderable=True) as table_id: dpg.add_table_column(label="One") @@ -1583,7 +1580,7 @@ def _scroll_programmatically(sender, app_data, user_data): with dpg.tree_node(label="Outer Size"): - with dpg.table(header_row=False, no_host_extendX=True, delay_search=True, + with dpg.table(header_row=False, no_host_extendX=True, borders_innerH=True, borders_outerH=True, borders_innerV=True, borders_outerV=True, context_menu_in_body=True, row_background=True, policy=dpg.mvTable_SizingFixedFit, height=150) as table_id: @@ -1601,7 +1598,7 @@ def _scroll_programmatically(sender, app_data, user_data): "no_host_extendX", "no_host_extendY", "resizable", before=table_id) dpg.add_text("Using explicit size:") - with dpg.table(header_row=False, no_host_extendX=True, delay_search=True, + with dpg.table(header_row=False, no_host_extendX=True, borders_innerH=True, borders_outerH=True, borders_innerV=True, borders_outerV=True, context_menu_in_body=True, row_background=True, policy=dpg.mvTable_SizingFixedFit, height=300, width=300): @@ -1619,7 +1616,7 @@ def _scroll_programmatically(sender, app_data, user_data): # without clipping dpg.add_text("Without Clipper") - with dpg.table(header_row=True, no_host_extendX=True, delay_search=True, + with dpg.table(header_row=True, no_host_extendX=True, borders_innerH=True, borders_outerH=True, borders_innerV=True, borders_outerV=True, context_menu_in_body=True, row_background=True, policy=dpg.mvTable_SizingFixedFit, height=300, @@ -1637,7 +1634,7 @@ def _scroll_programmatically(sender, app_data, user_data): # with clipping dpg.add_text("Using Clipper") - with dpg.table(header_row=True, no_host_extendX=True, delay_search=True, + with dpg.table(header_row=True, no_host_extendX=True, borders_innerH=True, borders_outerH=True, borders_innerV=True, borders_outerV=True, context_menu_in_body=True, row_background=True, policy=dpg.mvTable_SizingFixedFit, height=300, @@ -1659,7 +1656,7 @@ def _scroll_programmatically(sender, app_data, user_data): dpg.add_text("Freezing rows/columns") with dpg.table(header_row=True, borders_innerH=True, borders_outerH=True, borders_innerV=True, borders_outerV=True, row_background=True, height=300, freeze_rows=1, freeze_columns=1, - scrollY=True, scrollX=True, policy=dpg.mvTable_SizingFixedFit, delay_search=True): + scrollY=True, scrollX=True, policy=dpg.mvTable_SizingFixedFit): dpg.add_table_column(label="1", width=50) dpg.add_table_column(label="2", width=50) @@ -1685,7 +1682,7 @@ def _scroll_programmatically(sender, app_data, user_data): dpg.add_text("Using Filter (column 3)") _filter_table_id = dpg.generate_uuid() dpg.add_input_text(label="Filter (inc, -exc)", user_data=_filter_table_id, callback=lambda s, a, u: dpg.set_value(u, dpg.get_value(s))) - with dpg.table(header_row=True, no_host_extendX=True, delay_search=True, + with dpg.table(header_row=True, no_host_extendX=True, borders_innerH=True, borders_outerH=True, borders_innerV=True, borders_outerV=True, context_menu_in_body=True, row_background=True, policy=dpg.mvTable_SizingFixedFit, height=300, @@ -1744,7 +1741,7 @@ def _sorter(e): borders_innerH=True, borders_outerH=True, borders_innerV=True, borders_outerV=True, context_menu_in_body=True, row_background=True, policy=dpg.mvTable_SizingFixedFit, height=500, sortable=True, callback=_sort_callback, - scrollY=True, delay_search=True, tag="__demo_sorting_table"): + scrollY=True, tag="__demo_sorting_table"): dpg.add_table_column(label="One") dpg.add_table_column(label="Two", no_sort=True) @@ -1829,7 +1826,7 @@ def callback(sender, value, user_data): def create_table_set(policy): - with dpg.table(header_row=False, policy=policy, delay_search=True, + with dpg.table(header_row=False, policy=policy, borders_innerH=True, borders_outerH=True, borders_innerV=True, borders_outerV=True, row_background=True) as table_id1: @@ -2142,9 +2139,9 @@ def _callback_stacked(sender, app_data, user_data): def divergent_stack_cb(sender, app_data, user_data): if app_data: - dpg.configure_item("divergent_stack_series", values=data_div, label_ids=labels_div, group_size=len(labels_reg), group_width=0.75, shift=0, stacked=True, horizontal=True) + dpg.configure_item("divergent_stack_series", values=data_div, label_ids=labels_div, group_size=len(labels_div), group_width=0.75, shift=0, stacked=True, horizontal=True) else: - dpg.configure_item("divergent_stack_series", values=data_reg, label_ids=labels_reg, group_size=len(labels_div), group_width=0.75, shift=0, stacked=True, horizontal=True) + dpg.configure_item("divergent_stack_series", values=data_reg, label_ids=labels_reg, group_size=len(labels_reg), group_width=0.75, shift=0, stacked=True, horizontal=True) dpg.add_checkbox(label="Divergent", tag="divergent_stack_cb", default_value=True, callback=divergent_stack_cb) with dpg.plot(label="PolitiFact: Who Lies More?", height=400, width=-1): diff --git a/docs/source/conf.py b/docs/source/conf.py index aebf6928a..15260b499 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -16,7 +16,7 @@ # -- Project information ----------------------------------------------------- project = 'Dear PyGui' -copyright = '2024, Jonathan Hoffstadt and Preston Cothren' +copyright = '2025, Jonathan Hoffstadt and Preston Cothren' author = 'Jonathan Hoffstadt and Preston Cothren' diff --git a/docs/source/documentation/plots.rst b/docs/source/documentation/plots.rst index fa6a43ee2..07489fb2a 100644 --- a/docs/source/documentation/plots.rst +++ b/docs/source/documentation/plots.rst @@ -342,14 +342,23 @@ Querying -------- Querying allows the user to select a region of the plot by -holding with the right mouse button and clicking with the left one. +**Ctrl + dragging the right mouse button** and dragging five +circles of the query rectangle with left mouse button. + +Double left click inside a drag rect will remove it (if *min_query_rects* allows). +If number of rects exceed *max_query_rects* when create new drag rect, it will replace the last one. + +Since DearPyGui 2.0, *query_mod* changes to *query_toggle_mod* for swapping the Ctrl key above. +*query_button* is removed, so **dragging the right mouse button** is hardcoded. +*min_query_rects, max_query_rects* limit the number of drag rects. Querying requires setting *query* to **True** when creating the plot. -The callback of the plot will run when the plot is being queried. +The callback of the plot will run when the plot is being queried (dragging five circles). +Or not using plot's callback but drag rect's callback *dpg.add_drag_rect(callback=...)*. All the query areas are sent through the *app_data* argument as -*[(x_min, x_max, y_min, y_max), (x_min, x_max, y_min, y_max), ...]*. +*((x_min, y_min, x_max, y_max), (x_min, y_min, x_max, y_max), ...)*. It is also possible to poll the plot for the query areas by calling: :py:func:`get_plot_query_rects