]> git.saurik.com Git - wxWidgets.git/blame - src/common/richtooltipcmn.cpp
Use wxWindowID in wxNewId() and related functions.
[wxWidgets.git] / src / common / richtooltipcmn.cpp
CommitLineData
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
38wxRichToolTip::wxRichToolTip(const wxString& title,
39 const wxString& message) :
40 m_impl(wxRichToolTipImpl::Create(title, message))
41{
42}
43
44void
45wxRichToolTip::SetBackgroundColour(const wxColour& col, const wxColour& colEnd)
46{
47 m_impl->SetBackgroundColour(col, colEnd);
48}
49
50void wxRichToolTip::SetIcon(int icon)
51{
52 m_impl->SetStandardIcon(icon);
53}
54
55void wxRichToolTip::SetIcon(const wxIcon& icon)
56{
57 m_impl->SetCustomIcon(icon);
58}
59
3c3b6f60
VZ
60void wxRichToolTip::SetTimeout(unsigned milliseconds,
61 unsigned millisecondsDelay)
e520c3f7 62{
3c3b6f60 63 m_impl->SetTimeout(milliseconds, millisecondsDelay);
e520c3f7
VZ
64}
65
66void wxRichToolTip::SetTipKind(wxTipKind tipKind)
67{
68 m_impl->SetTipKind(tipKind);
69}
70
9c58d1d3
RD
71void wxRichToolTip::SetTitleFont(const wxFont& font)
72{
73 m_impl->SetTitleFont(font);
74}
75
f6268c15 76void wxRichToolTip::ShowFor(wxWindow* win, const wxRect* rect)
e520c3f7
VZ
77{
78 wxCHECK_RET( win, wxS("Must have a valid window") );
79
d3feb55c 80 m_impl->ShowFor(win, rect);
e520c3f7
VZ
81}
82
83wxRichToolTip::~wxRichToolTip()
84{
85 delete m_impl;
86}
87
88#endif // wxUSE_RICHTOOLTIP