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

Add a getter of main window dragging state #186

Open
HoKim98 opened this issue Sep 21, 2023 · 0 comments
Open

Add a getter of main window dragging state #186

HoKim98 opened this issue Sep 21, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@HoKim98
Copy link

HoKim98 commented Sep 21, 2023

Is your feature request related to a problem? Please describe.
I am currently developing a webview using an iframe in a WASM environment. At this time, the iframe is above the egui canvas, but when dragging the tab, there is a problem with widgets and mouse events being fed to the iframe, so I would like not to show webviews while dragging. However, it's not likely to checking the dragging status in the main window.

Describe the solution you'd like
It would be nice to be able to query the dragging state in the same way as WindowState like below.

let dock_state = DockState::new(vec![]); // should be inited somewhere
let window_state = dock_state.get_main_window_state();
if window_state.dragged() {
    println!("dragging :)");
}

Describe alternatives you've considered
Otherwise, it would be a good idea to receive a UI response as below.
But it doesn't assume the tabs' dragging state.

let mut dock_state = DockState::new(vec![]); // should be inited somewhere
let response = DockArea::new(&mut dock_state).show(...);
if response.dragged() {
    println!("dragging :)");
}

Additional context
If you need any development support, I'd be happy to help!

@HoKim98 HoKim98 added the enhancement New feature or request label Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant