[Library] DOMy - A DOM-like GUI framework

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
adrix89
Party member
Posts: 135
Joined: Fri Oct 15, 2010 10:58 am

Re: [Request] Input on design spec of new GUI library

Post by adrix89 »

Karai17 wrote: I've tried my hand recreating the following image, at least in markup. I haven't written any styles or scripts for it but I think it's a good start to show how I would create a markup file.

Code: Select all

Code..
The example isn't good, I have no idea what is going on since there is large parts missing.
Also the fact that widgets are separate means I have to keep track of multiple files.
The widgets will work if and only if they are set up and forget, If I have to change them when I am making the interface that is a degree of complexity too high for me. If I can focus on one file at a time then its fine.
Model View Controller
Coming from Java Swing I HATE any type of control requests,event managers, listeners,queues.
This is why I love LOVE so much, the controls are simple to set up, you can have as many callbacks as you like and you can handle things precisely.
Capture,bubble,catch looks great for me. If you want that spaghetti garbage make it optional.
I use Workflowy but you can check out Dynalist as its the better offer.
Muris
Party member
Posts: 131
Joined: Fri May 23, 2014 9:18 am

Re: [Request] Input on design spec of new GUI library

Post by Muris »

I tried to look the specs couldn't find it and most likely I missed it, but something that I noticed what Quickie for example lacks and I really would want to have, is anchor points. For example I want to make button at bottom right corner, it would be nice to just say button( pos = { 1,1} , anchor = { 1, 1 } ) or whatever the syntax would be and the anchor object, a container for example would then be calculated accordingly to this point, so if i grow the object container upwards, the first object would be on bottom right corner, then second one on top of it and so on.

It also makes setting things on middle of a screen a lot easier for example: table( pos = {0.5, 0.5}, anchor = {0.5,0.5} ) or if i want to have the table grow to the right from middle then table( pos = {0.5, 0.5}, anchor = { 0,0.5 } ) etc.

edit:After thinking about this a bit more, I guess it is kinda same as aligment. I guess it only comes in handy with rotating stuff. I tried drawing a picture of random layout that I came up with, nothing special, but just to visualize the thing for me.
randomuivisual.png
randomuivisual.png (1.17 KiB) Viewed 3154 times
User avatar
SiENcE
Party member
Posts: 792
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: [Request] Input on design spec of new GUI library

Post by SiENcE »

adrix89 wrote:
Model View Controller
Coming from Java Swing I HATE any type of control requests,event managers, listeners,queues.
This is why I love LOVE so much, the controls are simple to set up, you can have as many callbacks as you like and you can handle things precisely.
Capture,bubble,catch looks great for me. If you want that spaghetti garbage make it optional.
You are right, Swing is a bad example and shows how you can do it wrong.

But seperation of layout and code is always nice.
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: [Request] Input on design spec of new GUI library

Post by Karai17 »

adrix89:

I don't understand your issue. The markup I posted is just tables with the ability to use loops to write more dynamic markup. This is no different than writing dynamic html using some templating engine.

Also I am unsure what you mean about love. Love has a defined set of callbacks (mousepressed, keypressed...) And very much manages your input and other events.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
adrix89
Party member
Posts: 135
Joined: Fri Oct 15, 2010 10:58 am

Re: [Request] Input on design spec of new GUI library

Post by adrix89 »

Karai17 wrote: I don't understand your issue. The markup I posted is just tables with the ability to use loops to write more dynamic markup. This is no different than writing dynamic html using some templating engine.
Except the widget functionality and resources are in another file.

Code: Select all

   { "widget", "map_menu", id="menu" },
   { "widget", "chatbox", id="chat" },
Does not tell me anything on what they mean or what they do, I have to set them up somewhere else.
Like I said this is not a necessary a bad thing as long as I don't have to worry about them after I set them.
Love has a defined set of callbacks (mousepressed, keypressed...) And very much manages your input and other events.
In one place not all over the place. You control exactly how they work since they all flow to the same exact pipe.
I use Workflowy but you can check out Dynalist as its the better offer.
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: [Request] Input on design spec of new GUI library

Post by Karai17 »

A widget is basically just a struct (if you want to think of it like that), a data structure containing other data structures. I don't understand your objections to such a useful tool. Writing an entire GUI in a single file is a very painful experience and should be avoided much like the Plague.

It is also worth noting, you don't NEED to use widgets or MVC or markup. You will be able to write out a whole UI programatically, in a single file, if you really want to.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: [Request] Input on design spec of new GUI library

Post by Karai17 »

Bump.

I started implementing some basic markup parsing tonight and I want to have a particular issue out of the way before I work too much more on this. If anyone interested wants to discuss https://github.com/karai17/DOMinatrix/issues/15 (either here or on the issue tracker) please do!
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: [Request] Input on design spec of new GUI library

Post by Karai17 »

Bump.

I have most of the basic Element object coded, but I am a little stuck on how to go about cloning. Please give some input here: https://github.com/excessive/DOMinatrix/issues/18

Otherwise, I also have markup working and elements are aware of family relations. Once I get the basic Element finished up I'm going to want to poke at properties (styles) a bit so if anyone is great with metatables, PLEASE check out this: https://github.com/excessive/DOMinatrix/issues/5
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
adnzzzzZ
Party member
Posts: 305
Joined: Sun Dec 26, 2010 11:04 pm
Location: Porto Alegre, Brazil

Re: [Request] Input on design spec of new GUI library

Post by adnzzzzZ »

Maybe this is kinda unrelated, but I was looking around for some UI APIs from various places to see if anything in particular got my attention, and I found this http://shoesrb.com/. It looks pretty cool and maybe you guys would wanna use some of its concepts too, I think it's really simple and seems flexible too.
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: [Request] Input on design spec of new GUI library

Post by Karai17 »

Taking a quick look, I feel like I have a very similar mindset for simplicity as Shoes. The only difference I can see right now is that I had no particular thought to add an argument in the create function for properties or callbacks. I'll consider that.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
Post Reply

Who is online

Users browsing this forum: No registered users and 45 guests