iced-rs / iced

A cross-platform GUI library for Rust, inspired by Elm
https://iced.rs
MIT License
24.45k stars 1.14k forks source link

widgets: spinner (dropdown selection), integer/float input, imgui style tree #209

Open aentity opened 4 years ago

aentity commented 4 years ago

Wondering about support for following widgets:

  1. Spinner, dropdown selection with N set of known values
  2. Typed integer/float input fields, for easy numeric inputs
  3. Imgui style "tree", which is collapsible (nice for preserving space), and allows for nesting of more trees

Do you plan to support 1/2, with 3 maybe a wishlist item?

hecrj commented 4 years ago

Yes, I think we should support these widgets or a variation of them in the long run:

  1. A combobox or similar is the main widget I think we should build when implementing #30.
  2. A number field should be possible currently. The main challenge here is to reuse text editing logic nicely. #202 is somewhat related to this.
  3. A tree widget would be great, but I am not sure if we will currently find any important blockers. I'd love to see exploration attempts in this area.
loewenheim commented 4 years ago

I'd love to take a stab at the tree widget, but I think I'm gonna need some pointers. The way I see it, a tree contains some sort of content and a vector of children. But when rendering it, there also has to be something you can click to collapse it. Should that just be a Button? And if so, at what point is it created? Is it part of the Tree struct?

Kaffiend commented 3 years ago

I would also like to add input masks and relevant validation and placeholders to depict the mask, ie. phone, zip+4, email, date. As for date is concerned a simple mask would suffice but maybe a more explicit control with calendar popup would be a consideration as well. similar to a dropdown. edit: reference