void SetScrollThumb( wxInt32 value, wxInt32 thumbSize );
void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true );
+ void SetToolTip( wxToolTip* tooltip );
void InstallEventHandler( WXWidget control = NULL );
virtual void SetScrollThumb( wxInt32 value, wxInt32 thumbSize ) = 0;
virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true ) = 0;
+
+ virtual void SetToolTip(wxToolTip* WXUNUSED(tooltip)) { }
// is the clicked event sent AFTER the state already changed, so no additional
// state changing logic is required from the outside
void wxToolTip::SetTip( const wxString &tip )
{
m_text = tip;
+ if (m_window)
+ m_window->SetToolTip(this);
}
void wxToolTip::SetWindow( wxWindow *win )
#include "wx/dnd.h"
#endif
+#if wxUSE_TOOLTIPS
+ #include "wx/tooltip.h"
+#endif
+
#include <objc/objc-runtime.h>
// Get the window with the focus
[m_osxView setFont: font.OSXGetNSFont()];
}
+void wxWidgetCocoaImpl::SetToolTip(wxToolTip* tooltip)
+{
+ if (tooltip)
+ {
+ wxCFStringRef cf( tooltip->GetTip() , m_wxPeer->GetFont().GetEncoding() );
+ [m_osxView setToolTip: cf.AsNSString()];
+ }
+ else
+ [m_osxView setToolTip: nil];
+
+}
+
void wxWidgetCocoaImpl::InstallEventHandler( WXWidget control )
{
WXWidget c = control ? control : (WXWidget) m_osxView;
if ( m_tooltip )
m_tooltip->SetWindow(this);
+
+ if (m_peer)
+ m_peer->SetToolTip(tooltip);
}
#endif