+ if (m_windowPtr)
+ {
+ *m_windowPtr = NULL;
+ }
+}
+
+void wxTipWindow::OnMouseClick(wxMouseEvent& WXUNUSED(event))
+{
+ Close();
+}
+
+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
+}
+
+// ----------------------------------------------------------------------------
+// wxTipWindowView
+// ----------------------------------------------------------------------------
+
+wxTipWindowView::wxTipWindowView(wxWindow *parent)
+ : wxWindow(parent, -1,
+ wxDefaultPosition, wxDefaultSize,
+ wxNO_BORDER)
+{
+ // set colours
+ SetForegroundColour(*wxBLACK);
+#if !defined(__WXPM__)
+ SetBackgroundColour(wxColour(0xc3ffff));
+#else
+ // What is 0xc3ffff, try some legable documentation for those of us who don't memorize hex codes??
+ SetBackgroundColour(wxColour(*wxWHITE));
+#endif
+ m_creationTime = wxGetLocalTime();
+}
+
+void wxTipWindowView::Adjust(const wxString& text, wxCoord maxLength)
+{
+ wxTipWindow* parent = (wxTipWindow*) GetParent();