]>
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 | |
6 | // RCS-ID: $Id: wxhead.cpp,v 1.11 2010-04-22 12:44:51 zeitlin Exp $ | |
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 | ||
60 | void wxRichToolTip::SetTimeout(unsigned milliseconds) | |
61 | { | |
62 | m_impl->SetTimeout(milliseconds); | |
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 | ||
e520c3f7 VZ |
75 | void wxRichToolTip::ShowFor(wxWindow* win) |
76 | { | |
77 | wxCHECK_RET( win, wxS("Must have a valid window") ); | |
78 | ||
79 | m_impl->ShowFor(win); | |
80 | } | |
81 | ||
82 | wxRichToolTip::~wxRichToolTip() | |
83 | { | |
84 | delete m_impl; | |
85 | } | |
86 | ||
87 | #endif // wxUSE_RICHTOOLTIP |