#endif
#include "wx/radiobox.h"
+
+#if wxUSE_RADIOBOX
+
#include "wx/dialog.h"
#include "wx/frame.h"
{
if (g_isIdle) wxapp_install_idle_handler();
- if (!rb->HasVMT()) return;
+ if (!rb->m_hasVMT) return;
if (g_blockEventsOnDrag) return;
if (rb->m_alreadySent)
PreCreation( parent, id, pos, size, style, name );
+#if wxUSE_VALIDATORS
SetValidator( validator );
+#endif
m_widget = gtk_frame_new( title.mbc_str() );
gtk_signal_connect( GTK_OBJECT(m_radio), "clicked",
GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this );
- gtk_myfixed_put( GTK_MYFIXED(m_parent->GetWxWindow()),
- GTK_WIDGET(m_radio),
+ gtk_myfixed_put( GTK_MYFIXED(m_parent->m_wxwindow),
+ GTK_WIDGET(m_radio),
m_x+10, m_y+10+(i*24), 10, 10 );
}
int x = 7;
int y = 15;
+ if ( m_majorDim == 0 )
+ {
+ // avoid dividing by 0 below
+ wxFAIL_MSG( "dimension of radiobox should not be 0!" );
+
+ m_majorDim = 1;
+ }
+
int num_per_major = (m_boxes.GetCount() - 1) / m_majorDim +1;
wxSize res( 0, 0 );
int len = 22+gdk_string_measure( font, label->label );
if (len > max_len) max_len = len;
- gtk_myfixed_move( GTK_MYFIXED(m_parent->GetWxWindow()), button, m_x+x, m_y+y );
- y += 20;
+ gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), button, m_x+x, m_y+y );
+ y += 22;
node = node->Next();
if (!node) break;
{
GtkWidget *button = GTK_WIDGET( node->Data() );
- gtk_myfixed_resize( GTK_MYFIXED(m_parent->GetWxWindow()), button, max_len, 20 );
+ gtk_myfixed_resize( GTK_MYFIXED(m_parent->m_wxwindow), button, max_len, 20 );
node = node->Next();
if (!node) break;
{
GtkWidget *button = GTK_WIDGET( node->Data() );
- gtk_myfixed_set_size( GTK_MYFIXED(m_parent->GetWxWindow()), button, m_x+x, m_y+y, max, 20 );
+ gtk_myfixed_set_size( GTK_MYFIXED(m_parent->m_wxwindow), button, m_x+x, m_y+y, max, 20 );
x += max;
node = node->Next();
if ((m_windowStyle & wxNO_BORDER) != 0)
gtk_widget_hide( m_widget );
-
+
wxNode *node = m_boxes.First();
while (node)
{
return FALSE;
}
+
+#endif