// headers
// ----------------------------------------------------------------------------
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "radiobut.h"
#endif
// wxRadioButton creation
// ----------------------------------------------------------------------------
+
+#if wxUSE_EXTENDED_RTTI
+IMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioButton, wxControl,"wx/radiobut.h")
+
+WX_BEGIN_PROPERTIES_TABLE(wxRadioButton)
+ WX_DELEGATE( OnClick , wxEVT_COMMAND_RADIOBUTTON_SELECTED , wxCommandEvent )
+ WX_PROPERTY( Font , wxFont , SetFont , GetFont , , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
+ WX_PROPERTY( Label,wxString, SetLabel, GetLabel, wxEmptyString, 0 /*flags*/ , wxT("Helpstring") , wxT("group") )
+ WX_PROPERTY( Value ,bool, SetValue, GetValue,, 0 /*flags*/ , wxT("Helpstring") , wxT("group") )
+WX_END_PROPERTIES_TABLE()
+
+WX_BEGIN_HANDLERS_TABLE(wxRadioButton)
+WX_END_HANDLERS_TABLE()
+
+WX_CONSTRUCTOR_6( wxRadioButton , wxWindow* , Parent , wxWindowID , Id , wxString , Label , wxPoint , Position , wxSize , Size , long , WindowStyle )
+
+#else
IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)
+#endif
+
void wxRadioButton::Init()
{
if ( value )
{
const wxWindowList& siblings = GetParent()->GetChildren();
- wxWindowList::Node *nodeThis = siblings.Find(this);
+ wxWindowList::compatibility_iterator nodeThis = siblings.Find(this);
wxCHECK_RET( nodeThis, _T("radio button not a child of its parent?") );
// if it's not the first item of the group ...
if ( !HasFlag(wxRB_GROUP) )
{
// ... turn off all radio buttons before it
- for ( wxWindowList::Node *nodeBefore = nodeThis->GetPrevious();
+ for ( wxWindowList::compatibility_iterator nodeBefore = nodeThis->GetPrevious();
nodeBefore;
nodeBefore = nodeBefore->GetPrevious() )
{
}
// ... and also turn off all buttons after this one
- for ( wxWindowList::Node *nodeAfter = nodeThis->GetNext();
+ for ( wxWindowList::compatibility_iterator nodeAfter = nodeThis->GetNext();
nodeAfter;
nodeAfter = nodeAfter->GetNext() )
{