X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/01fa3fe74d0fadc5126fc27fb5729f08b10da606..0cc7251efec4fb9f7e9e3f403fe9f3e6585e9497:/include/wx/tipwin.h diff --git a/include/wx/tipwin.h b/include/wx/tipwin.h index feaddc11b6..37591de446 100644 --- a/include/wx/tipwin.h +++ b/include/wx/tipwin.h @@ -25,22 +25,27 @@ class WXDLLEXPORT wxTipWindow : public wxFrame { + friend class wxTipWindowView; public: + // Supply windowPtr for it to null the given address + // when the window has closed. wxTipWindow(wxWindow *parent, const wxString& text, - wxCoord maxLength = 100); + wxCoord maxLength = 100, wxTipWindow** windowPtr = NULL); + ~wxTipWindow(); + + void SetTipWindowPtr(wxTipWindow** windowPtr) { m_windowPtr = windowPtr; } protected: // event handlers - void OnPaint(wxPaintEvent& event); void OnMouseClick(wxMouseEvent& event); - - // calculate the client rect we need to display the text - void Adjust(const wxString& text, wxCoord maxLength); + void OnActivate(wxActivateEvent& event); + void OnKillFocus(wxFocusEvent& event); private: wxArrayString m_textLines; wxCoord m_heightLine; + wxTipWindow** m_windowPtr; DECLARE_EVENT_TABLE() };