/////////////////////////////////////////////////////////////////////////////
-// Name: radiobox.cpp
+// Name: src/gtk/radiobox.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "radiobox.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
num_of_cols = num_per_major;
num_of_rows = m_majorDim;
}
-
+
GtkRadioButton *m_radio = (GtkRadioButton*) NULL;
GtkWidget *table = gtk_table_new( num_of_rows, num_of_cols, FALSE );
gtk_table_set_row_spacings( GTK_TABLE(table), 1 );
gtk_widget_show( table );
gtk_container_add( GTK_CONTAINER(m_widget), table );
-
+
wxString label;
GSList *radio_button_group = (GSList *) NULL;
for (int i = 0; i < n; i++)
int right = (i%num_of_cols) + 1;
int top = i/num_of_cols;
int bottom = (i/num_of_cols)+1;
- gtk_table_attach( GTK_TABLE(table), GTK_WIDGET(m_radio), left, right, top, bottom,
- GTK_FILL, GTK_FILL, 1, 1 );
+ gtk_table_attach( GTK_TABLE(table), GTK_WIDGET(m_radio), left, right, top, bottom,
+ GTK_FILL, GTK_FILL, 1, 1 );
}
else
{
int right = (i/num_of_rows) + 1;
int top = i%num_of_rows;
int bottom = (i%num_of_rows)+1;
- gtk_table_attach( GTK_TABLE(table), GTK_WIDGET(m_radio), left, right, top, bottom,
- GTK_FILL, GTK_FILL, 1, 1 );
+ gtk_table_attach( GTK_TABLE(table), GTK_WIDGET(m_radio), left, right, top, bottom,
+ GTK_FILL, GTK_FILL, 1, 1 );
}
ConnectWidget( GTK_WIDGET(m_radio) );
return true;
}
-int wxRadioBox::FindString( const wxString &find ) const
+int wxRadioBox::FindString( const wxString &find, bool bCase ) const
{
wxCHECK_MSG( m_widget != NULL, wxNOT_FOUND, wxT("invalid radiobox") );
#else
wxString str( label->label );
#endif
- if (find == str)
+ if (find.IsSameAs( str, bCase ))
return count;
count++;
return attr;
}
-#if WXWIN_COMPATIBILITY_2_2
-
-int wxRadioBox::Number() const
-{
- return GetCount();
-}
-
-wxString wxRadioBox::GetLabel(int n) const
-{
- return GetString(n);
-}
-
-void wxRadioBox::SetLabel( int item, const wxString& label )
-{
- SetString(item, label);
-}
-
-#endif // WXWIN_COMPATIBILITY_2_2
-
#endif // wxUSE_RADIOBOX
-