On Fri, 13 Jun 2008, Jane wrote:

>> Rather than using fluid to build your UI, maybe you can build it
>> programmatically

> i thought about that too but that would make the positioning difficult.

You'll be glad you did though, because there is more to widgets than just 
their position. There's also their callback function, etc. It is no fun
having to change those manually.

Assuming the positioning is evenly spaced, you can ease the positioning
pain by using the positions of a first and second widget as a template
for the relative positioning of the other widgets- if widget 1 is at
(10,10) and widget 2 is at (20,10), the relative position of the second 
widget is (+10,0), so the third widget would be at (30,10), the fourth at 
(40,10), and so on.

Or maybe it is an option not so show so many widgets? I've built a mixer
app which shows several channel strips, but there is only 1 equalizer GUI-
it is not duplicated per channel. Instead, when a channel is selected,
the equalizer updates with the settings of that channel, and will then
control the equalizing settings of that channel only.

You'll want to separate data from UI from control functions from the 
beginning on (Read up on MVC, see wikipedia):
Have a control class that updates the UI and data, and have the
UI only call controll class functions. The benefit is that you'll
be able to control the UI either by mouse or via external events (incoming 
MIDI messages, for instance). It will also make it easier to perform 
automatic testing on your code.

Hope this helps,
Marc

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

Reply via email to