-
Notifications
You must be signed in to change notification settings - Fork 77
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
drag tab outside should be result into an new window :) #4
Comments
Agree, this feature is going to be crucial to get the library to a usable state |
It can be done with: egui::Window::new("My Window").show(ctx, |ui| {
ui.label("Hello World!");
}); Another part is how to determine that the tab is should be the new window. |
One way of achieving this effect is to imitate Dear Imgui. While the tab is being dragged outside of the tab bar, it is a new window until you drop it while hovering over one of these icons that show up in the middle of the node you're currently hovering over. If it's dropped anywhere else, it stays as a window. We might consider implementing this for all |
If we are going to do this it will require big changes. |
Definitely. But I think it's going to be worth it as it would make using the docking UI much easier. Of course, I'm open to other ideas too, this one's just the first thing that came into my mind. |
Or (it is simple and seems pretty elegant) it's just right-clicked on a tab and then this tab becomes an individual window. |
I have a couple problems with this idea:
|
I mean instead of showing this fully filled selection the user will have an ability to drop a tab and create new window. |
Sorry, if I explain pretty odd. |
So if I understand correctly: dragging the tab looks like it does right now and dropping it in a certain spot should create a new window out of it, or dock it in a node if it's dropped in another certain spot. Is that right? I'm not yet sure how it would feel to the user, but it's worth giving it a try! |
|
It works pretty good other thing is how to translate content to the window and how to back this window to the nodes as a tab. |
I think that should be great idea if to create a |
Good progress so far!
That's not a bad idea, I'll create one now. We can also use draft pull requests for tracking all WIP stuff. |
Sounds good. |
Done, you can use the experimental branch :) |
Guys, if I may add to that discussion. If anyone wants to know how docking should behave, please look how Visual Studio (not VSCode). They (Visual Studio) simply perfected it. |
Yes, this is the approach I would like to go with, that's why I'm suggesting to imitate Dear ImGui. |
I created a discussion for this feature: #29 |
I know this issue is pretty old, but judging by the linked repo I think the original poster meant the os window, not the |
Upon some tweaking (with breaking changes), I'm able to make it this far (code at https://github.com/micfong-z/egui_dock/tree/main; definitely not ready for a PR), with a Dear ImGui-like overlay: Screen.Recording.2023-06-17.at.22.16.26.mp4I'm using a separate However, same as in #27, I have totally no idea how to handle the windows after they are "detached". Maybe we should make I'm relatively new to Rust, and so its data structures. So there might be better solutions (?) |
@micfong-z Great work, this looks incredible! I think the issue with detached windows might be that we'd need to make changes to egui itself, so that we could "steal" the contents of any It's not an easy problem to solve and will probably take a few iterations to get this right. I also think it might be worthwhile to create a new branch just for this feature. You could then open a PR to that branch so that other people would also be able to contribute. |
Closed by #149 |
nice to have i think :)
link maybe help:
https://github.com/vivlim/egui-glow-multiwin
The text was updated successfully, but these errors were encountered: