On 22.07.2015 14:59 Edzard Egberts wrote:
> Albrecht Schlosser wrote:
>> On 22.07.2015 14:30 Edzard Egberts wrote:
>>> can't place such kind of window inside of such kind of window.
>>
>> That's not true. You can. See the test/subwindow.cxx demo program.
>> Although this one uses Fl_Window (not Fl_Double_Window). I did a short
>> test, and it works with Fl_Double_Window as well.
>
> Is this a "Wow it works!" and could cause problems in spite of that, or
> is this a "Of course it works!" and no problems in sight?
It definitely SHOULD work.
[ I saw that Ian posted something similar meanwhile. Anyway ...]
I remember that we changed many window types in test/*.cxx from
Fl_Window to Fl_Double_Window, and I don't remember why the subwindow
program was not changed.
Faint memory says that we experienced a few incompatibilities though, so
we reverted /some/ changes to use Fl_Window again. AFAICT this was
related to embedded GL windows though, hence all OpenGL programs in the
test folder might use Fl_Window instead of Fl_Double_Window.
Nothing in my memory tells me that bare Fl_Double_Windows should not be
nested.
As a side note: at that time (when we changed Fl_Window to
Fl_Double_Window in test/<many>.cxx) OS X used an own implementation of
"subwindows". This was changed recently to use real OS windows as on all
other platforms. Maybe this changed something - to the good or bad side,
I don't know (and I don't claim anything). I hope that /if/ it changed
anything in the behavior, then only to the good side.
> I don't trust in the "window in window", because this doesn't feel
> straight forward to me. A basic window and fl toolkit does it's things
> inside of it, feels much more comfortable to me.
There are exceptions though. Fl_Gl_Window is certainly one of them.
Fl_Cairo_Window is another example.
I agree that I'd use Fl_Group inside a window whenever possible, but
nested windows are a design feature of FLTK, and so you should be able
to rely on it. If anything goes awry with nested windows then we should
fix it or document the issue.
That said, I don't know if the issue "Fl_GL_Window does not work as
subwindow in Fl_Double_Window" is documented - if it is true at all (I
don't remember all the details).