X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/facd6764872eede45605ba7c9dfa0e1d0c708fa2..121c09cd1ac67c0a95f2d6b8d9bcd57470fab74d:/src/mac/carbon/tooltip.cpp diff --git a/src/mac/carbon/tooltip.cpp b/src/mac/carbon/tooltip.cpp index 934ef3e624..0c16019c47 100644 --- a/src/mac/carbon/tooltip.cpp +++ b/src/mac/carbon/tooltip.cpp @@ -1,17 +1,17 @@ ///////////////////////////////////////////////////////////////////////////// // Name: tooltip.cpp // Purpose: wxToolTip implementation -// Author: Robert Roebling +// Author: Stefan Csomor // Id: $Id$ -// Copyright: (c) 1998 Robert Roebling +// Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "tooltip.h" #endif -#include "wx/defs.h" +#include "wx/wxprec.h" #if wxUSE_TOOLTIPS @@ -227,12 +227,9 @@ void wxMacToolTip::Draw() HMHelpContentRec tag ; tag.version = kMacHelpVersion; SetRect( &tag.absHotRect , m_position.x - 2 , m_position.y - 2 , m_position.x + 2 , m_position.y + 2 ) ; - GrafPtr port ; - GetPort( &port ) ; - SetPortWindowPort(m_window) ; - LocalToGlobal( (Point *) &tag.absHotRect.top ); - LocalToGlobal( (Point *) &tag.absHotRect.bottom ); - SetPort( port ); + + QDLocalToGlobalRect( GetWindowPort( m_window ) , &tag.absHotRect ) ; + m_helpTextRef.Assign( m_label , wxFONTENCODING_DEFAULT ) ; tag.content[kHMMinimumContentIndex].contentType = kHMCFStringContent ; tag.content[kHMMinimumContentIndex].u.tagCFString = m_helpTextRef ;