So playing around with GTK for the first time, both as gtk-rs and GTK at all. I actually had another help post already typed up however I found the problem while writing it, apparently the Gtk calendar starts counting months from Jan = 0, crazy.
Anyway the other question I have was just regarding how to deal with more general mutable variables between GTK elements. As I said, complete GTK novice, complete GTK-rs novice and still a pretty big noob at Rust in general so please forgive the question if it seems silly.
Lets say I have a counter, or some kind of total, perhaps drawing on input from a SpinButton or something. I press a button, it adds the content to a variable or pushes to a vec, structure, something like that.
So first I try the obvious, use a &mut in the closure. Lifetime of the closure might outlive the variable. Fair enough, makes sense. Then I use the clone! macro commonly used in the GTK examples to pass it in, but ofc thats cloning it, not what I want. So clone! an Rc, but then immutable, so Rc Refcell it, clone! and borrow_mut inside the closure. That works.
So my question is: is there a nicer way of doing that?
Also I intend on compiling this for Windows later, currently Linux. Am I going to encounter problems other than GTK’s somewhat out of place look on Windows, and for distributing it (with the MSVC toolchain preferably) what libs do I need to package up with it?