]> git.saurik.com Git - wxWidgets.git/blame - include/wx/tipwin.h
fixed stupid bug which prevented automatic encoding conversion
[wxWidgets.git] / include / wx / tipwin.h
CommitLineData
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
8962e1d9 20#include "wx/popupwin.h"
01fa3fe7 21
8962e1d9 22#if wxUSE_POPUPWIN
f38bcae5 23
01fa3fe7
VZ
24// ----------------------------------------------------------------------------
25// wxTipWindow
26// ----------------------------------------------------------------------------
27
8962e1d9 28class WXDLLEXPORT wxTipWindow : public wxPopupTransientWindow
01fa3fe7
VZ
29{
30public:
173e8bbf
JS
31 // Supply windowPtr for it to null the given address
32 // when the window has closed.
01fa3fe7
VZ
33 wxTipWindow(wxWindow *parent,
34 const wxString& text,
173e8bbf
JS
35 wxCoord maxLength = 100, wxTipWindow** windowPtr = NULL);
36 ~wxTipWindow();
37
38 void SetTipWindowPtr(wxTipWindow** windowPtr) { m_windowPtr = windowPtr; }
01fa3fe7 39
8962e1d9
RD
40 // calculate the client rect we need to display the text
41 void Adjust(const wxString& text, wxCoord maxLength);
42
43 void Close();
44
01fa3fe7
VZ
45protected:
46 // event handlers
01fa3fe7 47 void OnMouseClick(wxMouseEvent& event);
8962e1d9 48 void OnPaint(wxPaintEvent& event);
01fa3fe7 49
01fa3fe7
VZ
50private:
51 wxArrayString m_textLines;
52 wxCoord m_heightLine;
173e8bbf 53 wxTipWindow** m_windowPtr;
01fa3fe7
VZ
54
55 DECLARE_EVENT_TABLE()
56};
57
8962e1d9 58#endif // wxUSE_POPUPWIN
f38bcae5 59
01fa3fe7 60#endif // _WX_TIPWIN_H_
f38bcae5 61