I'm working on a GUI library for Arduino, is this something useful? So far I have the basics of input, layout and rendering but only one interactive control - a button. What controls are most useful in an arduino GUI? Are they mostly readonly, like a progress bar or are they often interactive like buttons? Of course a general purpose GUI library should have both but I am looking for feedback to know where to invest effort first if at all. So far automatic layout using a StackPanel control is the coolest feature. It supports proportional of fixed size, alignment, and minmax constraints, padding for the panels and margins for controls to follow soon.
This uses Adafruit_GFX, so in theory should work with any display they support. But it uses an abstraction layer so it's possible to use a different graphics library. Only supports one display. Is there a need to support independent multiple displays in the sense that each will have independed user interface? Thanks for guidance!
The left screen is touch, the right is regular, use mouse or buttons to navigate and click...
The Arduino IDE is all that's needed for my examples.
My button is a jumper that I ground because almost anyone with an Arduino has a jumper. Get it? What MOST members can run!
Currently, if someone wanted to use this library today, they woud implement a class derived from BControl which handles mouse and focus and they will override draw() and provide their own visualization. So basically today I only have a simple button, but it's already usable if one wants to create their own controls. I was going to add bitmaps once I have checkboxes and sliders, but maybe it's more useful... Thanks for the example code and the video - an inspiring thing!
This is more intensive to draw, for that I need to optimize my drawing loop so it doesn't redraw the entire tree each time.. plan to do it this weekend.
I'm targeting lower end devices, but not sure if that's the right target group...
I don't think it's useful for AVR Arduinos. Even a CLI tends to eat up too much memory, and we're already faced with a FAQ being "my sketch is very short, but still runs low on memory. I'm only using the GFX display and SPI libraries..."
Noted! Thank you, please post if you have an example of what one might look like, I was going to start with a progress bar to serve the same purpose, because it seems easier to implement
Thanks! That's interesting.. I am not going that far as to build a visual editor like they have.. But I implemented a stack layout panel, that simplifies layout.. for example this is how to setup a layout as on the screenshot:
Implemented a scrollbar and a text label.. Wondering if a "GUI core" is something useful, meaning the users should make their own controls with the library, which solves the basics for them:
Architecture and class hierarchy
Measure, Layout and render passes
Input from virtual mouse/keyboard and event delegates
Focus management and navigation
Screen/view coordinate mapping and theming
Support for multiple independent displays
Basically all that's left is to create more controls.. Wondering if leaving the library as the "GUI core" on which to build is a viable strategy or whether the library needs to provide controls out of the box to be useful...