[IGSTK-Developers] View does not show in Widget
Patrick Cheng
cheng at isis.georgetown.edu
Thu Jan 31 15:06:01 EST 2008
Hi Andinet,
Take NeedleBiopsy for example, it has a .fl file which defines the GUI.
We need to move all the View object from its derived NeedleBiopsy.h into
the GUI. And added it to the widget in the construction methods?
Patrick
Andinet Enquobahrie wrote:
> Patrick,
>
> This is not an issue in the view class.
>
> You have to follow the correct sequence . You need to set the view
> inside the
> widget before you invoke the FLTK show() method. That is the correct
> sequence.
>
> Otherwise, if you follow a different function sequence, you will get a
> different
> behavior. For example, if you call RequestSetView after
> the show() method, then the FLTK window will render first before the
> View RenderWindow is connected with the FLTK window. Because of that,
> you will see the View rendered separate from the FLTK window.
>
> Sometimes even if you follow the correct sequence, the view might be
> rendered
> outside the FLTK window due to OpenGL rendering timing issue. In those
> cases,
> inserting artificial delay will help.
>
> -Andinet
>
>
>
>> Hi Andinet,
>>
>> I found there is an issue with the View class.
>>
>> Normally, in the testing code. We will call
>>
>> widget2D->RequestSetView( view2D );
>>
>> Before we finish creating the GUI.
>>
>> form->end();
>> form->show();
>>
>> This works out pretty well.
>>
>>
>> But if we move the RequestSetView call out of the GUI code, after
>> form->show. The render windows will not be contained in the widget.
>>
>> You can verify this by moving line 87 in
>> igstkCoordinateReferenceSystemObjectWithViewTest
>> Out of the GUI code.
>>
>> Thank you,
>>
>> Patrick
>>
>> _______________________________________________
>> IGSTK-Developers mailing list
>> IGSTK-Developers at public.kitware.com
>> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-developers
>>
>
>
More information about the IGSTK-Developers
mailing list