8000 The road from docking to PyPI · Issue #259 · pyimgui/pyimgui · GitHub
[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The road from docking to PyPI #259

Open
2 tasks
learn-more opened this issue Feb 14, 2022 · 6 comments
Open
2 tasks

The road from docking to PyPI #259

learn-more opened this issue Feb 14, 2022 · 6 comments
Labels
discussion todo Task that needs to be done

Comments

@learn-more
Copy link
Collaborator
learn-more commented Feb 14, 2022

This ticket serves to track the progress towards getting the docking features in a PyPI release.

TODO:

  • Map the docking features. (1)
  • Decide how to release this (2)

(1): Most of the docking features are not yet mapped to python, so this should be done first.
@KinoxKlark suggests to use the docking branch for that.
Currently pyimgui tracks 1.82 of DearImGui, so the docking branch should be matching the commit ocornut/imgui@2565945

(2): There are a few options here:

  1. Create a new PyPI package for the docking feature: pyimgui-docking[glfw,...] just like the main package.
  2. Add docking as a 'feature' inside the main package: pyimgui[glfw,docking] (unsure if this is possible)
  3. Always include docking features in PyPI.
@learn-more learn-more added discussion todo Task that needs to be done labels Feb 14, 2022
@KinoxKlark KinoxKlark pinned this issue Feb 14, 2022
@KinoxKlark
Copy link
Member

Thanks!

I reverted the docking branch to the correct commit to being synced with the 1.82 tracked by pyimgui. I had to undo some changes but nothing problematic and I think it is cleaner to start from this basis. Don't forget to git submodule update if anyone wants to work on this branch!

Since in the future we will try to catch up again with the current DearImGui release, here are the corresponding commits by release to match:

1.82
master: ocornut/imgui@35b1148
docking: ocornut/imgui@2565945

1.83
master: ocornut/imgui@ad5d1a8
docking: ocornut/imgui@1b435ae

1.84
master: ocornut/imgui@d2ffbd9
docking: ocornut/imgui@5a7d18a

1.85
master: ocornut/imgui@55d35d8
docking: ocornut/imgui@1b215ec

1.86
master: ocornut/imgui@512c54b
docking: ocornut/imgui@15b4a06

1.87
master: ocornut/imgui@c71a50d
docking: ocornut/imgui@1ee2527

@KinoxKlark
Copy link
Member
KinoxKlark commented Feb 14, 2022

I did get through the entire imgui.h file and its diff between 1.82:master and 1.82:docking and I updated the cimgui.pxd file with function to map (or discuss if we want to map or not). The corresponding commit is 8119b0f

I also updated the corresponding flags.

Here are the new struct/prop/function that could be mapped for the docking branch:

  • struct ImGuiIO

    • ConfigDockingNoSplit
    • ConfigDockingWithShift
    • ConfigDockingAlwaysTabBar
    • ConfigDockingTransparentPayload
    • ConfigViewportsNoAutoMerge
    • ConfigViewportsNoTaskBarIcon
    • ConfigViewportsNoDecoration
    • ConfigViewportsNoDefaultParent
    • MouseHoveredViewport
  • struct ImDrawData

    • OwnerViewport
  • struct ImGuiWindowClass

  • struct ImGuiViewport

    • ID
    • DpiScale
    • ParentViewportId
    • DrawData
    • RendererUserData
    • PlatformUserData
    • PlatformHandle
    • PlatformHandleRaw
    • PlatformRequestMove
    • PlatformRequestResize
    • PlatformRequestClose
  • struct ImGuiPlatformIO

  • struct ImGuiPlatformMonitor

  • GetWindowDpiScale()

  • GetWindowViewport()

  • SetNextWindowViewport(ImGuiID viewport_id)

  • DockSpace( ... )

  • DockSpaceOverViewport( ... )

  • SetNextWindowDockID( ... )

  • SetNextWindowClass(const ImGuiWindowClass* window_class)

  • GetWindowDockID()

  • IsWindowDocked()

  • GetBackgroundDrawList(ImGuiViewport* viewport)

  • GetForegroundDrawList(ImGuiViewport* viewport)

  • GetPlatformIO()

  • UpdatePlatformWindows()

  • RenderPlatformWindowsDefault( ... )

  • DestroyPlatformWindows()

  • FindViewportByID(ImGuiID id)

  • FindViewportByPlatformHandle(void* platform_handle)

I also updated the internal part but nothing that needs to be reported for now.

If someone wants to tackle some of these, please consider using the / system inside cimgui.pxd to mark mapped functions. Also, I would advise documenting mapped functions as you go along.

I hope I did not forget anything.

@masc-it
Copy link
masc-it commented Feb 16, 2022

Hi! I am working on some of these, everything's tracked in #261

@KinoxKlark
Copy link
Member

Will some functionalities of the docking branch need to consider the new with support implemented in #264 ? Just to be consistent with the rest of pyimgui. I'll merge dev/version-2.0 in docking when I'll merge it in the dev/version-2.0 branch.

@mCodingLLC
Copy link

Docking with support would only need to be added if the docking branch adds any begin_docking_* kind of commands. In the current docking branch I didn't see any.

@KinoxKlark
Copy link
Member

I merged #261, thanks a lot to @masc-it for the help. I updated my previous comment with the implemented functions. Please let me know if I forgot something ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion todo Task that needs to be done
Projects
None yet
Development

No branches or pull requests

3 pa 2E33 rticipants
0