Jump to content

uGFX embedded linux


Recommended Posts

I have been trying to decide how to make my current project work well on an embedded linux machine.  I decided to try a smaller scale X11 window manager, I tried Matchbox as a starter.  I set it up to run my brewery project compiled with ugfx.  It is the only application running, there are no menu's to load other application.  I have full access to all of SDL2 and even openGL if I want.  All of the daemons are running, it has access to the network, and the PostgreSQL database on the machine.  It is running on a display that is 1440x900 resolution, it is scaled from the application that is built with resolution 1024x600.



Rebuilt the application for bigger then the display resolution.  I made an error ant typed in 1770 instead of 1440.  There is just less room on the right. 


The display isn't the best and it is too big.  It is a display from a defunct laptop with an HDMI adapter that I bought on ebay for $30 or so.

Anyway, it was fun to do and I will work on using an even smaller window manager this week.  The tinyWM is the smallest they come and provides no service.  The good part is it will filter less keyboard and mouse and will consequently run faster.  Sorry for the huge images.


Link to comment
Share on other sites

Thank you very much for sharing! It is always nice & interesting to see for what and how people use µGFX. We'd definitely love to see more!
I love the temperature (?) gauge in the middle. Is there any chance for you to share that one? I guess that would be a very nice example for the example widgets of the downloads section.

On a side note: Unfortunately we haven't had time to include your table widget into the repository yet...

Link to comment
Share on other sites

I wouldn't mind sharing the temperature gauge but at this point it is just hacked together. It is fixed width and height ans all of the positions are hard coded to fit.  When I get to making it real I will let you know.

As for the table widget, I had to make more changes to make it work better.  The remaining portion of the display used to be just background color when the even/odd background was used so with no rows it was a solid color.  Now the remaining area is colored in rows of even/odd.

I also want to add something to allow the developer to make better use of the columns.  As a simple start I will try an api like:

gwinTableSetColumnWidth(xx, uint16_t column, uint16_t width) 

But I haven't worked out the geometry yet, what to do with the extra space if the width is greater then sum of the column widths or what to do if the sum is greater then the width.  

Another option I thought of is that as each row is added the columns are checked such that each column width is as large as is needed to hold the widest content.  Then if the content is larger then the width of the table, only the last column is truncated with ellipses.  

I haven't decided what to do yet, but currently the table does not make good use of space.  For the Mash Step table, the name column  needs to be big and the other two columns are at most 6 char's wide.  The table could be much less wide if I had a good way to deal with the column width. Of course, to make this good I would have to change the names in the headers.

Link to comment
Share on other sites

With these kinds of things it's usually a good idea to keep it as simple as possible. Don't forget that this is a GUI toolkit designed to use as little resources as possible meant for embedded systems. Auto-resizing is ALWAYS very expensive and a lot of trouble - things we don't really want to spend resources for. So far we only added auto-resizing for one widget/case and we regret it a lot. Don't forget that the kind of GUIs you create with µGFX are usually (as in almost always) static.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...