]> git.saurik.com Git - wxWidgets.git/blob - include/wx/tipwin.h
fixed compilation warning about signed/unsigned comparison
[wxWidgets.git] / include / wx / tipwin.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/tipwin.h
3 // Purpose: wxTipWindow is a window like the one typically used for
4 // showing the tooltips
5 // Author: Vadim Zeitlin
6 // Modified by:
7 // Created: 10.09.00
8 // RCS-ID: $Id$
9 // Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
10 // Licence: wxWindows license
11 ///////////////////////////////////////////////////////////////////////////////
12
13 #ifndef _WX_TIPWIN_H_
14 #define _WX_TIPWIN_H_
15
16 #ifdef __GNUG__
17 #pragma interface "tipwin.h"
18 #endif
19
20 #include "wx/popupwin.h"
21
22 #if wxUSE_POPUPWIN
23
24 // ----------------------------------------------------------------------------
25 // wxTipWindow
26 // ----------------------------------------------------------------------------
27
28 class WXDLLEXPORT wxTipWindow : public wxPopupTransientWindow
29 {
30 public:
31 // Supply windowPtr for it to null the given address
32 // when the window has closed.
33 wxTipWindow(wxWindow *parent,
34 const wxString& text,
35 wxCoord maxLength = 100, wxTipWindow** windowPtr = NULL);
36 ~wxTipWindow();
37
38 void SetTipWindowPtr(wxTipWindow** windowPtr) { m_windowPtr = windowPtr; }
39
40 // calculate the client rect we need to display the text
41 void Adjust(const wxString& text, wxCoord maxLength);
42
43 void Close();
44
45 protected:
46 // event handlers
47 void OnMouseClick(wxMouseEvent& event);
48 void OnPaint(wxPaintEvent& event);
49
50 private:
51 wxArrayString m_textLines;
52 wxCoord m_heightLine;
53 wxTipWindow** m_windowPtr;
54
55 DECLARE_EVENT_TABLE()
56 };
57
58 #endif // wxUSE_POPUPWIN
59
60 #endif // _WX_TIPWIN_H_
61