X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2ce7af354a12de8cf0d80d27f6958c6ccd95f766..cc6f960f4941f4463a7501a2108239442f585d38:/src/mac/carbon/notebmac.cpp?ds=sidebyside diff --git a/src/mac/carbon/notebmac.cpp b/src/mac/carbon/notebmac.cpp index e620bc017b..c95eadadcd 100644 --- a/src/mac/carbon/notebmac.cpp +++ b/src/mac/carbon/notebmac.cpp @@ -175,6 +175,9 @@ bool wxNotebook::Create(wxWindow *parent, long style, const wxString& name) { + if ( !wxNotebookBase::Create(parent, id, pos, size, style, name) ) + return false; + Rect bounds ; Str255 title ; @@ -414,7 +417,7 @@ void wxNotebook::MacSetupTabs() SetControlData( (ControlHandle) m_macControl, ii+1, kControlTabInfoTag, sizeof( ControlTabInfoRec) , (char*) &info ) ; SetTabEnabled( (ControlHandle) m_macControl , ii+1 , true ) ; -#if 0 // TARGET_CARBON +#if TARGET_CARBON if ( GetImageList() && GetPageImage(ii) >= 0 && UMAGetSystemVersion() >= 0x1020 ) { // tab controls only support very specific types of images, therefore we are doing an odyssee @@ -427,15 +430,15 @@ void wxNotebook::MacSetupTabs() wxMacCreateBitmapButton( &info , *GetImageList()->GetBitmap( GetPageImage(ii ) ) , kControlContentPictHandle) ; IconFamilyHandle iconFamily = (IconFamilyHandle) NewHandle(0) ; OSErr err = SetIconFamilyData( iconFamily, 'PICT' , (Handle) info.u.picture ) ; - wxASSERT_MSG( err == noErr , "Error when adding bitmap" ) ; + wxASSERT_MSG( err == noErr , wxT("Error when adding bitmap") ) ; IconRef iconRef ; err = RegisterIconRefFromIconFamily( 'WXNG' , (OSType) 1 , iconFamily, &iconRef ) ; - wxASSERT_MSG( err == noErr , "Error when adding bitmap" ) ; + wxASSERT_MSG( err == noErr , wxT("Error when adding bitmap") ) ; info.contentType = kControlContentIconRef ; info.u.iconRef = iconRef ; SetControlData( (ControlHandle) m_macControl, ii+1,kControlTabImageContentTag, sizeof( info ), (Ptr)&info ); - wxASSERT_MSG( err == noErr , "Error when setting icon on tab" ) ; + wxASSERT_MSG( err == noErr , wxT("Error when setting icon on tab") ) ; UnregisterIconRef( 'WXNG' , (OSType) 1 ) ; ReleaseIconRef( iconRef ) ; DisposeHandle( (Handle) iconFamily ) ; @@ -634,7 +637,7 @@ void wxNotebook::OnMouse( wxMouseEvent &event ) } -void wxNotebook::MacHandleControlClick( WXWidget control , wxInt16 controlpart ) +void wxNotebook::MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool WXUNUSED( mouseStillDown ) ) { #if 0 wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, m_windowId , ::GetControl32BitValue((ControlHandle)m_macControl) - 1, m_nSelection);