>> Though I would always derive my "outer" widgets from fltk
>> widgets, if it were me...
> As far as the 'outer widget' goes, how exactly do you mean there?
You have used this pattern...
class MainWindow {
public:
Fl_Window *mainWin;
:
:
MainWindow::MainWindow() {
{ mainWin = new Fl_Window(447, 529, "Wheel Generator");
and etc...
Where your "parent object" is a new class, not derived from any fltk
widget.
So, the first widget your parent object creates is always a window, that
is the parent window for all other widgets.
So I'd argue that it is simpler, and easier to understand, if you
instead make MainWindow a subclass of Fl_[Double_]Window, and then you
don't need to "new" your outer window widget at all, as MainWindow *is*
a window then.
Why is this better? Because now the "parent window" of your widgets then
also become the "parent object".
With the pattern you have used, the "parent window" is mainWin, but the
"parent object" is MainWindow, and these are not the same object...
SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14
3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk