-// ----------------------------------------------------------------------------
-// macros
-// ----------------------------------------------------------------------------
-
-IMPLEMENT_DYNAMIC_CLASS(wxToggleButton, wxControl)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED)
-
-// ============================================================================
-// implementation
-// ============================================================================
-// ----------------------------------------------------------------------------
-// wxToggleButton
-// ----------------------------------------------------------------------------
-
-bool wxToggleButton::Create(wxWindow *parent, wxWindowID id,
- const wxString& label,
- const wxPoint& pos,
- const wxSize& size, long style,
- const wxValidator& validator,
- const wxString& name)
-{
- m_macIsUserPane = FALSE ;
-
- if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
- return false;
-
- m_labelOrig = m_label = label ;
-
- Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
-
- m_peer = new wxMacControl(this) ;
- verify_noerr ( CreateBevelButtonControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , CFSTR("") ,
- kControlBevelButtonNormalBevel , kControlBehaviorToggles , NULL , 0 , 0 , 0 , m_peer->GetControlRefAddr() ) );
-
-
- MacPostControlCreate(pos,size) ;
-
- return TRUE;
-}
-
-wxSize wxToggleButton::DoGetBestSize() const
-{
- int wBtn = 70 ;
- int hBtn = 20 ;
-
- int lBtn = m_label.Length() * 8 + 12 ;
- if (lBtn > wBtn)
- wBtn = lBtn;
-
- return wxSize ( wBtn , hBtn ) ;
-}
-
-void wxToggleButton::SetValue(bool val)
-{
- m_peer->SetValue( val ) ;
-}
-
-bool wxToggleButton::GetValue() const