+#if !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
+
+
+void wxTipWindow::Close()
+{
+#if wxUSE_POPUPWIN
+ Show(FALSE);
+ Destroy();
+#else
+ wxFrame::Close();
+#endif
+}
+
+// ----------------------------------------------------------------------------
+// wxTipWindowView
+// ----------------------------------------------------------------------------
+
+wxTipWindowView::wxTipWindowView(wxWindow *parent)
+ : wxWindow(parent, -1,
+ wxDefaultPosition, wxDefaultSize,
+ wxNO_BORDER)
+{
+ // set colours
+ SetForegroundColour(*wxBLACK);
+#ifdef __WXMSW__
+ wxColour bkCol(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_INFOBK));
+#else
+ wxColour bkCol(wxColour(255, 255, 225));
+#endif
+ SetBackgroundColour(bkCol);
+ m_creationTime = wxGetLocalTime();
+ m_parent = (wxTipWindow*)parent;