GIDForums  

Go Back   GIDForums > Computer Programming Forums > FLTK Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 11-Nov-2004, 19:37
r2matthews r2matthews is offline
New Member
 
Join Date: Nov 2004
Location: Melbourne, Australia
Posts: 2
r2matthews is on a distinguished road

Any disadvantages with FLUID?


Hello,
I'm a new fltk user and I'm using it with opengl. I like using FLUID.
A general question: are there any disadvantages using FLUID as opposed to hand-coding? If I run across any tricky problems when using FLUID will I have to do nasty work-arounds because code is generated? Or does FLUID have enough facilities for hand-coding that it provides no restrictions?

Ray
  #2  
Old 11-Nov-2004, 20:51
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light
Hi Ray. Welcome to GIDForums™.

Good question about fluid. A few weeks ago, my response would have been to use fluid only for the initial layout and then hand code everything else. But now I think a little differenlty. Cable_guy has posted a great tutorial on how to use fluid in a much better manner. (see here) After seeing this, it seems much more likely that you can get fluid to generate the code in the manner that you want.

That being said, I think it is still probably a personal preference. I like to use fluid for the rudimentary layout and then hand code everything. It is one of the things I really like about fltk. It is so straight forward that it can easily be done by hand.

What kind of things are you working on? I have never done much with opengl and I would love to hear what you are doing.
  #3  
Old 11-Nov-2004, 20:56
cable_guy_67's Avatar
cable_guy_67 cable_guy_67 is offline
Senior Member
 
Join Date: Oct 2004
Location: Nescopeck, PA
Posts: 1,109
cable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the rough
Quote:
Originally Posted by r2matthews
Hello,
I'm a new fltk user and I'm using it with opengl. I like using FLUID.
A general question: are there any disadvantages using FLUID as opposed to hand-coding? If I run across any tricky problems when using FLUID will I have to do nasty work-arounds because code is generated? Or does FLUID have enough facilities for hand-coding that it provides no restrictions?

Ray

Hello and welcome Ray. Are you using 1.1.5 or 2.0? I don't think this matters I am just curious.

As far as hand coding vs. fluid generated coding I can give you my take. If you look through the tutorial (FLTK && fluid In Motion) you will see that you can do your hand coding in fluid. That was done with 1.1.5. It is really just a matter of using the fluid new/code function/method and new/code/code or /code block. Fluid will place your code and you will not have to use your editor. A good example of using both methods would be the mentioned tutorial and dsmith's post on tab order. It is just two ways to get to the same point. Sorry, I think the code/code block may not be available if you are using 1.1.5 (not positive) but I currently have 2.0 installed so I am guessing. Either way, you can use new/code/code and enter multiple lines of code. I did this when creating the button callback for the example.

I personally like using fluid as well which was why I posted the example of how to use fluid instead of hand coding with fltk. Hope this was helpful.
__________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work."
--Thomas Alva Edison
"Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety."
--Benjamin Franklin
"A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes."
--Hugh Downs
  #4  
Old 12-Nov-2004, 06:52
cable_guy_67's Avatar
cable_guy_67 cable_guy_67 is offline
Senior Member
 
Join Date: Oct 2004
Location: Nescopeck, PA
Posts: 1,109
cable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the rough
After reading dsmith's review of FLU in this thread I realized, there are some downsides to using fluid. You don't have direct access to the additional packages like FLU or others that are available. Oh, well. Perhaps that is what the plug-in's in 2.0 are for. Aside from that, you still can use fluid to whip up your base interface and add support for those additional widgets by hand. I suppose you could add them in with fluid using the method I described above but really, if you have a choice for large amounts of hand coding, between using the fluid code dialogs and an editor of choice I think using an external editor (with all the bells and whistles your particular editor has) would be the better choice.

Great, now I'm on the fence. I do agree with dsmith on this though, FLTK makes it easy to go with one or the other or a combination of both. What you are comfortable with will is likely be most productive for you. Fluid does make it easy (especially if new to FLTK like myself) to see how fltk expects the source to look. Even if you create a set of widgets in a window with fluid and replace code by hand fluid shows you a good place to jump in.
__________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work."
--Thomas Alva Edison
"Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety."
--Benjamin Franklin
"A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes."
--Hugh Downs
  #5  
Old 14-Nov-2004, 18:49
r2matthews r2matthews is offline
New Member
 
Join Date: Nov 2004
Location: Melbourne, Australia
Posts: 2
r2matthews is on a distinguished road
Hello,
Thanks dsmith and cable_guy for the replies. My own view was that any restrictions caused by fluid were likely to be minor. You have confirmed that, so fluid looks like the way to go.

Regarding some widgets not being available in fluid, that's OK for my purposes. I mainly want a straightforward GUI.
I have used a widget called CARTESIAN that I found on the web (It draws 2D graphs). I wrote a program that used Cartesian to draw a graph in a box in a simple GUI produced with fluid. So I know that widgets can be incorporated quite easily.

Dsmith: I'm using opengl to do some geometric computing. I'm interested in 4D objects (hypercubes etc) and I want a GUI with sliders and dials etc for manipulating the image on screen. I started off using QT and used it in one of my first programs. (I develop on LINUX but would like the option of porting to Windows). Apart from the licensing for QT being more restrictive, I found it had quite a high overhead. I like the 'fast' part of 'fast light toolkit'. I was very impressed by Greg Ercolano's video tutorials, so I switched to fltk and don't regret it.

I'm using version 1.1.4 on Linux. I have 1.1.5rc2 installed on Windows 2000 but I don't use it much.

Great forum!

Ray
 
 

Recent GIDBlogToyota - 2009 May Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FLTK && fluid In Motion cable_guy_67 FLTK Forum 4 20-Mar-2008 04:52
[Tutorial] GUI programming with FLTK dsmith FLTK Forum 10 03-Oct-2005 16:41
Simple FLTK dialog box sample cable_guy_67 FLTK Forum 4 02-Nov-2004 09:46

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 17:15.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.