/////////////////////////////////////////////////////////////////////////////
-// Name: src/osx/carbon/checkbox.cpp
+// Name: src/osx/checkbox_osx.cpp
// Purpose: wxCheckBox
// Author: Stefan Csomor
// Modified by:
#include "wx/checkbox.h"
#include "wx/osx/private.h"
-IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl)
IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox)
// Single check box item
long style,
const wxValidator& validator,
const wxString& name)
-{
- m_macIsUserPane = false ;
-
+{
+ DontCreatePeer();
+
if ( !wxCheckBoxBase::Create(parent, id, pos, size, style, validator, name) )
return false;
m_labelOrig = m_label = label ;
WXValidateStyle( &style );
- m_peer = wxWidgetImpl::CreateCheckBox( this, parent, id, label, pos, size, style, GetExtraStyle() ) ;
+ SetPeer(wxWidgetImpl::CreateCheckBox( this, parent, id, label, pos, size, style, GetExtraStyle() )) ;
MacPostControlCreate(pos, size) ;
wxCheckBoxState wxCheckBox::DoGet3StateValue() const
{
- return (wxCheckBoxState)m_peer->GetValue() ;
+ return (wxCheckBoxState)GetPeer()->GetValue() ;
}
void wxCheckBox::DoSet3StateValue(wxCheckBoxState val)
{
- m_peer->SetValue( val ) ;
+ GetPeer()->SetValue( val ) ;
}
bool wxCheckBox::OSXHandleClicked( double WXUNUSED(timestampsec) )
bool sendEvent = true;
wxCheckBoxState newState = Get3StateValue();
- if ( !m_peer->ButtonClickDidStateChange() )
+ if ( !GetPeer()->ButtonClickDidStateChange() )
{
wxCheckBoxState origState ;