X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/61fef19b852d426f5b00b60de083539b9ba0f76c..76b0f8384ed211c5f6b48597a62da743b604e666:/src/univ/radiobut.cpp diff --git a/src/univ/radiobut.cpp b/src/univ/radiobut.cpp index eb1d8a6dc8..8c65e6d8b4 100644 --- a/src/univ/radiobut.cpp +++ b/src/univ/radiobut.cpp @@ -1,10 +1,9 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: univ/radiobut.cpp +// Name: src/univ/radiobut.cpp // Purpose: wxRadioButton implementation // Author: Vadim Zeitlin // Modified by: // Created: 10.09.00 -// RCS-ID: $Id$ // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -17,10 +16,6 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ - #pragma implementation "univradiobut.h" -#endif - #include "wx/wxprec.h" #ifdef __BORLANDC__ @@ -29,9 +24,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 +40,6 @@ // implementation // ============================================================================ -IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl) - // ---------------------------------------------------------------------------- // wxRadioButton // ---------------------------------------------------------------------------- @@ -62,10 +56,10 @@ bool wxRadioButton::Create(wxWindow *parent, if ( !wxCheckBox::Create(parent, id, label, pos, size, style, validator, name) ) { - return FALSE; + return false; } - return TRUE; + return true; } // ---------------------------------------------------------------------------- @@ -134,13 +128,13 @@ void wxRadioButton::ClearValue() { if ( IsChecked() ) { - SetValue(FALSE); + SetValue(false); } } void wxRadioButton::SendEvent() { - wxCommandEvent event(wxEVT_COMMAND_RADIOBUTTON_SELECTED, GetId()); + wxCommandEvent event(wxEVT_RADIOBUTTON, GetId()); InitCommandEvent(event); event.SetInt(IsChecked()); Command(event); @@ -153,7 +147,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 +174,3 @@ void wxRadioButton::DoDraw(wxControlRenderer *renderer) } #endif // wxUSE_RADIOBTN -