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