]> git.saurik.com Git - wxWidgets.git/blob - src/common/richtooltipcmn.cpp
Return NULL from wxWindow::GetCapture() when the capture is being lost.
[wxWidgets.git] / src / common / richtooltipcmn.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/richtooltipcmn.cpp
3 // Purpose: wxRichToolTip implementation common to all platforms.
4 // Author: Vadim Zeitlin
5 // Created: 2011-10-18
6 // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
9
10 // ============================================================================
11 // declarations
12 // ============================================================================
13
14 // ----------------------------------------------------------------------------
15 // headers
16 // ----------------------------------------------------------------------------
17
18 // for compilers that support precompilation, includes "wx.h".
19 #include "wx/wxprec.h"
20
21 #ifdef __BORLANDC__
22 #pragma hdrstop
23 #endif
24
25 #if wxUSE_RICHTOOLTIP
26
27 #ifndef WX_PRECOMP
28 #include "wx/icon.h"
29 #endif // WX_PRECOMP
30
31 #include "wx/private/richtooltip.h"
32
33 // ============================================================================
34 // implementation
35 // ============================================================================
36
37 wxRichToolTip::wxRichToolTip(const wxString& title,
38 const wxString& message) :
39 m_impl(wxRichToolTipImpl::Create(title, message))
40 {
41 }
42
43 void
44 wxRichToolTip::SetBackgroundColour(const wxColour& col, const wxColour& colEnd)
45 {
46 m_impl->SetBackgroundColour(col, colEnd);
47 }
48
49 void wxRichToolTip::SetIcon(int icon)
50 {
51 m_impl->SetStandardIcon(icon);
52 }
53
54 void wxRichToolTip::SetIcon(const wxIcon& icon)
55 {
56 m_impl->SetCustomIcon(icon);
57 }
58
59 void wxRichToolTip::SetTimeout(unsigned milliseconds,
60 unsigned millisecondsDelay)
61 {
62 m_impl->SetTimeout(milliseconds, millisecondsDelay);
63 }
64
65 void wxRichToolTip::SetTipKind(wxTipKind tipKind)
66 {
67 m_impl->SetTipKind(tipKind);
68 }
69
70 void wxRichToolTip::SetTitleFont(const wxFont& font)
71 {
72 m_impl->SetTitleFont(font);
73 }
74
75 void wxRichToolTip::ShowFor(wxWindow* win, const wxRect* rect)
76 {
77 wxCHECK_RET( win, wxS("Must have a valid window") );
78
79 m_impl->ShowFor(win, rect);
80 }
81
82 wxRichToolTip::~wxRichToolTip()
83 {
84 delete m_impl;
85 }
86
87 #endif // wxUSE_RICHTOOLTIP