X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8138cfecaf49177e938aef0fb5e1ebf9e7f2d034..2ddb4d13585d5235556119fb1937273da9e433a3:/src/mac/carbon/toolbar.cpp diff --git a/src/mac/carbon/toolbar.cpp b/src/mac/carbon/toolbar.cpp index 500226f1ad..b7c55f0812 100644 --- a/src/mac/carbon/toolbar.cpp +++ b/src/mac/carbon/toolbar.cpp @@ -9,10 +9,6 @@ // Licence: The wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "toolbar.h" -#endif - #include "wx/wxprec.h" #if wxUSE_TOOLBAR @@ -597,8 +593,9 @@ bool wxToolBar::Show( bool show ) MacTopLevelHasNativeToolbar( &ownToolbarInstalled ); if (ownToolbarInstalled) { - bResult = (HIViewIsVisible( (HIViewRef)m_macHIToolbarRef ) != show); - ShowHideWindowToolbar( tlw, show, false ); + bResult = ( IsWindowToolbarVisible(tlw) != show); + if ( bResult ) + ShowHideWindowToolbar( tlw, show, false ); } else #endif @@ -616,7 +613,10 @@ bool wxToolBar::IsShown() const bool ownToolbarInstalled ; MacTopLevelHasNativeToolbar( &ownToolbarInstalled ); if (ownToolbarInstalled) - bResult = HIViewIsVisible( (HIViewRef)m_macHIToolbarRef ); + { + WindowRef tlw = MAC_WXHWND(MacGetTopLevelWindowRef()); + bResult = IsWindowToolbarVisible(tlw) ; + } else #endif bResult = wxToolBarBase::IsShown(); @@ -645,6 +645,13 @@ void wxToolBar::DoGetSize( int *width, int *height ) const wxToolBarBase::DoGetSize( width, height ); } +wxSize wxToolBar::DoGetBestSize() const +{ + int width , height ; + DoGetSize( &width , &height ) ; + return wxSize( width , height ) ; +} + void wxToolBar::SetWindowStyleFlag( long style ) { wxToolBarBase::SetWindowStyleFlag( style );