Have a look at the beginner's video tutorial to get a quick idea
on how to play with fluid.

http://seriss.com/people/erco/fltk-videos/fluid-intro.html

Regarding eg. callback and typing into small dialogs, keep in mind
that in these small dialogs, instead of entering all the code for
your callback, you can simply call a function (eg. MyCallback())
and then define the code for that either in a file that you #include
from within your fluid file, or you can define a function within fluid
(eg. New -> Code -> Function followed by New -> Code) so that you can use
a regular text editor window to edit the code, or define a new method as
part of your class defined within fluid.

Inside fluid, you can define a class (New -> Code-> Class), and either derive
it from an FLTK widget (Fl_Window, Fl_Group, etc), or just add widgets to it.
Either way you can then add methods to the class using New-> Code -> Function
and New->Code->Code.

If you don't like using Fluid to define methods, you can do a mix of using
fluid to define some methods, and setting up an #include within fluid
that includes your own file that has method implementations. I do this
myself in some cases where I have a very large application class that has
numerous methods; some Fluid oriented (eg. large menu and dialog definitions)
and some not (utility methods).

I would start by playing around with fluid; you'll get the feel by starting
small, and playing with things.

You should never have to hand edit fluid files; you can use features it has
to either #include or code your own stuff in a way that keeps fluid and your
hand-crafted code separate. Either use separate classes (eg. fluid classes
that derive from your hand made classes) or vice versa (your hand made classes
that derive from your fluid generated classes, like hand-layouts of dialogs).

In many cases I've used fluid to do 'the whole shebang'; the main(), an defining
numerous hand-layout GUI classes including not only the main application, but
of all of its dialogs, and even small classes that might themselves be 'widgets'
of sorts that can be duplicated procedurally.

One of these days I need to make an 'Advanced Fluid' video to follow up to
the above beginner one..

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to