I am coming from Tcl/Tk, where the basic widget set is very basic, but Tcl includes tools and features that facilitate creating more complex “widgets” from the simplier widgets and thus creating new “mega” widgets. There are several OOP frameworks for doing this (SNIT, BWidget, and others). Is this sort of thing possible with iced? Or must one put the entire UI in one giant main.rs file?
I would like to break up my UI into several pieces in separate modules (separate .rs files). I find it easied to manage things and makes things easier to maintain. Is this possible with iced and what is the best way to do this. The documentation does not seem to provide much of a clue as to how to do this.
Certainly doable, there are multiple existing charting/plotting iced libraries + others under active development. Compositing widgets is also rather easy, with multiple possible approaches depending on how much interactivity and complexity (as in how complex the intended widget composition is) you need.
I don’t see anything in that screenshot that looks particularly difficult to implement with iced versus any other framework. Just start small, read the pocket guide and unofficial guide (linked above), go through all the examples in the repo, and you should find most of what you need to build that!
The library almost forces you into composing your app into smaller pieces, so it should not be in one massive main.rs file. Within The Pocket Guide in the docs, there’s one subsection that talks about this:
But admittedly it’s pretty brief, so I built this one example once upon a time to help newcomers reason about how to compose applications from smaller pieces:
There are many other examples in the ecosystem that you can reference. I know you’re not a Discord user but FYI that’s where we the community is most active today