Re: [wxVTK] wxVTK + GTK + EVT_CHAR
Brought to you by:
malat
From: Sander N. <nie...@st...> - 2008-05-26 09:44:38
|
I find it strange that this is needed. In the CVS version for wxVTKRenderWindowInteractor there are registrations for EVT_KEY_DOWN, EVT_KEY_UP, and EVT_CHAR. We should thus be receiving both EVT_KEY_DOWN and EVT_CHAR events from wxWidgets. This should result in invoke events for both vtkCommand::KeyPressEvent and vtkCommand::CharEvent. We even call the event.Skip() in the OnKeyDown handler in order to make sure we also get the EVT_CHAR event (as explained in http://docs.wxwidgets.org/stable/wx_wxkeyevent.html#wxkeyevent) . If the wxVTKRenderWindowInteractor object is not receiving EVT_CHAR events (after a EVT_KEY_DOWN event) then this sounds more like a wxWidgets issue. On 24 mei 2008, at 17:36, Nigel Nunn wrote: > Hello Quoc Cuong and Mathieu, > > On Sat, May 24, 2008 at 3:58 PM, <Quo...@ce...> wrote: > >> I am using wxVTK 1.2 with GTK2 under linux (FC8). >> My wxVTKRenderWindowInteractor is embedded in a wxScrolledWindow >> (child of a frame). I can intercept mouse events but the EVT_CHAR >> is never sent. Has anybody experienced this problem? > > > I'm using wxVTKRenderWindowInteractor 1.36 (WinXP, VC++2005) > > Date: $Date: 2008/04/14 15:12:00 $ > Version: $Revision: 1.36 $ > > > with wx v.2.8.7. I have a single wxVTK window in a wxAUI docking > frame layout. I too found that OnChar() was not getting passed > through to the wxVTKRWI, but that OnKeyDown() was working fine. > > A quick fix for me was to handle the char event in OnKeyDown(). > I invoke a CharEvent after the KeyPressEvent (near line 485): > > InvokeEvent(vtkCommand::KeyPressEvent, NULL); > InvokeEvent(vtkCommand::CharEvent, NULL); // <--- added > > > This fixes the problem for my current case. > > Also noticed an issue with small offset to the vertical "y" pick > position. When I get a moment I'll try to track that down. > > Nigel > > > -- > > > ------------------------------------------------------------------------------------- > Keep up to date with what's happening in Australian sport visit http://www.ausport.gov.au > > This message is intended for the addressee named and may contain > confidential and privileged information. If you are not the intended > recipient please note that any form of distribution, copying or use > of this communication or the information in it is strictly > prohibited and may be unlawful. If you receive this message in > error, please delete it and notify the sender. > ------------------------------------------------------------------------------------- > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Wxvtk-users mailing list > Wxv...@li... > https://lists.sourceforge.net/lists/listinfo/wxvtk-users |