Yet another GUI toolkit: Gwee

Showcase your libraries, tools and other projects that help your fellow love users.
ZephyrMC
Prole
Posts: 7
Joined: Wed Dec 07, 2011 8:17 am

Re: Yet another GUI toolkit: Gwee

Post by ZephyrMC »

lxp is LuaExpat. I don't include it with Gwee because part of it is a native library, and I don't have a good (portable) way to resolve the dependency. This is actually a good time to point out that a link to a pure Lua XML parser would be awesome if anyone knows of a good one :)
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Yet another GUI toolkit: Gwee

Post by T-Bone »

ZephyrMC wrote:lxp is LuaExpat. I don't include it with Gwee because part of it is a native library, and I don't have a good (portable) way to resolve the dependency. This is actually a good time to point out that a link to a pure Lua XML parser would be awesome if anyone knows of a good one :)
...so what's the point of this if it depends on a native library? If you could do a minecraft and include it for all platforms and then determine the OS and use the right one, I guess it could be useful.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Yet another GUI toolkit: Gwee

Post by kikito »

It should be reasonably easy to adapt it to use pure lua code in addition to xml.

I mean using something like this as the source:

Code: Select all

return {
  { kind="button", id="foo", x="100", y="100", h="100", label="Button!" },
  { kind="textfield", id="field", x="100", y="200", w="100", h="30", label="Text Field:" }
}
Instead the xml:

Code: Select all

<interface>
    <button id="foo" x="100" y="100" w="100" h="30" label="Button!" />
    <textfield id="field" x="100" y="200" w="100" h="30" label="Text Field:" />
</interface>
Probably the former can be automatically generated from the later via xslt, and this would remove the luaexpat dependency - "just run this converter on your xml to produce a lua file".
When I write def I mean function.
User avatar
miko
Party member
Posts: 410
Joined: Fri Nov 26, 2010 2:25 pm
Location: PL

Re: Yet another GUI toolkit: Gwee

Post by miko »

ZephyrMC wrote:lxp is LuaExpat. I don't include it with Gwee because part of it is a native library, and I don't have a good (portable) way to resolve the dependency. This is actually a good time to point out that a link to a pure Lua XML parser would be awesome if anyone knows of a good one :)
How do you define "a good one"? Anyways, there are some pointers:
http://lua-users.org/wiki/LuaXml
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: Yet another GUI toolkit: Gwee

Post by josefnpat »

Yeah, the xml lib is stopping me from using. In all honesty, it would make it a lot easier to just define it all in lua, seeing as the people who would use it know lua already. Any screenshots yet? I see lots of commits to the git repo :)
Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
ZephyrMC
Prole
Posts: 7
Joined: Wed Dec 07, 2011 8:17 am

Re: Yet another GUI toolkit: Gwee

Post by ZephyrMC »

It should be reasonably easy to adapt it to use pure lua code in addition to xml.
Yeah, the xml lib is stopping me from using. In all honesty, it would make it a lot easier to just define it all in lua, seeing as the people who would use it know lua already.
Fair enough. I will work on a pure Lua version of the layout loader this afternoon.
automatically generated from the later via xslt
Also, this intrigues me.
...so what's the point of this if it depends on a native library?
Well, the widget set itself doesn't depend on a native library. The XML layouts module does, though, and the example uses the XML layouts module.

I will also push some screenshots this afternoon.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 6 guests