]> git.saurik.com Git - wxWidgets.git/blob - include/wx/tipwin.h
use "..." instead of <...> for wx headers
[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 #if wxUSE_TIPWINDOW
21
22 #if wxUSE_POPUPWIN
23 #include "wx/popupwin.h"
24 #else
25 #include "wx/frame.h"
26 #endif
27
28 // ----------------------------------------------------------------------------
29 // wxTipWindow
30 // ----------------------------------------------------------------------------
31
32 #if wxUSE_POPUPWIN
33 class WXDLLEXPORT wxTipWindow : public wxPopupTransientWindow
34 #else
35 class WXDLLEXPORT wxTipWindow : public wxFrame
36 #endif
37 {
38 friend class wxTipWindowView;
39 public:
40 // Supply windowPtr for it to null the given address
41 // when the window has closed.
42 wxTipWindow(wxWindow *parent,
43 const wxString& text,
44 wxCoord maxLength = 100, wxTipWindow** windowPtr = NULL);
45 ~wxTipWindow();
46
47 void SetTipWindowPtr(wxTipWindow** windowPtr) { m_windowPtr = windowPtr; }
48
49 void Close();
50
51 protected:
52 // event handlers
53 void OnMouseClick(wxMouseEvent& event);
54 #if !wxUSE_POPUPWIN
55 void OnActivate(wxActivateEvent& event);
56 void OnKillFocus(wxFocusEvent& event);
57 #endif
58
59 private:
60 wxArrayString m_textLines;
61 wxCoord m_heightLine;
62 wxTipWindow** m_windowPtr;
63
64 DECLARE_EVENT_TABLE()
65 };
66
67 #endif // wxUSE_TIPWINDOW
68 #endif // _WX_TIPWIN_H_