What is your favorite Lua GUI toolkit?

classic Classic list List threaded Threaded
73 messages Options
1234
Reply | Threaded
Open this post in threaded view
|

Re: What is your favorite Lua GUI toolkit?

steve donovan
On Wed, Feb 9, 2011 at 9:31 AM, Dirk Laurie <[hidden email]> wrote:
> I agree with your assessment of Qt.  Plus, it's as close to being
> platform-independent as GUI's get.  Great to hear about the Lua
> port.  I'll try it out immediately.

Is there still licensing issues for commercial use of Qt?

Every now and then, one _does_ do something for money ;)

steve d.

Reply | Threaded
Open this post in threaded view
|

Re: What is your favorite Lua GUI toolkit?

Miles Bader-2
In reply to this post by Dirk Laurie
Dirk Laurie <[hidden email]> writes:
> The question can be factored into two parts:
> 1. What is your favorite GUI toolkit?
> 2. Is there a good Lua front-end to it?

That assumes that people _have_ a "favorite GUI toolkit" independent of
the interface -- and I think often that isn't true.  In many cases, the
ease of use can be far more important than which backend toolkit
libraries are used.

After all, for the end-user Qt and GTK+ are essentially the same.

-Miles

--
Christian, n. One who follows the teachings of Christ so long as they are not
inconsistent with a life of sin.

Reply | Threaded
Open this post in threaded view
|

Re: What is your favorite Lua GUI toolkit?

Dirk Laurie
In reply to this post by steve donovan
On Wed, Feb 09, 2011 at 09:39:59AM +0200, steve donovan wrote:
>
> Is there still licensing issues for commercial use of Qt?
>
> Every now and then, one _does_ do something for money ;)
>
Non-commercial Qt is LGPL.

I personally have no problem with the attitude “my software library
is gratis if and only if your app that needs it is gratis”.

Nor with “otherwise you will have to pay for the version that includes
support”.  Commercial software without that is immoral if not illegal.

D.

Reply | Threaded
Open this post in threaded view
|

Re: What is your favorite Lua GUI toolkit?

Enrico Colombini
In reply to this post by Miles Bader-2
On 09/02/2011 9.09, Miles Bader wrote:
> After all, for the end-user Qt and GTK+ are essentially the same.

Not sure if I ever used QT, but (wearing my end-user hat) under Windows
I find GTK+ a bit irritating because of interface inconsistencies with
the hosting system (e.g. save/load dialogs).

--
   Enrico

Reply | Threaded
Open this post in threaded view
|

Re: What is your favorite Lua GUI toolkit?

steve donovan
In reply to this post by Dirk Laurie
On Wed, Feb 9, 2011 at 10:17 AM, Dirk Laurie <[hidden email]> wrote:
> Nor with “otherwise you will have to pay for the version that includes
> support”.  Commercial software without that is immoral if not illegal.

I'm fine with that, but the developer licence is steep for _small_
paying jobs. ($3 695 for single user per year)

wxLua would do the job there; I agree with Enrico that GTK+ feels a
bit odd on Windows, and ditto for OS X.

IUP really is nice for smaller projects (it's very compact as well)
but the build _is_ hard to get right (Translation: I did not succeed)

steve d.

Reply | Threaded
Open this post in threaded view
|

Re: What is your favorite Lua GUI toolkit?

Alexander Gladysh
In reply to this post by Steve Litt
On Wed, Feb 9, 2011 at 01:01, Steve Litt <[hidden email]> wrote:

> What is your favorite Lua GUI toolkit?

My favorite "Lua GUI toolkit" is, well, to make GUI in HTML.

Most desktop GUI libraries are not quite satisfactory (or, maybe, I
should invest a lot more time into trying to grok them)...

If I had to write something for desktop and could not use HTML GUI,
I'd, probably, use ltcltk: http://www.tset.de/ltcltk/

Alexander.

Reply | Threaded
Open this post in threaded view
|

Re: What is your favorite Lua GUI toolkit?

Pavel Holejsovsky-2
In reply to this post by Rena
On 2/9/2011 2:24 AM, HyperHacker wrote:

> On Tue, Feb 8, 2011 at 17:44, Miles Bader<[hidden email]>  wrote:
>> Wolfgang Oertl's lua-gtk is completely awesome.
>>
>> [He now calls it "lua-gnome" because it supports other gnome libraries
>> now, not just GTK+]
>>
>> http://lua-gtk.luaforge.net/en/index.html
>>
>> -Miles
>>
>
> Another +1 for lua-gnome AKA lua-gtk. GTK is a fantastic API and this
> gives you a fantastic interface to it.
>

<plug mode='shameless'>

I'm developing LGI, which is Lua binding to gnome libraries using
gobject-introspection, i.e. dynamically, using typelibs and libffi.  It
is still in development, unreleased yet, and it targets
soon-to-be-released gtk3.  However, most of the things already work
fine, and I'm trying to write GTK+-based Lua debugger as a
proof-of-concept before releasing 0.1 version.

See http://gitorious.org/lgi/lgi

and possibly

http://gitorious.org/lgi/lgi/blobs/master/samples/gtkhello.lua
http://gitorious.org/lgi/lgi/blobs/master/samples/gtkpad.lua

as samples how to use this binding.

</plug>

Pavel


Reply | Threaded
Open this post in threaded view
|

Re: What is your favorite Lua GUI toolkit?

steve donovan
In reply to this post by Alexander Gladysh
On Wed, Feb 9, 2011 at 11:38 AM, Alexander Gladysh <[hidden email]> wrote:
> If I had to write something for desktop and could not use HTML GUI,
> I'd, probably, use ltcltk: http://www.tset.de/ltcltk/

tcl/tk interfaces look a little old, but they're easy to put together
(being designed from the day one to work with a dynamic language). And
this _is_ one toolkit which is available via LuaRocks!

I tend towards HTML myself, in fact the itch behind the Orbiter
libraries is precisely to make generating local browser interfaces
easier. Not a simple task, since the models are very different, and in
fact it's probably not a good idea to try force HTML-based interfaces
to follow GUI toolkit conventions slavishly. (There is in fact a
modern tendency to make GUIs look like classy web pages)

steve d.

Reply | Threaded
Open this post in threaded view
|

Re: What is your favorite Lua GUI toolkit?

Enrico Tassi-3
In reply to this post by Pavel Holejsovsky-2
On Wed, Feb 09, 2011 at 11:04:31AM +0100, Pavel Holejsovsky wrote:
> On 2/9/2011 2:24 AM, HyperHacker wrote:
> >On Tue, Feb 8, 2011 at 17:44, Miles Bader<[hidden email]>  wrote:
> gobject-introspection, i.e. dynamically, using typelibs and libffi.

> See http://gitorious.org/lgi/lgi

Using g-object introspection seems a good strategy. Did you know that
there are at least other two attemtps to use it for Lua? Googling around
I found:

  http://oproj.tuxfamily.org/wiki/doku.php?id=lgob
  http://furi-ku.org/+/cgit/code/luigi/tree/

I would be awesom to have a comparison of these, and why not, maybe a
shared effort!? (yes, I dislike having 3 bindings for the same lib, all
incomplete).

Cheers
--
Enrico Tassi

Reply | Threaded
Open this post in threaded view
|

Re: What is your favorite Lua GUI toolkit?

Jerome Vuarand
In reply to this post by Steve Litt
2011/2/8 Steve Litt <[hidden email]>:
> What is your favorite Lua GUI toolkit?

Windows native controls, through a thin binding of user32.dll.
Obviously non-portable, but it works great.

Reply | Threaded
Open this post in threaded view
|

Re: What is your favorite Lua GUI toolkit?

steve donovan
In reply to this post by Enrico Tassi-3
On Wed, Feb 9, 2011 at 12:36 PM, Enrico Tassi <[hidden email]> wrote:
> Using g-object introspection seems a good strategy.

Yes, with lua-gnome Dr Oertl uses GCC-XML to build a lookup table of functions.

Mentioning introspection, there is of course also LuaJava and
LuaInterface, which can be used to generate good-looking interfaces
with Swing and WinForms respectively, using reflection.

LuaInterface WinForms is easier, but I don't know what the status on Mono is.

Swing is a good GUI option because Java is either installed, or easily
installable, on most platforms. And LuaJava is about 200K, although of
course since it's via JNI it has to be rebuilt for the specific
platform.

steve d.

Reply | Threaded
Open this post in threaded view
|

Re: What is your favorite Lua GUI toolkit?

steve donovan
In reply to this post by Jerome Vuarand
On Wed, Feb 9, 2011 at 12:51 PM, Jerome Vuarand
<[hidden email]> wrote:
> Windows native controls, through a thin binding of user32.dll.
> Obviously non-portable, but it works great.

WINE can always help there ;)

This gives really good power/weight ratio, of course.

Would be perhaps useful to work towards a somewhat higher-level Lua
toolkit built on this basis...

steve d.

Reply | Threaded
Open this post in threaded view
|

Re: What is your favorite Lua GUI toolkit?

David Given
In reply to this post by Rob Kendrick-2
On 02/09/11 00:37, Rob Kendrick wrote:
[...]
> It would be ncurses, but nobody's written a binding for it yet that
> doesn't make me want to spurt poisonous bile from my nipples.

You might want to get that looked into...

I'm quite happy with the curses-based GUI wot I wrote for WordGrinder,
although it's very simple. To run a dialogue you just do:

local dialogue = {
        title = "Title goes here"
        width = Form.Large, -- just smaller than screen
        height = 12, -- or absolute value,

        -- Arbitrary keybindings
        ["KEY_RETURN"] = function() return "confirm" end,
        ["KEY_ENTER"] = "confirm",
        ["KEY_^C"] = "cancel",

        -- Widgets:
        Form.Label {
                -- bounding box. Negative numbers go from
                -- opposite side of dialogue
                x1 = 1, y1 = 2,
                x2 = -1, y2 = 2,
                align = Form.Left,
                text = "Hello, world!"
        },

        Form.TextField {
                x1 = 1, y1 = 5,
                x2 = -1, y2 = 5,
                value = "Initial value of text field"
        }
}

Then you do:

local result = Form.Run(dialogue, RedrawScreen)

RedrawScreen is a function that draws what's behind the dialogue, and it
returns a value indicating whether the dialogue was confirmed or
cancelled. Typically I call this in a loop that validates the values the
user put into the dialogue.

The whole thing's about 600 lines of code, not including the curses
drawing routines. Widgets can be customised by overriding methods on the
widget instantiation. I'm fairly pleased with the general Lua-ness of it.

There's a bunch of stuff wrong with it, mainly in that it handles
screens too small for the dialogue rather ungracefully, and of course
the total lack of documentation, polish, and the fact that it's
integrated into WordGrinder and intended for dialogues only; I have
other stuff I want to write using it, and so have vague plans to
abstract it into a proper library at some point.

Code here:

http://wordgrinder.hg.sourceforge.net/hgweb/wordgrinder/wordgrinder/file/f658d1e8f1f3/src/lua/forms.lua

Example here (starting at line 100):

http://wordgrinder.hg.sourceforge.net/hgweb/wordgrinder/wordgrinder/file/f658d1e8f1f3/src/lua/addons/autosave.lua

--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "Thou who might be our Father, who perhaps may be in Heaven, hallowed
│ be Thy Name, if Name Thou hast and any desire to see it hallowed..."
│ --- _Creatures of Light and Darkness_, Roger Zelazny

Reply | Threaded
Open this post in threaded view
|

Re: What is your favorite Lua GUI toolkit?

Petr Štetiar
In reply to this post by Dirk Laurie
Dirk Laurie <[hidden email]> [2011-02-09 10:17:30]:

> On Wed, Feb 09, 2011 at 09:39:59AM +0200, steve donovan wrote:
> >
> > Is there still licensing issues for commercial use of Qt?
> >
> > Every now and then, one _does_ do something for money ;)
> >
>
> Non-commercial Qt is LGPL.

Why non-commercial? This looks like a FUD to me, you should read something
about Qt and LGPL[1] first. FYI LGPL is not the same as GPL.

"This version of Qt is appropriate for the development of Qt applications
(proprietary or open source) provided you can comply with the terms and
conditions contained in the GNU LGPL version 2.1."

And there's Qt LGPL exception[2] which you should read also.

BTW even such a big company like a Texas Instruments is using Qt LGPL for their
closed source 'SmartRF Studio 7' application[3].

1. http://qt.nokia.com/products/licensing
2. http://qt.gitorious.org/qt/qt/blobs/4.7/LGPL_EXCEPTION.txt
3. http://ynezz.true.cz/SmartRF%20Studio%20Software%20Manifest.pdf

-- ynezz

Reply | Threaded
Open this post in threaded view
|

Re: What is your favorite Lua GUI toolkit?

Alex Bradbury
In reply to this post by Alexander Gladysh
On 9 February 2011 09:38, Alexander Gladysh <[hidden email]> wrote:
> If I had to write something for desktop and could not use HTML GUI,
> I'd, probably, use ltcltk: http://www.tset.de/ltcltk/

Seconded. I've been using ltcltk for a few slightly hacky GUI tools to
help with my research. tk looks a little ugly, but using the ttk_*
widgets and setting the theme to 'clam' rather than the default makes
it look retro rather than prehistoric. None of the other bindings
struck me as being as stable, easy to use, or easy to compile and
redistribute. Plus I quite like the Tk API.

I've had quite a lot of experience with Gtk through the gtkmm library,
so I'm keenly watching the gobject-introspection based lgi. I like the
idea that most of the hassle of making sure Gtk API bindings work is
going upstream to projects that can be shared by bindings for
different languages. A disadvantage is it requires a recent
gobject-introspection package that's only available in the 11.04
Ubuntu repositories.

Alex

Alex

Reply | Threaded
Open this post in threaded view
|

Re: What is your favorite Lua GUI toolkit?

Pavel Holejsovsky-2
In reply to this post by Enrico Tassi-3
On 2/9/2011 11:36 AM, Enrico Tassi wrote:

> Using g-object introspection seems a good strategy. Did you know that
> there are at least other two attemtps to use it for Lua? Googling around
> I found:
>
>    http://oproj.tuxfamily.org/wiki/doku.php?id=lgob
>    http://furi-ku.org/+/cgit/code/luigi/tree/
>
> I would be awesom to have a comparison of these, and why not, maybe a
> shared effort!? (yes, I dislike having 3 bindings for the same lib, all
> incomplete).

Yes, I'm fully aware of both of them.  I initially started working with
lgob, but it does not have Gio support which I needed.  I tried to write
Gio support, but started disliking the way the lgob is made (it is using
gobject-introspection, but in a static fashion - parses XML .gir files
and generates C glue code which is then compiled by GCC into Lua
module).  I realized that dynamic approach would be better - uses binary
.typelib files at runtime to lookup function and type info and calls
function using libffi.  At the beginning it looked simple enough (but it
wasn't :-)

At the moment I created public tree on gitorious, I realized there is
also new LuiGI project, essentially doing the same thing as lgi.  I
contacted Adrian (its author) and we came to conclusion that it might be
better to continue with lgi, because it already had more features
implemented than luigi at that time (most notably callback support,
which is rather tricky).

Pavel


Reply | Threaded
Open this post in threaded view
|

RE: What is your favorite Lua GUI toolkit?

Thomas Fletcher
In reply to this post by Steve Litt
-----Original Message-----
>From: [hidden email] [mailto:[hidden email]] On Behalf Of Steve Litt
>Sent: Tuesday, February 08, 2011 5:02 PM
>To: Lua mailing list
>Subject: What is your favorite Lua GUI toolkit?
>
>Hi all,
>
>What is your favorite Lua GUI toolkit?

I am a big fan of Storyboard (the evaluation is full featured):

http://www.cranksoftware.com/storyboard

It is a UI design/develop/deploy environment specifically targeted at embedded systems.  You
use standard image resources and use Lua as the glue between the UI presentation and your
system logic.  The UI design environment incorporates LuaEclipse and provides a Lua script
debugging environment.

Of course I'm a bit biased since I work for Crank ... but with a bit of work you
can generate a UI targeting a huge number of platforms (Linux,Windows,Mac,QNX,...)
and a wide variety of rendering engines (gdi,dirctfb,fbdev,opengl,openvg,agtdk,sdl,...)

... of course I'm a bit biased since I work for Crank, but don't hold that against Storyboard =;-)

Thomas


Reply | Threaded
Open this post in threaded view
|

Re: What is your favorite Lua GUI toolkit?

Enrico Tassi-3
In reply to this post by Pavel Holejsovsky-2
On Wed, Feb 09, 2011 at 02:04:19PM +0100, Pavel Holejsovsky wrote:
> I contacted Adrian (its author) and we came to conclusion that it
> might be better to continue with lgi, because it already had more
> features implemented than luigi at that time (most notably callback
> support, which is rather tricky).

Nice! thanks for the effort and don't forget to post on lua-l when
it will be in usable state! I like lua-gnome, but gir/typelib seems to
be well supported upstream and I thus think it's better if lua-gnome is
replaced by something like lgi (when ready of course).

Cheers
--
Enrico Tassi

Reply | Threaded
Open this post in threaded view
|

Re: What is your favorite Lua GUI toolkit?

Alex Bradbury
In reply to this post by Pavel Holejsovsky-2
On 9 February 2011 13:04, Pavel Holejsovsky <[hidden email]> wrote:
> realized that dynamic approach would be better - uses binary .typelib files
> at runtime to lookup function and type info and calls function using libffi.
>  At the beginning it looked simple enough (but it wasn't :-)

Any idea on the call overhead? Glib+Gio provides a fairly good
standard library if the overhead of each call is not too high, while
it's not likely to matter much for most GUI code. Also, have you
looked at the in-development LuaJIT2 FFI API and considered if it
might at some point be possible to make use of that rather than
libffi?

Alex

Reply | Threaded
Open this post in threaded view
|

Re: What is your favorite Lua GUI toolkit?

Vadi
In reply to this post by Miles Bader-2


On Wed, Feb 9, 2011 at 3:09 AM, Miles Bader <[hidden email]> wrote:
Dirk Laurie <[hidden email]> writes:
> The question can be factored into two parts:
> 1. What is your favorite GUI toolkit?
> 2. Is there a good Lua front-end to it?

That assumes that people _have_ a "favorite GUI toolkit" independent of
the interface -- and I think often that isn't true.  In many cases, the
ease of use can be far more important than which backend toolkit
libraries are used.

After all, for the end-user Qt and GTK+ are essentially the same.


Sorry to nitpick. For the aesthetically conscious user, they aren't.

 
-Miles

--
Christian, n. One who follows the teachings of Christ so long as they are not
inconsistent with a life of sin.


1234