- 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
-{
- return m_peer->GetValue() ;
-}
-
-void wxToggleButton::Command(wxCommandEvent & event)
-{
- SetValue((event.GetInt() != 0));
- ProcessCommand(event);
-}
-
-wxInt32 wxToggleButton::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTREF WXUNUSED(event) )
-{
- wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, m_windowId);
- event.SetInt(GetValue());
- event.SetEventObject(this);
- ProcessCommand(event);
- return noErr ;
+ kControlBevelButtonNormalBevel , kControlBehaviorToggles , NULL , 0 , 0 , 0 , peer->GetControlRefAddr() ) );
+ return peer;