hoffstadt / hoffstadt/DearPyGui
Get viewport maximization/mlnimization state
- Dominant language
- C++
- Stars
- 15.6k
- Forks
- 783
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
I find it hard (even impossible) to know if the main window/viewport is in maximized/minimized state with the current API.
**Describe alternatives you've considered**
- Using `get_viewport_pos` gives the position of the viewport in the normal state. So it is a no go.
- Using a boolean to remember the state is not sufficient, because the user can trigger maximization / minimization events from the OS directly so there's no chance to be informed of those events (except with a callback, but the API does not offer this possibility)
**Describe the solution you'd like**
Add some functions giving this information (e.g. `ìs_viewport_maximized` , `is_viewport_minimized`)
Maybe it's not to hard to implement, at least for MacOS and linux ? It looks like glfw offers solutions, I think, like :
```
int iconified = [glfwGetWindowAttrib](https://www.glfw.org/docs/3.3/group__window.html#gacccb29947ea4b16860ebef42c2cb9337)(window, [GLFW_ICONIFIED](https://www.glfw.org/docs/3.3/group__window.html#ga39d44b7c056e55e581355a92d240b58a));
```
(PS: Thank you for the hard work!)
Contributor guide
Assessment
This issue has not been assessed yet.