]>
Commit | Line | Data |
---|---|---|
e520c3f7 VZ |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: src/common/richtooltipcmn.cpp | |
3 | // Purpose: wxRichToolTip implementation common to all platforms. | |
4 | // Author: Vadim Zeitlin | |
5 | // Created: 2011-10-18 | |
e520c3f7 VZ |
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 | ||
3c3b6f60 VZ |
59 | void wxRichToolTip::SetTimeout(unsigned milliseconds, |
60 | unsigned millisecondsDelay) | |
e520c3f7 | 61 | { |
3c3b6f60 | 62 | m_impl->SetTimeout(milliseconds, millisecondsDelay); |
e520c3f7 VZ |
63 | } |
64 | ||
65 | void wxRichToolTip::SetTipKind(wxTipKind tipKind) | |
66 | { | |
67 | m_impl->SetTipKind(tipKind); | |
68 | } | |
69 | ||
9c58d1d3 RD |
70 | void wxRichToolTip::SetTitleFont(const wxFont& font) |
71 | { | |
72 | m_impl->SetTitleFont(font); | |
73 | } | |
74 | ||
f6268c15 | 75 | void wxRichToolTip::ShowFor(wxWindow* win, const wxRect* rect) |
e520c3f7 VZ |
76 | { |
77 | wxCHECK_RET( win, wxS("Must have a valid window") ); | |
78 | ||
d3feb55c | 79 | m_impl->ShowFor(win, rect); |
e520c3f7 VZ |
80 | } |
81 | ||
82 | wxRichToolTip::~wxRichToolTip() | |
83 | { | |
84 | delete m_impl; | |
85 | } | |
86 | ||
87 | #endif // wxUSE_RICHTOOLTIP |