Replies: 1 comment
-
That is a good idea in general; we currently have logic in Cogent Code and Cogent Vector that supports saving the proportions of splits elements, and we will move that logic to be general for all splits (see #996), which should cover a lot of things, especially once #993 is implemented. We will also consider implementing saving of scroll positions. In general, I think it is better to do targeted saving of specific things (splits, scrollbars, etc) instead of saving the whole GUI tree. However, we do also have support for saving the whole GUI tree in JSON, with XML support under development. We are also planning to add support for saving trees as Go code at some point, which could work as part of an interactive GUI builder that generates Cogent Core code (see #167). Again, in general I would prefer if things can be saved in a more targeted way through the existing extensible settings structure or other use of |
Beta Was this translation helpful? Give feedback.
-
The ability to persist (and subsequently load) the state of the entire GUI tree to and from an intermediate format (such as JSON?) would be a useful addition.
It would allow users to essentially 'save' the state of all widgets on exit of an application, and then restore that state on application startup.
All widget properties that can be modified by the GUI user can be persisted including - size, scroll bar positions, slider positions, currently selected widget, etc.
This would be very useful for more complex desktop applications.
Both Egui (a Rust GUI framework) and Dear Imgui (a C++ GUI framework) have this functionality.
Beta Was this translation helpful? Give feedback.
All reactions