X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/526954c5968baa29218c994ec48e476ae2bd4b9f..384b8d9f3d9e239d5e639e406c4703a9ccbf8ad6:/src/osx/tglbtn_osx.cpp diff --git a/src/osx/tglbtn_osx.cpp b/src/osx/tglbtn_osx.cpp index 9e02808de6..c381cd4eda 100644 --- a/src/osx/tglbtn_osx.cpp +++ b/src/osx/tglbtn_osx.cpp @@ -5,7 +5,7 @@ // Author: Stefan Csomor // Modified by: // Created: 08.02.01 -// RCS-ID: $Id: tglbtn.cpp 54129 2008-06-11 19:30:52Z SC $ +// RCS-ID: $Id$ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -47,14 +47,14 @@ bool wxToggleButton::Create(wxWindow *parent, wxWindowID id, 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::CreateToggleButton( this, parent, id, label, pos, size, style, GetExtraStyle() ) ; + SetPeer(wxWidgetImpl::CreateToggleButton( this, parent, id, label, pos, size, style, GetExtraStyle() )) ; MacPostControlCreate(pos,size) ; @@ -75,12 +75,12 @@ wxSize wxToggleButton::DoGetBestSize() const void wxToggleButton::SetValue(bool val) { - m_peer->SetValue( val ) ; + GetPeer()->SetValue( val ) ; } bool wxToggleButton::GetValue() const { - return m_peer->GetValue() ; + return GetPeer()->GetValue() ; } void wxToggleButton::Command(wxCommandEvent & event) @@ -111,8 +111,8 @@ bool wxBitmapToggleButton::Create(wxWindow *parent, wxWindowID id, const wxValidator& validator, const wxString& name) { - m_macIsUserPane = FALSE ; - + DontCreatePeer(); + m_bitmap = label; m_marginX = @@ -121,7 +121,7 @@ bool wxBitmapToggleButton::Create(wxWindow *parent, wxWindowID id, if ( !wxControl::Create(parent, id, pos, size, style, validator, name) ) return false; - m_peer = wxWidgetImpl::CreateBitmapToggleButton( this, parent, id, label, pos, size, style, GetExtraStyle() ) ; + SetPeer(wxWidgetImpl::CreateBitmapToggleButton( this, parent, id, label, pos, size, style, GetExtraStyle() )); MacPostControlCreate(pos,size) ; @@ -142,12 +142,12 @@ wxSize wxBitmapToggleButton::DoGetBestSize() const void wxBitmapToggleButton::SetValue(bool val) { - m_peer->SetValue( val ) ; + GetPeer()->SetValue( val ) ; } bool wxBitmapToggleButton::GetValue() const { - return m_peer->GetValue() ; + return GetPeer()->GetValue() ; } void wxBitmapToggleButton::Command(wxCommandEvent & event)