[wxVTK] RE: [Fwd: wxVTK: MSW compilation vs. resizing problem]
Brought to you by:
malat
From: <R.F...@ex...> - 2005-04-20 14:22:32
|
Dear Mathieu et al., Thanks for your extremely fast response! Using the cited patch from Alexis the resizing problem is really solved in my (specific little test) case (cf. platform and library versions below): one render window in a wx frame with a menu and a status bar -- before the patch, resizing was hiding the status bar. In fact, I am instantiating your class by "iren =3D new wxVTKRenderWindowInteractor(this, MY_VTK_WINDOW);", thus, wxNO_FULL_REPAINT_ON_RESIZE should be active. Nevertheless, I am still wondering if the parent class call "wxWindow::OnSize(event);" code is required/correct/illegal/...? Thanks for your help and for providing this extremely helpful class, Reinhold > -----Original Message----- > From: mma...@ny... [mailto:mma...@ny...]=20 > Sent: Wednesday, April 20, 2005 2:44 PM > To: wxv...@li... > Cc: R.F...@ex...; ahr...@ya... > Subject: [Fwd: wxVTK: MSW compilation vs. resizing problem] >=20 >=20 > [Forwarding to wxVTK users] >=20 > John could you comment on your patch ? Which wx did you used=20 > ? I have also laying around patch from Alexis H. Rivera-Rios=20 > which apparently changed the function OnSize to something like: >=20 > void wxVTKRenderWindowInteractor::OnSize(wxSizeEvent > &event) > { >=20 > GetClientSize(&a,&b); > int *size3; > size3 =3D RenderWindow->GetSize(); =20 > if (size3[0]=3D=3D0 && size3[1]=3D=3D0) //// <-- new code > { > UpdateSize(a,b); > } > else > { > UpdateSize(size3[0], size3[1]); > } >=20 > if (!Enabled)=20 > { > return; > } >=20 > #if (VTK_MAJOR_VERSION =3D=3D 4 && VTK_MINOR_VERSION > 0) > InvokeEvent(vtkCommand::ConfigureEvent, NULL); > #endif > //this will check for Handle > Render(); > } >=20 >=20 > It seems wxNO_FULL_REPAINT_ON_RESIZE only affect windows (not=20 > my primary plateform). I was also looking at solution like=20 > vtkFlRenderWindow and there seems to be some tricks to=20 > consider to properly set the size of the renderwindow. >=20 > I'll have to investigate before applying another patch. >=20 > sorry for the troubles, > Mathieu >=20 > -------- Original Message -------- > Subject: wxVTK: MSW compilation vs. resizing problem > Date: Wed, 20 Apr 2005 15:19:55 +0100 > From: Reinhold F=FCreder <R.F...@ex...> > To: <mat...@cr...> >=20 > Dear Mathieu, >=20 > When updating to your latest version (0.8) of wxVtk (from=20 > 0.7) I am experiencing a compilation problem (and still the=20 > resizing problem). >=20 > During compilation MSVC++ 6 (Windows 2k) using wxWidgets=20 > version from August 2003 (in between 2.4.2 and 2.5.0) and VTK=20 > from end of February this year it reports the following error message > "...\wxVTK\wxVTKRenderWindowInteractor.cpp(327) : error=20 > C2039: 'OnSize' > : is not a member of 'wxWindow' > D:\CVS\wxWindows\include\wx/msw/window.h(53) : see=20 > declaration of 'wxWindow'" >=20 > This is HERE: > ---- > void wxVTKRenderWindowInteractor::OnSize(wxSizeEvent &event) > { > //this is also necessary to update the context on MSW=20 > #ifdef __WXMSW__ > wxWindow::OnSize(event); //wxNO_FULL_REPAINT_ON_RESIZE ??=20 > <<<< HERE !!! #endif ... > ---- >=20 > If I comment it out the patch provided by John Norris=20 > concerning the resizing problems under wxMSW does not work=20 > (consequently?). >=20 > Do I miss something? I am still using the old CMake files as=20 > for version 0.7. And also in the CVS head of wxWidgets I cannot find a > wxWindow::OnSize() method on the first view. Should the=20 > resizing event be reproduced/recreated in a different way to=20 > solve the resizing problem? Or is this not linked? >=20 > Thanks for your time, > Reinhold >=20 > -------------------- > Reinhold F=FCreder > MPhil Student > School of Eng., CS and Maths > University of Exeter, UK > =20 >=20 >=20 >=20 >=20 |