News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
Fluid to lua converter
Author Message
Tobi
Junior Member
**


Posts: 20
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #1
RE: Fluid to lua converter

JohnMurga Wrote:
Hi,

I was playing with the fluid_parser and I was wondering how easy it would be to change it so that it is able to cope with menu entries, as murgaLua 0.6 can now has all the same functionality as FLTK.


Oh, it's easy to do that. I thought it already works, but now it turns out that Fluid does widgets of type "MenuItem" which the fluid converter tries to build. There is no widget type MenuItem though, menu items need to be done with menu:add()...
Should be quite straightforward to fix.

Quote:
The same is true for images, which fluid embeds by default, and can now be mime encoded and then decoded for use in FL_Image creation.

Also, why does fluidtolua define so many variables at the start ?


I haven't tried images yet, but it should be quite simple to put in as well.
All those variables in the start are used because fluid saves symbolic names of widget and property types to the .fl files that need to be mapped to integer constants to use in fltk or murgalua. The .cxx export handles the mapping but when we work on .fl files directly we need to take care of that ourselves. These variables do this mapping. In future versions we could as well get rid of the variables and do the symbol to integer resolution in the parser itself.

Quote:
Anyway, what would be REALLY cool would be to be able to integrate this into murgaLua in a way that you could do something like :

Code:
  -- Loads .fl file, converts to lua and runs it (without the show/run)
  murgaLua.loadFluidGUI("test.fl")
  -- Assign callbacks to be used
  myFirstButton:callback(something) -- myFirstButton is name from .fl file.
  window:show()
  Fl:run()


Then, when developing an app you could just change the layout of your window without having to change your code ... Separating presentation from application logic :-)

What do you think ?

Cheers
JohnM



Sounds really cool! It's also easy for the parser to remember the windows in a fluid file and show them after creation. Adding Fl:run() is trivial Wink

There's quite some exams stress at the moment, I think we can take care of that after February, 17th Big Grin

Keep up the good work,

Tobi

This post was last modified: 02-08-2008 01:51 AM by Tobi.

02-08-2008 01:50 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
Fluid to lua converter - Tobi - 12-19-2007, 07:55 AM
RE: Fluid to lua converter - iGame3D - 12-19-2007, 12:33 PM
RE: Fluid to lua converter - Tobi - 12-20-2007, 01:38 AM
RE: Fluid to lua converter - xleitex - 12-24-2007, 07:06 AM
RE: Fluid to lua converter - iGame3D - 12-26-2007, 11:16 AM
RE: Fluid to lua converter - Tobi - 12-27-2007, 09:52 PM
RE: Fluid to lua converter - Tobi - 01-29-2008, 08:14 AM
Fluid to lua converter update - iGame3D - 02-06-2008, 09:33 AM
RE: Fluid to lua converter - JohnMurga - 02-06-2008, 08:15 PM
RE: Fluid to lua converter - Tobi - 02-08-2008 01:50 AM
RE: Fluid to lua converter - Juergen - 02-08-2008, 03:40 AM
RE: Fluid to lua converter - mikshaw - 02-08-2008, 07:23 AM
RE: Fluid to lua converter - Juergen - 02-08-2008, 09:15 AM
RE: Fluid to lua converter - mikshaw - 02-08-2008, 10:55 AM
RE: Fluid to lua converter - iGame3D - 02-15-2008, 02:30 PM
RE: Fluid to lua converter - Tobi - 04-23-2008, 04:35 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: