I've somehow worked around this issue before, thinking I understood what was
going on... now I'm not so sure I understand much of anything!
Say I have two classes...
fooA which subclasses Fl_Window
fooB which also subclass Fl_Window
And, fooA will instantiate fooB
The problem is when I call show() on fooB from within fooA, the fooB window
inlays into the fooA window (there is no OS toolbar on the top to
click/move/resize/close/minimize the window, no window frame, etc).
I'm going to write general pseudocode:
inside fooA.h:
--------------------------------------------------
class fooA:public Fl_Window{
fooA(int x, int y, int w, int h, const char* title);
static fooB* fooBptr;
};
--------------------------------------------------
inside fooA.cpp:
--------------------------------------------------
fooB* fooA::fooBptr = 0;
fooA::fooA(int x, int y, int w, int h,const char *
title):Fl_Window(x,y,w,h,title)
{
begin();
fooBptr = new fooB(0,0,200,200,"FooB Window");
// Other non-related code with widgets added to fooA
end();
show();
fooBptr->show();
}
-------------------------------------------------
inside fooB.cpp
-------------------------------------------------
fooB::fooB(int x, int y, int w, int h,const char *
title):Fl_Window(x,y,w,h,title)
{
begin();
// code with widgets added to FooB
end();
}
-------------------------------------------------
Hopefully the code is sufficient... I am royally confused at what's going on at
this point. Normally I have created new windows inside of static callback's
(and with static storage duration) so that when the window is re-shown the
user's selections on widgets within the window are intact, and that got me all
the window dressing one expects. Now that I'm trying to create a window
outside of a callback things are different. I'm sure this is due to my naive
understanding of static duration.
Any help is VERY appreciated!!
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk