Hello!
Thank you very much for the good GUI library you are building. It is 
truly worth it!
I noticed that FLTK 1.1.9. always relies on physical coordinates when 
placing widgets. I wish that there was a standardized height (at least) 
for the buttons. I also find it difficult to measure the exact length of 
a widget, say a button. I believe that this should happen internally, 
based on the widget's label. Actually a function that measures the 
amount of letters in the label can be used here. Of course, a minimal 
length must be provided (else the OK button would appear too small).
Placing buttons seems to me not the biggest problem FLTK has. I find it 
really burdensome to place any kind of widgets all over my window. I 
have some experience with the GUI library Gtkmm, which (deliberately) 
does not employ fixed coordinates. Instead, it offers container-like 
interfaces with the method add. Gtkmm has solved the problem with 
widget's positions gracefully. I really wish that FLTK addresses these 
issues in the next version (1.3?). I am not saying in any way that FLTK 
has a wrong implementation. Just the opposite - FLTK could be improved 
by several orders of magnitude if the user doesn't have to care for 
fixed coordinates any more.
My last thought is that a container-like class hierarchy of FLTK windows 
could be achieved. However, such solution is "home-brewed". I wonder 
whether there is a common way to add widgets in windows, say something like:
|---------------------|
|                                |
|  ...main content...     |
|                                |
|---------------------|
|...buttons row...       |
----------------------

class base_window : public Fl_Window {
/*...*/
public:
void add_button_in_row(/*...*/); // implements the placement of a button 
in a specific bar next to all currently placed there buttons
void add_button_in_main_content(/*...*/); // similar to the above, but 
places buttons below each other in the main rectangle of the window
} ;

Having this class base_window, any later derivatives of it can invoke 
the two methods and thus place buttons without ever mentioning 
coordinates. The coordinates are handled by the base's implementation, 
which keeps track of the X and Y of the last inserted button.
I hope that you understand my idea. Actually, I am not sure whether 
someone has already tried to provide a common standardized solution to 
the issue. Any suggestions on how base_window can look like are welcomed!
Thanks for reading!
Blessings!

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

Reply via email to