X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6aa89a22b8e47000c98bff05c6f545f331f1c353..64ea838d8f4d1853b7d850db93ee565e901d099a:/src/univ/radiobut.cpp diff --git a/src/univ/radiobut.cpp b/src/univ/radiobut.cpp index f0ddaa727a..d047af7f97 100644 --- a/src/univ/radiobut.cpp +++ b/src/univ/radiobut.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: univ/radiobut.cpp +// Name: src/univ/radiobut.cpp // Purpose: wxRadioButton implementation // Author: Vadim Zeitlin // Modified by: @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ - #pragma implementation "univradiobut.h" -#endif - #include "wx/wxprec.h" #ifdef __BORLANDC__ @@ -29,9 +25,10 @@ #if wxUSE_RADIOBTN +#include "wx/radiobut.h" + #ifndef WX_PRECOMP #include "wx/dcclient.h" - #include "wx/radiobut.h" #include "wx/validate.h" #endif @@ -44,8 +41,6 @@ // implementation // ============================================================================ -IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl) - // ---------------------------------------------------------------------------- // wxRadioButton // ---------------------------------------------------------------------------- @@ -60,12 +55,12 @@ bool wxRadioButton::Create(wxWindow *parent, const wxString &name) { if ( !wxCheckBox::Create(parent, id, label, pos, size, style, - wxDefaultValidator, name) ) + validator, name) ) { - return FALSE; + return false; } - return TRUE; + return true; } // ---------------------------------------------------------------------------- @@ -78,7 +73,7 @@ void wxRadioButton::OnCheck() // find the radio button which is the first in the group, i.e. the one // with wxRB_GROUP style const wxWindowList& siblings = GetParent()->GetChildren(); - wxWindowList::Node *nodeStart = siblings.Find(this); + wxWindowList::compatibility_iterator nodeStart = siblings.Find(this); while ( nodeStart ) { // stop if we found a radio button with wxRB_GROUP style or it we @@ -134,7 +129,7 @@ void wxRadioButton::ClearValue() { if ( IsChecked() ) { - SetValue(FALSE); + SetValue(false); } } @@ -153,7 +148,7 @@ void wxRadioButton::SendEvent() wxSize wxRadioButton::GetBitmapSize() const { wxBitmap bmp = GetBitmap(State_Normal, Status_Checked); - return bmp.Ok() ? wxSize(bmp.GetWidth(), bmp.GetHeight()) + return bmp.IsOk() ? wxSize(bmp.GetWidth(), bmp.GetHeight()) : GetRenderer()->GetRadioBitmapSize(); } @@ -180,4 +175,3 @@ void wxRadioButton::DoDraw(wxControlRenderer *renderer) } #endif // wxUSE_RADIOBTN -