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 void wxToolTip::SetAutoPop( long WXUNUSED(milliseconds
) )
106 void wxToolTip::SetReshow( long WXUNUSED(milliseconds
) )
110 // ---------------------------------------------------------------------------
111 // implementation helpers
112 // ---------------------------------------------------------------------------
114 // create the tooltip ctrl for our parent frame if it doesn't exist yet
115 WXHWND
wxToolTip::GetToolTipCtrl()
120 void wxToolTip::RelayEvent(WXMSG
*msg
)
124 // ----------------------------------------------------------------------------
126 // ----------------------------------------------------------------------------
128 IMPLEMENT_ABSTRACT_CLASS(wxToolTip
, wxObject
)
130 wxToolTip::wxToolTip(const wxString
&tip
)
135 wxToolTip::~wxToolTip()
139 // ----------------------------------------------------------------------------
141 // ----------------------------------------------------------------------------
143 void wxToolTip::Remove()
147 void wxToolTip::Add(WXHWND hWnd
)
151 void wxToolTip::SetWindow(wxWindow
*win
)
155 void wxToolTip::SetTip(const wxString
& tip
)
159 #endif // wxUSE_TOOLTIPS