1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/tooltip.cpp
3 // Purpose: wxToolTip class implementation for Palm OS
4 // Author: William Osborne - minimal working wxPalmOS port
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 #include "wx/wxprec.h"
32 #include "wx/tooltip.h"
33 #include "wx/palmos/private.h"
35 #include "wx/palmos/wrapcctl.h"
37 // VZ: normally, the trick with subclassing the tooltip control and processing
38 // TTM_WINDOWFROMPOINT should work but, somehow, it doesn't. I leave the
39 // code here for now (but it's not compiled) in case we need it later.
41 // For now I use an ugly workaround and process TTN_NEEDTEXT directly in
42 // radio button wnd proc - fixing TTM_WINDOWFROMPOINT code would be nice
43 // because it would then work for all controls, not only radioboxes but for
44 // now I don't understand what's wrong with it...
45 #define wxUSE_TTM_WINDOWFROMPOINT 0
47 // ----------------------------------------------------------------------------
49 // ----------------------------------------------------------------------------
51 // the tooltip parent window
52 WXHWND
wxToolTip::ms_hwndTT
= (WXHWND
)NULL
;
54 #if wxUSE_TTM_WINDOWFROMPOINT
56 // the tooltip window proc
57 static WNDPROC gs_wndprocToolTip
= (WNDPROC
)NULL
;
59 #endif // wxUSE_TTM_WINDOWFROMPOINT
61 // ----------------------------------------------------------------------------
63 // ----------------------------------------------------------------------------
65 // ----------------------------------------------------------------------------
67 // ----------------------------------------------------------------------------
69 // send a message to the tooltip control
70 inline LRESULT
SendTooltipMessage(WXHWND hwnd
,
78 // send a message to all existing tooltip controls
79 static void SendTooltipMessageToAll(WXHWND hwnd
,
86 // ============================================================================
88 // ============================================================================
90 // ----------------------------------------------------------------------------
92 // ----------------------------------------------------------------------------
94 void wxToolTip::Enable(bool flag
)
98 void wxToolTip::SetDelay(long milliseconds
)
102 // ---------------------------------------------------------------------------
103 // implementation helpers
104 // ---------------------------------------------------------------------------
106 // create the tooltip ctrl for our parent frame if it doesn't exist yet
107 WXHWND
wxToolTip::GetToolTipCtrl()
112 void wxToolTip::RelayEvent(WXMSG
*msg
)
116 // ----------------------------------------------------------------------------
118 // ----------------------------------------------------------------------------
120 IMPLEMENT_ABSTRACT_CLASS(wxToolTip
, wxObject
)
122 wxToolTip::wxToolTip(const wxString
&tip
)
127 wxToolTip::~wxToolTip()
131 // ----------------------------------------------------------------------------
133 // ----------------------------------------------------------------------------
135 void wxToolTip::Remove()
139 void wxToolTip::Add(WXHWND hWnd
)
143 void wxToolTip::SetWindow(wxWindow
*win
)
147 void wxToolTip::SetTip(const wxString
& tip
)
151 #endif // wxUSE_TOOLTIPS