X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/289532452089421ddadbd4726a8469511a19ab76..48e05747043db02c4e9d2e286eca4fdf5dee7881:/src/osx/radiobut_osx.cpp?ds=inline diff --git a/src/osx/radiobut_osx.cpp b/src/osx/radiobut_osx.cpp index 772a2601a6..6c511bc8e0 100644 --- a/src/osx/radiobut_osx.cpp +++ b/src/osx/radiobut_osx.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: radiobut.cpp +// Name: src/osx/radiobut.cpp // Purpose: wxRadioButton // Author: AUTHOR // Modified by: JS Lair (99/11/15) adding the cyclic group notion for radiobox @@ -24,15 +24,15 @@ bool wxRadioButton::Create( wxWindow *parent, long style, const wxValidator& validator, const wxString& name ) -{ - m_macIsUserPane = false; - +{ + DontCreatePeer(); + if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) ) return false; m_labelOrig = m_label = label; - m_peer = wxWidgetImpl::CreateRadioButton( this, parent, id, label, pos, size, style, GetExtraStyle() ); + SetPeer(wxWidgetImpl::CreateRadioButton( this, parent, id, label, pos, size, style, GetExtraStyle() )); MacPostControlCreate( pos, size ); @@ -74,10 +74,10 @@ wxRadioButton::~wxRadioButton() void wxRadioButton::SetValue(bool val) { wxRadioButton *cycle; - if (m_peer->GetValue() == val) + if (GetPeer()->GetValue() == val) return; - m_peer->SetValue( val ); + GetPeer()->SetValue( val ); if (val) { cycle = this->NextInCycle(); @@ -94,7 +94,7 @@ void wxRadioButton::SetValue(bool val) bool wxRadioButton::GetValue() const { - return m_peer->GetValue() != 0; + return GetPeer()->GetValue() != 0; } void wxRadioButton::Command(wxCommandEvent& event) @@ -105,7 +105,7 @@ void wxRadioButton::Command(wxCommandEvent& event) bool wxRadioButton::OSXHandleClicked( double WXUNUSED(timestampsec) ) { - if ( !m_peer->ButtonClickDidStateChange() ) + if ( !GetPeer()->ButtonClickDidStateChange() ) { // if already set -> no action if (GetValue()) @@ -127,7 +127,7 @@ bool wxRadioButton::OSXHandleClicked( double WXUNUSED(timestampsec) ) SetValue( true ); - wxCommandEvent event2( wxEVT_COMMAND_RADIOBUTTON_SELECTED, m_windowId ); + wxCommandEvent event2( wxEVT_RADIOBUTTON, m_windowId ); event2.SetEventObject( this ); event2.SetInt( true ); ProcessCommand( event2 );