+void wxTipWindow::OnDismiss()
+{
+ Close();
+}
+
+#else // !wxUSE_POPUPWIN
+
+void wxTipWindow::OnActivate(wxActivateEvent& event)
+{
+ if (!event.GetActive())
+ Close();
+}
+
+void wxTipWindow::OnKillFocus(wxFocusEvent& WXUNUSED(event))
+{
+ // Under Windows at least, we will get this immediately
+ // because when the view window is focussed, the
+ // tip window goes out of focus.
+#ifdef __WXGTK__
+ Close();
+#endif
+}
+
+#endif // wxUSE_POPUPWIN // !wxUSE_POPUPWIN
+
+void wxTipWindow::SetBoundingRect(const wxRect& rectBound)
+{
+ m_rectBound = rectBound;
+}
+
+void wxTipWindow::Close()
+{
+ if ( m_windowPtr )
+ {
+ *m_windowPtr = NULL;
+ m_windowPtr = NULL;
+ }
+
+#if wxUSE_POPUPWIN
+ Show(false);
+ #ifdef __WXGTK__
+ if (GTK_WIDGET_HAS_GRAB(m_widget))
+ gtk_grab_remove( m_widget );
+ #endif
+ Destroy();
+#else
+ wxFrame::Close();
+#endif
+}
+
+// ----------------------------------------------------------------------------
+// wxTipWindowView
+// ----------------------------------------------------------------------------