kas-gui / kas

Another GUI toolkit
Apache License 2.0
901 stars 25 forks source link

Add to 7GUIs #67

Closed dumblob closed 4 years ago

dumblob commented 4 years ago

I just discovered this library and it looks good to me. It seems mature enough to "accept the challenge" and add it to 7GUIs :wink:.

dhardy commented 4 years ago

Thanks for the suggestion. Probably not quite mature enough. I don't have motivation to implement these UIs now, but lets go through them quickly:

  1. Counter: KAS already has a counter example
  2. Temperature converter: the calculator example is strictly superior in capabilities
  3. Flight booker (constaints): evaluating constraints in a parent widget is already possible, disabling a button is not. Additionally, text-editing is poor and there is no native calendar input widget. Hence, this could kind of be implemented with little effort, but not well.
  4. Timer: KAS has stopwatch and clock examples which demonstrate animating/self-updating widgets, but no slider or progress bar yet.
  5. CRUD: the layouts are not a problem; data management should be possible but doesn't have model-view separation. This would be a good candidate for extending KAS (may have to think about what kind of data-view separation makes sense — this simple example doesn't really need much, but something like a sortable table does).
  6. Circle Drawer: probably possible (other than the slider widget), but undo/redo would have to be handled in user code. (Currently EditBox has very crude undo support.)
  7. Cells:

    • scrolling is supported (but with a minor text drawing bug)
    • double-click could be detected via low-level event handers in user code, but really should have higher-level support (along with a few other things like drag and right-click)
    • double-click-to-edit cells would need a special widget (possible in user code)
    • updating dependent cells would require processing by the parent Spreadsheet widget; this is basically what you'd want anyway but as already said, model-view separation may be useful

Summary: probably most (if not all) of this could be done in user-code already, but several desirable widgets are missing, text-entry is poor, there is no real undo support yet, and data-view separation would have to be done by user code.

dumblob commented 4 years ago

Sounds good. The point of 7GUIs though is to showcase how easy it is to do the particular thing with the given UI library. Second reason behind 7GUIs is to allow easy comparison of UI libraries.

This means, the value is not in "the UI lib can do this" (which actually most/all UI libs can, but in some this means using e.g. canvas/framebuffer and drawing & implementing absolutely everything yourself :cry:), but in "how does it look like in practice with this particular UI lib". In other words, it makes a lot of sense to implement exactly the individual cases and not just pointing to an app which is a superset of a chosen case :wink:.

So if anyone is interested, feel free to implement them. It'll also serve as a good PR for this project.

dhardy commented 4 years ago

Agree 100%; this project needs a number of things done in order to make these showcases easy to implement.

dhardy commented 4 years ago

I created a new repo for this: https://github.com/kas-gui/7guis