]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/private/richtooltip.h
Traditional Chinese translations update from Wei-Lun Chao.
[wxWidgets.git] / include / wx / generic / private / richtooltip.h
CommitLineData
e520c3f7
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/generic/private/richtooltip.h
3// Purpose: wxRichToolTipGenericImpl declaration.
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#ifndef _WX_GENERIC_PRIVATE_RICHTOOLTIP_H_
fce37f88 12#define _WX_GENERIC_PRIVATE_RICHTOOLTIP_H_
e520c3f7 13
26d863e2
VZ
14#include "wx/icon.h"
15#include "wx/colour.h"
16
e520c3f7
VZ
17// ----------------------------------------------------------------------------
18// wxRichToolTipGenericImpl: defines generic wxRichToolTip implementation.
19// ----------------------------------------------------------------------------
20
21class wxRichToolTipGenericImpl : public wxRichToolTipImpl
22{
23public:
24 wxRichToolTipGenericImpl(const wxString& title, const wxString& message) :
25 m_title(title),
26 m_message(message)
27 {
28 m_tipKind = wxTipKind_Auto;
29
30 // This is pretty arbitrary, we could follow MSW and use some multiple
31 // of double-click time here.
32 m_timeout = 5000;
3c3b6f60 33 m_delay = 0;
e520c3f7
VZ
34 }
35
36 virtual void SetBackgroundColour(const wxColour& col,
37 const wxColour& colEnd);
38 virtual void SetCustomIcon(const wxIcon& icon);
39 virtual void SetStandardIcon(int icon);
3c3b6f60
VZ
40 virtual void SetTimeout(unsigned milliseconds,
41 unsigned millisecondsDelay = 0);
e520c3f7
VZ
42 virtual void SetTipKind(wxTipKind tipKind);
43 virtual void SetTitleFont(const wxFont& font);
44
d3feb55c 45 virtual void ShowFor(wxWindow* win, wxRect* rect = NULL);
e520c3f7
VZ
46
47protected:
48 wxString m_title,
49 m_message;
50
51private:
52 wxIcon m_icon;
53
54 wxColour m_colStart,
55 m_colEnd;
56
3c3b6f60
VZ
57 unsigned m_timeout,
58 m_delay;
e520c3f7
VZ
59
60 wxTipKind m_tipKind;
61
62 wxFont m_titleFont;
63};
64
65#endif // _WX_GENERIC_PRIVATE_RICHTOOLTIP_H_