further separating implementation

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28199 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2004-07-11 16:19:18 +00:00
parent f18925dfe5
commit 5ca0d8122a
28 changed files with 2604 additions and 1879 deletions

View File

@@ -42,14 +42,14 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
m_peer = new wxMacControl() ;
if ( label.Find('\n' ) == wxNOT_FOUND && label.Find('\r' ) == wxNOT_FOUND)
{
verify_noerr ( CreatePushButtonControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , CFSTR("") , *m_peer ) );
verify_noerr ( CreatePushButtonControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , CFSTR("") , m_peer->GetControlRefAddr() ) );
}
else
{
ControlButtonContentInfo info ;
info.contentType = kControlNoContent ;
verify_noerr(CreateBevelButtonControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds,CFSTR(""),
kControlBevelButtonLargeBevel , kControlBehaviorPushbutton , &info , 0 , 0 , 0 , *m_peer ) );
kControlBevelButtonLargeBevel , kControlBehaviorPushbutton , &info , 0 , 0 , 0 , m_peer->GetControlRefAddr() ) );
}
wxASSERT_MSG( m_peer != NULL && m_peer->Ok() , wxT("No valid mac control") ) ;
@@ -97,8 +97,7 @@ wxSize wxButton::DoGetBestSize() const
}
Rect bestsize = { 0 , 0 , 0 , 0 } ;
short baselineoffset ;
::GetBestControlRect( *m_peer , &bestsize , &baselineoffset ) ;
m_peer->GetBestRect( &bestsize ) ;
int wBtn = 0 ;
if ( EmptyRect( &bestsize ) )
@@ -107,7 +106,7 @@ wxSize wxButton::DoGetBestSize() const
}
else
{
sz.x = bestsize.right - bestsize.left ;
wBtn = bestsize.right - bestsize.left ;
sz.y = bestsize.bottom - bestsize.top ;
}