+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 ( m_view->HasCapture() )
+ m_view->ReleaseMouse();
+ #endif
+ Destroy();
+#else
+ wxFrame::Close();
+#endif
+}
+
+// ----------------------------------------------------------------------------
+// wxTipWindowView
+// ----------------------------------------------------------------------------