-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Graphical GUI builder support #601
Comments
@CHTUZKI No, LittlevGL does not have a studio for dragging and dropping widgets. Everything has to be done in code at this time. |
So~ Is there any way to implement visual construction? |
@CHTUZKI I'm pretty sure it would require a custom tool to be built. I think that is not on the roadmap at this time, unfortunately. |
@embeddedt OK,thank you for your reply. |
I've found this project on GitHub but not sure what it is actually capable of: https://github.com/leQu/littlevgldesiner |
@kisvegabor I checked the repo and there is no mention of |
I just guess from the name of the repo. |
Looks like a webpage application? |
Maybe we could explore the Qt Creator plugin possibilities? |
@AloyseTech I also want to write a the littlevgl Graphical GUI builder program with QT, but my level of QT is very low. ( ̄^ ̄゜)尴尬 |
To be honest I don't know how QT creator works. Is it extendible like Eclipse? As @embeddedt mentioned a drag-and-drop designed is not on the roadmap right now, although it'd be a really good thing. So it would be awesome if you were interested in creating a designer but else we still need to wait for it for a while. :( |
Even though QtCreator is not based on eclipse, it is fully configurable as well using plugins. The drag and drop interface is a plugin itself https://github.com/qt-creator/qt-creator/tree/master/src/plugins/designer. I have no experience with this kind of stuff though, but Qt provide documentation for creating plugin or provide custom widget to the current Qt Designer plugin. |
@AloyseTech I see, thank you for the info. |
Hi~ @kisvegabor Maybe we can start work of lvgl-xml. it will be like HTML. |
@tianyoung |
@kisvegabor I did some work on my project. I parse the XML with expat and then translates it to lvgl. But as for what you mentioned drag and drop editor, I have no idea yet. |
Initially, I would like to apologize for the immense text, and for the translation to be done basically by the oracle ggle, except for my part some modifications. I will describe what I have done and what I have tried, so you and whoever is reading will have a better understanding. In my everyday I use wxwidgets + codeblocks a lot, without going into detail of the tools, I once tried to port "mix" c with c ++ in these tools and the result was not good, after some modifications in the initial project, no longer received the errors of pointers that were many when adding the "lvgl" folder to the project. I think my starting point has already been clarified. Now came the second problem, after further investigating your library, she uses "trickery" tasks to draw the screen. Describing the problem, in the tools I mentioned above, the best way to draw on the screen, it would be hypothetically speaking to use what in your library is:
And inside:
And in a direct way, without "artifice" tasks, draw in this memory space. So you could create the drawing of the object, copy, drag and paste it onto the previously drawn canvas. If you have understood, and within the tools mentioned, you are interested, I am at your disposal. I was very long in the description, but I tried to be brief, if you have interest, we will continue here or else open another topic. @tianyoung Thanks for reading. |
@kisvegabor @ivanbraga I wanna join you, but my project is on schedule, maybe I don't have much time to contribute to this project. |
@ivanbraga I'm afraid I didn't fully understand your proposal. So your idea is to create an IDE using wxWidget and make LittelvGL draw to wxWidget canvas? |
@ivanbraga, @tianyoung , XML is a perfect idea. |
@pengoor Is possible to customize Glade for the objects of LittlevGL? Or something similar hast to be created from scratch? |
@kisvegabor I think it's possible. But, Glade is a little out of date and is not good-looking :-( |
@pengoor I see. I was asking about it because you suggested it earlier :) Do you know a good alternative? Or would it's worth to build a drag and drop designer from scratch? |
@kisvegabor Glade is just a sample solution. If we decide to build a professional designer, from scratch may be the only method. After all, there is no free lunch. |
Making business with a drag and drop designer would require a very different approach:
I myself couldn't handle right now to run it on a for-profit basis. |
Yes, you're quite right, it's a different business. TouchGFX was sold(not free), and now it can only support ST's device. |
I mean TouchGFX is now free for the users. |
This issue or pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Did you see this? |
It seems the Python API is for the GUI library and the Builder. The same as you do with Micropython for LittlevGL.
As it's designed directly for GUIslice library (and not as a general purpose tool) I think it wouldn't be easy to port to a completely different GUI library. |
I would be interested in helping develop this, it is one of the missing pieces of LittlevGL that other more popular libraries have... I don't think we necessarily need to go XML to LittleVGL. It could generate LittlevGL code on the fly. Then whatever UI framework we use for the application will likely have a I have no idea where to begin with this project. If we can agree on a framework to start with (like Qt) and go from there it would be an interesting project. @kisvegabor perhaps you can reopen this issue for more visible discussion? |
Awesome! :)
@amirgon has developed a Micropython interface for LittelvGL and @rreilink has work in progress Python binding. Using one them it seems possible to run one instance of LittlevGL and controll it with a script API. What do you think? |
I have an idea. This is possible because Python is a dynamic language, where you could create code on runtime and run it immediately. So when you add a button for example, the GUI Builder appends One advantage of such GUI Builder is that it does not need a special "environment". It's just a Python script by itself, so It could run on any platform that runs Micropython+lvgl (or Python+lvgl), for example the unix port of If this sounds like an interesting option, I can create a proof-of-concept that shows how to create a script dynamically as a response to GUI events. |
@amirgon I like the idea, but for existing users, I think we need to consider that:
That being said, we could have two separate GUI builders: one targeting C/C++ and the other targeting Pythonic languages. What do you think about that? |
@embeddedt Having two GUI builders doesn't make sense. We should strive to concentrate the efforts on one goal, not do the same thing twice. Now, I think that my suggestion could be good enough for everyone, also for those lvgl users who write pure C and not use micropython: |
Then I have no problem with that approach. |
I'm not sure that they're targeting the same audience. GUIslice looks to me like it's designed with a simplistic, barebones look - whereas LittlevGL does alpha blending, shadows, etc. |
Oh, I think that they are targeted to the same audience, it's just that LittlevGL is much more advanced, for the reasons you pointed out and for other reasons. But GUIslice has a GUI Builder, that's its main selling point . My point was that if there was one library we would have both LittlevGL advanced features and a GUI Builder. |
I also like the idea of using (Micro)python as the engine of the GUI builder. It would be possible to export the Python code or convert it to C. @AGlass0fMilk What do think about it? With the existing and planned features of
So guys, I can say something great is happining here. :) |
Since the core library is written in C, I think we should consider focusing on writing the GUI builder for and with C/C++. I think maybe what we could do is have the GUI builder generate C code so that it works with those who want to use the core library. Then, for those who want to use MicroPython, we can do something similar to how the MicroPython code is currently being generated. The generated Python binding can expose application-level calls (like button clicks, etc) to the user for implementation in Python. I like the idea of using python to create the GUI builder application though. Perhaps we could use a binding like CFFI to call into LittlevGL? MicroPython is a very nice extension but I think writing the GUI builder for a higher level abstraction will cause headaches down the road in terms of maintenance and binding discrepancies. EDIT: Maybe it would be worth trying to write it with Python using the MicroPython binding and then export to C. |
@AGlass0fMilk Please explain this. I don't follow your logic.
I suggested in the post above to use micropython to generate both C and micropython code from the GUI builder.
There is already a micropython binding to lvgl, why not use it?
I don't understand what you mean, you can use micropython to write low level calls to lvgl API, just like in C.
I think it's close enough. Please provide examples.
Please explain why you think it would be worth it. |
By "the core library" I mean LittlevGL is originally written in C. As it is targeted towards embedded development, C will surely be the most attractive implementation to developers looking for an embedded GUI library solution. MicroPython is essentially a wrapper on top of this core library. So if the core library can be wrapped, then a generated GUI could also be wrapped to work with MicroPython. I basically have two suggestions for the possible architecture of the GUI builder: 1.) Export to C, wrap the generated GUIMy initial thought was to follow the same architecture -- export to C under the hood and generate a binding for MicroPython. This would keep the C implementation lightweight and modular (as C developers can simply use the exported code). The MicroPython layer would be in addition to rather than instead of the C layer, which is the way it is now. This provides both C and MicroPython developers a way to build GUIs with the same application. It would keep us from having to write an exporter for each supported language (I eventually want to make a C++ wrapper to go with my Mbed-OS port). 2.) Implement GUI builder in Python, create modular exporters for each supported languageOn the other hand, what we could do is just write the GUI builder application in Python. Then we create some sort of abstraction layer for the underlying code generator. We implement this API with an exporter module that is specific to each language we want to export to. This will let us support different languages without too much extra work. I want to emphasize that I think one of the most appealing aspects of LittlevGL is its lightweight, portable C-based implementation. So I think the focus of a GUI builder should be on primarily supporting C first. Then we can build up complexity (like MicroPython bindings) from there. In response to your other comments: I see now that the MicroPython binding would be the same thing as CFFI. If the API is close enough, then let's start architecting the Python-based GUI builder. I think it would be worth trying with Python because: Personally, I'm already familiar with several GUI libraries for Python. @kisvegabor Is there someplace (like a wiki or google doc) that we can start hashing out the architecture of this GUI builder application? Or maybe a new repository with a README so we can also start submitting new GitHub issues related to design. Once we have an architecture sketched out we can each start developing parts of the application in parallel. |
Just brainstorming here. A few considerations I thought of (these would be separate issues on a dedicated GitHub project):
|
I've created a repo for it and gave write access to @AGlass0fMilk: https://github.com/littlevgl/lv_gui_builder And created the first issue to discuss the architecture: lvgl/lv_gui_builder#1 So let's continue this topic there! Thank you very much for your contribution so far. Can't wait to see it! :) |
How did you parse the XML to LVGL? |
A few days ago I found the littlevGL library. I feel that this library is very good. Now I am still new to this library. I want to ask if littlevGL provides a GUIbuilder like STemwin.
The text was updated successfully, but these errors were encountered: