#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)
EVT_SIZE(wxRadioBox::OnSize)
END_EVENT_TABLE()
-wxRadioBox::wxRadioBox(void)
+wxRadioBox::wxRadioBox()
{
}
PreCreation( parent, id, pos, size, style, name );
+#if wxUSE_VALIDATORS
SetValidator( validator );
+#endif
m_widget = gtk_frame_new( title.mbc_str() );
GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this );
gtk_myfixed_put( GTK_MYFIXED(m_parent->m_wxwindow),
- GTK_WIDGET(m_radio),
- m_x+10, m_y+10+(i*24), 10, 10 );
+ GTK_WIDGET(m_radio),
+ m_x+10, m_y+10+(i*24), 10, 10 );
}
wxSize ls = LayoutItems();
if (newSize.y == -1) newSize.y = ls.y;
SetSize( newSize.x, newSize.y );
- m_parent->AddChild( this );
-
- (m_parent->m_insertCallback)( m_parent, this );
+ m_parent->DoAddChild( this );
PostCreation();
return TRUE;
}
-wxRadioBox::~wxRadioBox(void)
+wxRadioBox::~wxRadioBox()
{
wxNode *node = m_boxes.First();
while (node)
void wxRadioBox::OnSize( wxSizeEvent &event )
{
- wxControl::OnSize( event );
-
LayoutItems();
+
+ event.Skip();
}
wxSize wxRadioBox::LayoutItems()
if (len > max_len) max_len = len;
gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), button, m_x+x, m_y+y );
- y += 20;
+ y += 22;
node = node->Next();
if (!node) break;
wxFAIL_MSG(_T("wxRadioBox::SetLabel not implemented."));
}
-void wxRadioBox::Enable( bool enable )
+bool wxRadioBox::Enable( bool enable )
{
- wxControl::Enable( enable );
+ if ( !wxControl::Enable( enable ) )
+ return FALSE;
wxNode *node = m_boxes.First();
while (node)
gtk_widget_set_sensitive( label, enable );
node = node->Next();
}
+
+ return TRUE;
}
void wxRadioBox::Enable( int item, bool enable )
return FALSE;
}
+
+#endif