diff --git a/.appveyor.yml b/.appveyor.yml index 7ee7fd47..ffcecf5a 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,186 +1,310 @@ -environment: - global: - DROPBOX_TOKEN: - secure: UO64ZwJpnDQe5c7xArS14TLnqUi7TR76tJLpZVxo5lV8GJXEkDBEOjFsmaEVFQ/rvqCmMkECYE3RNWhFO/DE0o3Vh/6FCOiO2ZAQsKkOIGk= +#environment: +# global: +# DROPBOX_TOKEN: +# secure: a+7HvvAItUFtApW6GmY1HW4n3KPqR5/2KMt54YOap4ShTzbOPCkF05vOox8aiuQO2bnkvtax9PCOaEzVR15tYxeFH8qBaxHMCp7nU9AyUpk= +# +# matrix: +# +# # linux builds +# #- DOCKER_IMAGE: "quay.io/pypa/manylinux1_x86_64" +# # GCC_VERSION: 9 +# # services: docker +# # job_group: "linux" +# # appveyor_build_worker_image: ubuntu +# +# #- DOCKER_IMAGE: "quay.io/pypa/manylinux1_i686" +# # PRE_CMD: "linux32" +# # GCC_VERSION: 9 +# # services: docker +# # job_group: "linux" +# # appveyor_build_worker_image: ubuntu +# +# - image: "Ubuntu" +# appveyor_build_worker_image: Ubuntu +# APPVEYOR_JOB_NAME: "python37-x64-ubuntu" +# job_group: "linux" +# +# # win builds +# - PYTHON: "C:\\Python27" +# PYTHON_ARCH: 32 +# MSVC_VERSION: "Visual Studio 10" +# appveyor_build_worker_image: Visual Studio 2015 +# job_group: "windows" +# +# - PYTHON: "C:\\Python33" +# PYTHON_ARCH: 32 +# MSVC_VERSION: "Visual Studio 10" +# appveyor_build_worker_image: Visual Studio 2015 +# job_group: "windows" +# +# - PYTHON: "C:\\Python34" +# PYTHON_ARCH: 32 +# MSVC_VERSION: "Visual Studio 10" +# appveyor_build_worker_image: Visual Studio 2015 +# job_group: "windows" +# +# - PYTHON: "C:\\Python35" +# PYTHON_ARCH: 32 +# MSVC_VERSION: "Visual Studio 14" +# job_group: "windows" +# +# - PYTHON: "C:\\Python36" +# PYTHON_ARCH: 32 +# MSVC_VERSION: "Visual Studio 14" +# job_group: "windows" +# +# - PYTHON: "C:\\Python37" +# PYTHON_ARCH: 32 +# MSVC_VERSION: "Visual Studio 14" +# job_group: "windows" +# +# - PYTHON: "C:\\Python38" +# PYTHON_ARCH: 32 +# MSVC_VERSION: "Visual Studio 14" +# job_group: "windows" +# +# - PYTHON: "C:\\Python39" +# PYTHON_ARCH: 32 +# MSVC_VERSION: "Visual Studio 18" +# appveyor_build_worker_image: Visual Studio 2019 +# job_group: "windows" +# +# +# # x64 builds +# - PYTHON: "C:\\Python27-x64" +# PYTHON_ARCH: 64 +# MSVC_VERSION: "Visual Studio 10 Win64" +# appveyor_build_worker_image: Visual Studio 2015 +# job_group: "windows" +# +# - PYTHON: "C:\\Python33-x64" +# PYTHON_ARCH: 64 +# MSVC_VERSION: "Visual Studio 10 Win64" +# appveyor_build_worker_image: Visual Studio 2015 +# DISTUTILS_USE_SDK: "1" +# job_group: "windows" +# +# - PYTHON: "C:\\Python34-x64" +# PYTHON_ARCH: 64 +# MSVC_VERSION: "Visual Studio 10 Win64" +# appveyor_build_worker_image: Visual Studio 2015 +# DISTUTILS_USE_SDK: "1" +# job_group: "windows" +# +# - PYTHON: "C:\\Python35-x64" +# PYTHON_ARCH: 64 +# MSVC_VERSION: "Visual Studio 14 Win64" +# job_group: "windows" +# +# - PYTHON: "C:\\Python36-x64" +# PYTHON_ARCH: 64 +# MSVC_VERSION: "Visual Studio 14 Win64" +# job_group: "windows" +# +# - PYTHON: "C:\\Python37-x64" +# PYTHON_ARCH: 64 +# MSVC_VERSION: "Visual Studio 14 Win64" +# job_group: "windows" +# +# - PYTHON: "C:\\Python38-x64" +# PYTHON_ARCH: 64 +# MSVC_VERSION: "Visual Studio 14 Win64" +# job_group: "windows" +# +# - PYTHON: "C:\\Python39-x64" +# PYTHON_ARCH: 64 +# MSVC_VERSION: "Visual Studio 18 Win64" +# appveyor_build_worker_image: Visual Studio 2019 +# job_group: "windows" +# +# # osx builds +# - PY_VERSION: 2.7 +# job_group: "macos" +# appveyor_build_worker_image: macos +# +# - PY_VERSION: 3.4 +# job_group: "macos" +# appveyor_build_worker_image: macos +# +# - PY_VERSION: 3.5 +# job_group: "macos" +# appveyor_build_worker_image: macos +# +# - PY_VERSION: 3.6 +# job_group: "macos" +# appveyor_build_worker_image: macos +# +# - PY_VERSION: 3.7 +# job_group: "macos" +# appveyor_build_worker_image: macos +# +# - PY_VERSION: 3.8 +# job_group: "macos" +# appveyor_build_worker_image: macos +# +# - PY_VERSION: 3.9 +# job_group: "macos" +# appveyor_build_worker_image: macos +# +# +#for: +# - matrix: +# only: +# - job_group: windows +# +# init: +# - "ECHO %PYTHON% %PYTHON_ARCH% %MSVC_VERSION%" +# - "%PYTHON%\\python.exe --version" +# +# install: +# # python requirements needed to create distribution +# - "%PYTHON%\\python.exe -m pip install -U wheel pip" +# # get latest version of all submodules +# - "git submodule update --init --recursive" +# - "%PYTHON%\\python.exe -m pip install -U setuptools" +# - "%PYTHON%\\python.exe -m pip install -r doc/requirements-test.txt" +# +# build: off +# +# build_script: +# - "ci\\appveyor_build.cmd %PYTHON%/python.exe -m pip wheel . -w dist" +# - "%PYTHON%/python.exe -m pip install -e ." +# - "%PYTHON%/python.exe -m pytest -v --color=yes" +# +# - matrix: +# only: +# - job_group: macos +# +# init: +# - sh: | +# set -x +# if [[ "${PY_VERSION}" == "3.4" ]]; then +# export HOMEBREW_NO_AUTO_UPDATE=1 +# brew update +# brew install pyenv +# +# pyenv install --skip-existing $PY_VERSION +# pyenv local $PY_VERSION +# eval "$(pyenv init -)" +# else +# source ~/venv${PY_VERSION}/bin/activate +# fi +# python --version +# +# install: +# # python requirements needed to create distribution +# - sh: | +# python --version +# python -m pip install -U wheel pip +# git submodule update --init --recursive +# python -m pip install -U setuptools +# python -m pip install -r doc/requirements-test.txt +# +# build_script: +# # todo: install from wheel to avoid double compilation +# - sh: | +# python -m pip wheel . -w dist +# ls dist +# python -m pip install -e . +# PYTHONDEVMODE=1 python -m pytest -v --color=yes +# +# - matrix: +# only: +# - job_group: linux +# +# #init: +# # - sh: | +# # set -e +# # +# # if [[ $DOCKER_IMAGE ]]; then +# # docker pull $DOCKER_IMAGE +# # fi +# +# #install: +# # # python requirements needed to create distribution +# # - sh: | +# # python --version +# # git submodule update --init --recursive +# +# #build_script: +# # # todo: install from wheel to avoid double compilation +# # - sh: | +# # set -e +# # +# # if [[ $DOCKER_IMAGE ]]; then +# # # if docker image is set then run actual Linux build inside of docker +# # docker run --rm -v `pwd`:/io $DOCKER_IMAGE $PRE_CMD /io/ci/docker_build_wheels.sh +# # +# # else +# # # note: if it is not a docker-based build then just run coverage on python3 +# # # and do not create wheels (they will not be uploaded). +# # python3 --version +# # python3 -m pip freeze +# # +# # python3 -m pip install -r doc/requirements-test.txt +# # python3 -m pip install coverage +# # python3 -m pip install coveralls +# # +# # _CYTHONIZE_WITH_COVERAGE=1 pip install -e . +# # PYTHONDEVMODE=1 python3 -m coverage run --source imgui -m pytest -v --color=yes +# # python3 -m coverage report +# # coveralls +# # fi +# +# stack: python 3.7 +# +# init: +# - cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH% +# +# install: +# # python requirements needed to create distribution +# - sh: | +# python --version +# git submodule update --init --recursive +# python -m pip install cibuildwheel==2.2.0 +# +# # TODO: We will remove the --platform parameter when going full cibuildwheel +# build_script: python -m cibuildwheel --output-dir dist --platform linux +# +# artifacts: +# - path: "dist\\*.whl" +# name: Wheels +# +#on_success: +# - ps: | +# if ($env:APPVEYOR_REPO_BRANCH -eq "master") +# { +# python -m pip install dropbox +# python ci/dropbox_upload.py $(python setup.py --version) +# } +# else +# { +# Write-Host "Not a master branch. Upload skipped." +# } +# +#artifacts: +# - path: dist\* +# +environment: matrix: - # win builds - - PYTHON: "C:\\Python27" - PYTHON_ARCH: 32 - MSVC_VERSION: "Visual Studio 10" - job_group: "windows" - - - PYTHON: "C:\\Python33" - PYTHON_ARCH: 32 - MSVC_VERSION: "Visual Studio 10" - job_group: "windows" - - - PYTHON: "C:\\Python34" - PYTHON_ARCH: 32 - MSVC_VERSION: "Visual Studio 10" - job_group: "windows" - - - PYTHON: "C:\\Python35" - PYTHON_ARCH: 32 - MSVC_VERSION: "Visual Studio 14" - job_group: "windows" - - - PYTHON: "C:\\Python36" - PYTHON_ARCH: 32 - MSVC_VERSION: "Visual Studio 14" - job_group: "windows" - - - PYTHON: "C:\\Python37" - PYTHON_ARCH: 32 - MSVC_VERSION: "Visual Studio 14" - job_group: "windows" - - - PYTHON: "C:\\Python38" - PYTHON_ARCH: 32 - MSVC_VERSION: "Visual Studio 14" - job_group: "windows" - - - PYTHON: "C:\\Python39" - PYTHON_ARCH: 32 - MSVC_VERSION: "Visual Studio 18" - appveyor_build_worker_image: Visual Studio 2019 - job_group: "windows" - - - # x64 builds - - PYTHON: "C:\\Python27-x64" - PYTHON_ARCH: 64 - MSVC_VERSION: "Visual Studio 10 Win64" - job_group: "windows" - - - PYTHON: "C:\\Python33-x64" - PYTHON_ARCH: 64 - MSVC_VERSION: "Visual Studio 10 Win64" - DISTUTILS_USE_SDK: "1" - job_group: "windows" - - - PYTHON: "C:\\Python34-x64" - PYTHON_ARCH: 64 - MSVC_VERSION: "Visual Studio 10 Win64" - DISTUTILS_USE_SDK: "1" - job_group: "windows" - - - PYTHON: "C:\\Python35-x64" - PYTHON_ARCH: 64 - MSVC_VERSION: "Visual Studio 14 Win64" - job_group: "windows" - - - PYTHON: "C:\\Python36-x64" - PYTHON_ARCH: 64 - MSVC_VERSION: "Visual Studio 14 Win64" - job_group: "windows" - - - PYTHON: "C:\\Python37-x64" - PYTHON_ARCH: 64 - MSVC_VERSION: "Visual Studio 14 Win64" - job_group: "windows" - - - PYTHON: "C:\\Python38-x64" - PYTHON_ARCH: 64 - MSVC_VERSION: "Visual Studio 14 Win64" - job_group: "windows" - - - PYTHON: "C:\\Python39-x64" - PYTHON_ARCH: 64 - MSVC_VERSION: "Visual Studio 18 Win64" - appveyor_build_worker_image: Visual Studio 2019 - job_group: "windows" + - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu + APPVEYOR_JOB_NAME: "python37-x64-ubuntu" + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + APPVEYOR_JOB_NAME: "python37-x64-vs2015" + - APPVEYOR_BUILD_WORKER_IMAGE: macos-mojave + APPVEYOR_JOB_NAME: "python37-x64-macos-mojave" - # osx builds - - PY_VERSION: 2.7 - job_group: "macos" - appveyor_build_worker_image: macos +stack: python 3.7 - - PY_VERSION: 3.4 - job_group: "macos" - appveyor_build_worker_image: macos +init: +- cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH% - - PY_VERSION: 3.5 - job_group: "macos" - appveyor_build_worker_image: macos - - - PY_VERSION: 3.6 - job_group: "macos" - appveyor_build_worker_image: macos - - - PY_VERSION: 3.7 - job_group: "macos" - appveyor_build_worker_image: macos - - - PY_VERSION: 3.8 - job_group: "macos" - appveyor_build_worker_image: macos - - - PY_VERSION: 3.9 - job_group: "macos" - appveyor_build_worker_image: macos - - -for: - - matrix: - only: - - job_group: windows - - init: - - "ECHO %PYTHON% %PYTHON_ARCH% %MSVC_VERSION%" - - "%PYTHON%\\python.exe --version" - - install: - # python requirements needed to create distribution - - "%PYTHON%\\python.exe -m pip install -U wheel pip" - # get latest version of all submodules - - "git submodule update --init --recursive" - - "%PYTHON%\\python.exe -m pip install -U setuptools" - - "%PYTHON%\\python.exe -m pip install -r doc/requirements-test.txt" - - build: off - - build_script: - - "ci\\appveyor_build.cmd %PYTHON%/python.exe -m pip wheel . -w dist" - - "%PYTHON%/python.exe -m pip install -e ." - - "%PYTHON%/python.exe -m pytest -v --color=yes" - - - matrix: - only: - - job_group: macos - - init: - - sh: | - set -x - if [[ "${PY_VERSION}" == "3.4" ]]; then - export HOMEBREW_NO_AUTO_UPDATE=1 - brew update - brew install pyenv - - pyenv install --skip-existing $PY_VERSION - pyenv local $PY_VERSION - eval "$(pyenv init -)" - else - source ~/venv${PY_VERSION}/bin/activate - fi - python --version - - install: - # python requirements needed to create distribution - - sh: | - python --version - python -m pip install -U wheel pip - git submodule update --init --recursive - python -m pip install -U setuptools - python -m pip install -r doc/requirements-test.txt - - build_script: - # todo: install from wheel to avoid double compilation - - sh: | - python -m pip wheel . -w dist - ls dist - python -m pip install -e . - PYTHONDEVMODE=1 python -m pytest -v --color=yes +install: | + python --version + git submodule update --init --recursive + python -m pip install cibuildwheel==2.1.3 +build_script: python -m cibuildwheel --output-dir dist on_success: - ps: | @@ -193,6 +317,9 @@ on_success: { Write-Host "Not a master branch. Upload skipped." } - artifacts: - - path: dist\* + - path: "dist\\*.whl" + name: Wheels + +matrix: + fast_finish: true diff --git a/README.md b/README.md index f81c1665..c6148547 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![completion](https://img.shields.io/badge/completion-81%25%20%28373%20of%20458%29-blue.svg)](https://github.com/swistakm/pyimgui) +[![completion](https://img.shields.io/badge/completion-70%25%20%28517%20of%20734%29-blue.svg)](https://github.com/swistakm/pyimgui) [![Coverage Status](https://coveralls.io/repos/github/swistakm/pyimgui/badge.svg?branch=master)](https://coveralls.io/github/swistakm/pyimgui?branch=master) [![Documentation Status](https://readthedocs.org/projects/pyimgui/badge/?version=latest)](https://pyimgui.readthedocs.io/en/latest/?badge=latest) diff --git a/conftest.py b/conftest.py index 4bca2973..7c05efa8 100644 --- a/conftest.py +++ b/conftest.py @@ -9,11 +9,20 @@ from _pytest.outcomes import Skipped from sphinx.application import Sphinx -import imgui - PROJECT_ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) sphinx = None +if 'FROM_APPVEYOR' in os.environ: + # We need to trick the import mechanism in order to load the + # builded wheel instead of the local src directory + init_file_path = os.path.join(PROJECT_ROOT_DIR, 'imgui','__init__.py') + init_file_path_tmp = os.path.join(PROJECT_ROOT_DIR, 'imgui','__init__TMP.py') + os.rename(init_file_path, init_file_path_tmp) + import imgui + os.rename(init_file_path_tmp, init_file_path) +else: + import imgui + def project_path(*paths): return os.path.join(PROJECT_ROOT_DIR, *paths) @@ -25,7 +34,6 @@ def _ns(locals_, globals_): ns.update(globals_) return ns - class SphinxDoc(pytest.File): def __init__(self, path, parent): # yuck! diff --git a/doc/examples/integrations_glfw3.py b/doc/examples/integrations_glfw3.py index 3eb69704..dfc2bc0f 100644 --- a/doc/examples/integrations_glfw3.py +++ b/doc/examples/integrations_glfw3.py @@ -10,7 +10,8 @@ def main(): imgui.create_context() window = impl_glfw_init() impl = GlfwRenderer(window) - + io = imgui.get_io() + io.config_flags |= imgui.CONFIG_VIEWPORTS_ENABLE | imgui.CONFIG_DOCKING_ENABLE show_custom_window = True while not glfw.window_should_close(window): @@ -18,23 +19,28 @@ def main(): impl.process_inputs() imgui.new_frame() - - if imgui.begin_main_menu_bar(): - if imgui.begin_menu("File", True): - - clicked_quit, selected_quit = imgui.menu_item( - "Quit", 'Cmd+Q', False, True - ) - - if clicked_quit: - exit(1) - - imgui.end_menu() - imgui.end_main_menu_bar() - - + viewport = imgui.get_main_viewport() + imgui.set_next_window_position(viewport.pos.x, viewport.pos.y) + imgui.set_next_window_size(viewport.size[0], viewport.size[1]) + imgui.set_next_window_viewport(viewport.id) + imgui.set_next_window_bg_alpha(0.0) + window_flags = imgui.WINDOW_MENU_BAR|imgui.WINDOW_NO_DOCKING + window_flags |= imgui.WINDOW_NO_TITLE_BAR|imgui.WINDOW_NO_COLLAPSE|imgui.WINDOW_NO_RESIZE + window_flags |= imgui.WINDOW_NO_MOVE|imgui.WINDOW_NO_BRING_TO_FRONT_ON_FOCUS|imgui.WINDOW_NO_NAV_FOCUS + + imgui.push_style_var(imgui.STYLE_WINDOW_ROUNDING, 0.0) + imgui.push_style_var(imgui.STYLE_WINDOW_BORDERSIZE, 0.0) + imgui.push_style_var(imgui.STYLE_WINDOW_PADDING,(0.0,0.0)) + imgui.begin("Dockspace Demo", 0, window_flags) + imgui.pop_style_var() + imgui.pop_style_var() + imgui.pop_style_var() + + flags = imgui.DOCK_NODE_PASS_THRU_CENTRAL_NODE + id = imgui.get_id('MyDockspace') + imgui.dockspace(id, flags=flags) if show_custom_window: - is_expand, show_custom_window = imgui.begin("Custom window", True) + is_expand, show_custom_window = imgui.begin("Custom window", True, ) if is_expand: imgui.text("Bar") imgui.text_ansi("B\033[31marA\033[mnsi ") @@ -42,10 +48,10 @@ def main(): imgui.extra.text_ansi_colored("Eggs", 0.2, 1., 0.) imgui.end() - show_test_window() - #imgui.show_test_window() - - gl.glClearColor(1., 1., 1., 1) + # show_test_window() + imgui.show_test_window() + imgui.end() + gl.glClearColor(.1, .1, .1, 1) gl.glClear(gl.GL_COLOR_BUFFER_BIT) imgui.render() diff --git a/imgui-cpp b/imgui-cpp index 35b1148e..71a78dd2 160000 --- a/imgui-cpp +++ b/imgui-cpp @@ -1 +1 @@ -Subproject commit 35b1148efb839381b84de9290d9caf0b66ad7d03 +Subproject commit 71a78dd2acb5e8a82220f03ba1b382175b5c7913 diff --git a/imgui/cimgui.pxd b/imgui/cimgui.pxd index 7e9ad89e..523ba745 100644 --- a/imgui/cimgui.pxd +++ b/imgui/cimgui.pxd @@ -32,6 +32,8 @@ cdef extern from "imgui.h": ctypedef struct ImGuiListClipper ctypedef struct ImGuiOnceUponAFrame ctypedef struct ImGuiPayload + ctypedef struct ImGuiPlatformIO + ctypedef struct ImGuiPlatformMonitor ctypedef struct ImGuiSizeCallbackData ctypedef struct ImGuiStorage # ctypedef struct ImGuiStyle # declared later @@ -39,6 +41,7 @@ cdef extern from "imgui.h": ctypedef struct ImGuiTableColumnSortSpecs ctypedef struct ImGuiTextBuffer ctypedef struct ImGuiTextFilter + ctypedef struct ImGuiWindowClass # ctypedef struct ImGuiViewport # declared later # ==== @@ -64,6 +67,7 @@ cdef extern from "imgui.h": ctypedef int ImGuiColorEditFlags ctypedef int ImGuiConfigFlags ctypedef int ImGuiComboFlags + ctypedef int ImGuiDockNodeFlags ctypedef int ImGuiDragDropFlags ctypedef int ImGuiFocusedFlags ctypedef int ImGuiHoveredFlags @@ -128,7 +132,60 @@ cdef extern from "imgui.h": float y float z float w - + + cdef cppclass ImVector[T]: + int Size + int Capacity + T* Data + + cdef cppclass ImGuiStyle: + float Alpha # ✓ + ImVec2 WindowPadding # ✓ + float WindowRounding # ✓ + float WindowBorderSize # ✓ + ImVec2 WindowMinSize # ✓ + ImVec2 WindowTitleAlign # ✓ + ImGuiDir WindowMenuButtonPosition # ✓ + float ChildRounding # ✓ + float ChildBorderSize # ✓ + float PopupRounding # ✓ + float PopupBorderSize # ✓ + ImVec2 FramePadding # ✓ + float FrameRounding # ✓ + float FrameBorderSize # ✓ + ImVec2 ItemSpacing # ✓ + ImVec2 ItemInnerSpacing # ✓ + ImVec2 CellPadding # ✓ + ImVec2 TouchExtraPadding # ✓ + float IndentSpacing # ✓ + float ColumnsMinSpacing # ✓ + float ScrollbarSize # ✓ + float ScrollbarRounding # ✓ + float GrabMinSize # ✓ + float GrabRounding # ✓ + float LogSliderDeadzone # ✓ + float TabRounding # ✓ + float TabBorderSize # ✓ + float TabMinWidthForCloseButton # ✓ + ImGuiDir ColorButtonPosition # ✓ + ImVec2 ButtonTextAlign # ✓ + ImVec2 SelectableTextAlign # ✓ + ImVec2 DisplayWindowPadding # ✓ + ImVec2 DisplaySafeAreaPadding # ✓ + float MouseCursorScale # ✓ + bool AntiAliasedLines # ✓ + bool AntiAliasedLinesUseTex # ✓ + bool AntiAliasedFill # ✓ + float CurveTessellationTol # ✓ + float CircleTessellationMaxError # ✓ + + # note: originally Colors[ImGuiCol_COUNT] + # todo: find a way to access enum var here + ImVec4* Colors + + void ScaleAllSizes(float scale_factor) except + # ✗ + + ctypedef struct ImGuiIO: # ==== @@ -158,6 +215,17 @@ cdef extern from "imgui.h": #ImVec2 DisplayVisibleMin # ✓ # DEPRECIATED #ImVec2 DisplayVisibleMax # ✓ # DEPRECIATED + # Docking options + bool ConfigDockingNoSplit + bool ConfigDockingAlwaysTabBar + bool ConfigDockingTransparentPayload + + # Viewport options + bool ConfigViewportsNoAutoMerge + bool ConfigViewportsNoTaskBarIcon + bool ConfigViewportsNoDecoration + bool ConfigViewportsNoDefaultParent + # Miscellaneous options bool MouseDrawCursor # ✓ bool ConfigMacOSXBehaviors # ✓ @@ -173,7 +241,7 @@ cdef extern from "imgui.h": # Platform/Render const char* BackendPlatformName # ✗ const char* BackendRendererName # ✗ - void* BackendPlatformUserData # ✗ + void* BackendPlatformUserData # ✗ void* BackendRendererUserData # ✗ void* BackendLanguageUserData # ✗ @@ -252,11 +320,59 @@ cdef extern from "imgui.h": ImVec2 Pos # Read-only # ✓ ImVec2 CurrentSize # Read-only # ✓ ImVec2 DesiredSize # Read-write # ✓ + + + ctypedef struct ImGuiWindowClass: + ImGuiID ClassId + ImGuiID ParentViewportId + ImGuiViewportFlags ViewportFlagsOverrideSet + ImGuiViewportFlags ViewportFlagsOverrideClear + ImGuiTabItemFlags TabItemFlagsOverrideSet + ImGuiDockNodeFlags DockNodeFlagsOverrideSet + bool DockingAlwaysTabBar + bool DockingAllowUnclassed + + ImGuiWindowClass() except + + + ctypedef struct ImGuiPayload: # ✗ + void* Data # ✓ + int DataSize # ✓ + + bool IsDataType(const char* type) except + # ✗ + bool IsPreview() except + # ✗ + bool IsDelivery() except + # ✗ - cdef cppclass ImVector[T]: - int Size - int Capacity - T* Data + ctypedef struct ImGuiTableColumnSortSpecs: # ✓ + ImGuiID ColumnUserID # ✓ + ImS16 ColumnIndex # ✓ + ImS16 SortOrder # ✓ + ImGuiSortDirection SortDirection # ✓ + + ImGuiTableColumnSortSpecs() except + # ✗ + + ctypedef struct ImGuiTableSortSpecs: # ✓ + const ImGuiTableColumnSortSpecs* Specs # ✓ + int SpecsCount # ✓ + bool SpecsDirty # ✓ + + ImGuiTableSortSpecs() except + # ✗ + + ctypedef struct ImGuiOnceUponAFrame: + ImGuiOnceUponAFrame() + int RefFrame + + ctypedef struct ImGuiTextFilter: # X + #ImGui_API ImGuiTextFilter(str default_filter) + bool Draw(str label, float width) + bool PassFilter(str text, str text_end) + void Build() + void Clear() + bool isActive() + + ctypedef struct ImGuiTextBuffer: # X + pass + ctypedef struct ImGuiStorage: # ✗ + pass ctypedef struct ImGuiListClipper: # ✗ int DisplayStart # ✗ @@ -620,7 +736,8 @@ cdef extern from "imgui.h": ImVec2 DisplayPos # ✓ ImVec2 DisplaySize # ✓ ImVec2 FramebufferScale # ✓ - + ImGuiViewport* OwnerViewport + void DeIndexAllBuffers() except + # ✓ void ScaleClipRects(const ImVec2&) except + # ✓ @@ -833,92 +950,53 @@ cdef extern from "imgui.h": ) except + ImFontAtlasCustomRect* GetCustomRectByIndex(int index) except + # ✗ - ctypedef struct ImGuiStorage: # ✗ - pass - - cdef cppclass ImGuiStyle: - float Alpha # ✓ - ImVec2 WindowPadding # ✓ - float WindowRounding # ✓ - float WindowBorderSize # ✓ - ImVec2 WindowMinSize # ✓ - ImVec2 WindowTitleAlign # ✓ - ImGuiDir WindowMenuButtonPosition # ✓ - float ChildRounding # ✓ - float ChildBorderSize # ✓ - float PopupRounding # ✓ - float PopupBorderSize # ✓ - ImVec2 FramePadding # ✓ - float FrameRounding # ✓ - float FrameBorderSize # ✓ - ImVec2 ItemSpacing # ✓ - ImVec2 ItemInnerSpacing # ✓ - ImVec2 CellPadding # ✓ - ImVec2 TouchExtraPadding # ✓ - float IndentSpacing # ✓ - float ColumnsMinSpacing # ✓ - float ScrollbarSize # ✓ - float ScrollbarRounding # ✓ - float GrabMinSize # ✓ - float GrabRounding # ✓ - float LogSliderDeadzone # ✓ - float TabRounding # ✓ - float TabBorderSize # ✓ - float TabMinWidthForCloseButton # ✓ - ImGuiDir ColorButtonPosition # ✓ - ImVec2 ButtonTextAlign # ✓ - ImVec2 SelectableTextAlign # ✓ - ImVec2 DisplayWindowPadding # ✓ - ImVec2 DisplaySafeAreaPadding # ✓ - float MouseCursorScale # ✓ - bool AntiAliasedLines # ✓ - bool AntiAliasedLinesUseTex # ✓ - bool AntiAliasedFill # ✓ - float CurveTessellationTol # ✓ - float CircleTessellationMaxError # ✓ - - # note: originally Colors[ImGuiCol_COUNT] - # todo: find a way to access enum var here - ImVec4* Colors - - void ScaleAllSizes(float scale_factor) except + # ✗ - - ctypedef struct ImGuiPayload: # ✗ - void* Data # ✓ - int DataSize # ✓ - - bool IsDataType(const char* type) except + # ✗ - bool IsPreview() except + # ✗ - bool IsDelivery() except + # ✗ - - ctypedef struct ImGuiTableColumnSortSpecs: # ✓ - ImGuiID ColumnUserID # ✓ - ImS16 ColumnIndex # ✓ - ImS16 SortOrder # ✓ - ImGuiSortDirection SortDirection # ✓ - - ImGuiTableColumnSortSpecs() except + # ✗ - - ctypedef struct ImGuiTableSortSpecs: # ✓ - const ImGuiTableColumnSortSpecs* Specs # ✓ - int SpecsCount # ✓ - bool SpecsDirty # ✓ - - ImGuiTableSortSpecs() except + # ✗ ctypedef struct ImGuiContext: pass ctypedef struct ImGuiViewport: # ✓ + ImGuiID ID ImGuiViewportFlags Flags # ✓ ImVec2 Pos # ✓ ImVec2 Size # ✓ ImVec2 WorkPos # ✓ ImVec2 WorkSize # ✓ - + float DpiScale ImVec2 GetCenter() except + # ✓ ImVec2 GetWorkCenter() except + # ✓ + ctypedef struct ImgGuiPlatformIO: + void (*Platform_CreateWindow)(ImGuiViewport* vp) + void (*Platform_DestroyWindow)(ImGuiViewport* vp) + void (*Platform_ShowWindow)(ImGuiViewport* vp) + void (*Platform_SetWindowPos)(ImGuiViewport* vp, ImVec2 pos) + ImVec2 (*Platform_GetWindowPos)(ImGuiViewport* vp) + void (*Platform_SetWindowSize)(ImGuiViewport* vp, ImVec2 size) + ImVec2 (*Platform_GetWindowSize)(ImGuiViewport* vp) + void (*Platform_SetWindowFocus)(ImGuiViewport* vp) + bool (*Platform_GetWindowFocus)(ImGuiViewport* vp) + bool (*Platform_GetWindowMinimized)(ImGuiViewport* vp) + void (*Platform_SetWindowTitle)(ImGuiViewport* vp, const char* str) + void (*Platform_SetWindowAlpha)(ImGuiViewport* vp, float alpha) + void (*Platform_UpdateWindow)(ImGuiViewport* vp) + void (*Platform_RenderWindow)(ImGuiViewport* vp, void* render_arg) + void (*Platform_SwapBuffers)(ImGuiViewport* vp, void* render_arg) + float (*Platform_GetWindowDpiScale)(ImGuiViewport* vp) + void (*Platform_OnChangedViewport)(ImGuiViewport* vp) + void (*Platform_SetImeInputPos)(ImGuiViewport* vp, ImVec2 pos) + int (*Platform_CreateVkSurface)(ImGuiViewport* vp, ImU64 vk_inst, const void* vk_allocators, ImU64* out_vk_surface) + + ImVector[ImGuiPlatformMonitor] Monitors + + ImVector[ImGuiViewport*] Viewports + ImGuiPlatformIO() + + ctypedef struct ImGuiPlatformMonitor: + ImVec2 MainPos + ImVec2 MainSize + float DpiScale + ImGuiPlatformMonitor() + cdef extern from "imgui.h" namespace "ImGui": # ==== @@ -1022,6 +1100,7 @@ cdef extern from "imgui.h" namespace "ImGui": ImVec2 GetWindowSize() except + # ✓ float GetWindowWidth() except + # ✓ float GetWindowHeight() except + # ✓ + ImGuiViewport* GetWindowViewport() except + void SetNextWindowPos( # ✓ note: overrides ommited const ImVec2& pos, @@ -1049,6 +1128,7 @@ cdef extern from "imgui.h" namespace "ImGui": ) except + void SetNextWindowFocus() except + # ✓ void SetNextWindowBgAlpha(float alpha) except + # ✓ + void SetNextWindowViewport(ImGuiID viewport_id) except + void SetWindowPos( # ✓ const ImVec2& pos, # note: optional @@ -1081,12 +1161,11 @@ cdef extern from "imgui.h" namespace "ImGui": ImGuiCond cond # = 0 ) except + void SetWindowFocus(const char* name) except + # ✓ - + void SetWindowFontScale(float scale) except + # ==== # Content region ImVec2 GetContentRegionAvail() except + # ✓ ImVec2 GetContentRegionMax() except + # ✓ - float GetContentRegionAvailWidth() except + # ✓ # OBSOLETED in 1.70 (from May 2019) ImVec2 GetWindowContentRegionMin() except + # ✓ ImVec2 GetWindowContentRegionMax() except + # ✓ float GetWindowContentRegionWidth() except + # ✓ @@ -2014,6 +2093,26 @@ cdef extern from "imgui.h" namespace "ImGui": ) except + void SetTabItemClosed(const char* tab_or_docked_window_label) except + # ✓ + # DOCKSPACE + ImGuiID DockSpace( + ImGuiID id, + const ImVec2& size, + ImGuiDockNodeFlags flags, + const ImGuiWindowClass* window_class + ) except + + ImGuiID DockSpaceOverViewport( + const ImGuiViewport* viewport, + ImGuiDockNodeFlags flags, + const ImGuiWindowClass* window_class + ) except + + void SetNextWindowDockID( + ImGuiID dock_id, + ImGuiCond cond + ) except + + void SetNextWindowClass(const ImGuiWindowClass* window_class) except + + ImGuiID GetWindowDockID() except + + bool IsWindowDocked() except + + # ==== # Logging/Capture # Logging: all text output from interface is redirected to @@ -2239,4 +2338,12 @@ cdef extern from "imgui.h" namespace "ImGui": void* MemAlloc(size_t size) except + # ✗ void MemFree(void* ptr) except + # ✗ + # Multi-viewport + ImGuiPlatformIO& GetPlatformIO() + void UpdatePlatformWindows() + void RenderPlatformWindowsDefault() + void DestroyPlatformWindows() + ImGuiViewport* FindViewportByID(ImGuiID id) + ImGuiViewport* FindViewportByPlatformHandle(void* platform_handle) + \ No newline at end of file diff --git a/imgui/core.pyx b/imgui/core.pyx index f6184781..3bec8428 100644 --- a/imgui/core.pyx +++ b/imgui/core.pyx @@ -44,95 +44,6 @@ DEF TARGET_IMGUI_VERSION = (1, 79) cdef unsigned short* _LATIN_ALL = [0x0020, 0x024F , 0] -# ==== Condition enum redefines ==== -NONE = enums.ImGuiCond_None -ALWAYS = enums.ImGuiCond_Always -ONCE = enums.ImGuiCond_Once -FIRST_USE_EVER = enums.ImGuiCond_FirstUseEver -APPEARING = enums.ImGuiCond_Appearing - -# ==== Style var enum redefines ==== -STYLE_ALPHA = enums.ImGuiStyleVar_Alpha # float -STYLE_WINDOW_PADDING = enums.ImGuiStyleVar_WindowPadding # Vec2 -STYLE_WINDOW_ROUNDING = enums.ImGuiStyleVar_WindowRounding # float -STYLE_WINDOW_BORDERSIZE = enums.ImGuiStyleVar_WindowBorderSize # float -STYLE_WINDOW_MIN_SIZE = enums.ImGuiStyleVar_WindowMinSize # Vec2 -STYLE_WINDOW_TITLE_ALIGN = enums.ImGuiStyleVar_WindowTitleAlign # Vec2 -STYLE_CHILD_ROUNDING = enums.ImGuiStyleVar_ChildRounding # float -STYLE_CHILD_BORDERSIZE = enums.ImGuiStyleVar_ChildBorderSize # float -STYLE_POPUP_ROUNDING = enums.ImGuiStyleVar_PopupRounding # float -STYLE_POPUP_BORDERSIZE = enums.ImGuiStyleVar_PopupBorderSize # float -STYLE_FRAME_PADDING = enums.ImGuiStyleVar_FramePadding # Vec2 -STYLE_FRAME_ROUNDING = enums.ImGuiStyleVar_FrameRounding # float -STYLE_FRAME_BORDERSIZE = enums.ImGuiStyleVar_FrameBorderSize # float -STYLE_ITEM_SPACING = enums.ImGuiStyleVar_ItemSpacing # Vec2 -STYLE_ITEM_INNER_SPACING = enums.ImGuiStyleVar_ItemInnerSpacing # Vec2 -STYLE_INDENT_SPACING = enums.ImGuiStyleVar_IndentSpacing # float -STYLE_CELL_PADDING = enums.ImGuiStyleVar_CellPadding # ImVec2 CellPadding -STYLE_SCROLLBAR_SIZE = enums.ImGuiStyleVar_ScrollbarSize # float -STYLE_SCROLLBAR_ROUNDING = enums.ImGuiStyleVar_ScrollbarRounding # float -STYLE_GRAB_MIN_SIZE = enums.ImGuiStyleVar_GrabMinSize # float -STYLE_GRAB_ROUNDING = enums.ImGuiStyleVar_GrabRounding # float -STYLE_TAB_ROUNDING = enums.ImGuiStyleVar_TabRounding # flot -STYLE_BUTTON_TEXT_ALIGN = enums.ImGuiStyleVar_ButtonTextAlign # Vec2 -STYLE_SELECTABLE_TEXT_ALIGN = enums.ImGuiStyleVar_SelectableTextAlign # Vec2 - -# ==== Button Flags ==== -BUTTON_NONE = enums.ImGuiButtonFlags_None -BUTTON_MOUSE_BUTTON_LEFT = enums.ImGuiButtonFlags_MouseButtonLeft -BUTTON_MOUSE_BUTTON_RIGHT = enums.ImGuiButtonFlags_MouseButtonRight -BUTTON_MOUSE_BUTTON_MIDDLE = enums.ImGuiButtonFlags_MouseButtonMiddle - -# ==== Key map enum redefines ==== -KEY_TAB = enums.ImGuiKey_Tab # for tabbing through fields -KEY_LEFT_ARROW = enums.ImGuiKey_LeftArrow # for text edit -KEY_RIGHT_ARROW = enums.ImGuiKey_RightArrow # for text edit -KEY_UP_ARROW = enums.ImGuiKey_UpArrow # for text edit -KEY_DOWN_ARROW = enums.ImGuiKey_DownArrow # for text edit -KEY_PAGE_UP = enums.ImGuiKey_PageUp -KEY_PAGE_DOWN = enums.ImGuiKey_PageDown -KEY_HOME = enums.ImGuiKey_Home # for text edit -KEY_END = enums.ImGuiKey_End # for text edit -KEY_INSERT = enums.ImGuiKey_Insert # for text edit -KEY_DELETE = enums.ImGuiKey_Delete # for text edit -KEY_BACKSPACE = enums.ImGuiKey_Backspace # for text edit -KEY_SPACE = enums.ImGuiKey_Space # for text edit -KEY_ENTER = enums.ImGuiKey_Enter # for text edit -KEY_ESCAPE = enums.ImGuiKey_Escape # for text edit -KEY_PAD_ENTER = enums.ImGuiKey_KeyPadEnter -KEY_A = enums.ImGuiKey_A # for text edit CTRL+A: select all -KEY_C = enums.ImGuiKey_C # for text edit CTRL+C: copy -KEY_V = enums.ImGuiKey_V # for text edit CTRL+V: paste -KEY_X = enums.ImGuiKey_X # for text edit CTRL+X: cut -KEY_Y = enums.ImGuiKey_Y # for text edit CTRL+Y: redo -KEY_Z = enums.ImGuiKey_Z # for text edit CTRL+Z: undo - -# ==== Key Mod Flags ==== -KEY_MOD_NONE = enums.ImGuiKeyModFlags_None -KEY_MOD_CTRL = enums.ImGuiKeyModFlags_Ctrl -KEY_MOD_SHIFT = enums.ImGuiKeyModFlags_Shift -KEY_MOD_ALT = enums.ImGuiKeyModFlags_Alt -KEY_MOD_SUPER = enums.ImGuiKeyModFlags_Super - -# ==== Nav Input ==== -NAV_INPUT_ACTIVATE = enums.ImGuiNavInput_Activate -NAV_INPUT_CANCEL = enums.ImGuiNavInput_Cancel -NAV_INPUT_INPUT = enums.ImGuiNavInput_Input -NAV_INPUT_MENU = enums.ImGuiNavInput_Menu -NAV_INPUT_DPAD_LEFT = enums.ImGuiNavInput_DpadLeft -NAV_INPUT_DPAD_RIGHT = enums.ImGuiNavInput_DpadRight -NAV_INPUT_DPAD_UP = enums.ImGuiNavInput_DpadUp -NAV_INPUT_DPAD_DOWN = enums.ImGuiNavInput_DpadDown -NAV_INPUT_L_STICK_LEFT = enums.ImGuiNavInput_LStickLeft -NAV_INPUT_L_STICK_RIGHT = enums.ImGuiNavInput_LStickRight -NAV_INPUT_L_STICK_UP = enums.ImGuiNavInput_LStickUp -NAV_INPUT_L_STICK_DOWN = enums.ImGuiNavInput_LStickDown -NAV_INPUT_FOCUS_PREV = enums.ImGuiNavInput_FocusPrev -NAV_INPUT_FOCUS_NEXT = enums.ImGuiNavInput_FocusNext -NAV_INPUT_TWEAK_SLOW = enums.ImGuiNavInput_TweakSlow -NAV_INPUT_TWEAK_FAST = enums.ImGuiNavInput_TweakFast -NAV_INPUT_COUNT = enums.ImGuiNavInput_COUNT - # ==== Window flags enum redefines ==== WINDOW_NONE = enums.ImGuiWindowFlags_None WINDOW_NO_TITLE_BAR = enums.ImGuiWindowFlags_NoTitleBar @@ -158,35 +69,31 @@ WINDOW_UNSAVED_DOCUMENT = enums.ImGuiWindowFlags_UnsavedDocument WINDOW_NO_NAV = enums.ImGuiWindowFlags_NoNav WINDOW_NO_DECORATION = enums.ImGuiWindowFlags_NoDecoration WINDOW_NO_INPUTS = enums.ImGuiWindowFlags_NoInputs +WINDOW_NO_DOCKING = enums.ImGuiWindowFlags_NoDocking -# ==== Color Edit Flags ==== -COLOR_EDIT_NONE = enums.ImGuiColorEditFlags_None -COLOR_EDIT_NO_ALPHA = enums.ImGuiColorEditFlags_NoAlpha -COLOR_EDIT_NO_PICKER = enums.ImGuiColorEditFlags_NoPicker -COLOR_EDIT_NO_OPTIONS = enums.ImGuiColorEditFlags_NoOptions -COLOR_EDIT_NO_SMALL_PREVIEW = enums.ImGuiColorEditFlags_NoSmallPreview -COLOR_EDIT_NO_INPUTS = enums.ImGuiColorEditFlags_NoInputs -COLOR_EDIT_NO_TOOLTIP = enums.ImGuiColorEditFlags_NoTooltip -COLOR_EDIT_NO_LABEL = enums.ImGuiColorEditFlags_NoLabel -COLOR_EDIT_NO_SIDE_PREVIEW = enums.ImGuiColorEditFlags_NoSidePreview -COLOR_EDIT_NO_DRAG_DROP = enums.ImGuiColorEditFlags_NoDragDrop -COLOR_EDIT_NO_BORDER = enums.ImGuiColorEditFlags_NoBorder - -COLOR_EDIT_ALPHA_BAR = enums.ImGuiColorEditFlags_AlphaBar -COLOR_EDIT_ALPHA_PREVIEW = enums.ImGuiColorEditFlags_AlphaPreview -COLOR_EDIT_ALPHA_PREVIEW_HALF = enums.ImGuiColorEditFlags_AlphaPreviewHalf -COLOR_EDIT_HDR = enums.ImGuiColorEditFlags_HDR -COLOR_EDIT_DISPLAY_RGB = enums.ImGuiColorEditFlags_DisplayRGB -COLOR_EDIT_DISPLAY_HSV = enums.ImGuiColorEditFlags_DisplayHSV -COLOR_EDIT_DISPLAY_HEX = enums.ImGuiColorEditFlags_DisplayHex -COLOR_EDIT_UINT8 = enums.ImGuiColorEditFlags_Uint8 -COLOR_EDIT_FLOAT = enums.ImGuiColorEditFlags_Float -COLOR_EDIT_PICKER_HUE_BAR = enums.ImGuiColorEditFlags_PickerHueBar -COLOR_EDIT_PICKER_HUE_WHEEL = enums.ImGuiColorEditFlags_PickerHueWheel -COLOR_EDIT_INPUT_RGB = enums.ImGuiColorEditFlags_InputRGB -COLOR_EDIT_INPUT_HSV = enums.ImGuiColorEditFlags_InputHSV - -COLOR_EDIT_DEFAULT_OPTIONS = enums.ImGuiColorEditFlags__OptionsDefault +# ==== Text input flags ==== +INPUT_TEXT_NONE = enums.ImGuiInputTextFlags_None +INPUT_TEXT_CHARS_DECIMAL = enums.ImGuiInputTextFlags_CharsDecimal +INPUT_TEXT_CHARS_HEXADECIMAL = enums.ImGuiInputTextFlags_CharsHexadecimal +INPUT_TEXT_CHARS_UPPERCASE = enums.ImGuiInputTextFlags_CharsUppercase +INPUT_TEXT_CHARS_NO_BLANK = enums.ImGuiInputTextFlags_CharsNoBlank +INPUT_TEXT_AUTO_SELECT_ALL = enums.ImGuiInputTextFlags_AutoSelectAll +INPUT_TEXT_ENTER_RETURNS_TRUE = enums.ImGuiInputTextFlags_EnterReturnsTrue +INPUT_TEXT_CALLBACK_COMPLETION = enums.ImGuiInputTextFlags_CallbackCompletion +INPUT_TEXT_CALLBACK_HISTORY = enums.ImGuiInputTextFlags_CallbackHistory +INPUT_TEXT_CALLBACK_ALWAYS = enums.ImGuiInputTextFlags_CallbackAlways +INPUT_TEXT_CALLBACK_CHAR_FILTER = enums.ImGuiInputTextFlags_CallbackCharFilter +INPUT_TEXT_ALLOW_TAB_INPUT = enums.ImGuiInputTextFlags_AllowTabInput +INPUT_TEXT_CTRL_ENTER_FOR_NEW_LINE = enums.ImGuiInputTextFlags_CtrlEnterForNewLine +INPUT_TEXT_NO_HORIZONTAL_SCROLL = enums.ImGuiInputTextFlags_NoHorizontalScroll +INPUT_TEXT_ALWAYS_OVERWRITE = enums.ImGuiInputTextFlags_AlwaysOverwrite +INPUT_TEXT_ALWAYS_INSERT_MODE = enums.ImGuiInputTextFlags_AlwaysInsertMode # OBSOLETED in 1.82 (from Mars 2021) +INPUT_TEXT_READ_ONLY = enums.ImGuiInputTextFlags_ReadOnly +INPUT_TEXT_PASSWORD = enums.ImGuiInputTextFlags_Password +INPUT_TEXT_NO_UNDO_REDO = enums.ImGuiInputTextFlags_NoUndoRedo +INPUT_TEXT_CHARS_SCIENTIFIC = enums.ImGuiInputTextFlags_CharsScientific +INPUT_TEXT_CALLBACK_RESIZE = enums.ImGuiInputTextFlags_CallbackResize +INPUT_TEXT_CALLBACK_EDIT = enums.ImGuiInputTextFlags_CallbackEdit # ==== TreeNode flags enum redefines ==== TREE_NODE_NONE = enums.ImGuiTreeNodeFlags_None @@ -342,7 +249,6 @@ TABLE_BACKGROUND_TARGET_ROW_BG0 = enums.ImGuiTableBgTarget_RowBg0 TABLE_BACKGROUND_TARGET_ROW_BG1 = enums.ImGuiTableBgTarget_RowBg1 TABLE_BACKGROUND_TARGET_CELL_BG = enums.ImGuiTableBgTarget_CellBg - # === Focus flag enum redefines ==== # TODO: Change to FOCUSED_ ? FOCUS_NONE = enums.ImGuiFocusedFlags_None @@ -363,6 +269,15 @@ HOVERED_ALLOW_WHEN_DISABLED = enums.ImGuiHoveredFlags_AllowWhenDisabled HOVERED_RECT_ONLY = enums.ImGuiHoveredFlags_RectOnly HOVERED_ROOT_AND_CHILD_WINDOWS = enums.ImGuiHoveredFlags_RootAndChildWindows +# === Dock Node flags enum redefines ==== +DOCK_NODE_NONE = enums.ImGuiDockNodeFlags_None +DOCK_NODE_KEEP_ALIVE_ONLY = enums.ImGuiDockNodeFlags_KeepAliveOnly +DOCK_NODE_NO_DOCKING_IN_CENTRAL_NODE = enums.ImGuiDockNodeFlags_NoDockingInCentralNode +DOCK_NODE_PASS_THRU_CENTRAL_NODE = enums.ImGuiDockNodeFlags_PassthruCentralNode +DOCK_NODE_NO_SPLIT = enums.ImGuiDockNodeFlags_NoSplit +DOCK_NODE_NO_RESIZE = enums.ImGuiDockNodeFlags_NoResize +DOCK_NODE_AUTO_HIDE_TAB_BAR = enums.ImGuiDockNodeFlags_AutoHideTabBar + # === Drag Drop flag enum redefines ==== DRAG_DROP_NONE = enums.ImGuiDragDropFlags_None DRAG_DROP_SOURCE_NO_PREVIEW_TOOLTIP = enums.ImGuiDragDropFlags_SourceNoPreviewTooltip @@ -378,6 +293,18 @@ DRAG_DROP_ACCEPT_NO_DRAW_DEFAULT_RECT = enums.ImGuiDragDropFlags_AcceptNoDrawDef DRAG_DROP_ACCEPT_NO_PREVIEW_TOOLTIP = enums.ImGuiDragDropFlags_AcceptNoPreviewTooltip DRAG_DROP_ACCEPT_PEEK_ONLY = enums.ImGuiDragDropFlags_AcceptPeekOnly +# ==== Data Type ==== +DATA_TYPE_S8 = enums.ImGuiDataType_S8 +DATA_TYPE_U8 = enums.ImGuiDataType_U8 +DATA_TYPE_S16 = enums.ImGuiDataType_S16 +DATA_TYPE_U16 = enums.ImGuiDataType_U16 +DATA_TYPE_S32 = enums.ImGuiDataType_S32 +DATA_TYPE_U32 = enums.ImGuiDataType_U32 +DATA_TYPE_S64 = enums.ImGuiDataType_S64 +DATA_TYPE_U64 = enums.ImGuiDataType_U64 +DATA_TYPE_FLOAT = enums.ImGuiDataType_Float +DATA_TYPE_DOUBLE = enums.ImGuiDataType_Double + # === Cardinal Direction enum redefines ==== DIRECTION_NONE = enums.ImGuiDir_None DIRECTION_LEFT = enums.ImGuiDir_Left @@ -390,17 +317,83 @@ SORT_DIRECTION_NONE = enums.ImGuiSortDirection_None SORT_DIRECTION_ASCENDING = enums.ImGuiSortDirection_Ascending SORT_DIRECTION_DESCENDING = enums.ImGuiSortDirection_Descending -# ==== Mouse Cursors ==== -MOUSE_CURSOR_NONE = enums.ImGuiMouseCursor_None -MOUSE_CURSOR_ARROW = enums.ImGuiMouseCursor_Arrow -MOUSE_CURSOR_TEXT_INPUT = enums.ImGuiMouseCursor_TextInput -MOUSE_CURSOR_RESIZE_ALL = enums.ImGuiMouseCursor_ResizeAll -MOUSE_CURSOR_RESIZE_NS = enums.ImGuiMouseCursor_ResizeNS -MOUSE_CURSOR_RESIZE_EW = enums.ImGuiMouseCursor_ResizeEW -MOUSE_CURSOR_RESIZE_NESW = enums.ImGuiMouseCursor_ResizeNESW -MOUSE_CURSOR_RESIZE_NWSE = enums.ImGuiMouseCursor_ResizeNWSE -MOUSE_CURSOR_HAND = enums.ImGuiMouseCursor_Hand -MOUSE_CURSOR_NOT_ALLOWED = enums.ImGuiMouseCursor_NotAllowed +# ==== Key map enum redefines ==== +KEY_TAB = enums.ImGuiKey_Tab # for tabbing through fields +KEY_LEFT_ARROW = enums.ImGuiKey_LeftArrow # for text edit +KEY_RIGHT_ARROW = enums.ImGuiKey_RightArrow # for text edit +KEY_UP_ARROW = enums.ImGuiKey_UpArrow # for text edit +KEY_DOWN_ARROW = enums.ImGuiKey_DownArrow # for text edit +KEY_PAGE_UP = enums.ImGuiKey_PageUp +KEY_PAGE_DOWN = enums.ImGuiKey_PageDown +KEY_HOME = enums.ImGuiKey_Home # for text edit +KEY_END = enums.ImGuiKey_End # for text edit +KEY_INSERT = enums.ImGuiKey_Insert # for text edit +KEY_DELETE = enums.ImGuiKey_Delete # for text edit +KEY_BACKSPACE = enums.ImGuiKey_Backspace # for text edit +KEY_SPACE = enums.ImGuiKey_Space # for text edit +KEY_ENTER = enums.ImGuiKey_Enter # for text edit +KEY_ESCAPE = enums.ImGuiKey_Escape # for text edit +KEY_PAD_ENTER = enums.ImGuiKey_KeyPadEnter +KEY_A = enums.ImGuiKey_A # for text edit CTRL+A: select all +KEY_C = enums.ImGuiKey_C # for text edit CTRL+C: copy +KEY_V = enums.ImGuiKey_V # for text edit CTRL+V: paste +KEY_X = enums.ImGuiKey_X # for text edit CTRL+X: cut +KEY_Y = enums.ImGuiKey_Y # for text edit CTRL+Y: redo +KEY_Z = enums.ImGuiKey_Z # for text edit CTRL+Z: undo + +# ==== Key Mod Flags ==== +KEY_MOD_NONE = enums.ImGuiKeyModFlags_None +KEY_MOD_CTRL = enums.ImGuiKeyModFlags_Ctrl +KEY_MOD_SHIFT = enums.ImGuiKeyModFlags_Shift +KEY_MOD_ALT = enums.ImGuiKeyModFlags_Alt +KEY_MOD_SUPER = enums.ImGuiKeyModFlags_Super + +# ==== Nav Input ==== +NAV_INPUT_ACTIVATE = enums.ImGuiNavInput_Activate +NAV_INPUT_CANCEL = enums.ImGuiNavInput_Cancel +NAV_INPUT_INPUT = enums.ImGuiNavInput_Input +NAV_INPUT_MENU = enums.ImGuiNavInput_Menu +NAV_INPUT_DPAD_LEFT = enums.ImGuiNavInput_DpadLeft +NAV_INPUT_DPAD_RIGHT = enums.ImGuiNavInput_DpadRight +NAV_INPUT_DPAD_UP = enums.ImGuiNavInput_DpadUp +NAV_INPUT_DPAD_DOWN = enums.ImGuiNavInput_DpadDown +NAV_INPUT_L_STICK_LEFT = enums.ImGuiNavInput_LStickLeft +NAV_INPUT_L_STICK_RIGHT = enums.ImGuiNavInput_LStickRight +NAV_INPUT_L_STICK_UP = enums.ImGuiNavInput_LStickUp +NAV_INPUT_L_STICK_DOWN = enums.ImGuiNavInput_LStickDown +NAV_INPUT_FOCUS_PREV = enums.ImGuiNavInput_FocusPrev +NAV_INPUT_FOCUS_NEXT = enums.ImGuiNavInput_FocusNext +NAV_INPUT_TWEAK_SLOW = enums.ImGuiNavInput_TweakSlow +NAV_INPUT_TWEAK_FAST = enums.ImGuiNavInput_TweakFast +NAV_INPUT_COUNT = enums.ImGuiNavInput_COUNT + +# ==== Config Flags ==== +CONFIG_NONE = enums.ImGuiConfigFlags_None +CONFIG_NAV_ENABLE_KEYBOARD = enums.ImGuiConfigFlags_.ImGuiConfigFlags_NavEnableKeyboard +CONFIG_NAV_ENABLE_GAMEPAD = enums.ImGuiConfigFlags_.ImGuiConfigFlags_NavEnableGamepad +CONFIG_NAV_ENABLE_SET_MOUSE_POS = enums.ImGuiConfigFlags_.ImGuiConfigFlags_NavEnableSetMousePos +CONFIG_NAV_NO_CAPTURE_KEYBOARD = enums.ImGuiConfigFlags_.ImGuiConfigFlags_NavNoCaptureKeyboard +CONFIG_NO_MOUSE = enums.ImGuiConfigFlags_.ImGuiConfigFlags_NoMouse +CONFIG_NO_MOUSE_CURSOR_CHARGE = enums.ImGuiConfigFlags_.ImGuiConfigFlags_NoMouseCursorChange +CONFIG_IS_RGB = enums.ImGuiConfigFlags_.ImGuiConfigFlags_IsSRGB +CONFIG_IS_TOUCH_SCREEN = enums.ImGuiConfigFlags_.ImGuiConfigFlags_IsTouchScreen +# [BETA] Docking +CONFIG_DOCKING_ENABLE = enums.ImGuiConfigFlags_DockingEnable +# [BETA] Viewports +CONFIG_VIEWPORTS_ENABLE = enums.ImGuiConfigFlags_ViewportsEnable +CONFIG_DPI_ENABLE_SCALE_VIEWPORTS = enums.ImGuiConfigFlags_DpiEnableScaleViewports +CONFIG_DPI_ENABLE_SCALE_FONTS= enums.ImGuiConfigFlags_DpiEnableScaleFonts + +# ==== Backend Flags ==== +BACKEND_NONE = enums.ImGuiBackendFlags_None +BACKEND_HAS_GAMEPAD = enums.ImGuiBackendFlags_.ImGuiBackendFlags_HasGamepad +BACKEND_HAS_MOUSE_CURSORS = enums.ImGuiBackendFlags_.ImGuiBackendFlags_HasMouseCursors +BACKEND_HAS_SET_MOUSE_POS = enums.ImGuiBackendFlags_.ImGuiBackendFlags_HasSetMousePos +BACKEND_RENDERER_HAS_VTX_OFFSET = enums.ImGuiBackendFlags_RendererHasVtxOffset +# [BETA] Viewport +BACKEND_PLATFORM_HAS_VIEWPORTS = enums.ImGuiBackendFlags_PlatformHasViewports +BACKEND_HAS_MOUSE_HOVERED_VIEWPORT = enums.ImGuiBackendFlags_HasMouseHoveredViewport +BACKEND_RENDERER_HAS_VIEWPORTS = enums.ImGuiBackendFlags_RendererHasViewports # ==== Color identifiers for styling ==== COLOR_TEXT = enums.ImGuiCol_Text @@ -441,6 +434,8 @@ COLOR_TAB_HOVERED = enums.ImGuiCol_TabHovered COLOR_TAB_ACTIVE = enums.ImGuiCol_TabActive COLOR_TAB_UNFOCUSED = enums.ImGuiCol_TabUnfocused COLOR_TAB_UNFOCUSED_ACTIVE = enums.ImGuiCol_TabUnfocusedActive +COLOR_DOCKING_PREVIEW = enums.ImGuiCol_DockingPreview +COLOR_DOCKING_EMPTY_BG = enums.ImGuiCol_DockingEmptyBg COLOR_PLOT_LINES = enums.ImGuiCol_PlotLines COLOR_PLOT_LINES_HOVERED = enums.ImGuiCol_PlotLinesHovered COLOR_PLOT_HISTOGRAM = enums.ImGuiCol_PlotHistogram @@ -458,41 +453,99 @@ COLOR_NAV_WINDOWING_DIM_BACKGROUND = enums.ImGuiCol_NavWindowingDimBg COLOR_MODAL_WINDOW_DIM_BACKGROUND = enums.ImGuiCol_ModalWindowDimBg COLOR_COUNT = enums.ImGuiCol_COUNT -# ==== Data Type ==== -DATA_TYPE_S8 = enums.ImGuiDataType_S8 -DATA_TYPE_U8 = enums.ImGuiDataType_U8 -DATA_TYPE_S16 = enums.ImGuiDataType_S16 -DATA_TYPE_U16 = enums.ImGuiDataType_U16 -DATA_TYPE_S32 = enums.ImGuiDataType_S32 -DATA_TYPE_U32 = enums.ImGuiDataType_U32 -DATA_TYPE_S64 = enums.ImGuiDataType_S64 -DATA_TYPE_U64 = enums.ImGuiDataType_U64 -DATA_TYPE_FLOAT = enums.ImGuiDataType_Float -DATA_TYPE_DOUBLE = enums.ImGuiDataType_Double +# ==== Style var enum redefines ==== +STYLE_ALPHA = enums.ImGuiStyleVar_Alpha # float +STYLE_WINDOW_PADDING = enums.ImGuiStyleVar_WindowPadding # Vec2 +STYLE_WINDOW_ROUNDING = enums.ImGuiStyleVar_WindowRounding # float +STYLE_WINDOW_BORDERSIZE = enums.ImGuiStyleVar_WindowBorderSize # float +STYLE_WINDOW_MIN_SIZE = enums.ImGuiStyleVar_WindowMinSize # Vec2 +STYLE_WINDOW_TITLE_ALIGN = enums.ImGuiStyleVar_WindowTitleAlign # Vec2 +STYLE_CHILD_ROUNDING = enums.ImGuiStyleVar_ChildRounding # float +STYLE_CHILD_BORDERSIZE = enums.ImGuiStyleVar_ChildBorderSize # float +STYLE_POPUP_ROUNDING = enums.ImGuiStyleVar_PopupRounding # float +STYLE_POPUP_BORDERSIZE = enums.ImGuiStyleVar_PopupBorderSize # float +STYLE_FRAME_PADDING = enums.ImGuiStyleVar_FramePadding # Vec2 +STYLE_FRAME_ROUNDING = enums.ImGuiStyleVar_FrameRounding # float +STYLE_FRAME_BORDERSIZE = enums.ImGuiStyleVar_FrameBorderSize # float +STYLE_ITEM_SPACING = enums.ImGuiStyleVar_ItemSpacing # Vec2 +STYLE_ITEM_INNER_SPACING = enums.ImGuiStyleVar_ItemInnerSpacing # Vec2 +STYLE_INDENT_SPACING = enums.ImGuiStyleVar_IndentSpacing # float +STYLE_CELL_PADDING = enums.ImGuiStyleVar_CellPadding # ImVec2 CellPadding +STYLE_SCROLLBAR_SIZE = enums.ImGuiStyleVar_ScrollbarSize # float +STYLE_SCROLLBAR_ROUNDING = enums.ImGuiStyleVar_ScrollbarRounding # float +STYLE_GRAB_MIN_SIZE = enums.ImGuiStyleVar_GrabMinSize # float +STYLE_GRAB_ROUNDING = enums.ImGuiStyleVar_GrabRounding # float +STYLE_TAB_ROUNDING = enums.ImGuiStyleVar_TabRounding # flot +STYLE_BUTTON_TEXT_ALIGN = enums.ImGuiStyleVar_ButtonTextAlign # Vec2 +STYLE_SELECTABLE_TEXT_ALIGN = enums.ImGuiStyleVar_SelectableTextAlign # Vec2 -# ==== Text input flags ==== -INPUT_TEXT_NONE = enums.ImGuiInputTextFlags_None -INPUT_TEXT_CHARS_DECIMAL = enums.ImGuiInputTextFlags_CharsDecimal -INPUT_TEXT_CHARS_HEXADECIMAL = enums.ImGuiInputTextFlags_CharsHexadecimal -INPUT_TEXT_CHARS_UPPERCASE = enums.ImGuiInputTextFlags_CharsUppercase -INPUT_TEXT_CHARS_NO_BLANK = enums.ImGuiInputTextFlags_CharsNoBlank -INPUT_TEXT_AUTO_SELECT_ALL = enums.ImGuiInputTextFlags_AutoSelectAll -INPUT_TEXT_ENTER_RETURNS_TRUE = enums.ImGuiInputTextFlags_EnterReturnsTrue -INPUT_TEXT_CALLBACK_COMPLETION = enums.ImGuiInputTextFlags_CallbackCompletion -INPUT_TEXT_CALLBACK_HISTORY = enums.ImGuiInputTextFlags_CallbackHistory -INPUT_TEXT_CALLBACK_ALWAYS = enums.ImGuiInputTextFlags_CallbackAlways -INPUT_TEXT_CALLBACK_CHAR_FILTER = enums.ImGuiInputTextFlags_CallbackCharFilter -INPUT_TEXT_ALLOW_TAB_INPUT = enums.ImGuiInputTextFlags_AllowTabInput -INPUT_TEXT_CTRL_ENTER_FOR_NEW_LINE = enums.ImGuiInputTextFlags_CtrlEnterForNewLine -INPUT_TEXT_NO_HORIZONTAL_SCROLL = enums.ImGuiInputTextFlags_NoHorizontalScroll -INPUT_TEXT_ALWAYS_OVERWRITE = enums.ImGuiInputTextFlags_AlwaysOverwrite -INPUT_TEXT_ALWAYS_INSERT_MODE = enums.ImGuiInputTextFlags_AlwaysInsertMode # OBSOLETED in 1.82 (from Mars 2021) -INPUT_TEXT_READ_ONLY = enums.ImGuiInputTextFlags_ReadOnly -INPUT_TEXT_PASSWORD = enums.ImGuiInputTextFlags_Password -INPUT_TEXT_NO_UNDO_REDO = enums.ImGuiInputTextFlags_NoUndoRedo -INPUT_TEXT_CHARS_SCIENTIFIC = enums.ImGuiInputTextFlags_CharsScientific -INPUT_TEXT_CALLBACK_RESIZE = enums.ImGuiInputTextFlags_CallbackResize -INPUT_TEXT_CALLBACK_EDIT = enums.ImGuiInputTextFlags_CallbackEdit + +# ==== Button Flags ==== +BUTTON_NONE = enums.ImGuiButtonFlags_None +BUTTON_MOUSE_BUTTON_LEFT = enums.ImGuiButtonFlags_MouseButtonLeft +BUTTON_MOUSE_BUTTON_RIGHT = enums.ImGuiButtonFlags_MouseButtonRight +BUTTON_MOUSE_BUTTON_MIDDLE = enums.ImGuiButtonFlags_MouseButtonMiddle + +# ==== Color Edit Flags ==== +COLOR_EDIT_NONE = enums.ImGuiColorEditFlags_None +COLOR_EDIT_NO_ALPHA = enums.ImGuiColorEditFlags_NoAlpha +COLOR_EDIT_NO_PICKER = enums.ImGuiColorEditFlags_NoPicker +COLOR_EDIT_NO_OPTIONS = enums.ImGuiColorEditFlags_NoOptions +COLOR_EDIT_NO_SMALL_PREVIEW = enums.ImGuiColorEditFlags_NoSmallPreview +COLOR_EDIT_NO_INPUTS = enums.ImGuiColorEditFlags_NoInputs +COLOR_EDIT_NO_TOOLTIP = enums.ImGuiColorEditFlags_NoTooltip +COLOR_EDIT_NO_LABEL = enums.ImGuiColorEditFlags_NoLabel +COLOR_EDIT_NO_SIDE_PREVIEW = enums.ImGuiColorEditFlags_NoSidePreview +COLOR_EDIT_NO_DRAG_DROP = enums.ImGuiColorEditFlags_NoDragDrop +COLOR_EDIT_NO_BORDER = enums.ImGuiColorEditFlags_NoBorder + +COLOR_EDIT_ALPHA_BAR = enums.ImGuiColorEditFlags_AlphaBar +COLOR_EDIT_ALPHA_PREVIEW = enums.ImGuiColorEditFlags_AlphaPreview +COLOR_EDIT_ALPHA_PREVIEW_HALF = enums.ImGuiColorEditFlags_AlphaPreviewHalf +COLOR_EDIT_HDR = enums.ImGuiColorEditFlags_HDR +COLOR_EDIT_DISPLAY_RGB = enums.ImGuiColorEditFlags_DisplayRGB +COLOR_EDIT_DISPLAY_HSV = enums.ImGuiColorEditFlags_DisplayHSV +COLOR_EDIT_DISPLAY_HEX = enums.ImGuiColorEditFlags_DisplayHex +COLOR_EDIT_UINT8 = enums.ImGuiColorEditFlags_Uint8 +COLOR_EDIT_FLOAT = enums.ImGuiColorEditFlags_Float +COLOR_EDIT_PICKER_HUE_BAR = enums.ImGuiColorEditFlags_PickerHueBar +COLOR_EDIT_PICKER_HUE_WHEEL = enums.ImGuiColorEditFlags_PickerHueWheel +COLOR_EDIT_INPUT_RGB = enums.ImGuiColorEditFlags_InputRGB +COLOR_EDIT_INPUT_HSV = enums.ImGuiColorEditFlags_InputHSV + +COLOR_EDIT_DEFAULT_OPTIONS = enums.ImGuiColorEditFlags__OptionsDefault + +# ==== Slider Flags ==== +SLIDER_FLAGS_NONE = enums.ImGuiSliderFlags_None +SLIDER_FLAGS_ALWAYS_CLAMP = enums.ImGuiSliderFlags_AlwaysClamp +SLIDER_FLAGS_LOGARITHMIC = enums.ImGuiSliderFlags_Logarithmic +SLIDER_FLAGS_NO_ROUND_TO_FORMAT = enums.ImGuiSliderFlags_NoRoundToFormat +SLIDER_FLAGS_NO_INPUT = enums.ImGuiSliderFlags_NoInput + +# ==== Mouse Button ==== +MOUSE_BUTTON_LEFT = enums.ImGuiMouseButton_Left +MOUSE_BUTTON_RIGHT = enums.ImGuiMouseButton_Right +MOUSE_BUTTON_MIDDLE = enums.ImGuiMouseButton_Middle + + +# ==== Mouse Cursors ==== +MOUSE_CURSOR_NONE = enums.ImGuiMouseCursor_None +MOUSE_CURSOR_ARROW = enums.ImGuiMouseCursor_Arrow +MOUSE_CURSOR_TEXT_INPUT = enums.ImGuiMouseCursor_TextInput +MOUSE_CURSOR_RESIZE_ALL = enums.ImGuiMouseCursor_ResizeAll +MOUSE_CURSOR_RESIZE_NS = enums.ImGuiMouseCursor_ResizeNS +MOUSE_CURSOR_RESIZE_EW = enums.ImGuiMouseCursor_ResizeEW +MOUSE_CURSOR_RESIZE_NESW = enums.ImGuiMouseCursor_ResizeNESW +MOUSE_CURSOR_RESIZE_NWSE = enums.ImGuiMouseCursor_ResizeNWSE +MOUSE_CURSOR_HAND = enums.ImGuiMouseCursor_Hand +MOUSE_CURSOR_NOT_ALLOWED = enums.ImGuiMouseCursor_NotAllowed + +# ==== Condition enum redefines ==== +NONE = enums.ImGuiCond_None +ALWAYS = enums.ImGuiCond_Always +ONCE = enums.ImGuiCond_Once +FIRST_USE_EVER = enums.ImGuiCond_FirstUseEver +APPEARING = enums.ImGuiCond_Appearing # ==== Draw Corner Flags === # OBSOLETED in 1.82 (from Mars 2021), use ImDrawFlags_xxx @@ -535,41 +588,21 @@ FONT_ATLAS_NO_POWER_OF_TWO_HEIGHT = enums.ImFontAtlasFlags_NoPowerOfTwoHeight FONT_ATLAS_NO_MOUSE_CURSOR = enums.ImFontAtlasFlags_NoMouseCursors FONT_ATLAS_NO_BAKED_LINES = enums.ImFontAtlasFlags_NoBakedLines -# ==== Config Flags ==== -CONFIG_NONE = enums.ImGuiConfigFlags_None -CONFIG_NAV_ENABLE_KEYBOARD = enums.ImGuiConfigFlags_.ImGuiConfigFlags_NavEnableKeyboard -CONFIG_NAV_ENABLE_GAMEPAD = enums.ImGuiConfigFlags_.ImGuiConfigFlags_NavEnableGamepad -CONFIG_NAV_ENABLE_SET_MOUSE_POS = enums.ImGuiConfigFlags_.ImGuiConfigFlags_NavEnableSetMousePos -CONFIG_NAV_NO_CAPTURE_KEYBOARD = enums.ImGuiConfigFlags_.ImGuiConfigFlags_NavNoCaptureKeyboard -CONFIG_NO_MOUSE = enums.ImGuiConfigFlags_.ImGuiConfigFlags_NoMouse -CONFIG_NO_MOUSE_CURSOR_CHARGE = enums.ImGuiConfigFlags_.ImGuiConfigFlags_NoMouseCursorChange -CONFIG_IS_RGB = enums.ImGuiConfigFlags_.ImGuiConfigFlags_IsSRGB -CONFIG_IS_TOUCH_SCREEN = enums.ImGuiConfigFlags_.ImGuiConfigFlags_IsTouchScreen - -# ==== Backend Flags ==== -BACKEND_NONE = enums.ImGuiBackendFlags_None -BACKEND_HAS_GAMEPAD = enums.ImGuiBackendFlags_.ImGuiBackendFlags_HasGamepad -BACKEND_HAS_MOUSE_CURSORS = enums.ImGuiBackendFlags_.ImGuiBackendFlags_HasMouseCursors -BACKEND_HAS_SET_MOUSE_POS = enums.ImGuiBackendFlags_.ImGuiBackendFlags_HasSetMousePos -BACKEND_RENDERER_HAS_VTX_OFFSET = enums.ImGuiBackendFlags_RendererHasVtxOffset - -# ==== Slider Flags ==== -SLIDER_FLAGS_NONE = enums.ImGuiSliderFlags_None -SLIDER_FLAGS_ALWAYS_CLAMP = enums.ImGuiSliderFlags_AlwaysClamp -SLIDER_FLAGS_LOGARITHMIC = enums.ImGuiSliderFlags_Logarithmic -SLIDER_FLAGS_NO_ROUND_TO_FORMAT = enums.ImGuiSliderFlags_NoRoundToFormat -SLIDER_FLAGS_NO_INPUT = enums.ImGuiSliderFlags_NoInput - -# ==== Mouse Button ==== -MOUSE_BUTTON_LEFT = enums.ImGuiMouseButton_Left -MOUSE_BUTTON_RIGHT = enums.ImGuiMouseButton_Right -MOUSE_BUTTON_MIDDLE = enums.ImGuiMouseButton_Middle - # ==== Viewport Flags ==== VIEWPORT_FLAGS_NONE = enums.ImGuiViewportFlags_None # VIEWPORT_FLAGS_IS_PLATFORM_WINDOW = enums.ImGuiViewportFlags_IsPlatformWindow # Represent a Platform Window VIEWPORT_FLAGS_IS_PLATFORM_MONITOR = enums.ImGuiViewportFlags_IsPlatformMonitor # Represent a Platform Monitor (unused yet) VIEWPORT_FLAGS_OWNED_BY_APP = enums.ImGuiViewportFlags_OwnedByApp # Platform Window: is created/managed by the application (rather than a dear imgui backend) +VIEWPORT_FLAGS_NO_DECORATION = enums.ImGuiViewportFlags_NoDecoration # Platform Window: is created/managed by the application (rather than a dear imgui backend) +VIEWPORT_FLAGS_NO_TASK_BAR_ICON = enums.ImGuiViewportFlags_NoTaskBarIcon # Platform Window: is created/managed by the application (rather than a dear imgui backend) +VIEWPORT_FLAGS_NO_FOCUS_ON_APPEARING = enums.ImGuiViewportFlags_NoFocusOnAppearing # Platform Window: is created/managed by the application (rather than a dear imgui backend) +VIEWPORT_FLAGS_NO_FOCUS_ON_CLICK = enums.ImGuiViewportFlags_NoFocusOnClick # Platform Window: is created/managed by the application (rather than a dear imgui backend) +VIEWPORT_FLAGS_NO_INPUTS = enums.ImGuiViewportFlags_NoInputs # Platform Window: is created/managed by the application (rather than a dear imgui backend) +VIEWPORT_FLAGS_NO_RENDERER_CLEAR = enums.ImGuiViewportFlags_NoRendererClear # Platform Window: is created/managed by the application (rather than a dear imgui backend) +VIEWPORT_FLAGS_TOP_MOST = enums.ImGuiViewportFlags_TopMost # Platform Window: is created/managed by the application (rather than a dear imgui backend) +VIEWPORT_FLAGS_MINIMIZED = enums.ImGuiViewportFlags_Minimized # Platform Window: is created/managed by the application (rather than a dear imgui backend) +VIEWPORT_FLAGS_NO_AUTO_MERGE = enums.ImGuiViewportFlags_NoAutoMerge # Platform Window: is created/managed by the application (rather than a dear imgui backend) +VIEWPORT_FLAGS_CAN_HOST_OTHER_WINDOWS = enums.ImGuiViewportFlags_CanHostOtherWindows # Platform Window: is created/managed by the application (rather than a dear imgui backend) include "imgui/common.pyx" @@ -2075,6 +2108,10 @@ cdef class _ImGuiViewport(object): instance._ptr = ptr return instance + @property + def id(self): + return self._ptr.ID + @property def flags(self): self._require_pointer() @@ -2103,7 +2140,14 @@ cdef class _ImGuiViewport(object): """Work Area: Size of the viewport minus task bars, menu bars, status bars (<= Size)""" self._require_pointer() return _cast_ImVec2_tuple(self._ptr.WorkSize) - + + @property + def dpi_scale(self): + return self._ptr.DpiScale + @dpi_scale.setter + def dpi_scale(self, float value): + self._ptr.DpiScale = value + def get_center(self): self._require_pointer() return _cast_ImVec2_tuple(self._ptr.GetCenter()) @@ -2532,6 +2576,62 @@ cdef class _IO(object): #def display_visible_max(self, value): # self._ptr.DisplayVisibleMax = _cast_tuple_ImVec2(value) + @property + def config_docking_no_split(self): + return self._ptr.ConfigDockingNoSplit + + @config_docking_no_split.setter + def config_docking_no_split(self, value): + self._ptr.ConfigDockingNoSplit = value + + @property + def config_docking_always_tab_bar(self): + return self._ptr.ConfigDockingAlwaysTabBar + + @config_docking_always_tab_bar.setter + def config_docking_always_tab_bar(self,value): + self._ptr.ConfigDockingAlwaysTabBar = value + + @property + def config_docking_transparent_payload(self): + return self._ptr.ConfigDockingTransparentPayload + + @config_docking_transparent_payload.setter + def config_docking_transparent_payload(self,value): + self._ptr.ConfigDockingTransparentPayload = value + + @property + def config_viewports_no_auto_merge(self): + return self._ptr.ConfigViewportsNoAutoMerge + + @config_viewports_no_auto_merge.setter + def config_viewports_no_auto_merge(self,value): + self._ptr.ConfigViewportsNoAutoMerge = value + + @property + def config_viewports_no_task_bar_icon(self): + return self._ptr.ConfigViewportsNoTaskBarIcon + + @config_viewports_no_task_bar_icon.setter + def config_viewports_no_task_bar_icon(self,value): + self._ptr.ConfigViewportsNoTaskBarIcon = value + + @property + def config_viewports_no_decoration(self): + return self._ptr.ConfigViewportsNoDecoration + + @config_viewports_no_decoration.setter + def config_viewports_no_decoration(self,value): + self._ptr.ConfigViewportsNoDecoration = value + + @property + def config_viewports_no_default_parent(self): + return self._ptr.ConfigViewportsNoDefaultParent + + @config_viewports_no_default_parent.setter + def config_viewports_no_default_parent(self,value): + self._ptr.ConfigViewportsNoDefaultParent = value + @property def config_mac_osx_behaviors(self): return self._ptr.ConfigMacOSXBehaviors @@ -3000,7 +3100,96 @@ cdef class _ImGuiSizeCallbackData(object): def desired_size(self, tuple size): self._require_pointer() self._ptr.DesiredSize = _cast_args_ImVec2(size[0], size[1]) - + +cdef class _ImGuiWindowClass(object): + cdef cimgui.ImGuiWindowClass* _ptr + + def __init__(self): + pass + + def _require_pointer(self): + if self._ptr == NULL: + raise RuntimeError( + "%s improperly initialized" % self.__class__.__name__ + ) + @property + def class_id(self): + return self._ptr.ClassId + + @class_id.setter + def class_id(self, cimgui.ImGuiID id): + self._ptr.ClassId = id + + @property + def parent_viewport_id(self): + return self._ptr.ParentViewportId + + @parent_viewport_id.setter + def parent_viewport_id(self, cimgui.ImGuiID id): + self._ptr.ParentViewportId = id + + @property + def viewport_flags_override_set(self): + return self._ptr.ViewportFlagsOverrideSet + @viewport_flags_override_set.setter + def viewport_flags_override_set(self, cimgui.ImGuiViewportFlags flags): + self._ptr.ViewportFlagsOverrideSet = flags + + @property + def viewport_flags_override_clear(self): + return self._ptr.ViewportFlagsOverrideClear + @viewport_flags_override_clear.setter + def viewport_flags_override_clear(self, cimgui.ImGuiViewportFlags flags): + self._ptr.ViewportFlagsOverrideClear = flags + + @property + def tab_item_flags_override_set(self): + return self._ptr.TabItemFlagsOverrideSet + @tab_item_flags_override_set.setter + def tab_item_flags_override_set(self, cimgui.ImGuiTabItemFlags flags): + self._ptr.TabItemFlagsOverrideSet = flags + + @property + def dock_node_flags_override_set(self): + return self._ptr.DockNodeFlagsOverrideSet + @dock_node_flags_override_set.setter + def dock_node_flags_override_set(self, cimgui.ImGuiDockNodeFlags flags): + self._ptr.DockNodeFlagsOverrideSet = flags + + @property + def docking_always_tab_bar(self): + return self._ptr.DockingAlwaysTabBar + @docking_always_tab_bar.setter + def docking_always_tab_bar(self, bool value): + self._ptr.DockingAlwaysTabBar = value + + @property + def docking_allow_unclassed(self): + return self._ptr.DockingAllowUnclassed + @docking_allow_unclassed.setter + def docking_allow_unclassed(self, bool value): + self._ptr.DockingAllowUnclassed = value + +cdef class _ImGuiOnceUponAFrame(): + cdef cimgui.ImGuiOnceUponAFrame* _ptr + + def __init__(self): + pass + + def _require_pointer(self): + if self._ptr == NULL: + raise RuntimeError( + "%s improperly initialized" % self.__class__.__name__ + ) + + @property + def ref_frame(self): + return self._ptr.RefFrame + + @ref_frame.setter + def ref_frame(self, int value): + self._ptr.RefFrame = value + _io = None def get_io(): global _io @@ -3416,17 +3605,6 @@ def get_content_region_available(): # OBSOLETED in 1.70 (from May 2019) -def get_content_region_available_width(): - """Get available content region width. - - Returns: - float: available content region width. - - .. wraps:: - float GetContentRegionAvailWidth() - """ - return cimgui.GetContentRegionAvailWidth() - def get_window_content_region_min(): """Get minimal current window content boundaries in window coordinates. @@ -3899,6 +4077,9 @@ def set_next_window_size( ) """ cimgui.SetNextWindowSize(_cast_args_ImVec2(width, height), condition) + +def set_next_window_viewport(cimgui.ImGuiID viewport_id): + cimgui.SetNextWindowViewport(viewport_id) # Useful for non trivial constraints cdef _callback_user_info _global_next_window_size_constraints_callback_user_info = _callback_user_info() @@ -5216,6 +5397,35 @@ def table_set_background_color( """ cimgui.TableSetBgColor(target, color, column_n) +def dockspace( + cimgui.ImGuiID id, + tuple size=(0,0), + cimgui.ImGuiDockNodeFlags flags=0 +): + return cimgui.DockSpace( + id, + _cast_args_ImVec2(size[0], size[1]), + flags, + NULL + ) + +def dockspace_over_viewport( + cimgui.ImGuiDockNodeFlags flags +): + return cimgui.DockSpaceOverViewport(NULL, flags, NULL) + +def set_next_window_dock_id(cimgui.ImGuiID dock_id, cimgui.ImGuiCond cond): + cimgui.SetNextWindowDockID(dock_id, cond) + +#def set_next_window_class(cimgui.ImGuiWindowClass* window_class): +# cimgui.SetNextWindowClass(window_class) + +def get_window_dock_id(): + return cimgui.GetWindowDockID() + +def is_window_docked(): + return cimgui.IsWindowDocked() + def text(str text): """Add text to current widget stack. @@ -10459,6 +10669,23 @@ def pop_clip_rect(): """ cimgui.PopClipRect() +# Multi-viewport +# def get_platform_io(): +# return cimgui.GetPlatformIO() + +def update_platform_windows(): + cimgui.UpdatePlatformWindows() + +def render_platform_windows_default(): + cimgui.RenderPlatformWindowsDefault() + +def destroy_platform_windows(): + cimgui.DestroyPlatformWindows() + +#def find_viewport_by_id(cimgui.ImGuiID id): +# return cimgui.FindViewportByID(id) + + def begin_group(): """Start item group and lock its horizontal starting position. @@ -10706,6 +10933,9 @@ def pop_id(): """ cimgui.PopID() +def get_id(str id): + return cimgui.GetID(_bytes(id)) + def _ansifeed_text_ansi(str text): """Add ANSI-escape-formatted text to current widget stack. diff --git a/imgui/enums.pxd b/imgui/enums.pxd index 6a856175..8ca1b3ec 100644 --- a/imgui/enums.pxd +++ b/imgui/enums.pxd @@ -1,4 +1,284 @@ cdef extern from "imgui.h": + ctypedef enum ImGuiWindowFlags_: + ImGuiWindowFlags_None + ImGuiWindowFlags_NoTitleBar # Disable title-bar + ImGuiWindowFlags_NoResize # Disable user resizing with the lower-right grip + ImGuiWindowFlags_NoMove # Disable user moving the window + ImGuiWindowFlags_NoScrollbar # Disable scrollbars (window can still scroll with mouse or programmatically) + ImGuiWindowFlags_NoScrollWithMouse # Disable user vertically scrolling with mouse wheel. On child window, mouse wheel will be forwarded to the parent unless NoScrollbar is also set. + ImGuiWindowFlags_NoCollapse # Disable user collapsing window by double-clicking on it + ImGuiWindowFlags_AlwaysAutoResize # Resize every window to its content every frame + ImGuiWindowFlags_NoBackground # Disable drawing background color (WindowBg, etc.) and outside border. Similar as using SetNextWindowBgAlpha(0.0f). + ImGuiWindowFlags_NoSavedSettings # Never load/save settings in .ini file + ImGuiWindowFlags_NoMouseInputs # Disable catching mouse, hovering test with pass through. + ImGuiWindowFlags_MenuBar # Has a menu-bar + ImGuiWindowFlags_HorizontalScrollbar # Allow horizontal scrollbar to appear (off by default). You may use SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width. Read code in imgui_demo in the "Horizontal Scrolling" section. + ImGuiWindowFlags_NoFocusOnAppearing # Disable taking focus when transitioning from hidden to visible state + ImGuiWindowFlags_NoBringToFrontOnFocus # Disable bringing window to front when taking focus (e.g. clicking on it or programmatically giving it focus) + ImGuiWindowFlags_AlwaysVerticalScrollbar # Always show vertical scrollbar (even if ContentSize.y < Size.y) + ImGuiWindowFlags_AlwaysHorizontalScrollbar=1 # Always show horizontal scrollbar (even if ContentSize.x < Size.x) + ImGuiWindowFlags_AlwaysUseWindowPadding # Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient) + ImGuiWindowFlags_NoNavInputs # No gamepad/keyboard navigation within the window + ImGuiWindowFlags_NoNavFocus # No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB) + ImGuiWindowFlags_UnsavedDocument # Append '*' to title without affecting the ID, as a convenience to avoid using the ### operator. When used in a tab/docking context, tab is selected on closure and closure is deferred by one frame to allow code to cancel the closure (with a confirmation popup, etc.) without flicker. + ImGuiWindowFlags_NoNav = ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus, + ImGuiWindowFlags_NoDecoration = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse, + ImGuiWindowFlags_NoInputs = ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus, + ImGuiWindowFlags_NoDocking + + ctypedef enum ImGuiInputTextFlags_: + ImGuiInputTextFlags_None # + ImGuiInputTextFlags_CharsDecimal # Allow 0123456789.+-*/ + ImGuiInputTextFlags_CharsHexadecimal # Allow 0123456789ABCDEFabcdef + ImGuiInputTextFlags_CharsUppercase # Turn a..z into A..Z + ImGuiInputTextFlags_CharsNoBlank # Filter out spaces, tabs + ImGuiInputTextFlags_AutoSelectAll # Select entire text when first taking mouse focus + ImGuiInputTextFlags_EnterReturnsTrue # Return 'true' when Enter is pressed (as opposed to every time the value was modified). Consider looking at the IsItemDeactivatedAfterEdit() function. + ImGuiInputTextFlags_CallbackCompletion # Callback on pressing TAB (for completion handling) + ImGuiInputTextFlags_CallbackHistory # Callback on pressing Up/Down arrows (for history handling) + ImGuiInputTextFlags_CallbackAlways # Callback on each iteration. User code may query cursor position, modify text buffer. + ImGuiInputTextFlags_CallbackCharFilter # Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard. + ImGuiInputTextFlags_AllowTabInput # Pressing TAB input a '\t' character into the text field + ImGuiInputTextFlags_CtrlEnterForNewLine # In multi-line mode, unfocus with Enter, add new line with Ctrl+Enter (default is opposite: unfocus with Ctrl+Enter, add line with Enter). + ImGuiInputTextFlags_NoHorizontalScroll # Disable following the cursor horizontally + ImGuiInputTextFlags_AlwaysOverwrite # Overwrite mode + ImGuiInputTextFlags_AlwaysInsertMode # OBSOLETED in 1.82 + ImGuiInputTextFlags_ReadOnly # Read-only mode + ImGuiInputTextFlags_Password # Password mode, display all characters as '*' + ImGuiInputTextFlags_NoUndoRedo # Disable undo/redo. Note that input text owns the text data while active, if you want to provide your own undo/redo stack you need e.g. to call ClearActiveID(). + ImGuiInputTextFlags_CharsScientific # Allow 0123456789.+-*/eE (Scientific notation input) + ImGuiInputTextFlags_CallbackResize # Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. Notify when the string wants to be resized (for string types which hold a cache of their Size). You will be provided a new BufSize in the callback and NEED to honor it. (see misc/cpp/imgui_stdlib.h for an example of using this) + ImGuiInputTextFlags_CallbackEdit # Callback on any edit (note that InputText() already returns true on edit, the callback is useful mainly to manipulate the underlying buffer while focus is active) + + ctypedef enum ImGuiTreeNodeFlags_: + ImGuiTreeNodeFlags_None + ImGuiTreeNodeFlags_Selected # Draw as selected + ImGuiTreeNodeFlags_Framed # Draw frame with background (e.g. for CollapsingHeader) + ImGuiTreeNodeFlags_AllowItemOverlap # Hit testing to allow subsequent widgets to overlap this one + ImGuiTreeNodeFlags_NoTreePushOnOpen # Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack + ImGuiTreeNodeFlags_NoAutoOpenOnLog # Don't automatically and temporarily open node when Logging is active (by default logging will automatically open tree nodes) + ImGuiTreeNodeFlags_DefaultOpen # Default node to be open + ImGuiTreeNodeFlags_OpenOnDoubleClick # Need double-click to open node + ImGuiTreeNodeFlags_OpenOnArrow # Only open when clicking on the arrow part. If ImGuiTreeNodeFlags_OpenOnDoubleClick is also set, single-click arrow or double-click all box to open. + ImGuiTreeNodeFlags_Leaf # No collapsing, no arrow (use as a convenience for leaf nodes). + ImGuiTreeNodeFlags_Bullet # Display a bullet instead of arrow + ImGuiTreeNodeFlags_FramePadding # Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding(). + ImGuiTreeNodeFlags_SpanAvailWidth # Extend hit box to the right-most edge, even if not framed. This is not the default in order to allow adding other items on the same line. In the future we may refactor the hit system to be front-to-back, allowing natural overlaps and then this can become the default. + ImGuiTreeNodeFlags_SpanFullWidth # Extend hit box to the left-most and right-most edges (bypass the indented area). + ImGuiTreeNodeFlags_NavLeftJumpsBackHere # (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop) + # ImGuiTreeNodeFlags_NoScrollOnOpen # FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible + ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog + + ctypedef enum ImGuiPopupFlags_: + ImGuiPopupFlags_None # + ImGuiPopupFlags_MouseButtonLeft # For BeginPopupContext*(): open on Left Mouse release. Guaranteed to always be == 0 (same as ImGuiMouseButton_Left) + ImGuiPopupFlags_MouseButtonRight # For BeginPopupContext*(): open on Right Mouse release. Guaranteed to always be == 1 (same as ImGuiMouseButton_Right) + ImGuiPopupFlags_MouseButtonMiddle # For BeginPopupContext*(): open on Middle Mouse release. Guaranteed to always be == 2 (same as ImGuiMouseButton_Middle) + ImGuiPopupFlags_MouseButtonMask_ # + ImGuiPopupFlags_MouseButtonDefault_ # + ImGuiPopupFlags_NoOpenOverExistingPopup # For OpenPopup*(), BeginPopupContext*(): don't open if there's already a popup at the same level of the popup stack + ImGuiPopupFlags_NoOpenOverItems # For BeginPopupContextWindow(): don't return true when hovering items, only when hovering empty space + ImGuiPopupFlags_AnyPopupId # For IsPopupOpen(): ignore the ImGuiID parameter and test for any popup. + ImGuiPopupFlags_AnyPopupLevel # For IsPopupOpen(): search/test at any level of the popup stack (default test in the current level) + ImGuiPopupFlags_AnyPopup = ImGuiPopupFlags_AnyPopupId | ImGuiPopupFlags_AnyPopupLevel + + ctypedef enum ImGuiSelectableFlags_: + ImGuiSelectableFlags_None + ImGuiSelectableFlags_DontClosePopups # Clicking this don't close parent popup window + ImGuiSelectableFlags_SpanAllColumns # Selectable frame can span all columns (text will still fit in current column) + ImGuiSelectableFlags_AllowDoubleClick # Generate press events on double clicks too + ImGuiSelectableFlags_Disabled # Cannot be selected, display grayed out text + ImGuiSelectableFlags_AllowItemOverlap # (WIP) Hit testing to allow subsequent widgets to overlap this one + + ctypedef enum ImGuiComboFlags_: + ImGuiComboFlags_None + ImGuiComboFlags_PopupAlignLeft # Align the popup toward the left by default + ImGuiComboFlags_HeightSmall # Max ~4 items visible. Tip: If you want your combo popup to be a specific size you can use SetNextWindowSizeConstraints() prior to calling BeginCombo() + ImGuiComboFlags_HeightRegular # Max ~8 items visible (default) + ImGuiComboFlags_HeightLarge # Max ~20 items visible + ImGuiComboFlags_HeightLargest # As many fitting items as possible + ImGuiComboFlags_NoArrowButton # Display on the preview box without the square arrow button + ImGuiComboFlags_NoPreview # Display only a square arrow button + ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest + + ctypedef enum ImGuiTabBarFlags_: + ImGuiTabBarFlags_None # + ImGuiTabBarFlags_Reorderable # Allow manually dragging tabs to re-order them + New tabs are appended at the end of list + ImGuiTabBarFlags_AutoSelectNewTabs # Automatically select new tabs when they appear + ImGuiTabBarFlags_TabListPopupButton # Disable buttons to open the tab list popup + ImGuiTabBarFlags_NoCloseWithMiddleMouseButton # Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false. + ImGuiTabBarFlags_NoTabListScrollingButtons # Disable scrolling buttons (apply when fitting policy is ImGuiTabBarFlags_FittingPolicyScroll) + ImGuiTabBarFlags_NoTooltip # Disable tooltips when hovering a tab + ImGuiTabBarFlags_FittingPolicyResizeDown # Resize tabs when they don't fit + ImGuiTabBarFlags_FittingPolicyScroll # Add scroll buttons when tabs don't fit + ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll + ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyResizeDown + + ctypedef enum ImGuiTabItemFlags_: + ImGuiTabItemFlags_None # + ImGuiTabItemFlags_UnsavedDocument # Append '*' to title without affecting the ID, as a convenience to avoid using the ### operator. Also: tab is selected on closure and closure is deferred by one frame to allow code to undo it without flicker. + ImGuiTabItemFlags_SetSelected # Trigger flag to programmatically make the tab selected when calling BeginTabItem() + ImGuiTabItemFlags_NoCloseWithMiddleMouseButton # Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false. + ImGuiTabItemFlags_NoPushId # Don't call PushID(tab->ID)/PopID() on BeginTabItem()/EndTabItem() + ImGuiTabItemFlags_NoTooltip # Disable tooltip for the given tab + ImGuiTabItemFlags_NoReorder # Disable reordering this tab or having another tab cross over this tab + ImGuiTabItemFlags_Leading # Enforce the tab position to the left of the tab bar (after the tab list popup button) + ImGuiTabItemFlags_Trailing # Enforce the tab position to the right of the tab bar (before the scrolling buttons) + + # [BETA API] API may evolve slightly! + ctypedef enum ImGuiTableFlags_: + # Features + ImGuiTableFlags_None # + ImGuiTableFlags_Resizable # Enable resizing columns. + ImGuiTableFlags_Reorderable # Enable reordering columns in header row (need calling TableSetupColumn() + TableHeadersRow() to display headers) + ImGuiTableFlags_Hideable # Enable hiding/disabling columns in context menu. + ImGuiTableFlags_Sortable # Enable sorting. Call TableGetSortSpecs() to obtain sort specs. Also see ImGuiTableFlags_SortMulti and ImGuiTableFlags_SortTristate. + ImGuiTableFlags_NoSavedSettings # Disable persisting columns order, width and sort settings in the .ini file. + ImGuiTableFlags_ContextMenuInBody # Right-click on columns body/contents will display table context menu. By default it is available in TableHeadersRow(). + # Decorations + ImGuiTableFlags_RowBg # Set each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt (equivalent of calling TableSetBgColor with ImGuiTableBgFlags_RowBg0 on each row manually) + ImGuiTableFlags_BordersInnerH # Draw horizontal borders between rows. + ImGuiTableFlags_BordersOuterH # Draw horizontal borders at the top and bottom. + ImGuiTableFlags_BordersInnerV # Draw vertical borders between columns. + ImGuiTableFlags_BordersOuterV # Draw vertical borders on the left and right sides. + ImGuiTableFlags_BordersH = ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH # Draw horizontal borders. + ImGuiTableFlags_BordersV = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV # Draw vertical borders. + ImGuiTableFlags_BordersInner = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH # Draw inner borders. + ImGuiTableFlags_BordersOuter = ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH # Draw outer borders. + ImGuiTableFlags_Borders = ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter # Draw all borders. + ImGuiTableFlags_NoBordersInBody # [ALPHA] Disable vertical borders in columns Body (borders will always appears in Headers). -> May move to style + ImGuiTableFlags_NoBordersInBodyUntilResize # [ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appears in Headers). -> May move to style + # Sizing Policy (read above for defaults) + ImGuiTableFlags_SizingFixedFit # Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching contents width. + ImGuiTableFlags_SizingFixedSame # Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching the maximum contents width of all columns. Implicitly enable ImGuiTableFlags_NoKeepColumnsVisible. + ImGuiTableFlags_SizingStretchProp # Columns default to _WidthStretch with default weights proportional to each columns contents widths. + ImGuiTableFlags_SizingStretchSame # Columns default to _WidthStretch with default weights all equal, unless overriden by TableSetupColumn(). + # Sizing Extra Options + ImGuiTableFlags_NoHostExtendX # Make outer width auto-fit to columns, overriding outer_size.x value. Only available when ScrollX/ScrollY are disabled and Stretch columns are not used. + ImGuiTableFlags_NoHostExtendY # Make outer height stop exactly at outer_size.y (prevent auto-extending table past the limit). Only available when ScrollX/ScrollY are disabled. Data below the limit will be clipped and not visible. + ImGuiTableFlags_NoKeepColumnsVisible # Disable keeping column always minimally visible when ScrollX is off and table gets too small. Not recommended if columns are resizable. + ImGuiTableFlags_PreciseWidths # Disable distributing remainder width to stretched columns (width allocation on a 100-wide table with 3 columns: Without this flag: 33,33,34. With this flag: 33,33,33). With larger number of columns, resizing will appear to be less smooth. + # Clipping + ImGuiTableFlags_NoClip # Disable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns). Generally incompatible with TableSetupScrollFreeze(). + # Padding + ImGuiTableFlags_PadOuterX # Default if BordersOuterV is on. Enable outer-most padding. Generally desirable if you have headers. + ImGuiTableFlags_NoPadOuterX # Default if BordersOuterV is off. Disable outer-most padding. + ImGuiTableFlags_NoPadInnerX # Disable inner padding between columns (double inner padding if BordersOuterV is on, single inner padding if BordersOuterV is off). + # Scrolling + ImGuiTableFlags_ScrollX # Enable horizontal scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. Changes default sizing policy. Because this create a child window, ScrollY is currently generally recommended when using ScrollX. + ImGuiTableFlags_ScrollY # Enable vertical scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. + # Sorting + ImGuiTableFlags_SortMulti # Hold shift when clicking headers to sort on multiple column. TableGetSortSpecs() may return specs where (SpecsCount > 1). + ImGuiTableFlags_SortTristate # Allow no sorting, disable default sorting. TableGetSortSpecs() may return specs where (SpecsCount == 0). + + ctypedef enum ImGuiTableColumnFlags_: + # Input configuration flags + ImGuiTableColumnFlags_None # + ImGuiTableColumnFlags_DefaultHide # Default as a hidden/disabled column. + ImGuiTableColumnFlags_DefaultSort # Default as a sorting column. + ImGuiTableColumnFlags_WidthStretch # Column will stretch. Preferable with horizontal scrolling disabled (default if table sizing policy is _SizingStretchSame or _SizingStretchProp). + ImGuiTableColumnFlags_WidthFixed # Column will not stretch. Preferable with horizontal scrolling enabled (default if table sizing policy is _SizingFixedFit and table is resizable). + ImGuiTableColumnFlags_NoResize # Disable manual resizing. + ImGuiTableColumnFlags_NoReorder # Disable manual reordering this column, this will also prevent other columns from crossing over this column. + ImGuiTableColumnFlags_NoHide # Disable ability to hide/disable this column. + ImGuiTableColumnFlags_NoClip # Disable clipping for this column (all NoClip columns will render in a same draw command). + ImGuiTableColumnFlags_NoSort # Disable ability to sort on this field (even if ImGuiTableFlags_Sortable is set on the table). + ImGuiTableColumnFlags_NoSortAscending # Disable ability to sort in the ascending direction. + ImGuiTableColumnFlags_NoSortDescending # Disable ability to sort in the descending direction. + ImGuiTableColumnFlags_NoHeaderWidth # Disable header text width contribution to automatic column width. + ImGuiTableColumnFlags_PreferSortAscending # Make the initial sort direction Ascending when first sorting on this column (default). + ImGuiTableColumnFlags_PreferSortDescending # Make the initial sort direction Descending when first sorting on this column. + ImGuiTableColumnFlags_IndentEnable # Use current Indent value when entering cell (default for column 0). + ImGuiTableColumnFlags_IndentDisable # Ignore current Indent value when entering cell (default for columns > 0). Indentation changes _within_ the cell will still be honored. + + # Output status flags, read-only via TableGetColumnFlags() + ImGuiTableColumnFlags_IsEnabled # Status: is enabled == not hidden by user/api (referred to as "Hide" in _DefaultHide and _NoHide) flags. + ImGuiTableColumnFlags_IsVisible # Status: is visible == is enabled AND not clipped by scrolling. + ImGuiTableColumnFlags_IsSorted # Status: is currently part of the sort specs + ImGuiTableColumnFlags_IsHovered # Status: is hovered by mouse + + ctypedef enum ImGuiTableRowFlags_: + ImGuiTableRowFlags_None # + ImGuiTableRowFlags_Headers # Identify header row (set default background color + width of its contents accounted different for auto column width) + + ctypedef enum ImGuiTableBgTarget_: + ImGuiTableBgTarget_None # + ImGuiTableBgTarget_RowBg0 # Set row background color 0 (generally used for background, automatically set when ImGuiTableFlags_RowBg is used) + ImGuiTableBgTarget_RowBg1 # Set row background color 1 (generally used for selection marking) + ImGuiTableBgTarget_CellBg # Set cell background color (top-most color) + + ctypedef enum ImGuiFocusedFlags_: + ImGuiFocusedFlags_None # + ImGuiFocusedFlags_ChildWindows # IsWindowFocused(): Return true if any children of the window is focused + ImGuiFocusedFlags_RootWindow # IsWindowFocused(): Test from root window (top most parent of the current hierarchy) + ImGuiFocusedFlags_AnyWindow # IsWindowFocused(): Return true if any window is focused. Important: If you are trying to tell how to dispatch your low-level inputs, do NOT use this. Use 'io.WantCaptureMouse' instead! Please read the FAQ! + ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows + + ctypedef enum ImGuiHoveredFlags_: + ImGuiHoveredFlags_None # Return true if directly over the item/window, not obstructed by another window, not obstructed by an active popup or modal blocking inputs under them. + ImGuiHoveredFlags_ChildWindows # IsWindowHovered() only: Return true if any children of the window is hovered + ImGuiHoveredFlags_RootWindow # IsWindowHovered() only: Test from root window (top most parent of the current hierarchy) + ImGuiHoveredFlags_AnyWindow # IsWindowHovered() only: Return true if any window is hovered + ImGuiHoveredFlags_AllowWhenBlockedByPopup # Return true even if a popup window is normally blocking access to this item/window + # ImGuiHoveredFlags_AllowWhenBlockedByModal # Return true even if a modal popup window is normally blocking access to this item/window. FIXME-TODO: Unavailable yet. + ImGuiHoveredFlags_AllowWhenBlockedByActiveItem # Return true even if an active item is blocking access to this item/window. Useful for Drag and Drop patterns. + ImGuiHoveredFlags_AllowWhenOverlapped # Return true even if the position is obstructed or overlapped by another window + ImGuiHoveredFlags_AllowWhenDisabled # Return true even if the item is disabled + ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped, + ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows + + ctypedef enum ImGuiDockNodeFlags_: + ImGuiDockNodeFlags_None + ImGuiDockNodeFlags_KeepAliveOnly + ImGuiDockNodeFlags_NoDockingInCentralNode + ImGuiDockNodeFlags_PassthruCentralNode + ImGuiDockNodeFlags_NoSplit + ImGuiDockNodeFlags_NoResize + ImGuiDockNodeFlags_AutoHideTabBar + + ctypedef enum ImGuiDragDropFlags_: + ImGuiDragDropFlags_None + # BeginDragDropSource() flags + ImGuiDragDropFlags_SourceNoPreviewTooltip # By default, a successful call to BeginDragDropSource opens a tooltip so you can display a preview or description of the source contents. This flag disable this behavior. + ImGuiDragDropFlags_SourceNoDisableHover # By default, when dragging we clear data so that IsItemHovered() will return false, to avoid subsequent user code submitting tooltips. This flag disable this behavior so you can still call IsItemHovered() on the source item. + ImGuiDragDropFlags_SourceNoHoldToOpenOthers # Disable the behavior that allows to open tree nodes and collapsing header by holding over them while dragging a source item. + ImGuiDragDropFlags_SourceAllowNullID # Allow items such as Text(), Image() that have no unique identifier to be used as drag source, by manufacturing a temporary identifier based on their window-relative position. This is extremely unusual within the dear imgui ecosystem and so we made it explicit. + ImGuiDragDropFlags_SourceExtern # External source (from outside of dear imgui), won't attempt to read current item/window info. Will always return true. Only one Extern source can be active simultaneously. + ImGuiDragDropFlags_SourceAutoExpirePayload # Automatically expire the payload if the source cease to be submitted (otherwise payloads are persisting while being dragged) + # AcceptDragDropPayload() flags + ImGuiDragDropFlags_AcceptBeforeDelivery # AcceptDragDropPayload() will returns true even before the mouse button is released. You can then call IsDelivery() to test if the payload needs to be delivered. + ImGuiDragDropFlags_AcceptNoDrawDefaultRect # Do not draw the default highlight rectangle when hovering over target. + ImGuiDragDropFlags_AcceptNoPreviewTooltip # Request hiding the BeginDragDropSource tooltip from the BeginDragDropTarget site. + ImGuiDragDropFlags_AcceptPeekOnly = ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect # For peeking ahead and inspecting the payload before delivery. + + + ctypedef enum ImGuiDataType_: + ImGuiDataType_S8 # signed char / char (with sensible compilers) + ImGuiDataType_U8 # unsigned char + ImGuiDataType_S16 # short + ImGuiDataType_U16 # unsigned short + ImGuiDataType_S32 # int + ImGuiDataType_U32 # unsigned int + ImGuiDataType_S64 # long long / __int64 + ImGuiDataType_U64 # unsigned long long / unsigned __int64 + ImGuiDataType_Float # float + ImGuiDataType_Double # double + ImGuiDataType_COUNT + + ctypedef enum ImGuiDir_: + ImGuiDir_None + ImGuiDir_Left + ImGuiDir_Right + ImGuiDir_Up + ImGuiDir_Down + ImGuiDir_COUNT + + ctypedef enum ImGuiSortDirection_: + ImGuiSortDirection_None # + ImGuiSortDirection_Ascending # Ascending = 0->9, A->Z etc. + ImGuiSortDirection_Descending # Descending = 9->0, Z->A etc. + + ctypedef enum ImGuiKey_: ImGuiKey_Tab, ImGuiKey_LeftArrow, @@ -52,7 +332,7 @@ cdef extern from "imgui.h": ImGuiNavInput_TweakFast, # faster tweaks # e.g. R1 or R2 (PS4), RB or RT (Xbox), R or ZL (Switch) ImGuiNavInput_COUNT - ctypedef enum ImGuiConfigFlags_: + ctypedef enum ImGuiConfigFlags_: ImGuiConfigFlags_None # ImGuiConfigFlags_NavEnableKeyboard # Master keyboard navigation enable flag. NewFrame() will automatically fill io.NavInputs[] based on io.KeysDown[]. ImGuiConfigFlags_NavEnableGamepad # Master gamepad navigation enable flag. This is mostly to instruct your imgui backend to fill io.NavInputs[]. Backend also needs to set ImGuiBackendFlags_HasGamepad. @@ -65,6 +345,13 @@ cdef extern from "imgui.h": ImGuiConfigFlags_IsSRGB # Application is SRGB-aware. ImGuiConfigFlags_IsTouchScreen # Application is using a touch screen instead of a mouse. + # Docking [BETA] + ImGuiConfigFlags_DockingEnable + + # Viewports [BETA] + ImGuiConfigFlags_ViewportsEnable + ImGuiConfigFlags_DpiEnableScaleViewports + ImGuiConfigFlags_DpiEnableScaleFonts ctypedef enum ImGuiBackendFlags_: ImGuiBackendFlags_None # @@ -73,6 +360,10 @@ cdef extern from "imgui.h": ImGuiBackendFlags_HasSetMousePos # Backend Platform supports io.WantSetMousePos requests to reposition the OS mouse position (only used if ImGuiConfigFlags_NavEnableSetMousePos is set). ImGuiBackendFlags_RendererHasVtxOffset # Backend Renderer supports ImDrawCmd::VtxOffset. This enables output of large meshes (64K+ vertices) while still using 16-bit indices. + # Viewports [BETA] + ImGuiBackendFlags_PlatformHasViewports + ImGuiBackendFlags_HasMouseHoveredViewport + ImGuiBackendFlags_RendererHasViewports ctypedef enum ImGuiCol_: ImGuiCol_Text, @@ -113,6 +404,8 @@ cdef extern from "imgui.h": ImGuiCol_TabActive, ImGuiCol_TabUnfocused, ImGuiCol_TabUnfocusedActive, + ImGuiCol_DockingPreview, + ImGuiCol_DockingEmptyBg, ImGuiCol_PlotLines, ImGuiCol_PlotLinesHovered, ImGuiCol_PlotHistogram, @@ -131,20 +424,6 @@ cdef extern from "imgui.h": ImGuiCol_COUNT - ctypedef enum ImGuiDataType_: - ImGuiDataType_S8 # signed char / char (with sensible compilers) - ImGuiDataType_U8 # unsigned char - ImGuiDataType_S16 # short - ImGuiDataType_U16 # unsigned short - ImGuiDataType_S32 # int - ImGuiDataType_U32 # unsigned int - ImGuiDataType_S64 # long long / __int64 - ImGuiDataType_U64 # unsigned long long / unsigned __int64 - ImGuiDataType_Float # float - ImGuiDataType_Double # double - ImGuiDataType_COUNT - - ctypedef enum ImGuiStyleVar_: ImGuiStyleVar_Alpha, # float Alpha ImGuiStyleVar_WindowPadding, # ImVec2 WindowPadding @@ -168,50 +447,17 @@ cdef extern from "imgui.h": ImGuiStyleVar_GrabMinSize, # float GrabMinSize ImGuiStyleVar_GrabRounding, # float GrabRounding ImGuiStyleVar_TabRounding, # float TabRounding - ImGuiStyleVar_ButtonTextAlign, # ImVec2 ButtonTextAlign - ImGuiStyleVar_SelectableTextAlign, # ImVec2 SelectableTextAlign - ImGuiStyleVar_COUNT - - ctypedef enum ImGuiButtonFlags_: - ImGuiButtonFlags_None # - ImGuiButtonFlags_MouseButtonLeft # React on left mouse button (default) - ImGuiButtonFlags_MouseButtonRight # React on right mouse button - ImGuiButtonFlags_MouseButtonMiddle # React on center mouse button - - ctypedef enum ImGuiCond_: - ImGuiCond_None # No condition (always set the variable), same as _Always - ImGuiCond_Always # No condition (always set the variable) - ImGuiCond_Once # Set the variable once per runtime session (only the first call will succeed) - ImGuiCond_FirstUseEver # Set the variable if the object/window has no persistently saved data (no entry in .ini file) - ImGuiCond_Appearing # Set the variable if the object/window is appearing after being hidden/inactive (or the first time) - - ctypedef enum ImGuiWindowFlags_: - ImGuiWindowFlags_None - ImGuiWindowFlags_NoTitleBar # Disable title-bar - ImGuiWindowFlags_NoResize # Disable user resizing with the lower-right grip - ImGuiWindowFlags_NoMove # Disable user moving the window - ImGuiWindowFlags_NoScrollbar # Disable scrollbars (window can still scroll with mouse or programmatically) - ImGuiWindowFlags_NoScrollWithMouse # Disable user vertically scrolling with mouse wheel. On child window, mouse wheel will be forwarded to the parent unless NoScrollbar is also set. - ImGuiWindowFlags_NoCollapse # Disable user collapsing window by double-clicking on it - ImGuiWindowFlags_AlwaysAutoResize # Resize every window to its content every frame - ImGuiWindowFlags_NoBackground # Disable drawing background color (WindowBg, etc.) and outside border. Similar as using SetNextWindowBgAlpha(0.0f). - ImGuiWindowFlags_NoSavedSettings # Never load/save settings in .ini file - ImGuiWindowFlags_NoMouseInputs # Disable catching mouse, hovering test with pass through. - ImGuiWindowFlags_MenuBar # Has a menu-bar - ImGuiWindowFlags_HorizontalScrollbar # Allow horizontal scrollbar to appear (off by default). You may use SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width. Read code in imgui_demo in the "Horizontal Scrolling" section. - ImGuiWindowFlags_NoFocusOnAppearing # Disable taking focus when transitioning from hidden to visible state - ImGuiWindowFlags_NoBringToFrontOnFocus # Disable bringing window to front when taking focus (e.g. clicking on it or programmatically giving it focus) - ImGuiWindowFlags_AlwaysVerticalScrollbar # Always show vertical scrollbar (even if ContentSize.y < Size.y) - ImGuiWindowFlags_AlwaysHorizontalScrollbar=1 # Always show horizontal scrollbar (even if ContentSize.x < Size.x) - ImGuiWindowFlags_AlwaysUseWindowPadding # Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient) - ImGuiWindowFlags_NoNavInputs # No gamepad/keyboard navigation within the window - ImGuiWindowFlags_NoNavFocus # No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB) - ImGuiWindowFlags_UnsavedDocument # Append '*' to title without affecting the ID, as a convenience to avoid using the ### operator. When used in a tab/docking context, tab is selected on closure and closure is deferred by one frame to allow code to cancel the closure (with a confirmation popup, etc.) without flicker. - ImGuiWindowFlags_NoNav = ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus, - ImGuiWindowFlags_NoDecoration = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse, - ImGuiWindowFlags_NoInputs = ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus, + ImGuiStyleVar_ButtonTextAlign, # ImVec2 ButtonTextAlign + ImGuiStyleVar_SelectableTextAlign, # ImVec2 SelectableTextAlign + ImGuiStyleVar_COUNT + + ctypedef enum ImGuiButtonFlags_: + ImGuiButtonFlags_None # + ImGuiButtonFlags_MouseButtonLeft # React on left mouse button (default) + ImGuiButtonFlags_MouseButtonRight # React on right mouse button + ImGuiButtonFlags_MouseButtonMiddle # React on center mouse button + - ctypedef enum ImGuiColorEditFlags_: ImGuiColorEditFlags_None # ImGuiColorEditFlags_NoAlpha # # ColorEdit, ColorPicker, ColorButton: ignore Alpha component (will only read 3 components from the input pointer). @@ -259,220 +505,6 @@ cdef extern from "imgui.h": ImGuiMouseButton_Middle ImGuiMouseButton_COUNT - - ctypedef enum ImGuiTreeNodeFlags_: - ImGuiTreeNodeFlags_None - ImGuiTreeNodeFlags_Selected # Draw as selected - ImGuiTreeNodeFlags_Framed # Draw frame with background (e.g. for CollapsingHeader) - ImGuiTreeNodeFlags_AllowItemOverlap # Hit testing to allow subsequent widgets to overlap this one - ImGuiTreeNodeFlags_NoTreePushOnOpen # Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack - ImGuiTreeNodeFlags_NoAutoOpenOnLog # Don't automatically and temporarily open node when Logging is active (by default logging will automatically open tree nodes) - ImGuiTreeNodeFlags_DefaultOpen # Default node to be open - ImGuiTreeNodeFlags_OpenOnDoubleClick # Need double-click to open node - ImGuiTreeNodeFlags_OpenOnArrow # Only open when clicking on the arrow part. If ImGuiTreeNodeFlags_OpenOnDoubleClick is also set, single-click arrow or double-click all box to open. - ImGuiTreeNodeFlags_Leaf # No collapsing, no arrow (use as a convenience for leaf nodes). - ImGuiTreeNodeFlags_Bullet # Display a bullet instead of arrow - ImGuiTreeNodeFlags_FramePadding # Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding(). - ImGuiTreeNodeFlags_SpanAvailWidth # Extend hit box to the right-most edge, even if not framed. This is not the default in order to allow adding other items on the same line. In the future we may refactor the hit system to be front-to-back, allowing natural overlaps and then this can become the default. - ImGuiTreeNodeFlags_SpanFullWidth # Extend hit box to the left-most and right-most edges (bypass the indented area). - ImGuiTreeNodeFlags_NavLeftJumpsBackHere # (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop) - # ImGuiTreeNodeFlags_NoScrollOnOpen # FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible - ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog - - - ctypedef enum ImGuiPopupFlags_: - ImGuiPopupFlags_None # - ImGuiPopupFlags_MouseButtonLeft # For BeginPopupContext*(): open on Left Mouse release. Guaranteed to always be == 0 (same as ImGuiMouseButton_Left) - ImGuiPopupFlags_MouseButtonRight # For BeginPopupContext*(): open on Right Mouse release. Guaranteed to always be == 1 (same as ImGuiMouseButton_Right) - ImGuiPopupFlags_MouseButtonMiddle # For BeginPopupContext*(): open on Middle Mouse release. Guaranteed to always be == 2 (same as ImGuiMouseButton_Middle) - ImGuiPopupFlags_MouseButtonMask_ # - ImGuiPopupFlags_MouseButtonDefault_ # - ImGuiPopupFlags_NoOpenOverExistingPopup # For OpenPopup*(), BeginPopupContext*(): don't open if there's already a popup at the same level of the popup stack - ImGuiPopupFlags_NoOpenOverItems # For BeginPopupContextWindow(): don't return true when hovering items, only when hovering empty space - ImGuiPopupFlags_AnyPopupId # For IsPopupOpen(): ignore the ImGuiID parameter and test for any popup. - ImGuiPopupFlags_AnyPopupLevel # For IsPopupOpen(): search/test at any level of the popup stack (default test in the current level) - ImGuiPopupFlags_AnyPopup = ImGuiPopupFlags_AnyPopupId | ImGuiPopupFlags_AnyPopupLevel - - - ctypedef enum ImGuiSelectableFlags_: - ImGuiSelectableFlags_None - ImGuiSelectableFlags_DontClosePopups # Clicking this don't close parent popup window - ImGuiSelectableFlags_SpanAllColumns # Selectable frame can span all columns (text will still fit in current column) - ImGuiSelectableFlags_AllowDoubleClick # Generate press events on double clicks too - ImGuiSelectableFlags_Disabled # Cannot be selected, display grayed out text - ImGuiSelectableFlags_AllowItemOverlap # (WIP) Hit testing to allow subsequent widgets to overlap this one - - - ctypedef enum ImGuiComboFlags_: - ImGuiComboFlags_None - ImGuiComboFlags_PopupAlignLeft # Align the popup toward the left by default - ImGuiComboFlags_HeightSmall # Max ~4 items visible. Tip: If you want your combo popup to be a specific size you can use SetNextWindowSizeConstraints() prior to calling BeginCombo() - ImGuiComboFlags_HeightRegular # Max ~8 items visible (default) - ImGuiComboFlags_HeightLarge # Max ~20 items visible - ImGuiComboFlags_HeightLargest # As many fitting items as possible - ImGuiComboFlags_NoArrowButton # Display on the preview box without the square arrow button - ImGuiComboFlags_NoPreview # Display only a square arrow button - ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest - - - ctypedef enum ImGuiTabBarFlags_: - ImGuiTabBarFlags_None # - ImGuiTabBarFlags_Reorderable # Allow manually dragging tabs to re-order them + New tabs are appended at the end of list - ImGuiTabBarFlags_AutoSelectNewTabs # Automatically select new tabs when they appear - ImGuiTabBarFlags_TabListPopupButton # Disable buttons to open the tab list popup - ImGuiTabBarFlags_NoCloseWithMiddleMouseButton # Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false. - ImGuiTabBarFlags_NoTabListScrollingButtons # Disable scrolling buttons (apply when fitting policy is ImGuiTabBarFlags_FittingPolicyScroll) - ImGuiTabBarFlags_NoTooltip # Disable tooltips when hovering a tab - ImGuiTabBarFlags_FittingPolicyResizeDown # Resize tabs when they don't fit - ImGuiTabBarFlags_FittingPolicyScroll # Add scroll buttons when tabs don't fit - ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll - ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyResizeDown - - - ctypedef enum ImGuiTabItemFlags_: - ImGuiTabItemFlags_None # - ImGuiTabItemFlags_UnsavedDocument # Append '*' to title without affecting the ID, as a convenience to avoid using the ### operator. Also: tab is selected on closure and closure is deferred by one frame to allow code to undo it without flicker. - ImGuiTabItemFlags_SetSelected # Trigger flag to programmatically make the tab selected when calling BeginTabItem() - ImGuiTabItemFlags_NoCloseWithMiddleMouseButton # Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false. - ImGuiTabItemFlags_NoPushId # Don't call PushID(tab->ID)/PopID() on BeginTabItem()/EndTabItem() - ImGuiTabItemFlags_NoTooltip # Disable tooltip for the given tab - ImGuiTabItemFlags_NoReorder # Disable reordering this tab or having another tab cross over this tab - ImGuiTabItemFlags_Leading # Enforce the tab position to the left of the tab bar (after the tab list popup button) - ImGuiTabItemFlags_Trailing # Enforce the tab position to the right of the tab bar (before the scrolling buttons) - - # [BETA API] API may evolve slightly! - ctypedef enum ImGuiTableFlags_: - # Features - ImGuiTableFlags_None # - ImGuiTableFlags_Resizable # Enable resizing columns. - ImGuiTableFlags_Reorderable # Enable reordering columns in header row (need calling TableSetupColumn() + TableHeadersRow() to display headers) - ImGuiTableFlags_Hideable # Enable hiding/disabling columns in context menu. - ImGuiTableFlags_Sortable # Enable sorting. Call TableGetSortSpecs() to obtain sort specs. Also see ImGuiTableFlags_SortMulti and ImGuiTableFlags_SortTristate. - ImGuiTableFlags_NoSavedSettings # Disable persisting columns order, width and sort settings in the .ini file. - ImGuiTableFlags_ContextMenuInBody # Right-click on columns body/contents will display table context menu. By default it is available in TableHeadersRow(). - # Decorations - ImGuiTableFlags_RowBg # Set each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt (equivalent of calling TableSetBgColor with ImGuiTableBgFlags_RowBg0 on each row manually) - ImGuiTableFlags_BordersInnerH # Draw horizontal borders between rows. - ImGuiTableFlags_BordersOuterH # Draw horizontal borders at the top and bottom. - ImGuiTableFlags_BordersInnerV # Draw vertical borders between columns. - ImGuiTableFlags_BordersOuterV # Draw vertical borders on the left and right sides. - ImGuiTableFlags_BordersH = ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH # Draw horizontal borders. - ImGuiTableFlags_BordersV = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV # Draw vertical borders. - ImGuiTableFlags_BordersInner = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH # Draw inner borders. - ImGuiTableFlags_BordersOuter = ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH # Draw outer borders. - ImGuiTableFlags_Borders = ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter # Draw all borders. - ImGuiTableFlags_NoBordersInBody # [ALPHA] Disable vertical borders in columns Body (borders will always appears in Headers). -> May move to style - ImGuiTableFlags_NoBordersInBodyUntilResize # [ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appears in Headers). -> May move to style - # Sizing Policy (read above for defaults) - ImGuiTableFlags_SizingFixedFit # Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching contents width. - ImGuiTableFlags_SizingFixedSame # Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching the maximum contents width of all columns. Implicitly enable ImGuiTableFlags_NoKeepColumnsVisible. - ImGuiTableFlags_SizingStretchProp # Columns default to _WidthStretch with default weights proportional to each columns contents widths. - ImGuiTableFlags_SizingStretchSame # Columns default to _WidthStretch with default weights all equal, unless overriden by TableSetupColumn(). - # Sizing Extra Options - ImGuiTableFlags_NoHostExtendX # Make outer width auto-fit to columns, overriding outer_size.x value. Only available when ScrollX/ScrollY are disabled and Stretch columns are not used. - ImGuiTableFlags_NoHostExtendY # Make outer height stop exactly at outer_size.y (prevent auto-extending table past the limit). Only available when ScrollX/ScrollY are disabled. Data below the limit will be clipped and not visible. - ImGuiTableFlags_NoKeepColumnsVisible # Disable keeping column always minimally visible when ScrollX is off and table gets too small. Not recommended if columns are resizable. - ImGuiTableFlags_PreciseWidths # Disable distributing remainder width to stretched columns (width allocation on a 100-wide table with 3 columns: Without this flag: 33,33,34. With this flag: 33,33,33). With larger number of columns, resizing will appear to be less smooth. - # Clipping - ImGuiTableFlags_NoClip # Disable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns). Generally incompatible with TableSetupScrollFreeze(). - # Padding - ImGuiTableFlags_PadOuterX # Default if BordersOuterV is on. Enable outer-most padding. Generally desirable if you have headers. - ImGuiTableFlags_NoPadOuterX # Default if BordersOuterV is off. Disable outer-most padding. - ImGuiTableFlags_NoPadInnerX # Disable inner padding between columns (double inner padding if BordersOuterV is on, single inner padding if BordersOuterV is off). - # Scrolling - ImGuiTableFlags_ScrollX # Enable horizontal scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. Changes default sizing policy. Because this create a child window, ScrollY is currently generally recommended when using ScrollX. - ImGuiTableFlags_ScrollY # Enable vertical scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. - # Sorting - ImGuiTableFlags_SortMulti # Hold shift when clicking headers to sort on multiple column. TableGetSortSpecs() may return specs where (SpecsCount > 1). - ImGuiTableFlags_SortTristate # Allow no sorting, disable default sorting. TableGetSortSpecs() may return specs where (SpecsCount == 0). - - ctypedef enum ImGuiTableColumnFlags_: - # Input configuration flags - ImGuiTableColumnFlags_None # - ImGuiTableColumnFlags_DefaultHide # Default as a hidden/disabled column. - ImGuiTableColumnFlags_DefaultSort # Default as a sorting column. - ImGuiTableColumnFlags_WidthStretch # Column will stretch. Preferable with horizontal scrolling disabled (default if table sizing policy is _SizingStretchSame or _SizingStretchProp). - ImGuiTableColumnFlags_WidthFixed # Column will not stretch. Preferable with horizontal scrolling enabled (default if table sizing policy is _SizingFixedFit and table is resizable). - ImGuiTableColumnFlags_NoResize # Disable manual resizing. - ImGuiTableColumnFlags_NoReorder # Disable manual reordering this column, this will also prevent other columns from crossing over this column. - ImGuiTableColumnFlags_NoHide # Disable ability to hide/disable this column. - ImGuiTableColumnFlags_NoClip # Disable clipping for this column (all NoClip columns will render in a same draw command). - ImGuiTableColumnFlags_NoSort # Disable ability to sort on this field (even if ImGuiTableFlags_Sortable is set on the table). - ImGuiTableColumnFlags_NoSortAscending # Disable ability to sort in the ascending direction. - ImGuiTableColumnFlags_NoSortDescending # Disable ability to sort in the descending direction. - ImGuiTableColumnFlags_NoHeaderWidth # Disable header text width contribution to automatic column width. - ImGuiTableColumnFlags_PreferSortAscending # Make the initial sort direction Ascending when first sorting on this column (default). - ImGuiTableColumnFlags_PreferSortDescending # Make the initial sort direction Descending when first sorting on this column. - ImGuiTableColumnFlags_IndentEnable # Use current Indent value when entering cell (default for column 0). - ImGuiTableColumnFlags_IndentDisable # Ignore current Indent value when entering cell (default for columns > 0). Indentation changes _within_ the cell will still be honored. - - # Output status flags, read-only via TableGetColumnFlags() - ImGuiTableColumnFlags_IsEnabled # Status: is enabled == not hidden by user/api (referred to as "Hide" in _DefaultHide and _NoHide) flags. - ImGuiTableColumnFlags_IsVisible # Status: is visible == is enabled AND not clipped by scrolling. - ImGuiTableColumnFlags_IsSorted # Status: is currently part of the sort specs - ImGuiTableColumnFlags_IsHovered # Status: is hovered by mouse - - ctypedef enum ImGuiTableRowFlags_: - ImGuiTableRowFlags_None # - ImGuiTableRowFlags_Headers # Identify header row (set default background color + width of its contents accounted different for auto column width) - - ctypedef enum ImGuiTableBgTarget_: - ImGuiTableBgTarget_None # - ImGuiTableBgTarget_RowBg0 # Set row background color 0 (generally used for background, automatically set when ImGuiTableFlags_RowBg is used) - ImGuiTableBgTarget_RowBg1 # Set row background color 1 (generally used for selection marking) - ImGuiTableBgTarget_CellBg # Set cell background color (top-most color) - - - ctypedef enum ImGuiFocusedFlags_: - ImGuiFocusedFlags_None # - ImGuiFocusedFlags_ChildWindows # IsWindowFocused(): Return true if any children of the window is focused - ImGuiFocusedFlags_RootWindow # IsWindowFocused(): Test from root window (top most parent of the current hierarchy) - ImGuiFocusedFlags_AnyWindow # IsWindowFocused(): Return true if any window is focused. Important: If you are trying to tell how to dispatch your low-level inputs, do NOT use this. Use 'io.WantCaptureMouse' instead! Please read the FAQ! - ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows - - - ctypedef enum ImGuiHoveredFlags_: - ImGuiHoveredFlags_None # Return true if directly over the item/window, not obstructed by another window, not obstructed by an active popup or modal blocking inputs under them. - ImGuiHoveredFlags_ChildWindows # IsWindowHovered() only: Return true if any children of the window is hovered - ImGuiHoveredFlags_RootWindow # IsWindowHovered() only: Test from root window (top most parent of the current hierarchy) - ImGuiHoveredFlags_AnyWindow # IsWindowHovered() only: Return true if any window is hovered - ImGuiHoveredFlags_AllowWhenBlockedByPopup # Return true even if a popup window is normally blocking access to this item/window - # ImGuiHoveredFlags_AllowWhenBlockedByModal # Return true even if a modal popup window is normally blocking access to this item/window. FIXME-TODO: Unavailable yet. - ImGuiHoveredFlags_AllowWhenBlockedByActiveItem # Return true even if an active item is blocking access to this item/window. Useful for Drag and Drop patterns. - ImGuiHoveredFlags_AllowWhenOverlapped # Return true even if the position is obstructed or overlapped by another window - ImGuiHoveredFlags_AllowWhenDisabled # Return true even if the item is disabled - ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped, - ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows - - - ctypedef enum ImGuiDragDropFlags_: - ImGuiDragDropFlags_None - # BeginDragDropSource() flags - ImGuiDragDropFlags_SourceNoPreviewTooltip # By default, a successful call to BeginDragDropSource opens a tooltip so you can display a preview or description of the source contents. This flag disable this behavior. - ImGuiDragDropFlags_SourceNoDisableHover # By default, when dragging we clear data so that IsItemHovered() will return false, to avoid subsequent user code submitting tooltips. This flag disable this behavior so you can still call IsItemHovered() on the source item. - ImGuiDragDropFlags_SourceNoHoldToOpenOthers # Disable the behavior that allows to open tree nodes and collapsing header by holding over them while dragging a source item. - ImGuiDragDropFlags_SourceAllowNullID # Allow items such as Text(), Image() that have no unique identifier to be used as drag source, by manufacturing a temporary identifier based on their window-relative position. This is extremely unusual within the dear imgui ecosystem and so we made it explicit. - ImGuiDragDropFlags_SourceExtern # External source (from outside of dear imgui), won't attempt to read current item/window info. Will always return true. Only one Extern source can be active simultaneously. - ImGuiDragDropFlags_SourceAutoExpirePayload # Automatically expire the payload if the source cease to be submitted (otherwise payloads are persisting while being dragged) - # AcceptDragDropPayload() flags - ImGuiDragDropFlags_AcceptBeforeDelivery # AcceptDragDropPayload() will returns true even before the mouse button is released. You can then call IsDelivery() to test if the payload needs to be delivered. - ImGuiDragDropFlags_AcceptNoDrawDefaultRect # Do not draw the default highlight rectangle when hovering over target. - ImGuiDragDropFlags_AcceptNoPreviewTooltip # Request hiding the BeginDragDropSource tooltip from the BeginDragDropTarget site. - ImGuiDragDropFlags_AcceptPeekOnly = ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect # For peeking ahead and inspecting the payload before delivery. - - ctypedef enum ImGuiDir_: - ImGuiDir_None - ImGuiDir_Left - ImGuiDir_Right - ImGuiDir_Up - ImGuiDir_Down - ImGuiDir_COUNT - - ctypedef enum ImGuiSortDirection_: - ImGuiSortDirection_None # - ImGuiSortDirection_Ascending # Ascending = 0->9, A->Z etc. - ImGuiSortDirection_Descending # Descending = 9->0, Z->A etc. - ctypedef enum ImGuiMouseCursor_: ImGuiMouseCursor_None ImGuiMouseCursor_Arrow @@ -486,30 +518,14 @@ cdef extern from "imgui.h": ImGuiMouseCursor_NotAllowed, # When hovering something with disallowed interaction. Usually a crossed circle. ImGuiMouseCursor_COUNT - ctypedef enum ImGuiInputTextFlags_: - ImGuiInputTextFlags_None # - ImGuiInputTextFlags_CharsDecimal # Allow 0123456789.+-*/ - ImGuiInputTextFlags_CharsHexadecimal # Allow 0123456789ABCDEFabcdef - ImGuiInputTextFlags_CharsUppercase # Turn a..z into A..Z - ImGuiInputTextFlags_CharsNoBlank # Filter out spaces, tabs - ImGuiInputTextFlags_AutoSelectAll # Select entire text when first taking mouse focus - ImGuiInputTextFlags_EnterReturnsTrue # Return 'true' when Enter is pressed (as opposed to every time the value was modified). Consider looking at the IsItemDeactivatedAfterEdit() function. - ImGuiInputTextFlags_CallbackCompletion # Callback on pressing TAB (for completion handling) - ImGuiInputTextFlags_CallbackHistory # Callback on pressing Up/Down arrows (for history handling) - ImGuiInputTextFlags_CallbackAlways # Callback on each iteration. User code may query cursor position, modify text buffer. - ImGuiInputTextFlags_CallbackCharFilter # Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard. - ImGuiInputTextFlags_AllowTabInput # Pressing TAB input a '\t' character into the text field - ImGuiInputTextFlags_CtrlEnterForNewLine # In multi-line mode, unfocus with Enter, add new line with Ctrl+Enter (default is opposite: unfocus with Ctrl+Enter, add line with Enter). - ImGuiInputTextFlags_NoHorizontalScroll # Disable following the cursor horizontally - ImGuiInputTextFlags_AlwaysOverwrite # Overwrite mode - ImGuiInputTextFlags_AlwaysInsertMode # OBSOLETED in 1.82 - ImGuiInputTextFlags_ReadOnly # Read-only mode - ImGuiInputTextFlags_Password # Password mode, display all characters as '*' - ImGuiInputTextFlags_NoUndoRedo # Disable undo/redo. Note that input text owns the text data while active, if you want to provide your own undo/redo stack you need e.g. to call ClearActiveID(). - ImGuiInputTextFlags_CharsScientific # Allow 0123456789.+-*/eE (Scientific notation input) - ImGuiInputTextFlags_CallbackResize # Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. Notify when the string wants to be resized (for string types which hold a cache of their Size). You will be provided a new BufSize in the callback and NEED to honor it. (see misc/cpp/imgui_stdlib.h for an example of using this) - ImGuiInputTextFlags_CallbackEdit # Callback on any edit (note that InputText() already returns true on edit, the callback is useful mainly to manipulate the underlying buffer while focus is active) - + ctypedef enum ImGuiCond_: + ImGuiCond_None # No condition (always set the variable), same as _Always + ImGuiCond_Always # No condition (always set the variable) + ImGuiCond_Once # Set the variable once per runtime session (only the first call will succeed) + ImGuiCond_FirstUseEver # Set the variable if the object/window has no persistently saved data (no entry in .ini file) + ImGuiCond_Appearing # Set the variable if the object/window is appearing after being hidden/inactive (or the first time) + + # OBSOLETED in 1.82 (from Mars 2021) -> use ImDrawFlags_ ctypedef enum ImDrawCornerFlags_: ImDrawCornerFlags_None # @@ -558,4 +574,13 @@ cdef extern from "imgui.h": ImGuiViewportFlags_IsPlatformWindow # Represent a Platform Window ImGuiViewportFlags_IsPlatformMonitor # Represent a Platform Monitor (unused yet) ImGuiViewportFlags_OwnedByApp # Platform Window: is created/managed by the application (rather than a dear imgui backend) - \ No newline at end of file + ImGuiViewportFlags_NoDecoration + ImGuiViewportFlags_NoTaskBarIcon + ImGuiViewportFlags_NoFocusOnAppearing + ImGuiViewportFlags_NoFocusOnClick + ImGuiViewportFlags_NoInputs + ImGuiViewportFlags_NoRendererClear + ImGuiViewportFlags_TopMost + ImGuiViewportFlags_Minimized + ImGuiViewportFlags_NoAutoMerge + ImGuiViewportFlags_CanHostOtherWindows \ No newline at end of file diff --git a/imgui/enums_internal.pxd b/imgui/enums_internal.pxd index 7f40e4f8..aa0c4188 100644 --- a/imgui/enums_internal.pxd +++ b/imgui/enums_internal.pxd @@ -10,7 +10,7 @@ cdef extern from "imgui_internal.h": ImGuiItemFlags_SelectableDontClosePopup # false # MenuItem/Selectable() automatically closes current Popup window ImGuiItemFlags_MixedValue # false # [BETA] Represent a mixed/indeterminate value, generally multi-selection where values differ. Currently only supported by Checkbox() (later should support all sorts of widgets) ImGuiItemFlags_ReadOnly # false # [ALPHA] Allow hovering interactions but underlying value is not changed. - ImGuiItemFlags_Default_ # + # ImGuiItemFlags_Default_ # ctypedef enum ImGuiItemStatusFlags_: @@ -34,7 +34,7 @@ cdef extern from "imgui_internal.h": ImGuiButtonFlags_FlattenChildren # allow interactions even if a child window is overlapping ImGuiButtonFlags_AllowItemOverlap # require previous frame HoveredId to either match id or be null before being usable, use along with SetItemAllowOverlap() ImGuiButtonFlags_DontClosePopups # disable automatically closing parent popup on press // [UNUSED] - ImGuiButtonFlags_Disabled # disable interactions + # ImGuiButtonFlags_Disabled # disable interactions ImGuiButtonFlags_AlignTextBaseLine # vertically align button to match text baseline - ButtonEx() only // FIXME: Should be removed and handled by SmallButton(), not possible currently because of DC.CursorPosPrevLine ImGuiButtonFlags_NoKeyModifiers # disable mouse interaction if a key modifier is held ImGuiButtonFlags_NoHoldingActiveId # don't set ActiveId while holding the mouse (ImGuiButtonFlags_PressedOnClick only) diff --git a/imgui/internal.pyx b/imgui/internal.pyx index fb4b42a8..7cb8026e 100644 --- a/imgui/internal.pyx +++ b/imgui/internal.pyx @@ -28,7 +28,7 @@ ITEM_NO_NAV_DEFAULT_FOCUS = enums_internal.ImGuiItemFlags_NoNavDefaultFocus ITEM_SELECTABLE_DONT_CLOSE_POPUP = enums_internal.ImGuiItemFlags_SelectableDontClosePopup ITEM_MIXED_VALUE = enums_internal.ImGuiItemFlags_MixedValue ITEM_READ_ONLY = enums_internal.ImGuiItemFlags_ReadOnly -ITEM_DEFAULT = enums_internal.ImGuiItemFlags_Default_ +# ITEM_DEFAULT = enums_internal.ImGuiItemFlags_Default_ # Item Status Flags ITEM_STATUS_NONE = enums_internal.ImGuiItemStatusFlags_None @@ -51,7 +51,7 @@ BUTTON_REPEAT = enums_internal.ImGuiButtonFlags_Repeat BUTTON_FLATTEN_CHILDREN = enums_internal.ImGuiButtonFlags_FlattenChildren BUTTON_ALLOW_ITEM_OVERLAP = enums_internal.ImGuiButtonFlags_AllowItemOverlap BUTTON_DONT_CLOSE_POPUPS = enums_internal.ImGuiButtonFlags_DontClosePopups -BUTTON_DISABLED = enums_internal.ImGuiButtonFlags_Disabled +# BUTTON_DISABLED = enums_internal.ImGuiButtonFlags_Disabled BUTTON_ALIGN_TEXT_BASE_LINE = enums_internal.ImGuiButtonFlags_AlignTextBaseLine BUTTON_NO_KEY_MODIFIERS = enums_internal.ImGuiButtonFlags_NoKeyModifiers BUTTON_NO_HOLDING_ACTIVE_ID = enums_internal.ImGuiButtonFlags_NoHoldingActiveId diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..792440ab --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,27 @@ +[tool.cibuildwheel] + +skip = "cp310-*" + +build-verbosity = 1 + +test-command = [ + "cd {package}", + "py.test -v --color=yes" +] +before-test = "python -m pip install -r doc/requirements-test.txt" + +environment = {FROM_APPVEYOR="true", COVERALLS_REPO_TOKEN="$COVERALLS_REPO_TOKEN"} + +[tool.cibuildwheel.macos] +environment = { LC_ALL="en_US.UTF-8", LANG="en_US.UTF-8" } + +[build-system] +requires = [ + "Cython>=0.24,<0.30", + "PyOpenGL", + "glfw", + "wheel", + "click", + "setuptools", +] +build-backend = "setuptools.build_meta" diff --git a/pyvenv.cfg b/pyvenv.cfg new file mode 100644 index 00000000..a2c1153a --- /dev/null +++ b/pyvenv.cfg @@ -0,0 +1,3 @@ +home = C:\msys64\mingw64\bin +include-system-site-packages = false +version = 3.8.7 diff --git a/setup.py b/setup.py index e3c92b2b..a0268024 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ def get_version(version_tuple): if sys.platform in ('cygwin', 'win32'): # windows # note: `/FI` means forced include in VC++/VC # note: may be obsoleted in future if ImGui gets patched - os_specific_flags = ['/FIpy_imconfig.h'] + os_specific_flags = ['-includeconfig-cpp/py_imconfig.h'] # placeholder for future os_specific_macros = [] else: # OS X and Linux