+static void gtk_radiobutton_clicked_callback( GtkToggleButton *button, wxRadioBox *rb )
+{
+ if (g_isIdle) wxapp_install_idle_handler();
+
+ if (!rb->m_hasVMT) return;
+ if (g_blockEventsOnDrag) return;
+
+ if (!button->active) return;
+
+ wxCommandEvent event( wxEVT_COMMAND_RADIOBOX_SELECTED, rb->GetId() );
+ event.SetInt( rb->GetSelection() );
+ event.SetString( rb->GetStringSelection() );
+ event.SetEventObject( rb );
+ rb->GetEventHandler()->ProcessEvent(event);
+}
+
+//-----------------------------------------------------------------------------
+// "key_press_event"
+//-----------------------------------------------------------------------------
+
+static gint gtk_radiobox_keypress_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxRadioBox *rb )
+{
+ if (g_isIdle)
+ wxapp_install_idle_handler();
+
+ if (!rb->m_hasVMT) return FALSE;
+ if (g_blockEventsOnDrag) return FALSE;
+
+ if ((gdk_event->keyval != GDK_Up) &&
+ (gdk_event->keyval != GDK_Down) &&
+ (gdk_event->keyval != GDK_Left) &&
+ (gdk_event->keyval != GDK_Right))
+ {
+ return FALSE;
+ }
+
+ wxList::compatibility_iterator node = rb->m_boxes.Find( (wxObject*) widget );
+ if (!node)
+ {
+ return FALSE;
+ }
+
+ gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "key_press_event" );
+
+ if ((gdk_event->keyval == GDK_Up) ||
+ (gdk_event->keyval == GDK_Left))
+ {
+ if (node == rb->m_boxes.GetFirst())
+ node = rb->m_boxes.GetLast();
+ else
+ node = node->GetPrevious();
+ }
+ else
+ {
+ if (node == rb->m_boxes.GetLast())
+ node = rb->m_boxes.GetFirst();
+ else
+ node = node->GetNext();
+ }
+
+ GtkWidget *button = (GtkWidget*) node->GetData();
+
+ gtk_widget_grab_focus( button );
+
+ return TRUE;
+}
+
+static gint gtk_radiobutton_focus_in( GtkWidget *widget,
+ GdkEvent *WXUNUSED(event),
+ wxRadioBox *win )