+
+ return TRUE;
+ }
+
+#if !wxUSE_NANOX
+ case GraphicsExpose:
+ {
+ wxLogTrace( _T("expose"), _T("GraphicsExpose from %s"), win->GetName().c_str());
+
+ win->GetUpdateRegion().Union( event->xgraphicsexpose.x, event->xgraphicsexpose.y,
+ event->xgraphicsexpose.width, event->xgraphicsexpose.height);
+
+ win->GetClearRegion().Union( event->xgraphicsexpose.x, event->xgraphicsexpose.y,
+ event->xgraphicsexpose.width, event->xgraphicsexpose.height);
+
+ if (event->xgraphicsexpose.count == 0)
+ {
+ // Only erase background, paint in idle time.
+ win->SendEraseEvents();
+ // win->Update();
+ }
+
+ return TRUE;
+ }
+#endif
+
+ case KeyPress:
+ {
+ if (!win->IsEnabled())
+ return FALSE;
+
+ wxKeyEvent keyEvent(wxEVT_KEY_DOWN);
+ wxTranslateKeyEvent(keyEvent, win, window, event);
+
+ // wxLogDebug( "OnKey from %s", win->GetName().c_str() );
+
+ // We didn't process wxEVT_KEY_DOWN, so send wxEVT_CHAR
+ if (win->GetEventHandler()->ProcessEvent( keyEvent ))
+ return TRUE;
+
+ keyEvent.SetEventType(wxEVT_CHAR);
+ // Do the translation again, retaining the ASCII
+ // code.
+ wxTranslateKeyEvent(keyEvent, win, window, event, TRUE);
+ if (win->GetEventHandler()->ProcessEvent( keyEvent ))
+ return TRUE;
+
+ if ( (keyEvent.m_keyCode == WXK_TAB) &&
+ win->GetParent() && (win->GetParent()->HasFlag( wxTAB_TRAVERSAL)) )
+ {
+ wxNavigationKeyEvent new_event;
+ new_event.SetEventObject( win->GetParent() );
+ /* GDK reports GDK_ISO_Left_Tab for SHIFT-TAB */
+ new_event.SetDirection( (keyEvent.m_keyCode == WXK_TAB) );
+ /* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
+ new_event.SetWindowChange( keyEvent.ControlDown() );
+ new_event.SetCurrentFocus( win );
+ return win->GetParent()->GetEventHandler()->ProcessEvent( new_event );
+ }
+
+ return FALSE;