+ wxCHECK_MSG( m_widget != NULL, wxNOT_FOUND, wxT("invalid radiobox") );
+
+ int count = 0;
+
+ wxRadioBoxButtonsInfoList::compatibility_iterator node = m_buttonsInfo.GetFirst();
+ while (node)
+ {
+ GtkToggleButton *button = GTK_TOGGLE_BUTTON( node->GetData()->button );
+ if (button->active) return count;
+ count++;
+ node = node->GetNext();
+ }
+
+ wxFAIL_MSG( wxT("wxRadioBox none selected") );
+
+ return wxNOT_FOUND;
+}
+
+wxString wxRadioBox::GetString(unsigned int n) const
+{
+ wxCHECK_MSG( m_widget != NULL, wxEmptyString, wxT("invalid radiobox") );
+
+ wxRadioBoxButtonsInfoList::compatibility_iterator node = m_buttonsInfo.Item( n );
+
+ wxCHECK_MSG( node, wxEmptyString, wxT("radiobox wrong index") );
+
+ GtkLabel *label = GTK_LABEL(GTK_BIN(node->GetData()->button)->child);
+
+ wxString str( wxGTK_CONV_BACK( gtk_label_get_text(label) ) );
+
+ return str;
+}
+
+void wxRadioBox::SetLabel( const wxString& label )
+{
+ wxCHECK_RET( m_widget != NULL, wxT("invalid radiobox") );
+
+ GTKSetLabelForFrame(GTK_FRAME(m_widget), label);
+}
+
+void wxRadioBox::SetString(unsigned int item, const wxString& label)
+{
+ wxCHECK_RET( m_widget != NULL, wxT("invalid radiobox") );
+
+ wxRadioBoxButtonsInfoList::compatibility_iterator node = m_buttonsInfo.Item( item );
+
+ wxCHECK_RET( node, wxT("radiobox wrong index") );
+
+ GtkLabel *g_label = GTK_LABEL(GTK_BIN(node->GetData()->button)->child);
+
+ gtk_label_set_text( g_label, wxGTK_CONV( label ) );
+}
+
+bool wxRadioBox::Enable( bool enable )
+{
+ bool isEnabled = IsEnabled();
+
+ if ( !wxControl::Enable( enable ) )
+ return false;
+
+ wxRadioBoxButtonsInfoList::compatibility_iterator node = m_buttonsInfo.GetFirst();
+ while (node)
+ {
+ GtkButton *button = GTK_BUTTON( node->GetData()->button );
+ GtkLabel *label = GTK_LABEL(GTK_BIN(button)->child);
+
+ gtk_widget_set_sensitive( GTK_WIDGET(button), enable );
+ gtk_widget_set_sensitive( GTK_WIDGET(label), enable );
+ node = node->GetNext();
+ }
+
+ if (!isEnabled && enable)
+ {
+ GTKFixSensitivity();
+ }
+
+ return true;
+}
+
+bool wxRadioBox::Enable(unsigned int item, bool enable)
+{
+ wxCHECK_MSG( m_widget != NULL, false, wxT("invalid radiobox") );
+
+ wxRadioBoxButtonsInfoList::compatibility_iterator node = m_buttonsInfo.Item( item );
+
+ wxCHECK_MSG( node, false, wxT("radiobox wrong index") );
+
+ GtkButton *button = GTK_BUTTON( node->GetData()->button );
+ GtkLabel *label = GTK_LABEL(GTK_BIN(button)->child);
+
+ gtk_widget_set_sensitive( GTK_WIDGET(button), enable );
+ gtk_widget_set_sensitive( GTK_WIDGET(label), enable );
+
+ return true;
+}
+
+bool wxRadioBox::IsItemEnabled(unsigned int item) const