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

Please help me to clarify the concepts of some specific terms #7591

Closed
JTtNinjaCode opened this issue May 15, 2024 · 2 comments
Closed

Please help me to clarify the concepts of some specific terms #7591

JTtNinjaCode opened this issue May 15, 2024 · 2 comments
Labels

Comments

@JTtNinjaCode
Copy link

JTtNinjaCode commented May 15, 2024

Version/Branch of Dear ImGui:

All

Back-ends:

All

Compiler, OS:

All

Full config/build information:

All

Details:

When I read Glossary I am still unsure about some concepts to understand it visually. , so I decided to use some images to ask for help.
link:https://github.com/ocornut/imgui/wiki/Glossary

  • Does green rect is Platform Decorations?
  • Does red rect are Docking Decorations?
  • Does oragne rect are Host Window?
  • Does "Floating" Dock Node's size always same as it's Host Window?
  • Where is the Central Node?
  • Where is the Dockspace?
    image

In Glossary:

Host Window: the Window used to display Docking Decorations. In a Dock Node Hierarchy sitting over a Dockspace, the Host Window is always the window where the Dockspace was submitted. In a Dock Node Hierarchy sitting over a Floating Window, the Host Window is created by the Docking system.

What is "the Host Window is always the window where the Dockspace was submitted" mean? submit draw call?

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

No response

@JTtNinjaCode JTtNinjaCode changed the title Please help me to clarify the concepts of some specific terms. Please help me to clarify the concepts of some specific terms May 15, 2024
@ocornut ocornut added the doc label May 15, 2024
@ocornut
Copy link
Owner

ocornut commented May 15, 2024

Thanks for asking. It may be a good idea that we create an officially annotated picture.

Does green rect is Platform Decorations?

Yes, but it also technically include the window border and resizing behavior when clicking on that border.
Resizing from platform window border uses a different code path than resizing from imgui resize border/corner (e.g. clicking on bottom right of "Hello, World!" window).

Does red rect are Docking Decorations?

Yes.

Does orange rect are Host Windows?

Yes.

Does "Floating" Dock Node's size always same as it's Host Window?

Yes, the root dock node is. If you make the Debugger/Demo split float externally, the root dock node is same same as host window, but each child dock is roughly half of the size.

Where is the Central Node?
Where is the Dockspace?

There's none in that screenshot.
Presumably because DockSpaceOverViewport() or DockSpace() isn't called.
DockSpace created a docking node attached inside a window.

Central Node is not technically distinguishable from other nodes (which has been a design problem and source of confusion).
In an empty DockSpace the only node would be the central node. If you dock another window to the right of the central node, the central node will stay the one on the left. It's basically a property that's held in a single node.
One aspect of this property is that it allow the node to stay visible even if it is empty (whereas other one would hide/collapse).
I think the concept of central node will be removed eventually, it's causing too many issues, may need to use another technique to specify resizing/emptying behavior.

@JTtNinjaCode
Copy link
Author

Thank you a lot!

@ocornut ocornut closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants