Author Topic: Lua IUP GUI for Oxygen Basic?  (Read 4629 times)

0 Members and 3 Guests are viewing this topic.

Sean

  • Guest
Lua IUP GUI for Oxygen Basic?
« on: August 18, 2012, 09:40:32 PM »
I have some commercial code in FreeBasic and the FireFly GUI designer.  It's about 1000 lines of code and about another 1000 lines of auto-generated GUI code.  I had a lot of trouble using that combination.  There were quite a few stumper's that took 3 or 4 hours each to sort out.  Ordinarily I would not expect to meet any significant problems within 1000 lines of code.  Anyway one of the alternatives I have been looking at is the programming language Lua.
I think the standard GUI library for Lua (IUP)could be a good match of Oxygen Basic.  Lua is largely used as an embedded language within C and is based on a clean subset of C. I read that Oxygen Basic can handle most c header files without problem.  It could be a fairly easy job to integrate IUP into Oxygen Basic and provide an easy to use GUI and other features such as a drawing canvas.  IUP is being used by some other languages, for example scheme.
Maybe it is more difficult that that, and for sure the documentation for IUP is not the best.  It's just an idea.
I hope I can sort out my commercial code in some more sensible way.     

Charles Pegge

  • Guest
Re: Lua IUP GUI for Oxygen Basic?
« Reply #1 on: August 19, 2012, 04:26:29 AM »
Hi Sean,

We had a recent session on IUP

http://www.oxygenbasic.org/forum/index.php?topic=545.0

We had a few IUP version problems which James (jcfuller) was finally able to resolve for the most recent release,  by page 3 of this thread.

Normally hitching up DLLs is quite straightforward. Some of us prefer to access DLLs without the restriction of prototypes, and this is also supported.

My personal preference is to build GUIs around OpenGL, which I think has the greatest future-proof potential for a range of platforms and devices. But this it will take a while to build a set of useful components.

Lua of course is a scripting language, which is fine if you don't require the highest performance.

Charles

efgee

  • Guest
Re: Lua IUP GUI for Oxygen Basic?
« Reply #2 on: August 19, 2012, 10:21:26 AM »
My personal preference is to build GUIs around OpenGL, which I think has the greatest future-proof potential for a range of platforms and devices. But this it will take a while to build a set of useful components.

Here is a GUI based on SDL: https://github.com/pipelka/paragui
SDL runs on everything...

Here is a GUI with OpenGL: http://clanlib.org
And another one: http://www.libnui.net
Both seem to be written in C++ so maybe they are not usable with Oxygen.

« Last Edit: August 19, 2012, 10:37:07 AM by efgee »

JRS

  • Guest
Re: Lua IUP GUI for Oxygen Basic?
« Reply #3 on: August 19, 2012, 11:27:38 AM »
Quote
Here is a GUI based on SDL: https://github.com/pipelka/paragui
SDL runs on everything...

Including Android Linux. Here is a gcc example using SDL and "Android native app glue" JNI API. The demo is in an installable .apk (enable off market apps) which lets you spin the cube with screen gestures provide by the Android SDK.
« Last Edit: August 19, 2012, 12:23:34 PM by JRS »

Charles Pegge

  • Guest
Re: Lua IUP GUI for Oxygen Basic?
« Reply #4 on: August 19, 2012, 01:52:37 PM »
Excellent!

Opengl is essentially device-independent but there has to be constraints for small devices. There is a restricted version for these called Opengl ES.

http://www.khronos.org/opengles/

JRS

  • Guest
Re: Lua IUP GUI for Oxygen Basic?
« Reply #5 on: August 19, 2012, 03:05:00 PM »
Code: [Select]
#include <EGL/egl.h>
#include <GLES/gl.h>

What was used for the cube demo.

I was amazed that I could deliver a working OpenGL demo not requiring any per-installed dependencies in a 35K zip.
« Last Edit: August 19, 2012, 03:27:51 PM by JRS »

Charles Pegge

  • Guest
Re: Lua IUP GUI for Oxygen Basic?
« Reply #6 on: August 21, 2012, 03:31:49 AM »

I wonder if SDL also supports touch screens and gestures, since these have not become  part of the standard desktop offering yet.

Charles

kryton9

  • Guest
Re: Lua IUP GUI for Oxygen Basic?
« Reply #7 on: August 21, 2012, 01:52:37 PM »
SDL HG will have support for all modern features, touch, mutiple monitors. I can't find a video I watched last month about it.

JRS

  • Guest
Re: Lua IUP GUI for Oxygen Basic?
« Reply #8 on: August 21, 2012, 05:29:37 PM »
Once Ubuntu releases their ARM version for tablets, I'm sure screen gesturing will be a system API.

What I have working (chroot image) is a good preview of what is to come. Running as a shared process with Android and touch support via the VNC client, it's still very usable even with the extra layers.