// 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
/////////////////////////////////////////////////////////////////////////////
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) ;
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)
const wxValidator& validator,
const wxString& name)
{
- m_macIsUserPane = FALSE ;
-
+ DontCreatePeer();
+
m_bitmap = label;
m_marginX =
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) ;
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)