So I have made an application in gtk-rs however I am not a huge fan of use of callbacks and syntax wise (e.g. checkboxes cannot directly write to a &mut bool or singleline edit/entry fields cannot write to &mut String), I prefer to use something similar syntax to egui except it is retained.
Are there any libraries that are:
Written in pure Rust
Similar to egui syntax but retained
Uses gtk theme support
Its a library not a framework as defined by ratatui:
Egui can provide what it does (no callbacks, widgets directly modifying &mut references, and in general UI as code) because it reruns your code every times there are updates, that is because it is not retained.
oh, so that's what you mean by "syntax", I thought the word "syntax" was refering to some kind of DSL, or something the like.
but what you described is unique to immediate mode, as @SkiFire13 points out, you cannot do that in retained mode, that's the definition of retained mode:
the states (the boolean indicating a checkbox being checked, the string represents the content of a line edit, etc) are "retained", or in other words, "owned", by the GUI widgets tree, not by the application. and you must synchronize the application states and the "retained" GUI states in response of various "events".
so, my next question is, what's your motivation to seek for a "retained" mode library, instead of just using egui? maybe you are asking a wrong question (a.k.a. an XY problem), and "retained mode" is not the solution for the real problem?
or put it in another way, what's the problem that stops you from using egui in the first place?