]>
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 | |
3c3b6f60 | 6 | // RCS-ID: $Id$ |
e520c3f7 VZ |
7 | // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> |
8 | // Licence: wxWindows licence | |
9 | /////////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | // ============================================================================ | |
12 | // declarations | |
13 | // ============================================================================ | |
14 | ||
15 | // ---------------------------------------------------------------------------- | |
16 | // headers | |
17 | // ---------------------------------------------------------------------------- | |
18 | ||
19 | // for compilers that support precompilation, includes "wx.h". | |
20 | #include "wx/wxprec.h" | |
21 | ||
22 | #ifdef __BORLANDC__ | |
23 | #pragma hdrstop | |
24 | #endif | |
25 | ||
26 | #if wxUSE_RICHTOOLTIP | |
27 | ||
28 | #ifndef WX_PRECOMP | |
29 | #include "wx/icon.h" | |
30 | #endif // WX_PRECOMP | |
31 | ||
32 | #include "wx/private/richtooltip.h" | |
33 | ||
34 | // ============================================================================ | |
35 | // implementation | |
36 | // ============================================================================ | |
37 | ||
38 | wxRichToolTip::wxRichToolTip(const wxString& title, | |
39 | const wxString& message) : | |
40 | m_impl(wxRichToolTipImpl::Create(title, message)) | |
41 | { | |
42 | } | |
43 | ||
44 | void | |
45 | wxRichToolTip::SetBackgroundColour(const wxColour& col, const wxColour& colEnd) | |
46 | { | |
47 | m_impl->SetBackgroundColour(col, colEnd); | |
48 | } | |
49 | ||
50 | void wxRichToolTip::SetIcon(int icon) | |
51 | { | |
52 | m_impl->SetStandardIcon(icon); | |
53 | } | |
54 | ||
55 | void wxRichToolTip::SetIcon(const wxIcon& icon) | |
56 | { | |
57 | m_impl->SetCustomIcon(icon); | |
58 | } | |
59 | ||
3c3b6f60 VZ |
60 | void wxRichToolTip::SetTimeout(unsigned milliseconds, |
61 | unsigned millisecondsDelay) | |
e520c3f7 | 62 | { |
3c3b6f60 | 63 | m_impl->SetTimeout(milliseconds, millisecondsDelay); |
e520c3f7 VZ |
64 | } |
65 | ||
66 | void wxRichToolTip::SetTipKind(wxTipKind tipKind) | |
67 | { | |
68 | m_impl->SetTipKind(tipKind); | |
69 | } | |
70 | ||
9c58d1d3 RD |
71 | void wxRichToolTip::SetTitleFont(const wxFont& font) |
72 | { | |
73 | m_impl->SetTitleFont(font); | |
74 | } | |
75 | ||
e520c3f7 VZ |
76 | void wxRichToolTip::ShowFor(wxWindow* win) |
77 | { | |
78 | wxCHECK_RET( win, wxS("Must have a valid window") ); | |
79 | ||
80 | m_impl->ShowFor(win); | |
81 | } | |
82 | ||
83 | wxRichToolTip::~wxRichToolTip() | |
84 | { | |
85 | delete m_impl; | |
86 | } | |
87 | ||
88 | #endif // wxUSE_RICHTOOLTIP |