]>
Commit | Line | Data |
---|---|---|
01fa3fe7 VZ |
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/frame.h" | |
21 | ||
22 | // ---------------------------------------------------------------------------- | |
23 | // wxTipWindow | |
24 | // ---------------------------------------------------------------------------- | |
25 | ||
26 | class WXDLLEXPORT wxTipWindow : public wxFrame | |
27 | { | |
28 | public: | |
29 | wxTipWindow(wxWindow *parent, | |
30 | const wxString& text, | |
31 | wxCoord maxLength = 100); | |
32 | ||
33 | protected: | |
34 | // event handlers | |
35 | void OnPaint(wxPaintEvent& event); | |
36 | void OnMouseClick(wxMouseEvent& event); | |
129caadd JS |
37 | void OnActivate(wxActivateEvent& event); |
38 | void OnKillFocus(wxFocusEvent& event); | |
01fa3fe7 VZ |
39 | |
40 | // calculate the client rect we need to display the text | |
41 | void Adjust(const wxString& text, wxCoord maxLength); | |
42 | ||
43 | private: | |
44 | wxArrayString m_textLines; | |
45 | wxCoord m_heightLine; | |
46 | ||
47 | DECLARE_EVENT_TABLE() | |
48 | }; | |
49 | ||
50 | #endif // _WX_TIPWIN_H_ |